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.


Topics - timo777

Pages: [1]
1
System / How to declare sf::Thread
« on: December 26, 2012, 12:33:59 pm »
I can't get rid of the following thing... When I try to make a member for my class like this:

sf::Thread                              ListenThread;

I can't declare it like this somewhere else:

sf::Thread                              ListenThread(&CMultiplayer::Listen, &Multiplayer);

At the window class, for example, there is a member create() to initalize it. So why it isn't here? I am proberly doing something stupid...  :(

2
Graphics / Unresolved external symbol "public: static class sf::Image *
« on: December 24, 2012, 05:51:14 pm »
I have got a problem. I don't know if this is a sign I got to recompile SFML or I just created a bug myself. It gives this error:

1>CImageHandler.obj : error LNK2001: unresolved external symbol "public: static class sf::Image * CImageHandler::ImageList" (?ImageList@CImageHandler@@2PAVImage@sf@@A)
1><*private*>\Game\Debug\Client.exe : fatal error LNK1120: 1 unresolved externals

The relevant code is:

void CImageHandler::OnInit(){
        sf::Image               Image;

        Image.loadFromFile("Back.png");

        ImageList[0]=Image;  
}

And I defined it like this in the header file:

static sf::Image                        ImageList[100];

I am using SFML 2.0 with my AMD graphics card with the dynamic version. Say if I forgot something... :)

3
General / Run-Time Check Failure #2
« on: December 22, 2012, 12:38:07 pm »
I am using Windows 64 bit and SFML 2.0. Now, if I close the window on the normal way, i get the following error:

Run-Time Check Failure #2 - Stack around the variable 'window' was corrupted.

And randomly sometimes not that one but:

Run-Time Check Failure #2 - Stack around the variable 'shape' was corrupted.

I am trying to compile just the standard 'setting up' tutorial code so this shouldn't be a problem. I don't think I have used any release things. After commenting a bit the error doesn't appear without:

sf::CircleShape shape;

Does anyone know the answer?

Edit: so the error occurs at the end of the main() function but is somehow caused by that single line...

4
Network / [SFML 2]Networking game
« on: December 18, 2012, 03:53:42 pm »
Hello,

This is not really a SFML specific question but I am curious what's the best way to program a multiplayer game structured? If you have a good OOP-based engine, how would you make it sync between server and client. Would you make dummy classes for everything except the player and let the server do all the calculations or not?

And where to use threads? For both server and client, or only the server?

A lot of questions... but last one: are there any good multiplayer tutorials out there (not too advanced)?

Thank for help, even if you can answer one question. :)

Pages: [1]
anything