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

Pages: [1]
1
General / Re: Not rendering position and rotation accurately
« on: January 06, 2014, 07:30:13 pm »
You should pause the physics when you draw the sprites. From your picture, it looks like you call the step function between each draw of sprites.

Otherwise, you should consider creating your own custom sf::Drawable, sf::Transformable and draw Quads or Triangles instead of individual sprites. It will be much faster this way.

2
General / Isometric perspective to screen perspective
« on: December 27, 2013, 10:34:45 pm »
Hi, I have the following transform:

const static sf::Transform worldToScreen(sqrt(3) / sqrt(6), 0, -sqrt(3) / sqrt(6), 1 / sqrt(6), 2 / sqrt(6), 1 / sqrt(6), 0, 0, 1);

I see that the transform method of sf::Transform will always return a sf::Vector2f and take a sf::Vector2f as a parameter. Any way to make it return a sf::Vector3f and passing the parameter as a sf::Vector3f?

What I'd like to do is simply convert isometric world coordinates to screen coordinates by using this equation: [x',y',z']'=[T][x,y,z]' where x',y',z' are the screen coordinates (z' is ignored), T is the transformation matrix shown above and x,y,z are the world coordinates to convert.

Is this the correct way to use sf::Transforms?

3
Looks promising! However, the program crashes just after I selected the difficulty level when testing the testlevel...

Pages: [1]