We thought to add grids and portholes because pipes are made by different overlapped parts and if we change the opacity of them the connections will be visible. But maybe it’s a good idea to reduce the opacity. I’ll talk about it with my colleagues.@kpars
Our physics engine is Box2D. The main character is made up of six fixtures:
- Two arms that are sensors used to detect walls where the main character can be gripped.
- Upper body, lower body and feet (upper body is turned off when the main character crouches) that are related with collides with the environment, detection of damage sources and as well as doors, lightnings and sticks.
- Feet sensor that detects the sort of surface where is walking the main character or if it isn’t in contact with any surface in order to launch the falling animation.
All the movements of the main character are done by linear impulses but always checking that he doesn’t exceed the maximum linear velocity.
I use damping when the main character climbs stairs and grips a wall. A high damping when he climbs to avoid the falling of him and a low damping when he grips a wall to reduce the falling speed.
I talk about the main character because I think that it’s the most interesting point, but if you want information about something different, you only have to ask it.
About the data saving, all the elements of a map are serializable objects. Those objects have a Type, Subtype and a Specific Type and stores colour, rotation, the layer where they belong and a lot of parameters of each kind of object (on/off time, elements controlled by a stick…). Then, when a map is loaded, new objects are created using the parameters previously stored.