Showing posts with label fps. Show all posts
Showing posts with label fps. Show all posts

Monday, March 18, 2013

Instancing and a bit of shader play

I sat down and started to refactor my code for serious. FPS rate was still silly low, but the code looked ok. I've implement instancing and saw that it accelerated draw function by 4-5 times, also frustum culling lowers the drawing time at average 4 times. It was really ok, but still...


Consider following shader code:

What will happen in 28 and 29th line?

I'm setting a value for gRenderedPointLights to 7, so it will be logical if this loop unrolls and just copy its code 7 times with different i values.

 

HLSL attributes are very sensitive. I don't know why, but in that case the loop unrolled circa 50 times, removing the [unroll] attribute solves the problem. Now rendering time jumped like +100FPS.

Victory...

Saturday, February 9, 2013

Drumstep Defenders prototype

After 3 days of work (too much I think), I've finished my game prototype. It's ugly, it's hardly playable but it has some core features:
  • FPS camera
  • Random asteroids from quasi particle system
  • Imma firin mah lazor!
  • Laser-Asteroid collistion detection

Prototype means - you can run core game mechanics. Now is my way to MVP, need to add some real particle effects, more enemies, upgrade graphics, etc.

If you want you can download prototype here: