A simple example of the optimization is the trees. I calculated their movement (many sin and cos functions) in the render routine, which, of course, was a bad idea. When I moved the calculations to the TimerProcess routine, the lags with many trees on screen were gone.

Processing and rendering should always be seperated, because the video card can render WHILE the CPU calculates things...

The above mentioned bad code was made in the hurry during the compo where I was happy that things work, not how good they are implemented.

The things WILL mentioned are always the first things which can be optimized....

Another big thing in my case was:

Redesign of game classes...

During the compo, all my enemys had its own class from scratch...

While changing the engine for IGF, I built base classes which now every enemy class is derived from (the way it was meant to be from the beginning).
The base class can move, collide and all other basic behaviours... this allows me to store all enemys (no matter what kind) in a single list, which is much more comfortable (and faster) to process...

My current attemps to use Newton Game Physics for the game will speed up things, too... My own collision procedures are crap and buggy. Newton does a good job and if I manage to include it in the engine, even the collision response and special effect will look much more cooler.

Greetings,
Dirk