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

Pages: [1] 2
1
General / wxWidgets and SFML2 Issues
« on: June 24, 2011, 11:32:36 am »
Hmm, then I don't know. I know that with 2.9 something changed with the handle or something - can't quite remember - so the code was not working any more.

2
General discussions / mmorpg server question
« on: June 11, 2011, 05:18:02 pm »
I've never written a server for any online game, but i'd say it may be done like this:

- The server knows where each player is ('course he does)
- The server sends the data of all players in a radius around the player to the client. (Or maybe the server even checks if the player can see the other players, but he may delegate that check to the client)

3
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 05:01:31 pm »
Quote from: "Nexus"

[...]
What flags did you use to compile? I couldn't reproduce all warnings with -Wall -Wextra...


I am using CodeBlocks, but as far as I can see, its only -Wall.

4
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 10:45:11 am »
The Library seems nice, it would be much better though if it wouldn't clutter me with warnings just by including headers from it:

Code: [Select]
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator==(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|153|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator!=(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|161|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator==(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|153|warning: no return statement in function returning non-void|
Thor\Detail\MovedPtr.inl||In function 'bool thor::operator!=(const thor::MovedPtr<T, OwnershipPolicy>&, const thor::MovedPtr<T, OwnershipPolicy>&)':|
Thor\Detail\MovedPtr.inl|161|warning: no return statement in function returning non-void|
Thor\Detail\SmartPtrImpl.inl||In function 'void thor::detail::ForwardDestroy(T*) [with T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]':|
Thor\Detail\SmartPtrImpl.inl:148|53|instantiated from 'thor::detail::SmartPtrImpl<T, OwnershipPolicy>::SmartPtrImpl(U*) [with U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]'|
Thor\Detail\MovedPtr.inl:38|16|instantiated from 'thor::MovedPtr<T, OwnershipPolicy>::MovedPtr(U*) [with U = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, T = thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>, OwnershipPolicy = thor::NoCopy]'|
Thor\Detail\ResourceManager.inl:132|102|instantiated from 'thor::ResourcePtr<Resource> thor::ResourceManager<Resource, ResourceKey>::AddResource(thor::ResourceManager<Resource, ResourceKey>::SlotIterator, const ResourceKey&) [with Resource = sf::Image, ResourceKey = thor::Resources::ImageKey, thor::ResourceManager<Resource, ResourceKey>::SlotIterator = std::_Rb_tree_iterator<std::pair<const thor::Resources::ImageKey, thor::detail::ResourceSlot<sf::Image, thor::Resources::ImageKey>*> >]'|
Thor\Detail\ResourceManager.inl:76|30|instantiated from 'thor::ResourcePtr<Resource> thor::ResourceManager<Resource, ResourceKey>::Acquire(const ResourceKey&) [with Resource = sf::Image, ResourceKey = thor::Resources::ImageKey]'|
Thor\Detail\SmartPtrImpl.inl|63|warning: statement has no effect|


(MinGW-GCC 4.5.0)

And, no, I won't disable warnings on my side.

[edit]
Well, I found a solution on my side, but I still dislike warnings in third-party header files.
[/edit]

5
General / wxWidgets and SFML2 Issues
« on: June 10, 2011, 09:04:29 am »
What wxWidgets version where you using?

6
Python / Python binding generation tools
« on: April 17, 2011, 12:59:40 pm »
Quote
sf.cpp(22196) : error C2039: 'PollEvent': Ist kein Element von 'sf::RenderWindow
'

(Means something like "'PollEvent': Is no Element of sf::RenderWindow)

It seems like you don't have the newest pysfml2 AND sfml2

The other things are warnings, not nice, i don't like if they come from third party libraries, but you can to ignore them.

7
Python / Python binding generation tools
« on: April 16, 2011, 10:00:14 pm »
Hmm, that is strange, it seems like its trying to find "SFML/Window.hpp" in "c:\users\niklas\desktop\pysfml 2-0.0.1\SFML" which it, of course, can't find.

I don't know much about the vc compiler so i can't help though.

8
Python / Python binding generation tools
« on: April 09, 2011, 11:14:12 am »
There where some recent changes to sfml2 that made the binding incompatible but i managed to fix that locally and compile it using MinGW.

I only tested the examples so far but it seems i can finally switch to sfml2, even though, as you wrote, the binding may contain bugs.

9
SFML projects / SFGUI (old thread)
« on: September 27, 2010, 03:49:08 pm »
The file you are probably looking for is "<sfgui>/samples/CMakeLists.txt" since that seems to be the only file that contains the name of the SFML libs.

Running any sample crashes with a segfault though, so not sure if theres something missing.

10
General / Beginner Code Problems
« on: September 22, 2010, 10:49:30 pm »
Yes, that is basically correct.

11
General / Beginner Code Problems
« on: September 22, 2010, 10:41:22 pm »
No, this is not what i meant.

Her is an example
Code: [Select]

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
    sf::Image Image;
    Image.LoadFromFile("<PathToImage>")
    sf::Sprite Sprite(Image);

    unsigned int Alpha = 255; //Used to store the alpha value
    int Direction = -1;
    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }
         Alpha += Direction
         if(Alpha = 0) Direction = 1 //If Alpha is 0 then start increasing it
         else if (Alpha = 255)  Direction = -1 //Else if Alpha is 255 start decreasing it
        // Clear the screen (fill it with black color)
        App.Clear();
        Sprite.SetColor(sf::Color(255, 255, 255, Alpha)); //Set the Alpha value of the color to the stored Value
        App.Draw(Sprite) ///Draw the Sprite
        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


[edit]
I just realized that the code had a logical error. Now it should work. (Didn't test it though)
[/edit]

12
General / Beginner Code Problems
« on: September 22, 2010, 09:31:35 pm »
here, this code block is from a tutorial:

Code: [Select]
   
int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}



Each iteration of the code inside the "while (App.IsOpened())" loop is basically a frame.

13
General / Beginner Code Problems
« on: September 22, 2010, 09:24:30 pm »
Well, since nothng is drawn until App.Display() is called this won't, of course, work that way.*

What i would do is have a variable for the alpha value, change that each frame - either by a fixed value or based on the frame time - and then set the color of the Sprite. (And then draw the sprite and call App.Display() of course)

I leave the actual implementation to you.

*This assumes that this block is how it acually appears in your code.

14
General / Rect class?
« on: September 19, 2010, 09:04:36 am »
Hmm, you got the TopLeft coordinates and the BottomRight ones, what do you need more for an Rectangle?


If you don't know what i mean, look at this:
Code: [Select]
Top/Left------------------Top/Right
    |                        |
    |                        |
    |                        |
    |                        |
Bottom/Left------------Bottom/Right

15
Graphics / Graphical operations in a thread
« on: September 17, 2010, 09:06:02 pm »
It does seem to work, i don't get any errors and most examples run (except shader but that doesn't run in the previous revision too)

So, i guess its fixed, thanks.

Pages: [1] 2
anything