Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:31 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Rudenko's Disk Program

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 393
Posted: 06:57pm 23 Dec 2023
Copy link to clipboard 
Print this post

Here's another puzzle for you: Rudenko's Disk.





Rudenko.zip

(Requires a mouse, sorry!)

Enjoy!
-Bill
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4228
Posted: 10:19am 24 Dec 2023
Copy link to clipboard 
Print this post

Didn't know this game, had to check wiki. It is a form of "towers of Hanoi".
Nice!

You are quite productive. Every few months a new game... love it.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4228
Posted: 07:57pm 21 Mar 2024
Copy link to clipboard 
Print this post

Hi Bill,

I tried to play this game on CMM2, and it throws an error in line 139.

error: no mouse attached

controller mouse open XXX,YYY


Any idea ? I have a mouse attached (OPTION MOUSE 0,0) and used the mouse to start the game.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4228
Posted: 05:17pm 23 Mar 2024
Copy link to clipboard 
Print this post

Hi Bill,

Got it solved, now you can choose mouse channel...

' Mouse Channel
const MCHAN = 0'2



' Mouse left click ISR
sub LeftClick
 if not lbusy then
   lclick = 1
   mouse_x = mouse(X,MCHAN)
   mouse_y = mouse(Y,MCHAN)
 end if
end sub

' Make cursor track mouse
sub UpdateCursor
 gui cursor mouse(X,MCHAN), mouse(Y,MCHAN)
end sub


Volhout
Edited 2024-03-24 03:38 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9114
Posted: 05:35pm 23 Mar 2024
Copy link to clipboard 
Print this post

Calls to the mouse function need to set that a ps2 mouse is being used

mouse(x) becomes mouse(x,0)

The OP didn't generalise the code. He sets MCHAN as the mouse channel to use in the open command but doesn't follow through in the rest of the code

To do the correctly find every MOUSE command and function and use MCHAN in it. For a PS2 mouse MCHAN should be set to 0
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4228
Posted: 05:39pm 23 Mar 2024
Copy link to clipboard 
Print this post

Got it Peter....

Learning a thing or 2 on my way into CMM2 land.

Thanks...

Volhout

edit: this works...
MCHAN = MM.INFO(OPTION MOUSE)

Edited 2024-03-24 05:40 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024