Jump to content
  • Advertisement
Sign in to follow this  
BiiXteR

C++ SFML and Box2D tutorials?

This topic is 1106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I've been looking for Box2D/SFML (combined) tutorials for the past 2 days and I can't find any good ones.

Either they just randomly start with a ton of code and you can't follow, or its SDL and Box2D.

 

So, I'm looking for help to learn SFML and Box2D at the same time.

Pretty much i want these things : 

  • A tutorial which combines Box2D and SFML.
  • A tutorial which explains everything good and understandable.

Other things to note are : 

  • I know some SFML, though I don't understand how top combine Box2D to work with it.

Thank you. smile.png

Share this post


Link to post
Share on other sites
Advertisement

The thing is physics and graphics are independent of each other. In box2d each entity in the world has  properties such as translation and rotation, use these properties to decide where to render and how to orient your sprites; whether you render using SFML, SDL, or your own library is arbitrary. Also Box2d coordinates are not pixel coordinates, they're "meters" even though dimensions don't exist in the digital world.

 

Are you having any specific issues such as entities not being spaced correctly?

Edited by GameGeezer

Share this post


Link to post
Share on other sites

The thing is physics and graphics are independent of each other. In box2d each entity in the world has  properties such as translation and rotation, use these properties to decide where to render and how to orient your sprites; whether you render using SFML, SDL, or your own library is arbitrary. Also Box2d coordinates are not pixel coordinates, they're "meters" even though dimensions don't exist in the digital world.

 

Are you having any specific issues such as entities not being spaced correctly?

Ohhh, I think that's all I needed to know for now! Thanks :D

Share this post


Link to post
Share on other sites

FYI, I had some blog entries detailing a game I made with SFML and chipmunk physics (which is another 2d physics library like box2d).  Check it out, it might give you some ideas: 2dgamemaking

Be sure and start at the 1st entry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!