C++ SFML and Box2D tutorials?

Started by
2 comments, last by BeerNutts 8 years, 4 months ago

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

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?

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

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.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

This topic is closed to new replies.

Advertisement