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 / I need best game controller

Author
Message
Max Maker
19
Years of Service
User Offline
Joined: 17th May 2007
Location: 4
Posted: 1st Apr 2010 14:18
Hi everi wrote this message in "Newcomers DBPro Corner" board
but when i publish it i forget some question then i back to edit it
when i publish it again it never show ?!?!?
http://forum.thegamecreators.com/?m=forum_view&t=168105&b=7

now, i was asking about best game controller like GTA SA, crash 3, rayman and
MikeInel's game (Illusions of the Tower)
http://forum.thegamecreators.com/?m=forum_view&t=114553&b=8

I have this code but its not professional and not work
with PS3 analog (PS3 controller)



I really need this help
and i search for this source code for three years ago, when i joined here
was answer is: write it by your self, and learn programming
but i can't do it now..
thanks,,,

4444444444444444444444
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 1st Apr 2010 14:55
I've never tried using a PS3 controller, but it should work fine - the wired 360 controllers work, and I've used all manor of joysticks and joypads for the PC.

It's really just a case of working out what button does what.

Look at Joystick X() Y() Z() etc, best to check everything and take a note of what buttons relate to what on your PC. You should make a little debug thing for controllers, that shows each axis as a bar, and the state of all buttons and their number. Something that you can run, then check the controller and see visually what is being registered.

Ohh, try and use Joystick X() etc instead of things like Joystick Left - as your dead zone might not be set up, and you might not want it to be - usually it's easy to get the range, then work out a tolerance and just do that yourself, like if the range of X axis is -1000 to 1000, I might have...

movedir=0
JX#=joystick x()
if JX#<-200 then movedir=-1
if JX#>200 then movedir=1

See that will give quite snappy and accurate movement for a simple platform game etc, using that 'analog' value and checking with a tolerance.


Health, Ammo, and bacon and eggs!
Max Maker
19
Years of Service
User Offline
Joined: 17th May 2007
Location: 4
Posted: 1st Apr 2010 15:26
Thabk you Van B,
ohh,i forget, my code it work on ps3 but it no circular path
like arrow key WADS,,, forget ps3 controller, it doesn't matter now


((now do you have the source code??? ))

4444444444444444444444
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Apr 2010 00:24
@VanB,
You can use the command SET JOYSTICK DEADZONE (introduced in 7.4) to specify a percentage of the joystick range to ignore for tuning the JOYSTICK LEFT/RIGHT/UP/DOWN functions.

Max Maker
19
Years of Service
User Offline
Joined: 17th May 2007
Location: 4
Posted: 2nd Apr 2010 18:43
Mr.IanM
Thank you for your comment, but as i said forget joystick now.
alright, can you gave me source code like this game:



4444444444444444444444

Login to post a reply

Server time is: 2026-07-26 21:12:12
Your offset time is: 2026-07-26 21:12:12