Archive for the ‘Box2D’ Category

h1

Long time no post.

March 26, 2009

Ok. Here is a update on whats been happening in the world of schnacken.

Leveldata can now be changed and reloaded during runtime. Thomas have supplied me with new meshs, materials and textures. I have a created a BooleanCollisionTrigger, that can be set to react on collision from certain materials. I have also decided to add a AI pong Level to the game to try some of the logic of saving and loading data between levels since they are recreated/destroy on entry/exits.

The next plan once the trigger is working is to set up a level where the sound can be turned on or off. I also need to implement doors, that can be opened or closed, used to move between levels in the game.

h1

Physics physics physics.

February 24, 2009

I got collision feedback working the way it should. When two objects collide they get notified of each other, the function they end up in will tell them of the other objects, what current shape of that objects physical body that intersected with what shape of their physical body. All shapes does contain material data. So i will know if it’s just a sensor, metal, sword or chicken feather that collided with bone, mud, grass, ground, metal, skull, brain or ham.

This allow me to give the proper feedback and reaction from the objects, limiting me to doing jumps when the feet touch the ground, putting some tiny stars over the head of a character if the head collides with anything at high speed. See if the weapon collides with a shield or body. And the possibility to apply damage or particle effects suitable.

The material system will need to be added. It will contain more information for stuff like particles etc. Giving me the possibility to instantly feedback particle and other data as default and specify on specific events.

This system could be increased to handle bombs, since it’s just one big sensor with the bomb or explosion tag.

Interesting things could come out of this and so far it feels like a sensible stable system.

h1

Bouncing Schnacken.

January 28, 2009

Got the physics up and running for real now as well as fix up some issues thee guy doing the art (Thomas) mentioned. He found out that changing the player mesh (changing file name in the xml) would crash the game due to the fact that the animation names where hard coded. That got fixed up and now that can be changed without that much work, the next xml extension/change will handle different physic body data of the player. Currently the ball the player is suposed to throw get the same material as the physical body of schnacken. This wouldn’t be a problem if the ball didn’t need to be very light and bouncy. The fun part is that the player bounce actually looks quite good when jumping from a high point. It should be a quite trival fix up in xml, might even go so far as to create material templates for the physics that you just set, like flesh, rubber, stone, metal etc.

Fun to make progress I hope it’ll keep up.

h1

The Jetpack Ninja?!?

January 23, 2009

Like I said in my previous post, moving around and colliding with the world works nice. Tried to add a temporary jump function for debug purposes, but forgot to add a check if they player is touching ground, so instead we got  jet pack function. Simulating the actual jump just by adding a upward force works great, and the rest of the movement keep it all platformy in the feeling. you can change direction at any point in the air.

I looked for a way to actually get good feed back when touching the ground, being used from PhysX that there are different types of classes for everything, I totaly missed the obvious solution. Each shape has a isSensor value, by turning that true I get the effect i want. Thank you Flink for telling me.

Time to get to work and get this friday done with, so there is only weekend to focus on.

The next step is to temporarly add a bmp reader to the levelparsing. At the moment only a “if currentPixel != 0″ add block at pixel.position since there isn’t any detailed block types. just blocks or not.

Follow

Get every new post delivered to your Inbox.