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

Author Topic: FlipGame[Updated 02.18 2009]  (Read 14170 times)

0 Members and 1 Guest are viewing this topic.

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« on: February 13, 2009, 09:56:04 pm »
Hey guys!

I've made little puzzler and I'd like some feedback. :)

http://srejv.radhuset.org/flipgame/


So I rewrote the game, and improved on it. :) Changed a few of the levels too.
I'd still like some feedback! Good luck! :)

I'm using the animation framework in the wiki for animation. :]

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #1 on: February 14, 2009, 12:41:12 pm »
Thank you. :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
Re: FlipGame
« Reply #2 on: February 14, 2009, 01:20:08 pm »
Nice Game, funny to play. :)

If you want to continue working on it, you could make everything a little bit more colored, add some flip animations or something like this... ;)

Quote from: "Srejv"
I already have a feature request: a save function. Because noone will finish all the 100 (!) levels in one go.
That is definitively not SFML's task. ;)

You can save by writing into files. Use the C++ standard library's file stream std::fstream to do so.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #3 on: February 14, 2009, 01:29:58 pm »
Thank you! :)

Yes, animation is on the list. :] And colors!

I think I have to rewrite my screen class to support sharing variables between screens. I'm currently using http://www.sfml-dev.org/wiki/en/tutoriels/multiecransjeu_en and I try to add a static bool to that class to check if you press the "load game" option. But it won't compile. :(

1>main.obj : error LNK2001: unresolved external symbol "protected: static bool Screen::load_game" (?load_game@Screen@@1_NA)


So I'm gonna have to think of another way.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1485
    • View Profile
    • Blog
    • Email
FlipGame[Updated 02.18 2009]
« Reply #4 on: February 14, 2009, 02:26:02 pm »
Would you mind releasing the source code so that non-Windows users can enjoy your game? :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
FlipGame[Updated 02.18 2009]
« Reply #5 on: February 14, 2009, 02:34:38 pm »
Quote from: "Srejv"
So I'm gonna have to think of another way.
Not really. You probably forgot to define the Screen::load_game function or didn't define it exactly with the same type as declared. At least the linker cannot find the definition.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #6 on: February 14, 2009, 02:54:03 pm »
Quote from: "Tank"
Would you mind releasing the source code so that non-Windows users can enjoy your game? :)


Yes, that's the plan, only it's kinda broken right now since I'm trying to make it a better game. :] But I'm having some trouble so ... well.

Quote from: "Nexus"
Not really. You probably forgot to define the Screen::load_game function or didn't define it exactly with the same type as declared. At least the linker cannot find the definition.


I just had a public static bool, no function. :\ No idea what I'm doing wrong.

 
Code: [Select]

class Screen
{
public:
    static bool load_game;
    virtual int Run (sf::RenderWindow &App) = 0;
};


Edit:

Code: [Select]

1>square.obj : error LNK2001: unresolved external symbol "protected: static class sf::Image Square::m_White" (?m_White@Square@@1VImage@sf@@A)
1>square.obj : error LNK2001: unresolved external symbol "protected: static class sf::Image Square::m_Grey" (?m_Grey@Square@@1VImage@sf@@A)



Trying to follow http://www.sfml-dev.org/tutorials/1.4/graphics-sprite.php to get static vars working, but it's not working. Checked http://msdn.microsoft.com/en-us/library/f6xx1b1z(vs.71).aspx and I think it's got something to do with accessing the variables from other places. :\


Edit again:

Yes. When I remove the call from square.cpp the error vanishes. Hm. So calling a static variable from another file isn't allowed? :S

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
FlipGame[Updated 02.18 2009]
« Reply #7 on: February 14, 2009, 03:13:52 pm »
Quote from: "Srejv"
I just had a public static bool, no function. :\ No idea what I'm doing wrong.
Ah sorry. But the problem remains the same. The variable needs to be defined in the CPP file:

Code: [Select]
bool Screen::load_game;           // or:
bool Screen::load_game = false;

If you don't initialize load_game, it is initialized with its null value (in this case false) like all static or global variables.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #8 on: February 14, 2009, 05:07:55 pm »
Quote from: "Nexus"
Quote from: "Srejv"
I just had a public static bool, no function. :\ No idea what I'm doing wrong.
Ah sorry. But the problem remains the same. The variable needs to be defined in the CPP file:

Code: [Select]
bool Screen::load_game;           // or:
bool Screen::load_game = false;

If you don't initialize load_game, it is initialized with its null value (in this case false) like all static or global variables.


Aah! It works now! :D Thank you so much!

Though I still think I have to rewrite some of this stuff. Trying to figure out how to make the animation.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
FlipGame[Updated 02.18 2009]
« Reply #9 on: February 14, 2009, 05:28:50 pm »
Quote from: "Srejv"
Aah! It works now! :D Thank you so much!
No problem. ;)

Quote from: "Srejv"
Trying to figure out how to make the animation.
One way is to have several sprites which represent each step of the animation. So you draw one sprite, wait a certain time, draw the next, and so on... The more steps you have, the more fluent the animation looks.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Daazku

  • Hero Member
  • *****
  • Posts: 896
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #10 on: February 14, 2009, 08:35:02 pm »
Just a question :D. I was level 33 and i clicked on start game so i lose my save game... How can i revert back to level 33?
Pensez à mettre le tag [Résolu] une fois la réponse à votre question trouvée.
Remember to add the tag [Solved] when you got an answer to your question.

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #11 on: February 15, 2009, 05:12:13 pm »
Sorry, if you clicked the start game button the saved game is pretty much gone. :\ I'm working on a better way to solve the saving in a new version.

It's got animation and colors. :)

Daazku

  • Hero Member
  • *****
  • Posts: 896
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #12 on: February 15, 2009, 06:03:50 pm »
The game crash when we close the window.
Im stuck at level 54.

Edit: Stuck at level 60!
Pensez à mettre le tag [Résolu] une fois la réponse à votre question trouvée.
Remember to add the tag [Solved] when you got an answer to your question.

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
FlipGame[Updated 02.18 2009]
« Reply #13 on: February 15, 2009, 07:41:12 pm »
Yes, the game crash is also fixed in the new version that's coming soon. Working on it right now. :]

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
FlipGame[Updated 02.18 2009]
« Reply #14 on: February 22, 2009, 11:44:31 am »
Good job, I like the new animations. Don't know what I think about the way you show the current level though :)

I also get an error when I quit the game:

'The instruction at "0x0930afda" referenced memory at "0x00000080". The memory could not be "read".'

 

anything