matter-js icon indicating copy to clipboard operation
matter-js copied to clipboard

Create a platformer examples

Open HildericSB opened this issue 8 years ago • 6 comments

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.

HildericSB avatar Jan 19 '17 15:01 HildericSB

@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.

vkoves avatar Feb 28 '17 01:02 vkoves

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.

HildericSB avatar Feb 28 '17 13:02 HildericSB

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

landgreen avatar Mar 13 '17 22:03 landgreen

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

HildericSB avatar Mar 15 '17 12:03 HildericSB

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

liabru avatar Mar 16 '17 14:03 liabru

i did some coding with pixi js and matter js working together here, https://davidclews.com/post/11.html

salivity avatar Mar 22 '22 22:03 salivity