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

Pages: 1 ... 640 641 [642] 643 644 ... 720
9616
SFML projects / Re: Aurora
« on: September 21, 2012, 08:18:42 am »
So, instead of using another compiler that better suits your needs, you just write your own C++11 implementation  ???

I think you are setting your own limits
Well the library is not developed only for his purpose and he probably doesn't like to force people into using a specific compiler.
Keeping the compabiliy will limit the ability of C++11 features but keeps the possibility of using MSVC. It's not the nicest thing, but it maybe better than not supporting MSVC at all.

For the one game I'm working on, we're currently moving to MinGW 4.7.0, because of the lack of C++11 features, but we don't need to support MSVC because it's only the dev team that has to work with the code... ;)

9617
General / Re: How should I include SFML code in my craps game?
« on: September 21, 2012, 07:17:49 am »
At the moment rollDice() is a function not a class...

I wouldn't manage it the way you suggested at all.
For me there would just be one class that holds the game logic. The class has mainly two functions, one for updating/game logic and one for rendering/drawing. It's also the class itself that holds the sprite/texture for the table. Now one can have different classes for the game play. There could be a player class that simulates things for player(s), or a dice class that holds a random number generator, etc...
The update function and draw function get called from the screen/state manager and one handles the whole game logic in the update function, and then draws the sprites/players/coins/etc. in the draw function.

9618
Graphics / Re: Shapes problem
« on: September 21, 2012, 07:05:55 am »
If you had stated in the beginning that you were using VS 2012, we could have help you right then and there, since it's well known that one needs to recompile SFML for VS 2012... ;)

9619
Graphics / Re: Is it good if I set center of Sprite? (SFML1.6)
« on: September 21, 2012, 07:04:13 am »
There's no such thing as the 'best way'.
Both are equal and it only depends on how your game logic works and what seems to be easier in your situation. ;)

9620
Window / Re: pollEvent -> Segmentation Fault
« on: September 20, 2012, 10:14:26 pm »
One should mostly always handle the events with a while-loop

Taking a quick look at your "SmallGameEngine" code:

void IntroState::HandleEvents( GameEngine& game )
{
        sf::Event event;

        if( game.screen.pollEvent( event ) )
 

Ooops!  ;D
Yes that's really an Ooops! ;D
This mistake happened because I just rewrote the whole engine by using the old SDL/C-ish code underneath. I'm not sure if it's really wise in SDL to just check with if or if it's another 'mistake' in the original tutorial:
void CIntroState::HandleEvents(CGameEngine* game)
{
        SDL_Event event;

        if (SDL_PollEvent(&event)) {
                switch (event.type) {
                        case SDL_QUIT:
                                game->Quit();
                                break;

                        case SDL_KEYDOWN:
                                switch (event.key.keysym.sym) {
                                        case SDLK_SPACE:
                                                game->ChangeState( CPlayState::Instance() );
                                                break;

                                        case SDLK_ESCAPE:
                                                game->Quit();
                                                break;
                                }
                                break;
                }
        }
}

Thanks for pointing that out, I'll change it as soon as I find the time. ;)

9621
Graphics / Re: is it possible to subtract a texture from an other
« on: September 20, 2012, 10:07:24 pm »
I don't know of any SFML function that could do this, so I guess it's not possible. If yxou really need it you might be able to do such a thing with OpenGL, but I'm not an expert on OpenGL... ;)

9622
General / Re: Unable to setup Netbeaks with SFML
« on: September 20, 2012, 03:29:54 pm »
The error simply states that the compiler couldn't find the libraries, have you set the path to the libraries?

Btw when you use GCC 4.7 you'll have to recompile SFML on your own.

9623
Window / Re: Multiple windows on multiple monitors
« on: September 20, 2012, 02:53:41 pm »
SFML can only create windows on the default monitor,) and it's not the easiest part to port for all platforms.
Can't you get the window position and reset it, or is the window position relative to each monitor?

9624
Graphics / Re: Shapes problem
« on: September 20, 2012, 02:49:45 pm »
Well the code is neither minimal nor complete, e.g. what happens in the drawManager?
Have you tried to just take a wibdow and a shape and render it, without all your engune code? Does it also crash?
At which point do hand over the window to the drawManager?

9625
Graphics / Re: Screen Resolution Change - White Textures
« on: September 20, 2012, 02:16:27 pm »
Well I haven't used XP in over a year but iirc there was never such a problem, nor is it on Windows 7. You could try another VM than VB.

Btw please make use of the code=cpp tag. ;)

9626
Graphics / Re: Shapes problem
« on: September 20, 2012, 02:14:13 pm »
Well then, you still don't provide enough information, showing related code but not the actual problem code won't help us all that much.
At best you should make a minimal and complete example that reproduces the error.
Btw is there really a need for a raw pointer?

9627
General discussions / Re: Trying to gauge image drawing limits
« on: September 20, 2012, 02:10:02 pm »
Which benchmark did you look at? (Not sure about SFML 1.6)
Because the new ones are all faster with static text. Don't look at the percentages!! That's between SFML 2 and SDL 1.1 and SFML is obviouspy faster wirh dynamic text = higher difference = higher percentage count.

9628
General discussions / Re: Trying to gauge image drawing limits
« on: September 20, 2012, 01:45:19 pm »
Text are also handled as textures, if you have static text, the textures/glyphs have to be calculated/prepaired once, where as on dynamic text everythings has to be calculated every frame (or so).

9629
Graphics / Re: Shapes problem
« on: September 20, 2012, 01:42:28 pm »
You're talking about shapes and stuff but in the whole code you provide you never make use of it.
Since you don't have a shape as a member variable I guess you try to delete a local obkect in the destructor which obviously doesn't work. ;)

9630
Graphics / Re: Screen Resolution Change - White Textures
« on: September 20, 2012, 01:33:30 pm »
Afaik there's a problem with Virtual Box...

Otherwise make sure you follow the offical tutorial specially about OpenGL.

Pages: 1 ... 640 641 [642] 643 644 ... 720