Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:13 01 Aug 2025 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 : FloodIt Game

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 07:37pm 25 Mar 2022
Copy link to clipboard 
Print this post

The FloodIt game presents you with a board filled with randomly-colored squares. Your job is to help a flood fill that starts at the top left corner square to end up completely filling the board with a single color. Naturally, you are only allowed so many moves, depending on the size of the board and the number of colors.

You get to choose the board size and the number of colors. The game can be played with the arrow keyboard keys or with a mouse.




Enjoy!
-Bill


Floodit.zip
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 12:06am 26 Mar 2022
Copy link to clipboard 
Print this post

Wow, you are really churning out the CMM2 games at the moment Bill!  
Good work.
Smoke makes things work. When the smoke gets out, it stops!
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 03:03am 26 Mar 2022
Copy link to clipboard 
Print this post

Nice, although I'm finding a few mouse related errors:
the mouse channel must be specified if other than the default 2

[line 109]   gui cursor mouse(X,MCHAN), mouse(Y,MCHAN)
[line 119]  mx = mouse(X,MCHAN) : my = mouse(Y,MCHAN)

"Press any key" when a game is over doesn't work with no mouse. Ie: my mouse is on channel 0. If MCHAN=2, I can't play another round after the first one.

Something is odd about the number of moves: a few times, I've cleared the screen to one colour, but one click more is required to finish. Also, at least once, clearing to one colour on move 39 (22x22, 6 colours) has resulted in "You lose, 0 points"  where usually finishing at move 39 is a win with 1 point.

The auto screen save after 17 moves is a bit annoying - line 529, commented out. (I've got a weird SD card that takes 30+ seconds to save an image, so the program hangs until the save is done.)

==============
Now I might need to delete the program because it is too addictive...   ;-)
Visit Vegipete's *Mite Library for cool programs.
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 01:30pm 26 Mar 2022
Copy link to clipboard 
Print this post

Thanks for the bug report, vegipete! I will work on fixing it up. I have noticed some of those problems myself but thought I'd purged them.

-Bill
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025