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

Pages: 1 ... 3 4 [5] 6 7 ... 9
61
Graphics / SFML 2.0 Drawing doesn't work
« on: June 14, 2009, 05:58:47 am »
I tried to do a simple test using SFML 2.0,
Code: [Select]

sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "O hai");
sf::Shape Rect=sf::Shape::Rectangle(50,50,200,100,sf::Color::White);
// Start game loop
    while (Window.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (Window.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                Window.Close();
        }

        // Clear the screen (fill it with black color)
        Window.Clear();
  Window.Draw(Rect);

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

and I got an access violation exception (something to do with OpenGL state or something).  I tried the code with the SVN trunk version and everything worked fine.  

Basically my question is, How usable is SFML 2.0 / when should we be able to essentially "beta test" it?

62
SFML projects / Squeebs, a 2d comic mmorpg
« on: June 13, 2009, 09:54:38 pm »
Quote from: "dabo"
Quote from: "Dinocool"
@dabo, if it gets stuck at 10 files just rerun and remember if your on vista run as admin with xp sp2 compatibility


I'm using xp sp2. I have tried 5-6 times and it always gets stuck with 10 files left and 298 kb downloaded.


Same here, (Well I'm using Windows 7, but if I try compatability mode it actually breaks it more (it doesn't even get that far and says it's loading but pretty much freezes)).

63
SFML projects / Squeebs, a 2d comic mmorpg
« on: June 09, 2009, 10:09:46 pm »
I'm wowwed just by the startup.  Seems very interesting.  
However, (this could just be me) but the website is sometimes unresponsive and right now the game is "loading" with 10 files to go.  

But other than that this is great!  

I wouldn't mind helping depending on what you need.

64
Audio / sf::Sound SetPosition, how does it work?
« on: June 07, 2009, 09:32:20 pm »
Wow that article is really helpful, thanks!

65
DotNet / Change RenderWindow's Title after creation...
« on: May 18, 2009, 07:14:32 pm »
Oh well in that case I would say it is a very useful function to add.  Many applications have changing titles.  Browsers are a good example of this.  In the gaming realm maybe the programmer would like to show the score on the window.  Or post statuses on the title.  There are many applications for this and simply providing it wouldn't hurt.

66
DotNet / Change RenderWindow's Title after creation...
« on: May 18, 2009, 04:57:40 pm »
I just did a quick lookup on changing title, it's actually really simple.  In win32 you use SetWindowText and you can change the window text.  I'd say for you (Laurent) it would take about five minutes tops.  I haven't checked the mac or linux functions but I assume it would be as simple.  

I know this is a minor feature and that you have more important features to work on, so why don't you delegate some of these minor tasks to other people (there are many qualified people on these forums).  I know that you do like to keep control of the code, but some of these small changes someone else could do.  If something does go wrong it wouldn't break too badly.

67
General / Inheritance Problem?
« on: May 10, 2009, 06:34:19 am »
it probably means you do not have a default constructor.  You need to call your AnimSprite constructor that takes an argument with an initialization list (use the : ).

Check out: http://www.cprogramming.com/tutorial/initialization-lists-c++.html

68
General discussions / sf::Rect<> design question
« on: May 04, 2009, 01:44:04 pm »
I know at first I was confused by the four point scheme as opposed to the origin + width/height.  But to fix it all I did was add the width and height to the origin points anyway...

I guess it depends what previous library or language you come from.  

I also agree that a SetHeight and SetWidth could be added; for now I just create new rects with the desired width and height...inefficient...i know...

70
General / SFML and Box2D
« on: April 14, 2009, 07:34:44 pm »
Awesome, I shall look through the code.  One question, what is Toolbox?

71
Window / Change origin
« on: April 12, 2009, 07:56:36 pm »
use SetCenter() (by Center it really means origin).

72
General / SFML and Box2D
« on: April 12, 2009, 06:21:13 pm »
Currently I'm trying to get by with just using a physics scale and scaling up and down between Box2D and SFML.  I might try to use views later.  

However currently I'm having trouble defining shapes between Box2D and SFML.  My player contains a Sprite of an image but overlaying the Sprite is a Circle for a shield.  Now for the b2Body associated with the player I want it to be a circle when the shields are up and a composition of shapes when shields are down.  Currently I'm testing collision with the Circle idea, but I can't seem to get it to work.  I think the problem is with how I set up the position, center, etc of shapes and sprites in SFML vs bodies and shapes in Box2D.    Anyone have any tips for this? I know the problem is probably simple, but it has been vexing me for a while.  

Here's a run down on how I set up the Shape in SFML:
I take the max of the player's width and height and add 10 to it, the final value being the diameter.  
I then set up the circle Shape given a Sprite's position, the diameter, etc.
I had to hack at the position until it centered it (not the best idea but it worked at the time) adding or subtracting by the Sprite's size to the Shape's x and y.  
I then pass the Shape's position to the b2Body.  

Now I know something is wrong but can't pinpoint it.  The collision appears to be off on one side and the body also appears to be slightly larger than I wanted (I pass the radius/physScale to the body).


EDIT: I hacked my way at it again and I kind of got it working.  Seems problem was Sprites "center" themselves at the top left corner while Circles center themselves...well at their center.  I knew this but somewhere I forgot something somewhere.  Still right now its a brute forced way...but yeah.

73
General / High memory usage of SFML applications
« on: April 09, 2009, 03:41:07 pm »
SFML doesn't sleep unless you tell it to (or UseVerticalSync() or SetFramrateLimit() ) using sf::Sleep()

74
General / Signalsending system
« on: April 07, 2009, 06:11:30 pm »
just a very small minor thing: Receiver is spelled wrong.  I don't know if that was intentional or not.  

Grammar police out.

75
General / SFML and Box2D
« on: April 07, 2009, 06:04:13 am »
So I tried to set up Box2D for my game and I broke it.  I'm pretty sure its the scaling factor I used to get from pixels to meters (I pretty much just divided by a factor of ten) and I completely broke Box2D.  It stuttered for a bit and after a while threw an exception.  

Anyway I wanted to re-ask how to scale my units.  I've never used an sf::View before nor do I know how to convert from pixel to meter coordinates.  I do know that my screen size is 1024 x 768.  My test image is a 32 x 32 circle.  How do I set up stuff then? Do I divide the screen size by the width and height to get units that way? All I know is I'm very confused when it comes to setting up Box2D (with SFML).

Pages: 1 ... 3 4 [5] 6 7 ... 9