| View previous topic :: View next topic |
| Author |
Message |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Thu Jan 18, 2007 8:55 pm Post subject: Stupid question: Limiting Input? |
|
|
OK I've been working on a few apps and games for a month now. They're going well I have figured out almost everything I wanted to do with the GU and I've done some little apps and a few 3D demos.
The problem is I'm processing all my input in the main game loop, this means if my render stage (using a BSP renderer) renders more or less frames per second it also means I'm sampling the input irregularly.
So what's the best way to capture input at regular intervals. I have a few ideas but I'm wondering if there's a 'standard' way of doing it, and if someone could give me a little example code.
Thanks for any help :)
[EDIT] Well I found something which looks like it'll help. Still any other options or example code is welcomed:
http://forums.ps2dev.org/viewtopic.php?t=3983&highlight=sampling |
|
| Back to top |
|
 |
RCON
Joined: 03 Aug 2005 Posts: 16
|
Posted: Fri Jan 19, 2007 4:12 am Post subject: |
|
|
I think sceCtrlReadBufferPositive(&pad, 1) syncs your controller input to the VSync and sceCtrlPeekBufferPositive(&pad, 1) does not. That might also lock your framerate to 60fps max.
-Louie |
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Fri Jan 19, 2007 4:53 am Post subject: |
|
|
| Yeah I just found that out too thanks. I think I will try and aim for using the vsync/60fps method as it's just easier (aslong as my fps doesn't drop below 60. |
|
| Back to top |
|
 |
|