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 - Robostove

Pages: [1]
1
Window / Re: Switching between event processors
« on: March 17, 2014, 09:11:23 am »
Thanks for clarifying how long it takes to time out due to lack of event processing, eXpl0it3r.

Yeah, my program is a (fairly simple) state machine. In between two states (event processing loops) I was loading a few textures, generating several thousand sprites from them and assigning them random positions and orientations. This delay was quite short (much less than a second), but I feared that might be the issue.

Instead, I found a few places where I was passing bad input to functions, cleaned them up, and I haven't seen a crash yet. The delay definitely wasn't my issue.

Still, I am still curious about other ways that I could switch between game states. I haven't come up with anything better than bools and return codes.

2
Window / Switching between event processors
« on: March 17, 2014, 07:42:00 am »
Is there a best practice for switching between event handling functions?

I'm working on an application with several different modes that I need to switch between, each with different requirements for event processing. (They each have their own "game loop")

Currently, these event processors are member functions of different classes. I flip a boolean inside of an event processor when it's time to move to the next, exiting that game loop. When that loop exits, it sends a code that instantiates an object of the corresponding mode, and the next loop starts.

What I'm worried about is the delay between the different game loops. If it's too long, will the window start "Not Responding"? I'm experiencing some fairly hard to reproduce "not responding" crashes now, and I'm wondering if this is the problem.

Any alternate techniques or critiques of my design will be greatly appreciated. Thank you.

3
General / Re: Difficulty setting up SFML 2.1
« on: December 01, 2013, 05:36:06 am »
Thanks, I've managed to get everything working.

Should have read the tutorial more carefully  ;D


4
General / Difficulty setting up SFML 2.1
« on: November 30, 2013, 08:47:14 am »
I'm trying to compile on Ubuntu.

There's no 2.1 package using apt-get, so I tried the CMake tutorial -

2.1 doesn't appear to have a CMakeLists.txt so I tried CodeBlocks -

I set up the compiler and linker search directories, linker settings, and I'm getting the following errors:

-------------- Build: Release in proj1 ---------------

Linking console executable: bin/Release/proj1
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-graphics.so when searching for -lsfml-graphics
/usr/bin/ld: cannot find -lsfml-graphics
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-window.so when searching for -lsfml-window
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-system.so when searching for -lsfml-system
/usr/bin/ld: cannot find -lsfml-system
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings

I've tried it with and without using the SFML_STATIC macro. What's with the incompatible .so message?


Giving up, I tried compiling through the terminal-

g++ -c main.cpp -Ihome/libs/SFML21/include
 
and I get
main.cpp:2:29: fatal error: SFML/Graphics.hpp: No such file or directory
compilation terminated.

I don't understand why all of these seem to think that this directory doesn't exist... it's definitely there.

I'm a Linux newbie but this seems like it should be straightforward... What am I doing wrong?



Pages: [1]