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

Pages: [1]
1
Graphics / Re: Converting to standard Cartesian
« on: July 18, 2013, 05:01:50 am »
Thanks again for the input. It still boggles my mind that this is the standard; I would have expected implementations to just come Cartesian baked in - that's what we're all taught to work with in mathematics, after all. Even OpenGL's coordinate system is Cartesian.

I don't mean to bash Laurent or any other API developers, so please don't misunderstand. I'm just surprised. Do most people that use these APIs just work with this coordinate system?

2
Graphics / Re: Extending RectangleShape and Rendering
« on: July 18, 2013, 03:42:15 am »
Ah, that makes sense. So, in this scheme, all the positional and visual data of the tile would be kept within that RectangleShape member. The extra information I was considering is pathfinding related, like weights, isWall, etc.

Thanks.

3
Graphics / Extending RectangleShape and Rendering
« on: July 18, 2013, 02:29:15 am »
I think this problem is from my lack of C++ experience, so forgive me if it's silly. I'm creating a Tile class for the usual reasons, and wanted to just extend RectangleShape so that I could keep all the nice things already available and just add extras for my implementation. So I have it defined as:

class Tile : public sf::RectangleShape {
public:
        Tile(sf::Vector2f pos, const sf::Color color);
        void render(sf::RenderWindow& window);
};
 

The confusion I'm having is with how to render something like this. With a RectangleShape, you can just call window.draw(rectshape). I was hoping to define it something like

void Tile::render(sf::RenderWindow& window) {
        window.draw(this);
}
 

but alas it doesn't work that way.

4
Window / Re: I'm Getting Error LNK2019 When Compiling sf::Window
« on: July 18, 2013, 02:01:56 am »
Have you verified that the project properties are set up correctly? It looks like you've done the include directories, but the linker isn't set correctly so it can't find the definitions of those functions. Check the tutorial for your IDE again and make sure to set the libraries and library directories correctly.

5
Graphics / Re: Converting to standard Cartesian
« on: July 10, 2013, 06:42:44 am »
Yeah, that makes sense, and shouldn't be too bad to implement. Thanks.

6
Graphics / Re: Converting to standard Cartesian
« on: July 10, 2013, 03:26:08 am »
Bah, that's too bad. I'm surprised that this was the chosen coordinate system. Is there a reason for it that I'm not aware of? Standard Cartesian seems to make much more sense.

Thanks for the replies.

7
Graphics / Re: Converting to standard Cartesian
« on: July 08, 2013, 01:22:33 am »
See, extra "complexity" (if you can call it that) like that is what I'm hoping to avoid. My hope was to find some way to just apply it once during launch and have it apply everywhere.

8
Graphics / Converting to standard Cartesian
« on: July 07, 2013, 11:24:17 pm »
I found some old posts similar to this, specifically http://en.sfml-dev.org/forums/index.php?topic=5990.0 from late 2011/early 2012.

I'd like to flip the Y-axis back to use standard Cartesian. Is there a good way to do this without doing changes to every individual entity?

Pages: [1]