physics platform chain random terrain demo
Shri

All,

Sorry for the wordy title, but I didn't know what to call it

I put together another little physics demo. If you go to my site www.ashatej.com, it is at the bottom of the demos section "Stickman Run" (physics chain terrain demo). The demo generates a random bunch of chain vertices to mimic random terrain. There is a stickman figure that you can make run over the terrain using the left and right arrow keys (no jumping) On rare occasions, the random terrain creates a section that the stickman can't run over. If that happens, just reload the page and run the app again.  I tested it on a PC with firefox and chorme and it seems to work as advertised.

The demo uses the standard wade physics extension. Here are a couple of links about box2d chains https://docs.coronalabs.com/guide/physics/physicsBodies/index.html#edge-shape-chain-body and https://www.youtube.com/watch?v=oBcv_P_YDrw&index=6&list=PLRqwX-V7Uu6akvoNKE4GAxf6ZeBYoJ4uh .

The whole demo is available for download as a zip file. The stickman graphics are free to use but were NOT released under CC0, so there are some restrictions. If you go to the demo credits, you can load "Robert Brooks" web page and look at the licenising information. Please respect the rights of the graphics copyright holder. There is some standard copyright stuff in the source code, but that's mine so feel free to do with it what you like. I don't use the online editor, so you have to know a little code to understand what is going on.

If you have any questions regarding the demo, post them to this thread and I will try to get you an answer.

cheers - shri

All 2 Comments
cartyman

As someone who is trying to learn about physics and box2d, is it easier for me to start with this or the other physics project that you posted?

Shri

cartyman,

I would start with this one, as it uses only the released wade version, and the game world and the stickman are simpler (stripped down) versions.

I also would higly recommend watching the youtube video link. The beginning of the series is here. Don't pay too much attention to the java and processing stuff, but the guy does a great job describing terms and how box2d works. After you watch the videos, I would recommend this link. The code is all c++, but again, ignore the language specific stuff and pick up the concepts.

If you have questions regarding what I did in the demos, post them here and I will try to answer, or else I'm sure someone from CWC will reply.

cheers - shri

Post a reply
Add Attachment
Submit Reply
Login to Reply