• Advertisement
Sign in to follow this  

Gameplay code architecture

This topic is 474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey guys,

 

i ve playing around with unity for almost a year now (not everyday) and i ve come to a point that i need to structure my code in a way that has been done professionally. the internet is just a garbage of information. everything i found was how to show health bar (ofcourse everything in 1 file and with one variable like float hp = 100). how is it done professionally ? buff / debuff ? damage on time ? 

 

another problem that occurs is, i dont know which concept i need to apply to what or when. e.g. state machine, sounds good but how to actually implement it is a big problem. event system ? perfect, but how ? 

 

i want to structure my system professionally or better said scalable, maintainable and easy to change code. in other words, design patterns. i need examples of these patterns. can anyone point me out to an example or tutorial or book ?

 

 

Share this post


Link to post
Share on other sites
Advertisement

hey guys,

 

i ve playing around with unity for almost a year now (not everyday) and i ve come to a point that i need to structure my code in a way that has been done professionally. the internet is just a garbage of information. everything i found was how to show health bar (ofcourse everything in 1 file and with one variable like float hp = 100). how is it done professionally ? buff / debuff ? damage on time ? 

 

another problem that occurs is, i dont know which concept i need to apply to what or when. e.g. state machine, sounds good but how to actually implement it is a big problem. event system ? perfect, but how ? 

 

i want to structure my system professionally or better said scalable, maintainable and easy to change code. in other words, design patterns. i need examples of these patterns. can anyone point me out to an example or tutorial or book ?

 

Design patterns are not your solution.

These are not magic plasters to all architecture problems.

 

A good book I can recommend on this subject is Code Complete 2.

It focuses on code in various subjects "professionaly".

 

Keep learning and use Google.

Part of being a developer and espacially a "professional" one, is learning by yourself. 

Focus on specific issues when trying to discuess issues or else you get ton of generic answers with "read X,Y,Z".

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement