QB64 Phoenix Edition
kind of works? reading multiple mice: any c programmers want to look at this? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: kind of works? reading multiple mice: any c programmers want to look at this? (/showthread.php?tid=864)

Pages: 1 2 3 4 5 6 7 8 9


RE: kind of works? reading multiple mice: any c programmers want to look at this? - Pete - 09-15-2022

I can barely manage one keyboard, but okay!

Pete


RE: kind of works? reading multiple mice: any c programmers want to look at this? - madscijr - 09-15-2022

(09-15-2022, 05:58 PM)Spriggsy Wrote: LOL! @madscijr , I just saw this https://www.asawicki.info/news_1533_handling_multiple_mice_with_raw_input
Didn't realize you've been at this for such a long time.

Like I said, I have a million projects, sometimes they sink without a trace, but if it's something I think could be worthwhile, it'll stay on the backburner until a way can be found to make some progress. 

Right now we're is closer to actually getting this working than ever. The only thing holding it back is the display thing. 

Here's another idea -kludgey, but desperate times call for desperate measures, lol- 
what about somehow passing a screen shot of QB64's screen to the event code, which takes it (with memcopy or however it might be able to use it) and paints it to its own window? 

Maybe Pete/BPlus/Ken or some of the other heavy hitters could suggest some workable solution?


RE: kind of works? reading multiple mice: any c programmers want to look at this? - Pete - 09-15-2022

I foresee "racing" issues if you take that approach.

Pete


RE: kind of works? reading multiple mice: any c programmers want to look at this? - SpriggsySpriggs - 09-15-2022

Yeah, I think it will be quite a problem. Give me a couple of days to see about this way of unregistering the window and then re-registering it with the callback as part of its registration. That may or may not be the solution.


RE: kind of works? reading multiple mice: any c programmers want to look at this? - madscijr - 09-15-2022

(09-15-2022, 06:28 PM)Pete Wrote: I can barely manage one keyboard, but okay!

Pete

Ha! 
Well I think it would be useful for things like multiplayer games (where each player gets their own keyboard or mouse), or educational or collaborative type applications, where as an alternative to networking 2 computers, additional users just plug into a spare USB port. 

My "killer app" for this is multiplayer Pong! 
Why must Pong games on the PC be limited to a single mouse, or for additional players, the keyboard? 
The game play is terrible! 
Atari had Quadrapong in 1974, and almost 50 years later we haven't got the ability to recreate that on a modern PC by simply plugging in a few mice.  
Why stop at 4? I'm thinking of stuff like Octopong!
And games like Atari Warlords, Duck Hunt type shooting games, collaborative jigsaw puzzle games, Tank or Spacewar! games where you use the mouse to aim, drawing, or using multi mice to make music. 

Or with multi keyboards, split screen games where players are simultaneously typing in their own keyboard. 

You would think this kind of thing would have been done already!


RE: kind of works? reading multiple mice: any c programmers want to look at this? - Pete - 09-15-2022

I loved Warlords. Had an Atari 2600 and an Atari 64 computer. 2 joysticks, and 4 paddle controllers. Ah, the good ol' days.

Pete


RE: kind of works? reading multiple mice: any c programmers want to look at this? - madscijr - 09-16-2022

(09-15-2022, 09:29 PM)Pete Wrote: I loved Warlords. Had an Atari 2600 and an Atari 64 computer. 2 joysticks, and 4 paddle controllers. Ah, the good ol' days.

Pete

Awww yeah, that's the stuff! 

The Atari 2600 started the ball rolling for me, then my folks got me a TI99/4A which I learned to program games on (the regular not the extended BASIC, I took it as far as I could with that). 

Atari 64 - do you mean an Atari 8-bit computer with 64k or did you mean Commodore 64? I had a C64 after the TI, and programmed that a lot too, mostly BASIC and taught myself some 6502 assembly.


RE: kind of works? reading multiple mice: any c programmers want to look at this? - Pete - 09-16-2022

Probably the Atari 8 64K. 5 1/4 floppy drive, which beat that cassette recorder you and I both probably struggled with for our TI4A. That's right, I had one of those, too; 1981. I was in college at the time, just married, and had my father-in-law over visiting. I had him wait 15 minutes while I wrote some code, which resulted in a small red flashing square transversing the 13" black and white television set. I'm sure he was hoping his daughter could figure a way out of the marriage after that experience, but funny thing, I ended up in the same profession, but while he spent $100,000 on computer systems and software for his practice, I wrote my own system, which was better, more dependable, and highly accurate all for the cost of $6,000 in computer and printer hardware. BTW, still married to the same wonderful woman now for over 40 years, but now we have a 25" black and white t.v., which is a good thing, because my eyesight would struggle seeing that flashing square on the old set. Big Grin

Pete


RE: kind of works? reading multiple mice: any c programmers want to look at this? - madscijr - 09-16-2022

(09-16-2022, 01:01 AM)Pete Wrote: Probably the Atari 8 64K. 5 1/4 floppy drive, which beat that cassette recorder you and I both probably struggled with for our TI4A. That's right, I had one of those, too; 1981. I was in college at the time, just married, and had my father-in-law over visiting. I had him wait 15 minutes while I wrote some code, which resulted in a small red flashing square transversing the 13" black and white television set. I'm sure he was hoping his daughter could figure a way out of the marriage after that experience, but funny thing, I ended up in the same profession, but while he spent $100,000 on computer systems and software for his practice, I wrote my own system, which was better, more dependable, and highly accurate all for the cost of $6,000 in computer and printer hardware. BTW, still married to the same wonderful woman now for over 40 years, but now we have a 25" black and white t.v., which is a good thing, because my eyesight would struggle seeing that flashing square on the old set. Big Grin

Pete

Cassettes indeed! They were conveniently ubiquitous and relatively cheap, I'll give them that! 
Still, within the first week of having the C64, I finally had enough of dealing with them, and coughed up $400 of my paper route money, got a 1541 floppy drive, and never looked back! 
Later I found an expansion unit for the TI, with a couple floppy drives and the serial or com card, and transferred all my programs to a modern computer via nullnodem. 
Eventually I would like to create some equivalent functions in QB64 to run my old TI programs. The biggest challenge will be CALL SOUND!


RE: kind of works? reading multiple mice: any c programmers want to look at this? - Pete - 09-16-2022

Yeah, we've come a long way. Some of those older BASIC languages had advantages. Atari Basic had a way to change ascii characters into custom 8x8 characters, very easily. I wish we still had that with QB. I don't miss the line numbers from TI days, that's for sure. Programming games like 4-player monopoly on those limited memory systems was a great way to become adept at optimization. Only bad habits is possibly the use of single character variables and few remark statements.

Well if this multi-controller project works out it will be a nice addition for gammers. Have you thought through what syntax may be needed to handle the job? Maybe the usb ports could be used as identifiers. _Mousebutton(1, 2) as an array? In otherwords something to distinguish who clicked what, etc.

Pete