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

Pages: [1]
1
SFML projects / The Flying Penguin
« on: January 22, 2011, 08:47:03 pm »
Heya, I've been working on a 2D game called The Flying Penguin that originally used SDL/OpenGL, but I made a made a switch to SFML since it handles things a lot better than my custom made SDL/OpenGL wrapper.

It's basically a 2D flight game where the point is to fly as far as possible on limited fuel, avoiding birds that give penalties while collecting fish for extra fuel.



To download, you'll have to get it from the GitHub page because it's not a stable release yet (v0.1 is the pre-SFML version).
http://github.com/leezh/flying-penguin

I have yet to do a proper project page, but so far my blog is all about the project anyways.
http://leezh.net/

Comments and critiques would be appreciated.

Enjoy!

2
Window / Segmentation Fault when Window is Closed
« on: January 22, 2011, 08:37:19 pm »
I took the code and tried compiling it. No problems at all, even with GDB running with breakpoints. Oh well, sorry for the pointless digging. I guess I should have tested it out before I posted.

3
Window / Segmentation Fault when Window is Closed
« on: January 22, 2011, 03:51:55 pm »
Sorry for digging up this old article, but I think it's because the code would call window.Clear() and window.Display() after window.Close() is called. You should use probably use:

Code: [Select]
   sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT, 32), "solo");

    while(window.IsOpened())
    {
        sf::Event windowEvent;
        while(window.GetEvent(windowEvent))
        {
            if(windowEvent.Type == sf::Event::Closed)
            {
                window.Close();
                return; // <-- FIX
            }
        }

        window.Clear();
        window.Display();
    }

Pages: [1]
anything