Decent tutorials about game structure, not code?

Started by
1 comment, last by signal_ 13 years, 6 months ago
Hey there folks. I've been coding in Python for about 6 months, doing stuff such as Sphere and Euler and building basic games like Tetris using a library called pygame. I'm starting to work on more advanced code, but I'm confused about exactly where to start.
For example, for monsters on a map, I use a list (array) containing multiple instances of a Monster class. Each frame of my game loop, I iterate through each to run update and draw functions. However, I have no idea if this is the way I should be doing it, as it seems quite slow, especially with pygame.

So, essentially what I'm looking for are tutorials that teach about the best ways to structure complex games, as opposed to tutorials that teach the code used in an example game, which is all I can seem to find. Can anyone help me out?
Advertisement
Bumpity
I can just say how I got better at game structuring: keep making more games! I try to keep everything modular and try to learn new things everyday (this includes reading little snippets of insight from posters on these boards).

I think it may be tough to find a tutorial for this type of thing. I think a lot of it comes from experience, building incrementally more complex games.
Quote:Original post by MelonTime
For example, for monsters on a map, I use a list (array) containing multiple instances of a Monster class. Each frame of my game loop, I iterate through each to run update and draw functions. However, I have no idea if this is the way I should be doing it, as it seems quite slow, especially with pygame.

You may have inefficiencies in your update function; however, if you have a 'lot' of monsters you may be having problems if say you're doing inefficient O(n2) algorithms (eg for collision detection). Or maybe you have lots of draw calls; Pygame, as far as I know, uses software rendering. If you use something like SFML, which has python bindings (PySFML), you can make use of hardware acceleration and this can rapidly speed things up.

This topic is closed to new replies.

Advertisement