Oh no, not FLIP again! (or smooth 3D)

Blitz3D Forums/Blitz3D Programming/Oh no, not FLIP again! (or smooth 3D)

Rhyolite(Posted 2003) [#1]
Ok, I know this topic has been discussed a hundred times (I think I have read most of them) but I am still having a problem with the whole area of smooth 3D movement. I am still pretty much a newbie to 3D and Blitz, so forgive me ;)

I have written a smallish game as an aid to learning Blitz3D. I have implemented (not all at the same time) both render tweening (as per Castle Demo and associated articles), delta timing (as per articles within the community) and 'smoothed' delta timing. All satisfactorily keep game speed (logic) constant as intended.

Everything seems fine in windowed mode (either debug or non-debug) but in full screen mode I am getting jerkiness in my movement. This jerkiness seems to be tied into the monitor refresh rate, as some settings are smoother than others. Also I can twiddle about with my logic update frequency or put in small delays to smooth out the display but this only works for one screen refresh rate.

However, in all cases using FLIP FALSE gives me smooth movement at all monitor refresh rates. Unfortunatly I believe using FLIP FALSE as 'standard' is not a good idea so was hoping for another solution.

My 'game' is pretty simple and on my Athlon 2400 XP and Geforce 3 with FLIP FALSE gives me HUGE FPS (over 1000). The movement I am having problems with is scrolling simple 3D objects on and off the screen along a single axis of movement. The movement takes about one second in each direction (on or off), but even slowing this movement down does not help.

Can anyone enlighten me further, please (this is really bugging me know)!

Thanks in advance,
Rhy


Neochrome(Posted 2003) [#2]
good point.. i found that by matching the Monitors refresh rate normally sorts this.

on games, a refresh rate of 60hz is OK and have the game renderworld tweened

and be sure that nothing else is running at the same time.. I know its not much help, its down to the graphics driver and the way the game works.

tho DONT quote me on this because i could be way off.. but in my experiance i found that some cards deal with refresh monitors deifferently :o(


Rob(Posted 2003) [#3]
A refresh rate of 60hz messes up my eyes with the flicker.


smilertoo(Posted 2003) [#4]
Only way i can think of without frame rate calculations is to lock the game logic to 60fps, and let the graphics redraw run as fast as it can.


Gabriel(Posted 2003) [#5]
Blitz3d uses 100% of CPU time whether you use Flip False or not. Only using a Delay will give back CPU time to the system.

However, Flip False is unpredictable, and unpredictable is bad. I agree that there might be something in the code causing a problem. Or a very weird local driver problem.


Rhyolite(Posted 2003) [#6]
Thanks for comments so far.

I thought my code might be doing something wacky, so I swapped my original movement code for something sswift has done. Still have same problems so pretty much ruled out programmer error in the actual movement code itself.

I am using standard Nvidia drivers, but will check and update to latest version.

Just to make clear, my game logic is always running at the same rate (using tweening or delta time) but graphics are drawn as fast as possible (dependant on FLIP TRUE/FALSE and monitor refresh rate). The jerkiness is not due to low frame rates as the problem occurs at, amongst others, 100+ FPS (FLIP TRUE and 125hz monitor refresh). Also occurs at low FPS.

Cheers, Rhy


Zethrax(Posted 2003) [#7]
Not sure if this is relevent to your problem but I had a similar problem with the frame rate dropping a while back. I would be collecting guns in my game (which were just long thin Blitz cubes used as placeholders, so no huge polycount involved) positioning them near a second camera used to render the heads up display graphics, and then EntityAlphaing them to zero to stop them from being rendered while they were not being used.

After collecting about 6-8 guns the frame rate would abrubtly drop from around 80 to around 40, even though the guns were not being rendered. I tried positioning the guns so they were not all occupying the same space in case it was some sort of weird z-buffering issue but it didn't seem to make a difference.

I eventually fixed the problem by using HideEntity to hide the guns instead of EntityAlpha, so if you're using EntityAlpha in your game it's possible it may be causing the problem you described.