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

Pages: 1 [2]
16
SFML projects / Re: Blokade [source and binaries now available]
« on: January 28, 2013, 08:55:56 pm »
I am trying to compile in Windows 8 with the Code::Blocks project, I get a compile error on an Enum not being a class. When I turn on compile for C++11 then I get the error getenv is not in namespace std. Once I remove the std then the project compiles but the game crashes upon execution  :-\ Your binary works fine though. And I have put all resources in the debug bin output directory.

Plus, my executable is 4mb but yours is only 1.2mb. How did you setup your Code::Blocks environment for it to compile with that project? I installed the Code::Blocks from the SFML downloads.

17
SFML projects / Re: Blokade [source and binaries now available]
« on: January 28, 2013, 06:57:34 pm »
I remember seeing =0 somewhere for virtual functions, now I know what it means. And I have to re-design the way I initialize instances, I'll see what I can come up with.

Done, I modified the first post with the links :)


18
SFML projects / Re: Blokade [source and binaries now available]
« on: January 28, 2013, 06:00:01 pm »
wow that was fast! thanks a lot, I appreciate it :) I merged your pull request and the Xcode build still compiles fine, that's awesome.

Yes I'm learning about std::string, I started to use it in the FileAccess class and it's much more elegant than char*. Yes GFXMenuItem is supposed to be pure virtual, I forgot to remove the protected members while refactoring, I'll take care of that.

I did read about initialization lists, probably a better practice than init methods. But llvm complains when I don't provide a default constructor, that's why I used init methods. I see your point about the inheritance, I will look into it.

About the guard types, I saw code examples using both and I thought it was better, I'll take one off.

Great feedback and thanks for the port  :D

19
SFML projects / Re: Blokade
« on: January 28, 2013, 08:06:54 am »
Source is now available: https://github.com/moonfirefly/Blokade
Also link to binaries in the readme  :) you probably need OSX 10.8.2 to run it though.

If someone wants to try to get it to compile and run on windows, that would be cool!


20
SFML projects / Re: Blokade
« on: January 21, 2013, 04:44:31 pm »
indeed tank, they're not playing but considering the exhaustive amount of clones in the wild, I should blend in  :)

21
System / Re: isKeyPressed does not always capture input
« on: January 21, 2013, 10:00:37 am »
OSX 10.8.2 running on a Macbook Pro (June 2012). To this day I still get the issue sometimes, it's annoying. Maybe I should try the nightly builds then. thanks!

22
I've been using SFML for my project in Xcode and it was beautiful so I decided to port it to windows with Code::Blocks.

Did you get XCode to bundle the dylib libraries in the application archive? my builds only contain the frameworks, test machines require SFML installed for the binaries to even start.

23
SFML projects / Re: Blokade
« on: January 21, 2013, 07:46:51 am »
I have found why the binary wasn't working on another mac, the SFML dylib libraries are not compiled in the application bundle. As soon as I installed SFML on the other machine, the game started flawlessly.

I don't think users should have to install the lib to play the games, I think XCode is missing a build setting to compile the necessary dylibs right in the application archive.

but that's for another post..  ;)

24
SFML projects / Re: Blokade
« on: January 21, 2013, 04:31:39 am »
yes I avoided the official name to be off the google radar, but since this project is only for fun it should be fine  ;D it's the first game I thought would be fun to make.

I have an include that is OSX-specific to get the resource path to load images and such, besides that I only use C++ and SFML includes. I have to figure the equivalent for Windows. I think I'll download the Windows SFML install and see what I have to do for the resource path. I think I need a preprocessor define for each OS in that case.

25
SFML projects / Blokade [source and binaries now available]
« on: January 21, 2013, 03:57:00 am »
I got far enough to show my work in progress with my simple game Blokade, a falling blocks clone. My goal is to experiment with SFML and learn to make a small game in C++ in XCode.



Right now I'm not able to get the game to run on anything besides the Mac I used to make it. I think the XCode build settings need to be tweaked. I will make a binary available when I sort this out :)

---

Just uploaded Blokade version 0.9.3 with top 5 high scores and top lines. A lot of changes in code but UI is the same.

Github: https://github.com/moonfirefly/Blokade
OSX binary: https://www.dropbox.com/s/ig2cu3qv5usksd7/Blokade_0.9.3_OSX_En.zip
Windows binary: https://www.dropbox.com/s/edy9gpticrk9orj/Blokade_0.9.3_Windows_En.zip

This is probably my last update for this game for a while. I'm starting my next SFML project, a mario bros 1 platformer :) I will upload to github and make binaries available as soon as I get a decent version running.

26
System / Re: isKeyPressed does not always capture input
« on: January 19, 2013, 09:20:59 pm »
Well at least I know my code is fine :)

I use XCode 4.5.2 with the SFML2 project template provided in the SFML install for OSX. I had to do some changes to make it compile though, as indicated in this post : http://en.sfml-dev.org/forums/index.php?topic=10175.0

I'm curious to see if other developers experience the same keyboard input issue on OSX.
Thanks for your input!

27
System / Re: isKeyPressed does not always capture input
« on: January 19, 2013, 07:27:48 pm »
See below a complete small example that reproduces the problem:

#include <SFML/Graphics.hpp>

int main (int argc, const char * argv[]) {
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");        

    while (window.isOpen()) {
        sf::Event event;
        while (window.pollEvent(event)) {
                if (event.type == sf::Event::Closed) {
                        window.close();
            }
        }

        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Return)) {
            window.close();
        }
       
        window.clear();
        window.display();
    }

        return EXIT_SUCCESS;
}

The code closes the window on return key press but sometimes I have to press twice to make it work.
Am I missing something?

28
System / isKeyPressed does not always capture input
« on: January 19, 2013, 06:22:04 pm »
I have the following code to check for return key press in my menu main loop :

if (sf::Keyboard::isKeyPressed(sf::Keyboard::Return)) {
    if (m_buttonExit.isSelected()) {
        m_pWindow->close();
    }
    else if (m_buttonStart.isSelected()) {
        newGame();
    }
}

The problem is that sometimes I have to press twice to actually get it to detect the return key press. I don't press any other key at the same time and this code executes at every single loop. I'm on OS X.

I'm not sure what to do at this point. I disabled to key repeat, no difference. The problem is intermittent as well, happens roughly 1 out of 5 times.

Pages: 1 [2]
anything