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

  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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.