SaydAziz / ApocalypseTrain

A 4 player Co-Op Survival Top Down Shooter
1 stars 0 forks source link

[PROGRAMMING] Pfe Add Interactable and Carryable Actors #29

Closed chopov1 closed 5 months ago

chopov1 commented 5 months ago

TODO: Port interaction from old game, and make sure replication works on it.

Solution: Split up single interactable class into multiple to keep classes open for extension and adhere to the SRP, InteractableActor and CarryableActor.

Extra: Added outlines and post process to scene to test interaction feedback. Moved ActivePlayers list in GameState to cpp so we have access to it in cpp. Have run into some issues with the variable type getting changed in the BP on compile, maybe we move that whole method to cpp in the future, seems like an editor bug.

Notes: Performance Tested 1000 fuel items in the scene with Angel, no lag so current interaction method seems fine performance wise, was not worth rewriting. If optimizations need to happen later we change but I figure I'd rather not take the risk if its not a problem currently in case it breaks other systems. Tried to keep protected and public variables consistent, as well as placement of properties and methods within the header files, let me know if there's any improvements that could be made, or if you know of a standard we should adhere by. Left in some commented lines of code that give hooks into where we would handle how carrying an item interacts with weapons, as well as where a carried item would need to flash and pulse when we reach that point.