Advertisement

Architecture of code in a game

Started by May 10, 2018 07:01 PM
2 comments, last by Luhan M. 6 years, 6 months ago

I've completed 3 games till now (Pong, Snake, Breakout), and in the end of each one of them I ask myself, how could I improve the way I architecture my code. After searching for 2 days, I've found out about the ECS and data oriented design (I'm not so sure, but seems like these two do walk holding hands). The thing is that they seem like a very efficient way to organize the code for optimization, as well for being able to modify a entity without too much trouble, but I'm not so sure if it's worth the trouble in a very small game in which you probably won't need optimization.

The question is: worth it now to have such mindset in my game, or should I "create" my own way to architecture the code as I learn?

 

Those techniques are probably not worth it for a small game, but a small game could be a good test bed to get familiar with the techniques, so you can then use them in larger games. I would recommend re-implementing Snake in several different ways, to see what works and what doesn't. You will then be better prepared to make design decisions in more sophisticated projects.

 

Advertisement
9 minutes ago, alvaro said:

Those techniques are probably not worth it for a small game, but a small game could be a good test bed to get familiar with the techniques, so you can then use them in larger games. I would recommend re-implementing Snake in several different ways, to see what works and what doesn't. You will then be better prepared to make design decisions in more sophisticated projects.

 

This makes sense, I'll do it. Thank you.

This topic is closed to new replies.

Advertisement