Sign in to follow this  

Gameplay code architecture

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this