DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Math & Physics
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-15-2004, 09:40 AM   #1
Codemonger
New Member
 
Codemonger's Avatar
 
Join Date: Oct 2004
Location: Canada
Posts: 24
Default

I was playing starwars battlefront the other day, and noticed that input is fixed to framerate. I haven't really thought this through, but when I play the game and the frame rate is high, everything is pretty smooth, when the frame rate drops, naturally everythin slows down. To compensate for this the physics is tweened between what the frame rate is and should be. But it seems the tweening is only applied to the physics of the game and not the user input. I only say this because in the menu, selecting your character, the game may chug, but so does the input. The mouse drags across the screen really, really slow. I haven't put much thought into this but wouldn't it seem much better if the input was frame independent and seem smoother even at low framerates. I mean, if framerate is 10fps, it doesn't mean my mouse should travel really slow, and take 1 second to travel 100 pixels. It should be the same to get from point A to point B in 1 second regardless of framerate, just the same way physics are tweened. Or are games already doing this and I'm missing something, maybe it just seems this way to me?

BTW I put this in the physics section as I thought it's more related to how physics are dealt with.
Codemonger is offline   Reply With Quote
Old 10-15-2004, 10:58 AM   #2
NomadRock
Senior Member
 
NomadRock's Avatar
 
Join Date: Aug 2004
Location: USA
Posts: 829
Default

That is the way I think games should work as well, and this is how I deal with input. I find it increadibly annoying at extremely low frame rates when it takes you forever to get back to the button that changes the detail back down, or what not. I only poll the input once per frame, but I move the cursor by the ammount that the mouse was moved during that time. This can be kind of annoying as well, because the cursor appears to jump around the screen if you move it very fast at low frame rates, but I dont know any better way.
___________________________________________
Jesse Coyle
NomadRock is offline   Reply With Quote
Old 10-15-2004, 11:22 AM   #3
Codemonger
New Member
 
Codemonger's Avatar
 
Join Date: Oct 2004
Location: Canada
Posts: 24
Default

Yeah I was thinking about the jumping too ... what if the cursor was drawn independant of the buffers flipping ? any thoughts on that. It would only be a small portion of the screen being updated so it would be very quick, or would the flipping of the buffers cause the mouse to flicker ?
Codemonger is offline   Reply With Quote
Old 10-15-2004, 11:25 AM   #4
Codemonger
New Member
 
Codemonger's Avatar
 
Join Date: Oct 2004
Location: Canada
Posts: 24
Default

I guess this would cause sync issues though, if your mouse moves over a button it should glow, but the buffer hasn't flipped yet so it would look strange, out of sync. hmmm, I guess they way you suggest would be the most viable solution.
Codemonger is offline   Reply With Quote
Old 10-15-2004, 12:07 PM   #5
NomadRock
Senior Member
 
NomadRock's Avatar
 
Join Date: Aug 2004
Location: USA
Posts: 829
Default

You could have a lack of hover changes, and that would not be much of an issue. The problem I see is that you would have to redraw under then cursor when you move it, if you move it manually appart from the back buffer. I dont think this kind of pipe stalling would help out your framerate any.

Perhaps one could draw a faded trail behind the mouse that went half way toward the last position of the mouse. At high frame rates you woul not notice it at all, but at low frame rates it would make it easier to not loose the mouse. I am not sure how effective it would be. Windows has mouse trails but this is just a buch of copies of the cursor pasted in the trail, and is very confusing to the eyes. A smooth trail would be better, but I cannot be sure how helpful it would really be without trying it out.
___________________________________________
Jesse Coyle
NomadRock is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 01:59 AM.


Powered by vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.