Jump to content
  • Advertisement
Sign in to follow this  
Tangletail

Implementing Box2D into isometric question.

This topic is 795 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

Does anyone know how well Box2D works in Isometric? And if it works out pretty well, could I get some tips on implementing it?

 

Some notes about the world...

The world is just going to be 2D sprites, and there will only be one plain of movement. That is to say that there will be no bridges that goes over a walkable path.

Share this post


Link to post
Share on other sites
Advertisement

I guess where I am hunged up the most is trying to convert box2D's coordinates to isometric projection.

 

Because while box will see it as top down, I still need to convert information between spaces.

 

Like using the Open Source software tiled. When you draw polygons in isometric, you need to convert the polygons to orthogonal projection. And then scale them to your physics world scale.

Share this post


Link to post
Share on other sites
Good point of Box2D being that, akin to how logical maps work (independent to real screen coordinates), is not tied to the actual graphical representation

Share this post


Link to post
Share on other sites

@Tangletail; as in, converting world space coordinates to view space?

 

I will grant that the Articles system is not as good as it used to be on this site, but there are a crapton of articles about all manners of 2D graphics topics still on this site. Try this one.

 

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/axonometric-projections-a-technical-overview-r3223

Share this post


Link to post
Share on other sites

Basically it's just the axis aligned tilemap but rendered in isometric view.

 

Rendering a 2D tilemap into isometric projection in 2D would just work like this

x = (tile.x - tile.y) * (TILE_WIDTH / 2)
y = (tile.y + tile.x) * (TILE_HEIGHT / 2)

Assuming it's a 2:1 ratio isometric projection. Checking collision would basically just be the opposite of that with some algebra

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!