Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

How do i handle classes in game development?

$
0
0

Hi, i am learning SDL (C++), it is going pretty well but i have a problem. i have no idea how to structure my classes and how not to make a complete fucking mess of my code.

i can make some cool small projects if i just have my main file and then i have for example a player class and a enemy class. and then in the main file just do

player.handleLogic()

enemy.handleLogic()

player.draw()

enemy.draw()

and then that for all my objects... so that isn't working.

my question is how do i handle my …


Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>