Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Multiple controllers

Author
Message
Guitar Hero
23
Years of Service
User Offline
Joined: 13th Mar 2003
Location:
Posted: 18th Oct 2003 22:28
Hello fellow DBP'ers,
I am trying to implement multiple controllers in my game by using several 'set control device' calls in my main game loop. The problem is that this kills the frame rate. Without resetting the device, i get 166 fps but resetting the control device just four times drags it down to <10 fps .
Does anyone know of a better way or a dll that can do this more efficiently.
I have added the code I currently use.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 18th Oct 2003 23:03
Are you doing all the movement for only one person per sync ?


Avatar & Logo by Indi. Insert witty comment here...
Guitar Hero
23
Years of Service
User Offline
Joined: 13th Mar 2003
Location:
Posted: 19th Oct 2003 01:44
Hi,
On your suggestion, i've tried getting the input for just one player per loop but i'm only getting 39fps. Thats not too bad I guess, but without the controller assignment I get 160+fps.
Quite a drop. Also it's a lot less accurate.
Thanks for the idea though.

PS I think it's windows slowing things down setting the new controller, so do you think it would be faster to run another DBP program at the same time that collects the input and sends it to the clipboard? The main game could then scan the clipboard to get the input.

Login to post a reply

Server time is: 2026-07-26 09:30:54
Your offset time is: 2026-07-26 09:30:54