Stupid question: Limiting Input?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Bytrix
Posts: 72
Joined: Wed Sep 14, 2005 7:26 pm
Location: England

Stupid question: Limiting Input?

Post by Bytrix »

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=sampling
RCON
Posts: 16
Joined: Wed Aug 03, 2005 1:02 am
Contact:

Post by RCON »

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
Bytrix
Posts: 72
Joined: Wed Sep 14, 2005 7:26 pm
Location: England

Post by Bytrix »

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.
Post Reply