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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Srejv

Pages: [1] 2 3 ... 5
1
SFML projects / FlipGame[Updated 02.18 2009]
« on: February 24, 2009, 04:28:49 pm »
I think the new way of showing the level is better... but maybe that's just me. :\

Yes, it's the sf::font class when it loads the default font. :\ From what I understood it's a sfml bug..

2
SFML projects / FlipGame[Updated 02.18 2009]
« 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. :]

3
SFML projects / FlipGame[Updated 02.18 2009]
« 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. :)

4
SFML projects / FlipGame[Updated 02.18 2009]
« 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.

5
SFML projects / FlipGame[Updated 02.18 2009]
« 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

6
SFML projects / FlipGame[Updated 02.18 2009]
« 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.

7
SFML projects / FlipGame[Updated 02.18 2009]
« on: February 14, 2009, 12:41:12 pm »
Thank you. :)

8
SFML projects / 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. :]

9
Network / Unicode string
« on: January 26, 2008, 05:24:16 pm »
Is it possible to send unicode strings using the sf::Packet?

10
Feature requests / Joysticks auto recognition
« on: January 24, 2008, 09:08:52 pm »
Is it possible to make sfml recognize a joystick if you plug it in after the application has started?

11
Audio / get playing offset
« on: January 24, 2008, 08:59:32 pm »
Isn't there any way get the playing offset from a then music class? :(

12
Window / Joysticks
« on: January 18, 2008, 06:41:47 pm »
Why is axis the same as buttons?

Code: [Select]

sf::Event::JoyMove.Axis

is the same as
Code: [Select]

sf::Event::JoyButton.Button


What I mean is it gives the same ouput. Shouldn't JoyButton.Button give like -1 or something when just tilting an axis and JoyMove.Axis return -1 if I'm pressing a button?

13
Audio / get playing offset
« on: January 18, 2008, 03:40:20 pm »
How do I get the playing offset from sf::Music?

Code: [Select]
/usr/include/SFML/Audio/Sound.hpp: In member function 'float pbox::Jukebox::CheckOffset()':
/usr/include/SFML/Audio/Sound.hpp:211: error: 'float sf::Sound::GetPlayingOffset() const' is inaccessible
jukebox.cpp:152: error: within this context
jukebox.cpp:152: error: 'sf::Sound' is not an accessible base of 'sf::Music'


The error I got while trying. :<

14
Network / Port problems
« on: January 12, 2008, 02:13:11 pm »
Okay, I removed the Bind from client.cpp, but it still doesn't work. :/

Edit:

So I changed the recieve and send ifstatements to:

Code: [Select]

if(Server.Receive(Message, sizeof(Message), Received, ip) != sf::Socket::Done)
  return;


And
Code: [Select]

if(Client.Send(Buffer, sizeof(Buffer), target, port) != sf::Socket::Done)
{
  std::cout << "Msg fail" << std::endl;
  return 0;
}


And it works. :)

15
Network / Port problems
« on: January 11, 2008, 06:42:19 pm »
Okay, but does that matter? :|

Pages: [1] 2 3 ... 5
anything