Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by MikeD

So 4 days into learning impactjs and with a simple, but working level my artist/designer says. Oh I hoped it was going to be like Mush, not square tiles.

http://www.youtube.com/watch?v=y9er2B8SLF4

What she basically wants is a ground with smooth curves and a player that follows them. In this game the hero moves independently and the person playing manipulates the environment.

So anyone got any ideas how I could go about the collision detection with the ground and using box2d with the hero? Is this even possible with impactjs?

Many thanks

Mike

1 decade ago by StuartTresadern

Use box2d to create the ground polygons. Personally I would use an external application to map the floor object polygons. This should allow you to get a smooth effect. Just try and keep the points down as much as possible.

I use Physics Editor to map polygons http://www.codeandweb.com/physicseditor

1 decade ago by MikeD

Thanks, Physics Editor looks like money well spent. What's involved in doing an exporter for box2dweb?

Now to figure out how I do the ground image etc in ImpactJS.

1 decade ago by StuartTresadern

Exporter is pretty easy (either XML or JSON):
http://www.codeandweb.com/blog/2012/05/30/customize_physicseditor_exporter

If you do not already have texture packer I think you can still get Physics Editor and Texture Packer for a discount price.

I would simply create the graphics for the ground and load them as normal images which you will then attach to the box2d objects (mapped using the Physics Editor). At some point you may need to look at a custom cache / draw code to improve performance.
Page 1 of 1
« first « previous next › last »