Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Grauniad on August 14, 2013, 02:06:08 PM

Title: Macro-level of events in a frame?
Post by: Grauniad on August 14, 2013, 02:06:08 PM
I'm wondering if you could sketch out the sequence of events every frame?

You have the creeper sim, you have units that move or fire, you have the CRPL cores and ..?

Now some things happen every frame, others happen every x frames and so forth. If one, for instance want to control creeper depth, it might be possible to cycle through the map maybe 3 times a second (every 10 frames) rather than every single frame, for instance?
Title: Re: Macro-level of events in a frame?
Post by: teknotiss on August 14, 2013, 02:08:50 PM
that's what ui wanted to ask  ::) cheers G!
Title: Re: Macro-level of events in a frame?
Post by: knucracker on August 14, 2013, 03:07:36 PM
Unfortunately for this strategy, thanks to the greater run time efficiency of the mono run time I do everything every frame :)  So no more phased Creeper updates.  There are of course things that are on delays (packet requests, etc.) but in general everything gets evaluated every frame.

The only exception is when you accelerate the game I don't redraw the game every frame.  So at 4x there will be 4 internal game loop updates before I re-render things visually.  This is a performance optimization to prevent 4x the rendering work.
Title: Re: Macro-level of events in a frame?
Post by: Grauniad on August 14, 2013, 03:11:36 PM
I guess it gets complicated real fast... :)