Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPU specific delay
#11
It is not CPU dependent. It depends just on the video card. Read the explanation in the FAQ entry I posted.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#12
vsync doesent work on flatscreens.
And whats wrong with using timer?, or rels millisec thingy?
Or just move to freeBASIC Big Grin



SSC: Could you post some code, we might be able to figure out whats wrong.
Reply
#13
Quote:That should do a slight about 1/2 second pause

Wtf, the vsync delay is nothing like 1/2 second. its more like 1/60 second.

And as Nathan said, it isnt cpu dependant.
Reply
#14
Quote:
SSC Wrote:I have tried many combinations and even have delays after everygraphics placement, and every key stroke, but I cant seem to get it slowed down...
Did you try asking for help with that?

Quote:the reason for this is that the time between each delay is still running ultra fast
No, that's not it. Adding timed (*) delay loops caps the maximum speed of the program. Meaning, if you delay for exactly .05 seconds each frame, you'll get 20 fps or less even on the fastest computer ever made - it won't matter how quickly the program is executing between delay loops.

The only way it could go faster than you intend is if you're doing something wrong.

(*) You were delaying for a set amount of time, right? Not something like "FOR n = 1 TO 1000: NEXT n", right?

ok, I see what you are saying there, but one, I have multiple layers, and multiple places graphics are displayed depending on what part of the game you are (menu, movie, gameplay etc...) but I may be able to work that, and two, what about the key inputs, for example when I move the character he moves all the way across the map in a split second, I want to try to write a routine that can slow it all down at once.

btw vsync is running and on my higher end machine it is not even noticable, so that doesnt really help, vsync waits for the monitors refresh but doesnt stop the frames at 60/second.
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#15
Quote:
Oz Wrote:That should do a slight about 1/2 second pause

Wtf, the vsync delay is nothing like 1/2 second. its more like 1/60 second.

And as Nathan said, it isnt cpu dependant.

Maybe I jsut have a crappy machine....oh well

I feel so dumb
inner voice: "That's because you are, Oz...ya dumb ass"

Oz~
Reply
#16
Quote:vsync doesent work on flatscreens.

VSync works everywhere. It's not monitor's stuff, but video card stuff.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#17
rofl, after a year without toughing the code, I fix it...lol

sterling your code worked, it is what I was originally trying to do, for some reason or another the reldelay was not working which is why i thought that any time delay was not going to work, it completely stumped me till now, even though I had the answer to begin with...thx for the help though
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#18
Glad you figured it out Big Grin .
What I was going to say was, if your code and engine are properly
structured and organized, then you should only need one delay routine. And this routine should be called only once per loop.
You might need other calls to the routine for the menus, battles and other parts of your game too, but like for instance walking around and exploring in an RPG you would only need one call to the delay routine per loop. Sounds like in your game the graphics are drawing at many different points in your program, and you probably aren't using any page buffering for the graphics. So, if you haven't tried to yet you might want to draw all your graphics to a page buffer and then display the buffer once per loop along with the delay call. That should work too.

Cya,

Nemesis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)