QB64 Phoenix Edition
QB64 Game Tutorial Updated - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16)
+--- Forum: Learning Resources and Archives (https://staging.qb64phoenix.com/forumdisplay.php?fid=13)
+--- Thread: QB64 Game Tutorial Updated (/showthread.php?tid=1628)



QB64 Game Tutorial Updated - TerryRitchie - 04-19-2023

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


RE: QB64 Game Tutorial Updated - Dimster - 04-19-2023

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.


RE: QB64 Game Tutorial Updated - TerryRitchie - 04-19-2023

(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.


RE: QB64 Game Tutorial Updated - Dimster - 04-19-2023

It's working now Terry, thanks. So now how do I connect my coffee machine? Smile


RE: QB64 Game Tutorial Updated - TerryRitchie - 04-19-2023

(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


RE: QB64 Game Tutorial Updated - TerryRitchie - 05-07-2023

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!