Matter-js: Create a platformer examples

Created on 19 Jan 2017  路  5Comments  路  Source: liabru/matter-js

Hi !

A platformer game example would be awesome to begin with the engine.
As I said in issue #335 , it can a bit hard to developp a platformer with the current findable ressouces.

The only one I found is : https://codepen.io/tanker837/pen/qaeQKZ

If somebody got something else, i'll be thankful.

feature-request

Most helpful comment

I'm a bit of a novice programmer, but I wrote the platformer that you linked on codepen. If anyone has any questions about putting the game together I'd be happy to help.

https://landgreen.github.io/sidescroller/
Press T to enter testing,
0-+ to zoom

All 5 comments

@hilde2 - I think this is a great idea, and actually from my experience with MatterJS (making a simple slingshot game), I don't expect it would be too difficult. What would you be specifically looking for in terms of how it would be broken down? If you can help me plan out such a tutorial I would be more than happy to write it.

I've also proposed some improvements to documentation (Issue #373), so check that out and see if any of my suggestions there would be useful. Any feedback on potential challenges you've had would be very useful.

There is a bit of work to make something good for a platformer.
A documented tutorial like you explain in #373 could be awesome.

Something that I like and I found really usefull is what you can found in P2.js examples : https://github.com/schteppe/p2.js/blob/master/examples/canvas/platformer.html
I made a quick js fiddle if you want to try it : https://jsfiddle.net/2h4ah4k1/
This help a lot to start a platformer project on the P2 engine :

  • Learn how to make the body stop rotating
  • Collissions detector
  • Slope
  • etc ...

And there is still this tunneling bug #335 . In this is issue there is this example : https://jsfiddle.net/hsassewa/
This just show the basics, like collissions sensors, and non rotating bodies.

I'm a bit of a novice programmer, but I wrote the platformer that you linked on codepen. If anyone has any questions about putting the game together I'd be happy to help.

https://landgreen.github.io/sidescroller/
Press T to enter testing,
0-+ to zoom

I found your codepen really usefull ! But a bit too much complex for the one who just want to try MatterJS.

Agreed, I hope to use @landgreen's code to create a simpler example with just the core mechanics.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

car1ot picture car1ot  路  3Comments

moe091 picture moe091  路  3Comments

jack-guy picture jack-guy  路  3Comments

drachehavoc picture drachehavoc  路  4Comments

kunchenguid picture kunchenguid  路  3Comments