-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|697|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Blogs Home -> Blogs

Created : 03 June 2019

Platformer with Ropes(emscripten)

Nature of code

I noticed a book at home and got into reading mode. I had read this book before so decided to browse the free online book by daniel shiffman - nature of code. In here I wanted to look at the chapter with flocking but I noticed some kind of swinging example. I was able to convert the code to Monkey2 and get it somewhat working in a quick platformer mockup.

I have been testing and fixing today. I uploaded a emscripten version.


I kind of have difficulties deciding how to aproach this rope feature further. I had the idea to create a more complex anchoring, where the rope if it touches blocks in then gets anchored at that point. But I think this might be to difficult for me to get working in a short time.

Right now the player can shoot /release ropes with 'r' and move up and down the rope and swing (w/a/s/d) If you jump into a deeper part of the level you can only get out with the rope.

I was thinking of adding some kind of enemy to spice things up. But who knows...



Tuesday, 04 June 2019, 00:55
Scrolling's not working for me - I get a stutter when pressing left/right cursor, but that's all.

Also "scroll" is spelled incorrectly (sccoll).

Not sure the swinging mechanism is right just yet though, the momentum is erratic. I do like the idea though (especially since I made lots of use out of the Bungee rope in Worms!).
Tuesday, 04 June 2019, 02:45
I had added automatic scrolling at the last moment I had not thought of testing the manual scrolling yet.

I wil take a look at worms and see how it handles there
Tuesday, 04 June 2019, 03:20
Yeah, if you aim for Worms Mechanics, then this could be great.
It's going to be fairly tricky though, I reckon. The Worms rope was VERY well put together!