SFML community forums

General => SFML projects => Topic started by: Janneman on April 27, 2013, 12:54:55 pm

Title: MineSweeper
Post by: Janneman on April 27, 2013, 12:54:55 pm
Hi all!

I just finished my first SFML game: another Minesweeper clone. Some features are: highscore, possibility to save the board and continue lateron.
I would've posted screenshots if only I knew how to make them :) because the game is fullscreen, and if I press printscreen and then paste in paint, I just get an empty, white image.

Download it here: https://www.dropbox.com/s/yrwd16s62xbcaaz/MineSweeper.zip?dl=1

I would appreciate any feedback :)

Edit: Some screenshots (thanks AFS):
(http://i42.tinypic.com/153tl6s.png)

(http://i42.tinypic.com/4joqyu.png)

(http://i40.tinypic.com/23vewn.png)

Edit: now it does support variable field sizes.
Title: Re: MineSweeper
Post by: AFS on April 27, 2013, 05:21:08 pm
Nice job! :D

I'm not really a fan of minesweeper, so I can't give you advice or anything, but I liked its functionality (menus, save, load, three difficulties). Very nice.

And about screenshots, you could try this code:

if (sf::Keyboard::isKeyPressed(sf::Keyboard::[Some Key])) {
     sf::Image screeny = yourWindow.capture();
     screeny.saveToFile("SS.jpg");
}

;)
Title: Re: MineSweeper
Post by: Janneman on April 27, 2013, 06:11:53 pm
Quote
Nice job!
Thanks :D

And thanks for the screenshot solution, that looks interesting. Definitely going to try that out.
Title: Re: MineSweeper
Post by: eXpl0it3r on April 27, 2013, 08:33:30 pm
Nice! :)
I has really feel of the (original?) Minesweeper. What I don't like that much, is the fullscreen mode, since I usually like to capture the whole field with one look, which is not quite possible in fullscreen.

Some varying field sizes would also be interesting. :)
Title: Re: MineSweeper
Post by: Janneman on April 27, 2013, 09:01:41 pm
Quote
What I don't like that much, is the fullscreen mode
I could've done it windowed, but since I like to keep the tiles as quadrangular as possible I would have had to remove another row of the board. And then the form of the board is more of a bar than a square :)

Quote
Some varying field sizes would also be interesting. :)
Yeah, I also thought about that, but didn't feel like implementing it, so I just chose to let the amount of mines vary per level.
Title: Re: MineSweeper
Post by: didii on June 11, 2013, 01:25:56 pm
Wow, thanks for stealing my stuff (http://en.sfml-dev.org/forums/index.php?topic=10677.0)...
Title: Re: MineSweeper
Post by: Haikarainen on June 11, 2013, 06:59:39 pm
Wow, thanks for stealing my stuff (http://en.sfml-dev.org/forums/index.php?topic=10677.0)...

Hmm. By investigating his code there doesn't seem to be many similarities at all. He might have taken inspiration from your code and application, but the only thing I can see he have stolen from you is the graphics, how is the graphics licensed? Did you create them yourself?
Title: Re: MineSweeper
Post by: Janneman on June 11, 2013, 07:56:06 pm
Well, I was just searching the web for a good tileset, and found your one. There are no licenses at all, so why wouldn't I use it?
Title: Re: MineSweeper
Post by: Silvah on June 11, 2013, 07:58:05 pm
IANAL, but in most jurisdictions "no license" is equal to "all rights reserved", making any use illegal.
Title: Re: MineSweeper
Post by: Janneman on June 11, 2013, 08:17:47 pm
Oh, well, I don't know anything about licensing; this was just a practice project and I never meant to harm anybody, but I'll replace the tileset.
Title: Re: MineSweeper
Post by: Haikarainen on June 11, 2013, 10:31:56 pm
Well you could at least have given proper credits.
Title: Re: MineSweeper
Post by: didii on June 12, 2013, 02:23:37 am
It's almost impossible to find it using Google without knowing my name. The graphics itself are only found inside a .zip-file on my Github, so impossible to find using Google Images.


It's not that I mind that much, I was mostly surprised by seeing this, not harmed. And actually on reflecting, I'm glad my project has helped you further completing yours. Use it as you like, that'll help you more than myself, since I stopped working on it. And in fact, I remember creating the topic specifically to help people who are thinking about making the same. So I'm kind of being a hypocrite right now, but it was on purpose.

Take this as a warning to be careful when copying stuff over the internet. Everything you find on the internet is automatically licensed except when explicitly said it is not (which is fundamentally wrong in my opinion) as Silvah said. When working on a bigger project this is pretty important to keep in mind.

So use it as you like. I'm glad I was able to help you :)


Wow, thanks for stealing my stuff (http://en.sfml-dev.org/forums/index.php?topic=10677.0)...
Hmm. By investigating his code there doesn't seem to be many similarities at all. He might have taken inspiration from your code and application, but the only thing I can see he have stolen from you is the graphics, how is the graphics licensed? Did you create them yourself?
I did not inspect the code, since I did not have the time to do it. That's why I wrote 'stuff' :P and yes I've created them myself with Paint!
Title: Re: MineSweeper
Post by: Janneman on June 12, 2013, 10:01:07 am
Quote
It's almost impossible to find it using Google without knowing my name. The graphics itself are only found inside a .zip-file on my Github, so impossible to find using Google Images.
I searched for Minesweeper games, then I found yours on this forum :)

Quote
Take this as a warning to be careful when copying stuff over the internet. Everything you find on the internet is automatically licensed except when explicitly said it is not (which is fundamentally wrong in my opinion) as Silvah said. When working on a bigger project this is pretty important to keep in mind.
Yeah, I'm definitely going to remember this for future projects. Maybe I should try to make my own sprites/sounds etc., the problem is I suck at that.

Quote
So use it as you like. I'm glad I was able to help you :)
Thanks :)
Title: Re: MineSweeper
Post by: Silvah on June 12, 2013, 12:12:06 pm
Everything you find on the internet is automatically licensed except when explicitly said it is not
There's another problem with that: in most jurisdictions (the US being a notable exception), it's actually impossible to say "this work of mine is not copyrighted". Such statement has no legal effect in these jurisdictions.
Title: Re: MineSweeper
Post by: didii on June 12, 2013, 12:28:27 pm
Quote
Take this as a warning to be careful when copying stuff over the internet. Everything you find on the internet is automatically licensed except when explicitly said it is not (which is fundamentally wrong in my opinion) as Silvah said. When working on a bigger project this is pretty important to keep in mind.
Yeah, I'm definitely going to remember this for future projects. Maybe I should try to make my own sprites/sounds etc., the problem is I suck at that.
With the current system of licencing you don't have a lot of choice. There are plenty of sites though who wants to share their art, tilesets and/or sounds. Deviantart is a great place to get some inspiration, but has a lot of licensed stuff. Or search for 'tileset' on Google and you'll find plenty of sites with graphics free to use.

Everything you find on the internet is automatically licensed except when explicitly said it is not
There's another problem with that: in most jurisdictions (the US being a notable exception), it's actually impossible to say "this work of mine is not copyrighted". Such statement has no legal effect in these jurisdictions.
Then the system is even worse than I thought... Good to know though. But that means the only way of sharing the things you've made is to ask for such a zlib/libpng licence as SFML has?
Title: Re: MineSweeper
Post by: Nexus on June 12, 2013, 04:09:49 pm
Maybe I should try to make my own sprites/sounds etc., the problem is I suck at that.
Then get better :P

Especially for graphics, I find it quite important to have an own and consistent style. It needn't always be very polished; sometimes, simple graphics fit better. However, random spritesheets patched together mostly look bad (and you have to care about licenses).

For example, take a look at VVVVVV: The graphics are extremely simple, but they match the retro style of the game (although I'm personally not a big fan of this pixel style).
Title: Re: MineSweeper
Post by: MorleyDev on June 12, 2013, 07:39:03 pm
Don't be afraid of "placeholder" graphics and sounds tastefully acquired from whatever corner of the internet allows it. 99% of programmer art sucks :)
Title: Re: MineSweeper
Post by: Nexus on June 12, 2013, 08:25:01 pm
I agree that there may be a lot of good assets to find, even free ones. However, the difficulty is to combine them in a way such that the game doesn't look like a patchwork, which is usually far worse than programmer art.

But I don't think that most programmer art sucks. If you check out the SFML games in the project forum, there are some with really nice graphics. Even if not all of them can compete with professional art, they still look good. Of course there are also many games with simple graphics made in Paint, but they tend to be smaller projects (often from beginners), where the focus lies on programming and not a shiny result. Correspondingly, the developers are less ambituous at making good graphics.

For music, it's a bit different -- I believe it is much more difficult to create something that sounds interesting and not boring or annoying. Also, it might be easier to find a music theme and some sound effects that match the game. Especially for sound effects, it's not obvious when different artists are involved in the making, while different graphic styles are well recognizable.

Anyway, that's only how I see it :)