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

Author Topic: My Snake  (Read 11186 times)

0 Members and 1 Guest are viewing this topic.

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
My Snake
« on: February 17, 2009, 09:44:16 pm »
Uhuuu finally I finished it. My first game in c++ (I almost gave it up when I found sfml). Not very complicated but it works.

Link to the wiki.

And feedback is welcomed.

When the snake gets out of the ground (worm tunnels) it is confused. I first wanted to rotate the entire scene but I didn't find rotate in views so it was a little more complicated and I just made the view shake.
My new webpage calinmocanu

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
My Snake
« Reply #1 on: February 18, 2009, 09:51:14 am »
Please use a .zip/.rar compressed file, it's better.  :)
.EXE files are dangerous without that. Thanks.
I tested your game : it's impressive. This games without cases, it's not habitually! And graphics are beautiful, and I'm not talking about the snake's rotation (are collisions possibles with them?). I loved the moving screen, like an explosion :P
But they are bad point:
- Under Vista, the main "menu" flashes : is it normal?
- The cursor mouse is ugly : delete and replace it by a pointer or something like that
- It' a bit... chaotic.  :x And difficult for me...
- Where are the sources :?:

EDIT: excuse-me, I haven't seen it was a compressed file  :oops: .
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
My Snake
« Reply #2 on: February 18, 2009, 01:17:45 pm »
Quote from: "pierreyoda"
Please use a .zip/.rar compressed file, it's better.  :)
.EXE files are dangerous without that. Thanks.


What? There's nothing dangerous about uncompressed executables.

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
My Snake
« Reply #3 on: February 18, 2009, 01:37:27 pm »
Quote from: "pierreyoda"

(are collisions possibles with them?)
But they are bad point:
- Under Vista, the main "menu" flashes : is it normal?
- The cursor mouse is ugly : delete and replace it by a pointer or something like that
- It' a bit... chaotic.  :x And difficult for me...
- Where are the sources :?:

What collisions? The snake goes out of the scene but it will eventually return as the mouse pointer doesen't. It stops sending any more events whe it goes out or something like that.

I don't use vista, I tested it at school and it worked well though, except at the end it says "error pure virtual call"

I didn't thought about the mouse but I'll leave it as it is...

Thats how I wanted it to be :D

And I'll make the sources available if you can tell me how can I get a copyright on them (Like Laurent has in the SFML).
My new webpage calinmocanu

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
My Snake
« Reply #4 on: February 18, 2009, 02:32:07 pm »
I think you can publish under GPL 3 with a copyright. I see lots of files with :
Code: [Select]
/*
Copyright 2007-2008 - YOUR NAME

This file is part of xxx (Your Project)

xxx software is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

xxx software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/


And for the mouse, it was just a suggestion. Like others. The game is quite impressive like that. Is it your first project under SFML?
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
My Snake
« Reply #5 on: February 18, 2009, 02:38:23 pm »
Quote from: "pierreyoda"
I think you can publish under GPL 3 with a copyright. I see lots of files with :
Code: [Select]
/*
Copyright 2007-2008 - YOUR NAME

This file is part of xxx (Your Project)

xxx software is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

xxx software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/


And for the mouse, it was just a suggestion. Like others. The game is quite impressive like that. Is it your first project under SFML?


PS: And they aren't collisions with worms, spiders... ?
PS: I just see that it's not the screen who moves but sprites... I love  :) .
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
My Snake
« Reply #6 on: February 18, 2009, 03:14:49 pm »
I put the source and the copyright with that in. click link again

My second game in total, I made the other one with flash. Oh and c++ is the only language I know (sort of know). So yes this is my first with sfml.

I also made a kind of simulation with it. There are a lot of particles at the beginning and they attract each other (gravity)  and collide. It should simulate the forming of a solar system from a mass of gas to a star and some planets. the graphics are black circles  :lol:
My new webpage calinmocanu

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6288
  • Thor Developer
    • View Profile
    • Bromeon
My Snake
« Reply #7 on: February 18, 2009, 03:52:50 pm »
Nice, very special controls. ;)
The spider is a good idea, but sometimes (combined with the steering, the worm heaps and the webs) it is hard to evade it. Possibly you could make it slower, or not killing the snake all at once.

But I also got the "flash" problem in main menu (Windows Vista).

Quote from: "pierreyoda"
- Where are the sources :?:
Why is every SFML user expected to publish the source code? At least I could comprehend one not wanting to reveal all his work. Especially if he delivers the application for different plattforms.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
My Snake
« Reply #8 on: February 18, 2009, 05:08:01 pm »
Nice game, but there're several errors in your source.
  • Please ALWAYS use / as your directory seperator, especially for #inclueds. It works flawless under Windows, but also under Linux and MacOSX. Otherwise compilers on Linux and OSX won't find the includes you wrote in your sources like <SFML\Graphics.hpp> etc.
  • Watch the case-sensitiveness! The best solution is to name all files/resources in lower-case. "spider.png" and "net.png" are wrong in your source. Again, fixing this makes your game compatible with Linux and OSX.
  • Which compiler do you use?!?! It seems that your compiler allows you to change a private member variable of a derived class, namely myStartTime, which is declared private in sf::Clock. I just commented the problematic lines out and voila, worked.
Besides that, neat graphics! I like the smooth movements and rotations. =)

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
My Snake
« Reply #9 on: February 18, 2009, 05:36:15 pm »
Quote from: "Nexus"
Nice, very special controls. ;)
Quote from: "pierreyoda"
- Where are the sources :?:
Why is every SFML user expected to publish the source code? At least I could comprehend one not wanting to reveal all his work. Especially if he delivers the application for different plattforms.

It was just a question. It's question of mentality.

PS: Sorry for multi-posts, EDIT fonction "crashed"...  :oops:  :shock:
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
My Snake
« Reply #10 on: February 18, 2009, 08:45:40 pm »
I wanted it to make open source for the beginning so it didn't upset me :wink:

I modified SFML and made that public, the compiler is normal.

What do I use at LoadFromFile("...") exactly? / or \ ( "\\" )
I tried both and they worked on my pc but only one worked at my friends pc (both windows)
My new webpage calinmocanu

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
My Snake
« Reply #11 on: February 18, 2009, 09:28:12 pm »
Quote from: "pierreyoda"
- Under Vista, the main "menu" flashes : is it normal?
Happens to me too using XP Pro

Btw, nice game.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6288
  • Thor Developer
    • View Profile
    • Bromeon
My Snake
« Reply #12 on: February 18, 2009, 10:15:02 pm »
Quote from: "pierreyoda"
It was just a question. It's question of mentality.
Mine was just a question, too. ;)
I have just noticed that often, the source code of a developped game is requested.

Quote from: "csiz"
What do I use at LoadFromFile("...") exactly? / or \ ( "\\" )
I tried both and they worked on my pc but only one worked at my friends pc (both windows)
Generally, you should better use the slash / instead of backslash \ (raw \\). The advantage of slash is plattform independence.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
My Snake
« Reply #13 on: April 17, 2009, 11:31:59 pm »
compiled it for linux too, you can find it on the wiki
My new webpage calinmocanu