Is there any benefit to using box2d in a tiled map game? I plan on using box2d lights of course, to get the lighting effects…I’ve been coding off and on for about a year. Got a new PC and i’m getting back into it. I’m still basically a ‘newbie’ though. I want to finish this game this time!
We need specific details. Is it a platformer, look down, or whatever else?
Oh, sorry. I thought I wrote top-down. I could see the need for box2d in a platformer though. I’m making a 2d top down tiled game. I don’t think i’ll have MUCH need for physics, but possibly a little. It’s the farming game i’ve been working on for some time. But i’ve heard of using box2d for collisions as well. I’ve been trying to find a good book or some good source materials but have not had much luck.
Well it really all depends on what you want to do. I’m not really one to ask about top down games, but I’ve used the library for similar purposes before.
Look at these two links:
https://reversiblean-reversiblean.rhcloud.com/top-down-physics-with-nape-box2d/
http://www.iforce2d.net/b2dtut/top-down-car
They’re not in Java but you should be able to understand it :point:
Box2D is not that hard to learn, look through all the basic tutorials on iforce2d.net or/and watch these tutorials and you’re good to go: https://www.youtube.com/watch?v=85A1w1iD2oA&list=PL-2t7SM0vDfdYJ5Pq9vxeivblbZuFvGJK
But for a tiled game like yours I wouldn’t recommend box2d, collision detection is not that hard to make and lights aren’t either, you will learn a lot if you code it yourself.
It will also be very annoying to use box2d in a (simple) game like yours, it will be very hard for you, harder than just coding some lights yourself. You have to adapt your whole coding style to box2d which is not easy. However, looking through these tutorials won’t do you any harm, and you can after that still choose if you want to use box2d or not.