|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1484 |
Minesweeper game + source uploaded to wiki |
19/11/2006 @ 08:08 by Dave O\'Brien
|
Hi all,
I've been dabbling with a simple Minesweeper game in iziBasic, and it's now in presentable shape.
I've uploaded the game and its source files to the Samples section of the iziBasic wiki:
http://wiki.aldweb.com/index.php?wiki=Samples
It should run on Palm 3.x or later, in both B&W and color. If you find any problems with it, let me know.
It was fun programming it in iziBasic, though I did get quite close to the limit of the number stack and had to get rid of some variables to get a successful compile.
It uses some standard images included with iziBasic, and simulates recursion using PUSH and POP. Runs very well on PalmOS 5 devices, somewhat slower (but still OK) on an old Visor Platinum).
Cheers! |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 19/11/2006 @ 18:16 by aldweb
visitor |
Hello Dave,
As I already wrote you by e-mail, I love your minesweeper implementation. Just wanted to share it with all forum readers
Cheers,
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 22/11/2006 @ 22:57 by Lou
visitor |
Dave, Great implementation of Minesweeper!
I've noticed some "white screen" delays on closing your app. I had the same thing with my game (Stop or Go) and it actually led to some users' devices crashing.
I don't recall exactly why, but when I moved away from saving a lot of game data with preferences and moved to using a data file, the problems disappeared and closing the game was sped up considerably.
I noticed in your source code that you are also saving quite a few preferences. Might I suggest using a data file?
Perhaps something like:
open "SwprData" for output as #1 for %cellNum%= 1 to %totalCells% %cellRaw%=a(%cellNum%)+1 print #1,%cellRaw% next close #1
Regards, Lou |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 22/11/2006 @ 23:14 by aldweb
visitor |
Hello Lou,
Good advice.
Do you want me to remember you why I gave you this same advice some time ago for Stop Or Go (which is one of the few games I keep playing once or twice almost every single day!) and why storing lots of information in a file is faster than in preferences?
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4 -------- 22/11/2006 @ 23:19 by aldweb
visitor |
Hey Lou, I just discovered your 2nd application, DiceDeck. I guess this one is also a must have!
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 5 -------- 23/11/2006 @ 07:20 by Dave O\'Brien
visitor |
Thanks for the tip on saving to a file.
I'm saving 110 numbers (1 for each cell), which probably goes way beyond what the PalmOS folks thought that Preferences should be used for.
I'll try out your code this weekend and let y'all know how it goes.
Thanks again! |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 6 -------- 23/11/2006 @ 12:54 by aldweb
visitor |
Heelo Dave,
Here are a few suggestions to enhance the game, pick only whatever you like from my proposals!
Suggestion #1 Put a timer, save high scores for the 3 Easy, Medium and Hard levels. Make sure to stop the timer if the player exits from the game and to start it again when the player comes back.
Suggestion #2 (maybe the most important one) Offer another more user friendly way to control the flagging of a cell. This could be: - either a stroke of the pen from the target cell to another cell - or a long pen tap on the target cell would turn the flag on, a quick tap to turn it back off, another quick tap on a non flagged cell would undiscover the cell => having chosen to work with images and no more buttons (as in your original proof of concept) opens this kind of great enhancement
Suggestion #3 Put a dramatic bomb sound (with PLAYWAVE) when KABOOM! Same thing with a great relief song when not KABOOM! Offer option to turn sound off, whatever the Game system setting is.
Suggestion #4 Your application is not only freeware, it also is open source. Worth mentionning it in the About box, this is a very nice offer from you.
Suggestion #5 What about a nice bomb image? Even an animated one? (a little bit like I did in the Matches sample application with burning matches)
These are just proposals. Your game is already a must have as is!
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7 -------- 24/11/2006 @ 20:28 by Dave O\'Brien
visitor |
I've uploaded Sweeper 1.1 to the wiki Samples section.
I now save the data in a normal data file instead of using preferences, and it is indeed much faster, with no blank white screen. Thanks for the tip!
aldweb, thank you also for the suggestions. I need to decide which features are most important, vs. how much effort they will take. This is a reversal, isn't it? Perhaps I should barter you Sweeper updates for iziBasic updates. ;^P
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 8 -------- 24/11/2006 @ 22:41 by aldweb
visitor |
Perhaps I should barter you Sweeper updates for iziBasic updates. ;^P
Damned, I am trapped!
This is a good win-win deal, Dave!
Cheers, aldweb
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 9 -------- 24/11/2006 @ 23:09 by Lou
visitor |
Dave, Happy to pass on the good advice Aldweb gave me a while ago. Again, great implementation.
Aldweb, For me, no need to recall why it works. For me, it's enough to know that it works. Guess I'm getting old.
Lou |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|