Ardusweeper - tiny minesweeper


#1

https://github.com/jbellue/minesweeper
A simple minesweeper for Arduboy.

  • A grid of 15 * 9,Three levels of difficulty: easy (15 mines), medium (25) and hard (35),
  • Awesome old-school mutable sound effects (because I can’t do sound design),
  • Vastly uncommented code (because apparently, I can’t really code),
  • Incredible art! (because it looks like pixel art is more fun than code…)
  • Fast mode!
  • Flagging an open tile will click all non-flagged surrounding tiles.
    It’s faster, it’s also deadlier. If you’re scared, you can deactivate it
    in the menu.
  • Best times saved on the EEPROM
  • Press LEFT or RIGHT on the main menu to see them. In there, press both UP and DOWN to erase them.

Enjoy :slight_smile:

edit: added some pictures. I didnm’t realize how difficult it was to take a picture of an arduboy screen…



"Semi-Official" Game List for the Arduboy
How exactly does uploading work? [SOLVED]
(Ross) #2

Nice game! Looks great.

Here is a link to a copy of Ardusweeper on Codebender.

This might make it easy for people to preview it as well.


Eried's Unofficial Repo :)
Eried's Unofficial Repo :)
#3

Ah, I was going to take a picture today, thanks for adding one for me :slight_smile:
(I also considered shooting a video, but given the awful sound design, I decided against it)


(Ross) #4

Haha, go for it, I didn’t edit the topic post because I figured you might add one at some point. I thought the layout was pretty slick, so I wanted to share something at least : )


#5

I love Minesweeper and I can’t wait to try this one.

However, when I try to upload the sketch I get the error message “minesweeper.ino:2:29: fatal error: ArduboyPlaytune.h: No such file or directory
#include <ArduboyPlaytune.h>”

Is there anything I can do to make this work?


(Ross) #6

Hey, before we get it working in the IDE, could you try the version provided here? https://codebender.cc/sketch:290610


#7

You probably aren’t using the latest version of the library… This is using version 10200.
I’ve fixed a couple bugs since I updated the library, but the version ekem linked on codebender should be completely working (there might be a couple of bugs here and there, mostly with the way the sound is handled… Now that I think about it, there might be less sound bugs, as I’ve had issues with some of the new stuff).

You can also get the latest library from github: https://github.com/Arduboy/Arduboy/blob/master/src (ask if you need help with that)

Enjoy! (and don’t forget to read the help, I’ve had a couple people warning me about a bug that is actually a feature :slight_smile: )


(Scott) #8

If you have a version working on codebender, then it shouldn’t be to hard to modify the IDE version to work with the current version 1.1 of the Arduboy library.

If people install the V1.2 library to make your game work, it will cause errors for almost every other sketch that expects the V1.1 library.


#9

I understand what you say, but shouldn’t we try to push the use of the newer version of the library? What’s the point of improving the library, if in the end, we just tell people to use the old version, for compatibility? I’m not trying to raise an argument there, I am genuinely trying to understand.

When I get the time, I’ll update the code… Is there a better way than just putting 100s of #ifdef everywhere to handle both versions of the library?


(Scott) #10

The version of the library on GitHub on the master branch is a version under development. For some reason, it was decided not to use a Git branch for development and then merge to the head when fully tested and considered stable. Therefore, there may be bugs in this “latest” version or changes may be made before it’s released for general use.

That’s something that’s being looked into, and one reason that this newer version hasn’t been released yet. You may not have to. You can’t be sure until new development is considered stable and is officially released.


(Kevin) #11

This is incredible now I no longer need my windows 3.1 box :wink:


#12

Right, I’ve pushed my change to revert to the released library, it makes sense. I’ve been too lazy to put everything between #ifdefs, at least the code is (a bit more) readable. I’ll update it when the time comes to!

If anyone wants to improve the game in any way, please do so! I might go back to it because I want it to be as good as I can make it, but there isn’t much I can improve on…


#13

Thanks for the fast reply and the help - the codebender sketch is working great! I’ve been playing it all day and the sketch will definitely stay on my Arduboy for quite some time.


#14

Thanks for your answer. It’s true, I’m still on the older library, but as far as I understand from this thread, updating could mean running into trouble with other sketches, so I guess I’ll keep it for a while. But really, thanks for your help.:slight_smile:

I’ve found no bugs so far and I’m enjoying the hell out of the game.


#15

For an unknown reason, I can’t seem to be able to edit my first post (full disclosure: I might be daft).
Here are a couple of ‘screenshots’ that I painstakingly manually recreated. There must be a better way! :slight_smile:
(if someone less stupid thann me wants to edit the first post for me, feel free to do so :slight_smile: )


(Pharap) #16

I know I’m late to the party, but you could try a variation of:

#if NEW_LIB
    #define NEW_LIB_CODE(x) x
    #define OLD_LIB_CODE(x)
#else
    #define NEW_LIB_CODE(x)
    #define OLD_LIB_CODE(x) x
#endif

(Cody) #17

That looks complicated will I learn that in time for making my games?


(Holmes) #18

Cody, the only one that can decide that is you. :slight_smile: I will try to make some tutorials in the coming week for people new to programming, but there are plenty of resources online to learn programming.

Try this website out in the meantime: http://www.learncpp.com


(Cody) #19

Thanks @crait I’m checking it now thanks


(Cody) #20

Arrrrgggg sooo complex…sorry I’m waiting for arduino but man you learnt that way man rock solid