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

Pages: [1]
1
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.

2
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]