Sign in to follow this  
  • entries
    235
  • comments
    509
  • views
    171996

Optimizations...

Sign in to follow this  
SimmerD

78 views

I spent the last couple of days on a few optimizations, from physics to shadows.

The framerate isn't quite what I'd like but it's smooth & playable on my system ( ~30-45 fps ), and I don't have a lot of other speed-up ideas, so I need to move on & continue getting the test version ready.

I added physics sleeping, so objects track their last positions & velocities, and if these haven't changed much, they increase a sleep counter. Once the sleep counter reaches one second, they go to sleep, and very little physics is done on them until they receive some sort of impulse from an awake object. Right now the player & enemies are always 'awake' physically. This was a very minor fps improvement, but it should help the minimum frame rate at times.

For shadows, I made the shadow frustum code a bit tighter, and did a better job of skipping work for casters that are out of view. The system is a bit complicated b/c objects may be casters, receivers, or both. If they are receivers, you only care if they are in view, but if they are casters, you may want to skip the receiver work but still do shadow casting on any receiving entities.

The other day I added entity tilting to match the terrain. Enemy corpses don't do ragdoll, so when they fall, they tend to stick over ledges & into ramps & stairs. I added code to find the slope of the terrain under their feet, and rotate the char so he falls roughly flat to the ground. Still not perfect, but much better than before.

Then I adapted the technique for dropped items, like weapons, so they line up, too.



The game is too hard right now, without any sort of way to replenish your character's health. Right now the player's received damage can be tweaked via an overall factor, but if it's too low, it's hard to get close to death via combat, and falling pretty far doesn't kill you, so I think I will raise it back up and instead add some sort of pickup or device that, when activated, will boost your character's health.

Sign in to follow this  


5 Comments


Recommended Comments

I'm really starting to like the visual style you've got going on there - the color scheme is great, and the texture work is very natural (at least in static screens [wink]).

You mentioned your framerate is high 30's/low 40's - out of curiosity, what hardware is that running on?

Share this comment


Link to comment
Those skies/backgrounds really work well - is it entirely sky dome/box, or is there actual 3D geometry making up the background? The second image looks like its got some "real" terrain in the distance [smile]

Quote:
Original post by ApochPiQ
You mentioned your framerate is high 30's/low 40's - out of curiosity, what hardware is that running on?
I was going to ask exactly the same question [grin]

Off the top of my head, ISTR talk (many, many journal entries ago) about a GeForce 3 being min-spec?

Cheers,
Jack

Share this comment


Link to comment
My main dev box is an AMD64x2 4200, although I'm not using the other core for anything. I was going to use it for the water effect, but the fps doesn't change if I skip it.

My gfx is a 6600 gt, and I have 2 or 4 gb of ram ( i forget ).

That 30-45 quote is on the mountain temple level, which certainly has a lot going on, so I'm not too worried about it...

The gfx spec is still gf3, but it's sort of pointless in that you'll need a decent CPU to play the game anyway...

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now