veggis

2.5D platformer?

Recommended Posts

I've been looking for a framework for an idea i have. I want to create a 2d platformer with 3d objects for web and mobile.

Babylon is attractive, but i'm unsure if there are any physics engine that can handle constraints and also suitable for a platformer in that way.

Any ideas?

Is unity the best way to go here?

Thanks :)

Share this post


Link to post
Share on other sites

If everything's missing is a physics engine, we do have it. But those are 3d physics engine (oimo and cannon.js). There are many 2D physics engines, but they need to be integrated with the framework (or be integrated externally), and you will also need to make sure the "3d dimension" is staying constant, so it will eventually stay 2D.

Share this post


Link to post
Share on other sites

I would take my time and look at 2D game engines first if you're thinking anything along the lines of focusing on sprites that move in a X-Y plane. IMHO using Babylon.js for a 2.5D game like what's discussed here http://www.html5gamedevs.com/topic/22268-25d-beat-em-up-jump/ would be overkill since you're not taking advantage of a lot of what BJS has to offer.

If you're thinking something like Super Mario 3D world but you only move in 2 directions Left Right Jump/etc. then yeah it's pretty much oimo, cannon or the default.

 

Share this post


Link to post
Share on other sites

Here's Schteppe's Platformer example with BabylonJS(top) and Canvas(bottom).

Once again WAD to jump/left/right.

https://jsfiddle.net/oagn4jvz/6/

So it is certainly doable. But whether or not it's better than simply limiting z-axis velocity/position in a 3D physics-engine. Well. I have no idea.

It's a bit messy, and uses 2 separate loops, but you get the idea.

Share this post


Link to post
Share on other sites

@Raggar @vtange

Great examples! This is definetity what i'm looking for.

I'm thinking it would probably be easier to implement it with a 3d phsyics engine. But probably better performance wise with something like p2. Im not sure.

 

Thanks everyone!

Share this post


Link to post
Share on other sites

  I read somewhere from a 2d camera or 2d layer, is there such a thing in babylonjs? or I have to build myself?

2d camera  would be great for my project.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.