Dosbox vsync1/4/2024 ![]() I just wrote long posts on Vogons asking for testing and asking NY00123 about cooperation. When I read the SDL guide for moving from 1.2 to 2.0, some of the patterns (ie: blitting and the sequence of new 2.0 function calls) don't jive with our code, some of which seems to still use the 1.2 approach and function calls (will write more details in the next day or so) so I'm hoping once we try these "standard" 2.0 call patterns, we might fix vsync too.įrom dosbox-staging. If someone out there owns an Apple OS X machine, please chime in if you can. I need to dig more into SVN now too!)Īt least vsync is good on the Windows side. Jazz Jackrabbit doesn't use aspect correction hmm (maybe DOSBox auto-disables aspect correct for these custom VGA modes? Or maybe this is a bug in DOSBox and the custom mode or resolution is throwing off that aspect calculation? interesting stuff. Jazz Jackrabbit is unique in that it deliberately drops to a custom resolution (320x199 instead of 200) so it can run the display at 60hz instead of 70hz. Very interesting that aspect correction isn't performed. Thanks for testing on your side rules out something wonky with my Xorg and direct-rendering configuration. I will be able to test more with Windows 10 after holidays.įrom dosbox-staging. Oh, and back when I was testing on Windows 10 I saw no performance issues related to vsync - I was testing Rertro City Rampage 486. When game is started with aspect=false, the resolution is 320x199. Loading screen before map is ok, but in-game it's disabled and game uses resolution 320x203. Loop Until MultiKey(FB.SC_Q) Or MultiKey(FB.To test how the game is supposed to behave - and in-game, aspect = true is lost. If Timer - PrevT < dT Then Sleep dT*1000, 1 ' Test For intersection with the obsticle If MultiKey(FB.SC_UP) Then circley -= circlespeed * dT If MultiKey(FB.SC_DOWN) Then circley += circlespeed * dT If MultiKey(FB.SC_LEFT) Then circlex -= circlespeed * dT ![]() If MultiKey(FB.SC_RIGHT) Then circlex += circlespeed * dT ' According to pushed key we change the circle's coordinates. Sleep 250, 1 'Emulate Really Slow computer Image you need to run the code: (save as BMP)ĭim Shared As Single PrevX, PrevY, circlex, circley, circlespeedĬirclespeed = 200 ' Circle's speed => 200 pixels per secĬircle (circlex, circley), 10, RGB(255, 0, 0),F Test it for different FPS (SLEEP command). Screenunlock ' Unlock the page to display what has been drawn.ĭim as double timer_elapsed = (timer - start_time) PRINT "time-based factor:" tb_movement_factor PUT (guybrush_x ,140), Frame(frame1), PSET Screenset workpage, workpage xor 1 ' Swap work pages. Screenlock ' Lock our screen (nothing will be Guybrush_x = guybrush_x + 2 * tb_movement_factor ' (if your program runs 60 FPS, tb_movement_factor will be 1)įrame1 = frame1 + 0.09 * tb_movement_factor Tb_movement_factor = loop_time * 60 ' adjust your movement factor to 60 FPS If loop_time > 1.6 then loop_time = 1.6 ' initial loop cap max If loop_time = 0 then loop_time = 1 ' initial loop cap min So that brings me a question - how to time game so it'll have constant framerate, not depended on CPU speed (and therefore player won't be able to cheat it using CPU slower and it'll run on uber 500 GHz quantum computers in future ) Example BASIC codes would be welcomed.ĭIM SHARED AS Double frame1=1, guybrush_x = -120ĭim Shared As Double loop_time=1, this_time, tb_movement_factor=1 If you will put Win98 (last Windows with real dos, me doesn't count) on one of modern computers (like Pentium 4 or Core2Duo, not sure if 98 will go on really modern computers )) it'll run as fast as it did when it came out, it won't glitch and can't be cheated with cpu slower (it has slow down option in pause menu anyway, so it is not needed for people who can't go through game otherwise). Well, there are some titles that doesn't have such issues, for example first Jazz Jackrabbit. There are some games, especially very old ones that on newest computers runs like hell and they glitched up, because programmer didn't think that computers will get faster eventually and only solution for that is program that will slow down your CPU, while some others which run fine on modern equipment can be cheated using cpu slower. Sorry for title but couldn't think of another.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |