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.

Program Announcements / MultiJoy : multi joystick / joypad plugin

Author
Message
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 22nd Nov 2004 01:38 Edited at: 10th May 2007 01:43
One of the problems with Dark BASIC Professional is that it doesn't originally support multiple joysticks. MultiJoy Plugin gives you an easy and efficient set of new commands to support multiple joysticks/joypads/input devices in your game or program. It supports any windows compatible controller, up to 16 devices, both analog and digital, up to 256 axis and up to 256 buttons per device. Originally designed to work with DarkBASIC Professional, it's compatible with DarkBASIC Classic, and it can be used with any other programming language that supports DLL calls. It includes the JOY SCANCODE and JOY STATE commands, wich are great for games with customizable input. Once installed in Dark BASIC Pro, you don't need any external files, DLL calls or wrapper functions to make it work. MultiJoy Plugin will avoid some nasty bugs and speed loss from the original Dark BASIC Professional joystick commands. Also, there are extra commands wich are very useful, and not present in Dark BASIC Professional. Here's a list of the current commands:

Joystick/Joypad commands:

JOY START
JOY LAST
JOY EXIST
JOY LAST BUTTON
JOY LAST AXIS
JOY POLL
JOY POLL ALL
JOY X AXIS
JOY Y AXIS
JOY Z AXIS
JOY AXIS
JOY X
JOY Y
JOY BUTTON
JOY ANY BUTTON
JOY SCANCODE
JOY STATE
JOY DIR
JOY SET DEADZONE
JOY POV
JOY POV EXIST
JOY POV DIR


MultiJoy limits:

Number of devices: 16
Number of axis: 256
Number of buttons: 256


Extra commands:

RANGE
WRAP
LMID$
GET STRING$
SEARCH STRING
PROCESS STRING QUEUE$
STRING WORD WRAP$
CRYPT STRING$
CRYPT STRING TO CHR$
UNCRYPT STRING$
MAKE FILE FROM STRING
MAKE STRING FROM FILE$
WRITE MEMBLOCK STRING
READ MEMBLOCK STRING$
FILE BOX$
INPUT BOX$
DIRECTORY BOX$
INI READ$
INI WRITE
MY IP$
GET TEMP DIR$
GET USERNAME$
GET ENVIRON$
YESNO
POPUP


MultiJoy Plugin can be bought online with PayPal at my page (http://darkphear.cjb.net) for only $10.
I think it's a fair price, and it will help me continue working on this plugin and also other projects that may be useful for the community. All registered users will get free updates, and they are allowed to use the plugin in their free or commercial programs.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 22nd Nov 2004 03:45
People probably wont want to pay for it.

Maybe do an EZRotate and have a free crap version and a l337 full version.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 22nd Nov 2004 04:11 Edited at: 22nd Nov 2004 04:31
Thanks for your comments, but this have been already discussed a lot. I wanted to keep it private and not release it because of the negative feedback. The only reason I'm releasing it is because a couple of guys asked me to.
I will definitely never release it for free, because I have seen absolutely no interest or effort from users or TGC in making DBPRO support multiple joypads. The only guy I would give it for free if he asked me is TCA, who helped me a lot. Besides his help, the only thing I had with this project from the beginning was negative criticism. Now I know how TGC feel.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 22nd Nov 2004 06:12
OK, fine.

I'm sure Wolf would say that having the free version upped his sales of the full version though...
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 22nd Nov 2004 07:20
Later I'll release a demo version with very limited functionality just to show how it works.
The full version includes sample source code, free upgrades and all support I can give.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 23rd Nov 2004 06:18
DarkPhear iv recived the plugin, have you got any sample code that i can try
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 23rd Nov 2004 08:20
Yes, you'll receive it in a few minutes.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 23rd Nov 2004 09:28
As promised, I have compiled a small demo version of the plugin. It shows a pop-up window, and it's limited to 1 axis and 1 button. Enjoy. And buy it!

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 24th Nov 2004 03:37
Hi Darkphear got you samples thanks
im having a bit of a problem
i got 2 cyborg force rumble pads connected by usb
im not having all luck
what am i doing wrong
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 24th Nov 2004 03:46
What do you get when you run the sample program number 1?

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 24th Nov 2004 04:08
i get
the last detected device is device -1
i get the same with sample 2
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 24th Nov 2004 04:32
Quote: "The only guy I would give it for free if he asked me is TCA"

Very nice of you

Walk softly... and carry a big gun...
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 24th Nov 2004 04:45
I ran you GLFW plugin
i was getting responce from both joypads
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 24th Nov 2004 04:48 Edited at: 24th Nov 2004 04:54
Go to Control Panel - game options.
Do the controllers show up in the list?
Click on controller identification, and check what are the id numbers of the controlers. Remember MultiJoy`s joyid range is 0-7 (corresponds to 1-8 in the panel).


Quote: "
i get
the last detected device is device -1
i get the same with sample 2
"


It seems a problem with the JOY LAST command.
Run this code, try to change the joyid manually.
Move the joystick around and see if the values change.



Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 24th Nov 2004 05:27
Iv dug out an old 2-axis 4-button jostick
pluged it into the midi port all 3 joysticks show up in windows(as shown in pik attached)
and all respond in the properties page, i cant find any id numbers
run the code no responce, change joyid no in code 0 to 8 no luck
all 3 repond to GLFW pugin
sorry about this

Attachments

Login to view attachments
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 24th Nov 2004 06:08 Edited at: 24th Nov 2004 06:12
I'll e-mail you a test program...

Anyone had problems with the demo version?

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 24th Nov 2004 07:04 Edited at: 24th Nov 2004 09:13
I think the problem is with Windows XP. There must be an old winmm function call in the initialization... I'll give it a break and see what I can do.

[EDIT]
Found a solution already. I'll have it working 100% with XP in a few days.
[/EDIT]

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 25th Nov 2004 03:01
Thats great news,keep up the good work.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 25th Nov 2004 03:09 Edited at: 25th Nov 2004 03:28
I've sent you a beta build. Please tell me how it works.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 25th Nov 2004 03:46 Edited at: 25th Nov 2004 03:49
I compiled the first sample and all three joysticks
responded top job, both analog controls on both pads respond ok, 12 button responded on 1 joypad and 10 on the other,may be thats my joy pad, i compiled the other 2 sample you sent me
the multijoy_sample_wrap_range cashed on compiling
this is looking good, keep up the good work
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 25th Nov 2004 04:46 Edited at: 25th Nov 2004 04:47
Hey Spline, try running this:
http://wave.prohosting.com/ccasali/DDRAGON.zip
It uses a lot of functions from MultiJoy Plugin.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Developer Troy
20
Years of Service
User Offline
Joined: 9th Nov 2004
Location: Virginia
Posted: 25th Nov 2004 06:40
My two cents. You don't need to offer stuff for free. You put a lot of effort into something, you should get something in return, especially if the plugin works really well. You could save others a lot of work, I don't think $10 is much to ask in return. But if you had some people helping you to develop it, then you could give it to them for free of course. It's about fair exchange. The exchange of ideas and help is a lot of times free in this forum, but when you take hours of your own time and create a working program, then that is worth something. Plus the extra cash helps you to further improve your plugin.

Troy

Dooh! Did I say that out loud?
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 25th Nov 2004 07:36 Edited at: 25th Nov 2004 07:39
Nice game Darkphear after a little config i hade all three joypads responing, its not easy trying to contol 3 joypads on you own, $10 is not much when you think of what sort of games you can make, and can stop many fights from hapening over who can play the game, now you all can play,
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 25th Nov 2004 08:20
Thanks for you complements guys, now I'm really happy I have released it. The money is really useful. But for me the most important thing is that if I spend some of my time on this, others can save up their time for making terrific games.
My own game, Double Dragon Forever is getting a lot of benefit from the plugin. Download it in that link above and check out how cool is going to be. Ah, and it will be freeware, of course.
I still want to see a street fighter or KOF style fighting game made with my plugin.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 25th Nov 2004 11:26
MultiJoy Plugin updated:
Turned back to OpenGL for Windows XP compatibility.
Initialization code 100% rewritten.
Fixed a bug in JOY STATE()
Fixed a bug in JOY LAST BUTTON()

Expanded limits:
up to 16 devices (0-15)
up to 256 axis per device (0-255)
up to 256 buttons per device (0-255)

New JOYSTICK / JOYPAD commands included:
JOY LAST AXIS(joyid)
JOY AXIS(joyid,axis_number)
JOY EXIST(joyid)

New EXTRA commands included:
STRING WORD WRAP$(text$,line_size)
CRYPT STRING TO CHR$(string$,key)

Demo version is attached. Enjoy.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net

Attachments

Login to view attachments
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 26th Nov 2004 04:48 Edited at: 26th Nov 2004 04:50
nice work darkphear, geting ride of the GLFW plugin,
very quick devlopment, great support, this is going to be a great tool to have, all the joypads respond perfectly, exept on one the joypads only 9 out of the 11 buttons respond were all 11 respond on the other joypad, maybe its the joypad,and still when i try to compile the multijoy_sample_wrap_range it crashes, but that probably somthing im doing wrong, good luck with the plug, i think that everyone should buy it, your not asking much for all the time you have put in to developing the plugin.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 26th Nov 2004 08:37 Edited at: 26th Nov 2004 08:44
The Double Dragon Forever demo you ran uses the same WRAP and RANGE functions from the plugin all the time, so, I guess the problem is probably not in such commands. You could try adding REM to each line of the code to find out where is the problem.
About the joypad with 9/11 buttons responding, what do JOY LAST BUTTON (joyid) and JOY LAST AXIS (joyid) functions return for it? Note that some joypads have buttons working as axis.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 27th Nov 2004 08:12 Edited at: 27th Nov 2004 18:12
I Change the joy pad to another USB port on my computer, now all buttons work on both joypad, nice!
as for the Wrap a exe is created after compiling that runs,even though it crashes darkbasic, i have attached a pik of the display, is this what it should look like, i think i might re-istall my system, that might be the problem.

Attachments

Login to view attachments
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 28th Nov 2004 00:07
At least we know the commands are working.
I'm currently writing documentation for all commands, and more examples.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 30th Nov 2004 03:40
Plugin updated, new commands added, bugfixes...
Information updated.

Cleber de Mattos Casali, game programmer.
Author of DarkPhear (full freeware RPG), Retro River Raid and others. Download free games and demos at my page: http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 30th Nov 2004 03:51
Great Job, hope to see it soon,
how has the responce been, i hope it is all going well
keep up the good work.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 30th Nov 2004 04:10 Edited at: 30th Nov 2004 04:26
As I expected, it's not very popular. But if it's useful for a couple of guys, then I'm pretty happy with it.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 30th Nov 2004 04:25
I Can workout why people would not want this pluin.
on compiling multijoy_sample_wrap_range,
no more crashing, nice , hope you all the best
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 1st Dec 2004 06:48
Hi darkPhear will multijoy work in Dark Game SDK?
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 2nd Dec 2004 03:54
Hm, probably yes. I must test it first to tell you for sure.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 11th Dec 2004 09:03
Hi Darkphear have you had any luck in writing anymore examples
may be a little 3d prog with joystick control, this would be helpfull.
are you looking a buying Dark SDK yet, or are you waiting for the Dev c++ release like me
thanx
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 11th Dec 2004 22:17
I'll make a big update to MultiJoy Plugin very soon, new commands and a lot of new sample code will be included. My goal is to have at least one sample program for every command.
About the SDK, I'm not 100% sure I'll buy it yet. And I will definitely not buy it until it's Dev C++ compatible.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 11th Dec 2004 22:47
That great looking forward to seeing the up date
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 16th Dec 2004 06:55
Thanks for the updates DarkPhear the 3d example you set was great
only one problem
when i compile 3d example all three joypad work fine
when i take out one joy pad and run it again i get

Runtime Error - Object dose not exist at line 41
any ideas?

sorry that i keep asking question im more into the 3D design than programming

one day i might understand how to code
aristid
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 16th Dec 2004 21:36
way to go darkphear.
I will definitely get multijoy when I need it, just not before. many others feel the same I'm guessing, so dont get disappointed or anything is what Im saying...

cheers.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 18th Dec 2004 06:26
@Spline
Try this:

A small fix, just added one more "IF"

@aristid
Yeah, I think TGC won't change the joystick commands anymore. Specially now there's a specific plugin for that. Maybe when people here want to develop a multiplayer street fighter or double dragon clone, and they see it's not possible with the built in joystick commands, they will buy it.
Don't get me wrong, I'm not forcing anyone to buy it. With some effort you can use DLL calls and an external DLL like GLFW, or maybe study the DirectInput API to use it directly (painful...).
MultiJoy Plugin is just an easier and much more practical solution.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 18th Dec 2004 22:31
Thank DarkPhear work Perfect
have you got any more plans for Multijoy?
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 18th Dec 2004 23:52
Yeah, I have 2 new joystick commands and a lot of extra commands on their way.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 19th Dec 2004 05:33 Edited at: 19th Dec 2004 05:36
That great, im in need of a little help
all works fine when i take the joypads in and out
untill i take them all out it ,im trying to work out the code
but you will be able to work it out with no problems.
also im trying to work out how to use wrap values
so the block rotate on the spot, i know i should know all this
stuff but i have not been codeing for long

thanks alot for you help
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 19th Dec 2004 11:00
Okay, the JOY LAST() function returns -1 if no joysticks are detected. This should give you an error message if there's no joypad connected (using the POPUP command).



Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
Spline
20
Years of Service
User Offline
Joined: 30th Oct 2004
Location: London U.K
Posted: 20th Dec 2004 00:24
that work great thank alot,
i see you have alot of other commands
other than joystick commands in you plug
i will have to try to study them abit more

thanks again great progress
keep up the good work
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 25th Dec 2004 10:04
Will this work with DBC?
Will this work with DBP patch 4 (DX 8?)?

If so you have a customer.

Peace, the anti-Bush.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 26th Dec 2004 21:48
DBC: Yes, but you must have the enhancements installed, and you will need wrapper functions for the DLL calls. I can write it for you if you need.

DBPRO: Yes, any version, fully tested. No wrapper functions needed.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 29th Dec 2004 02:16
I'll need those wrappers.
I'll be using DBC until the real world catches up with DBP (for the forseeable future).
Let me know when finished so I can purchase.

Peace, the anti-Bush.
DarkPhear
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Brazil
Posted: 30th Dec 2004 10:42
Okay, I'm working on it. I'll let you know.

Download free games and demos at my page: http://darkphear.cjb.net
MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net

Login to post a reply

Server time is: 2024-11-22 19:07:37
Your offset time is: 2024-11-22 19:07:37