Archive

Archive for 24.06.2011

The End of Tip of the Day

As some of you know, I was posting a tip of the day each day. However, I have decided this is counter constructive – some days I have more tips to give than others, so it makes more sense just to post on demand. Thus, shall be renaming Tip of the Day to Tips and Tricks and they will become less patterned, and instead released when I have something to say.

-Xander

Categories: Notice

Space Fight – Physics

So how do objects interact with each other in the game, and indeed, how can we generalise their individual manipulation in the world?

Important: This is my first post where I use some physics and vector algebra. If you aren’t comfortable with these topics, and would like help understanding the posts, feel free to comment and I’ll give you some help and/or suggestions. Moreover, if you are happy with these topics, but think I’ve done a bad job of explaining, then tell me that as well!

Individual Objects

Position and Facing

A physics object in the game doesn’t keep track of it’s own position or facing for technical reasons (they is part of the graphics object, which gets them from sf::Sprite). Nonetheless, a physics object is capable of retrieving and modifying it’s position via virtual functions and polymorphism. The same is true for it’s facing/angle.

Read more…

Follow

Get every new post delivered to your Inbox.

Join 73 other followers