Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Optimisation

Optimisation

r1ckparker
r1ckparker's Journal · · 1 min read
1,112 0
The plan is that eventually the game will be ported to iPhone/android but currently the target is a netbook. These devices have quite low graphics capability and are slower than regular desktop machines.

I've been testing my game on my netbook and as I've been adding stuff its been gradually getting slower and slower. Today I've done some optimisation to hopefully make it run a bit quicker.

The maze is made up of a series of textured cubes. Where there is a wall, there is a cube of 6 sides and 12 polygons. This is wasteful because you never see the top and bottom of the cube, and if you are in a corridor, chances are you will never see the sides either.

So I have replaced the cubes with flat polygons, and I'm only drawing what I need. I'll do some comparisons on the netbook later to work out if this is faster. (it runs at a smooth 60 fps on my desktop regardless of which method I use)

Also, the entire maze is being built before the player starts and I'm just moving the camera around. I could just draw the maze as I get to it, instead of generating it all at once. However this is a big change and I will probably leave it for the moment and come back to this topic later.

Discussion

Loading comments...