shaky graphics
BlitzMax Forums/BlitzMax Beginners Area/shaky graphics
| ||
Hi guys, I searched the forum for a solution to my problem: when I run my project i get some shaking/stuttering. I tried setting different graphics drivers, setting various refresh rates in the Graphics command, setting Flip 1, using delta time and other thins. Nothing worked. I cant fix it and have no idea where else to look for a solution. Maybe I have done something wrong. Please help me. I have linked the project files: my_game.zip Run the game, press start and wait a few seconds for stuff to start moving. Thank you. Last edited 2013 |
| ||
did you ever try to comment out all PRINTs? |
| ||
Your delta is messing it up. Try changing the speed to something like 3, and take out the delta*.001 bit for your Y increment and see the difference. You need to do your delta timing differently. |
| ||
i must be blind but I do not see the graphics jittering. |
| ||
thanks for the advice guys. @midimaster, that is so interesting, I commented all prints and it shakes very seldom now. Can you explain why this is happening? Were you sarcastic? @brucey, with speed 2 or 3 it is shaky on my computer. The only thing that improved was commenting out the PRINTs. I will try improving my delta timing, I saw some interesting on the subject. @cruis.in it may not happen on your computer |
| ||
Well, the player ship and bullets are fine at all times here. The enemy ships shudder horrendously because their delta movement looks something like : y + 32 y + 0 y + 0 y + 32 etc |
| ||
Delta should always be declared as a float even if it only contains an int. I suspect that's the problem although I've not looked at the code yet. |
| ||
I have uploaded a new version here: https://www.dropbox.com/s/qv7d1m0ognwxcar/space%20invaders.zip (bkup link: http://dl.transfer.ro/space_invaders-transfer_ro-05feb-a5ff98.zip ) I have implemented fixed rate logic and tweening. The game seems to run smooth now. I also found out that having two monitors caused some flickering. Even with FRL. I have no idea how to fix this or if it can be fixed. Any advice in this direction is much appreciated. Good thing most users have just one monitor. |