Author Topic: Axe Minesweeper  (Read 48136 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #15 on: August 30, 2010, 05:21:57 pm »
Flood fill?
It's a possibility, but it seems a bit inefficient. 

@ DJ
I'm not sure what you mean - I checked the downloads and the archives from the old website, but there doesn't appear to be any Minesweeper games that does a mass reveal - they just seem to show only the adjacent squares without branching out.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Minesweeper
« Reply #16 on: August 30, 2010, 05:30:47 pm »
Flood fill?
It's a possibility, but it seems a bit inefficient.
That's pretty much the only way to do it and handle all cases correctly (because what happens when you click a blank space is the exact definition of a flood fill). As for being inefficient, you won't really have to worry about that when using Axe, as long as you code it well.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Minesweeper
« Reply #17 on: August 30, 2010, 05:33:25 pm »
Yeah pretty much what calc84 said, you will need some sort of flood fill algorithm in order to code that properly, and while it may sound inefficient, it may not be as slow as you think, especially in Axe, and for such a small space.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #18 on: August 31, 2010, 01:29:45 am »
Flood fill?
It's a possibility, but it seems a bit inefficient.  

@ DJ
I'm not sure what you mean - I checked the downloads and the archives from the old website, but there doesn't appear to be any Minesweeper games that does a mass reveal - they just seem to show only the adjacent squares without branching out.
I thought this one did? http://www.omnimaga.org/index.php?action=downloads;sa=view;down=195

Maybe I am confused about what you mean by branching out, though...

@Builderboy keep in mind if he uses way too much code from someone else and he decides to enter this to the contest (seeing there are no download provided) this might affect his score a bit, though. However that's up to him so...
« Last Edit: August 31, 2010, 01:31:55 am by DJ Omnimaga »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Axe Minesweeper
« Reply #19 on: August 31, 2010, 02:19:18 am »
Nah, that technically doesn't branch out. All that one does is show the eight other squares around the center point where you clicked. If the spot is a number it shows it and if blank it shows blank. If it is a bomb it doesn't reveal. I'll take a screenshot of the Minesweeper and show you what the branching out is, if I get a good example.

Edit:
Here is the picture. See where there is like a "bubble" of numbers? What happens there is that you click on a square that is blank and then it branches out to all the blank ones that is by it until it hits a number creating that "bubble." Make more sense?
« Last Edit: August 31, 2010, 02:23:21 am by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #20 on: August 31, 2010, 02:33:26 am »
Aah ok I see. Thanks for the info

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Axe Minesweeper
« Reply #21 on: August 31, 2010, 02:34:43 am »
No problem :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #22 on: August 31, 2010, 01:42:03 pm »
Haha, I've finally got expanding to work!
I can't post a screenshot because I'm at school right now, but it works, and it's respectably fast.  
It still has a few bugs though, and needs to be optimized, but I should hammer that out soon.

Edit: I might enter this into the contest, even though I'll probably lose a bunch of points for originality.  (There's an entire folder for BASIC minesweeper games on ticalc).  But hey, if few people are entering, I might have a shot.  (I think)
« Last Edit: August 31, 2010, 01:43:34 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #23 on: August 31, 2010, 01:44:20 pm »
Great! Hope you can get those bugs fixed easily :)

Can't wait for screenshots :)

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #24 on: September 01, 2010, 11:55:45 am »
I've got the very basics coded: it's now a playable game.  It still needs a lot of polishing though, but that should be easy.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Axe Minesweeper
« Reply #25 on: September 01, 2010, 12:01:18 pm »
Quote
It still needs a lot of polishing though

And more mines :)

Regardless, that's awesome!  You've done some excellent work!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #26 on: September 01, 2010, 12:06:56 pm »
Wow looks really nice!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Minesweeper
« Reply #27 on: September 01, 2010, 01:56:40 pm »
That looks really cool!  I notice that when the area is clearing, it doesnt update all at once, but kinda goes in a sweeping fashion.  Was this intentional or just a byproduct of the method?

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #28 on: September 01, 2010, 03:16:38 pm »
@Hot_Dog:
I can easily change the number of mines.  I just set it at 10 so that the expanding process is more clear.  It's harder to test if I did it right if the bubbles are tiny.

@ Builderboy:
The sweeping is a byproduct.  Just a question, does it look better this way, or would be better if it was instantaneous?

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #29 on: September 01, 2010, 03:34:03 pm »
I think it would be better if instantaneous, but as long as it won't freeze the grayscale during the entire loading process