Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 Game Tutorial Updated
#1
The game tutorial at www.qb64tutorial.com has been updated.

- STICK and STRIG added to Lesson 7: Gathering Input

- New lesson - Lesson 21: Advanced Controller Input

These updates are all about game controllers. I've had more than few people over the past year ask for a tutorial on using game pads and joysticks.

If you have time check it out and let me know if you find any issues I need to resolve.

Terry
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#2
Hi Terry - My keyboard and mouse are wireless. I'm not sure if this makes a difference. When I ran the very first example of _Device and _Device$, the results were an endless loop of Keyboard 1 and seems it never did find the mouse. Are the controller codes just for controllers connected to your computer? (keyboard and mouse are both Logitech.
Reply
#3
(04-19-2023, 03:13 PM)Dimster Wrote: Hi Terry - My keyboard and mouse are wireless. I'm not sure if this makes a difference. When I ran the very first example of _Device and _Device$, the results were an endless loop of Keyboard 1 and seems it never did find the mouse. Are the controller codes just for controllers connected to your computer? (keyboard and mouse are both Logitech.

Being wireless should not make a difference. DeviceCount in the first example should contain the number of controllers connected to your system? An endless loop would mean DeviceCount is very high (or 0) for some reason. Type this code in and let me know the number that's printed:

PRINT _DEVICES

If you typed the code in by hand check for typos. Make sure line 14 reads: Dcount = Dcount + 1
If there is a typo in that line then an endless loop showing keyboard like you are seeing will happen.

You can also download the tutorial asset file which contains all the example programs ready to open.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#4
It's working now Terry, thanks. So now how do I connect my coffee machine? Smile
Reply
#5
(04-19-2023, 06:44 PM)Dimster Wrote: It's working now Terry, thanks. So now how do I connect my coffee machine? Smile

With an Arduino of course Smile
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#6
I just updated all the code listings in the tutorial to text based thanks to the new QB64 3.7.0 export to HTML feature. You can now copy and paste code directly from the tutorial pages as well as click on keywords in the code that will take you to the Wiki.

What a useful new feature!
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply




Users browsing this thread: 1 Guest(s)