Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: epic Snake with SFML  (Read 4012 times)

0 Members and 1 Guest are viewing this topic.

Engineer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
epic Snake with SFML
« on: August 19, 2013, 01:47:23 am »
Hello all !
I finally succesfully made a snake using SFML and wanted to share it here  :)
Unique features:

* Awesome In-Game Epic Audio Player ! Unleash the 8 bit epic songs while playing Snake !
* A snake that is very unique... You don't eat fruits, you eat keys (don't ask me why).
* Excellent fail screen !

You start with S, and change music with Space.
You control the snake with the arrows of your keyboard.

I want to thank you all the people who helped me into making the game a reality, and a special Thanks to Geheim for his BIG support.  :D


The link:
http://www.megafileupload.com/en/file/442446/snakeSFML-zip.html

Tell me your opinion about it. :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: epic Snake with SFML
« Reply #1 on: August 19, 2013, 02:00:36 pm »
Snake! ;D

There seem to be a few issues:

You start with S, and change music with Space.
Well writing to press START while it's actually 'S' is a bit confusing.

You control the snake with the arrows of your keyboard.
This seems to mix different songs. Looks like you're not stopping the currently playing song, before starting a new one.

Unfortunately the game just starts without giving the player time to actually locate where they are and what their next move should be. So you'll end up in a wall with a high percentage.

There's no restart functionality, so every time you die, you'll have to restart the whole game. This does only make it more frustrating...

The collision detection is off somewhere, because you often can run through the keys without picking them up and sometimes pick them up, even though you only passed them. Then there's the issue that you somehow can go onto the top wall without dying.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Engineer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: epic Snake with SFML
« Reply #2 on: August 19, 2013, 02:13:03 pm »
First, thanks for your feedback and taking the time to try my game (even if its a classic and simple one). :)

For the issues:

You need to press S to Start : I know it can be kinda confusing but its because I'm using a start screen (find it to be cooler) :P

Music problem: You sure it mix songs ? Everytime I press space it makes a new song play (I know they are all 8 bits but they are all different). Maybe you mean that if you stop one music then press space a few times  the song will be where you paused it but that's not the case either.

I know for the restart thing and for the problem of locating, through the framerate limit of the game is set low so the game is kinda easy. (there's another variant of the game where I double the framerate limit and make the snake grow 3 times bigger everytime you eat a key :p ).

The problem is that due of the architecture of the code right now, it is kinda impossible to make the game restart. I did not make a screenstate system (like putting all the game in a function and call this function if you press a button in the menu). Instead I just draw sprite (the fail screen if your snake hit something, the menu while you still didn't press S)... I know it's a very very very bad choice but it's only my first game and I plan to implement a screenstate system in the next game :)

Most of the time on my side the snake picks the key up. For the collision I use the contains() method which detect if a point (x,y) is contained in the sprite of the key. So yeah it's kinda based on luck... :)
For the top wall I would just need to change the background image (located in data/), as well as all the epic songs if you wish to hear them again, outside of the game :D

Thanks a lot for your feedback. :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: epic Snake with SFML
« Reply #3 on: August 19, 2013, 02:49:11 pm »
Here's a quick video showing all issues. Apparently the double layered music only occurs in the start screen. Seems like you don't prevent the starting of a new sound even though the start screen music is playing.



You need to press S to Start : I know it can be kinda confusing but its because I'm using a start screen (find it to be cooler) :P
Fixed
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Engineer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: epic Snake with SFML
« Reply #4 on: August 19, 2013, 03:29:39 pm »
Oh yes, you mean you press space while being in the menu, well I fixed that (it was easy) :)
and thanks for the background image : P
I'll release a new version soon with fixes, keep in mind tho its only my first game so there are some things I can not fix (like losing after being in the menu for a little time) because of the bad architecture of the code. :)
Thanks for taking the time of uploading image/and video to provide feedback, I really appreciate it :)
« Last Edit: August 19, 2013, 03:38:55 pm by Engineer »

 

anything