I want to make a bouncy platformer as in this https://www.youtube.com/watch?v=WMrmGUdWprA.

This game is not tile based, but there are sloppy lines going in any direction.

I see two challenges:

  1. How to represent and make levels. This includes generating arbitrary paths, also paths has to have normals so I can draw two lines for the edges of the path.

How to represent this path? I need an api similar to Path2D, and I need to be able get the points that make up the lines of the path, so I can draw it. Also maybe I need the normals of the path so I can draw two lines opposite each other that make up the tunnel. How to generate a random tunnel using this Path2D api? For more advanced, The tunnel randomly shrinks with sharp spikes and sometimes contains smooth square shapes lines.

  1. How to do collision detection against sloppy lines.
  • 1
    \$\begingroup\$ This looks like something you can handle with standard ray-vs-line-segment intersection tests, which have been covered here in past Q&A. Can you clarify what you've tried so far, and where specifically you've gotten stuck, or had trouble getting your desired outcome? \$\endgroup\$ – DMGregory Sep 29 '19 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.