Skip to content

Devlog 4

Antonio Caggiano edited this page Jan 26, 2021 · 5 revisions

Back with a new devlog. This time I am going to talk about dynamic entities, and how everything is now destructible!

While a static entity is not affected by physical forces thus does not move, a dynamic entity is affected by forces, so it can fall and can be pushed and pulled around. Thanks again to Box2D, implementing this was just a matter of setting the type of physics bodies to either b2_dynamicBody or b2_staticBody.

[Video dynamic/static bodies]

Another easy but important thing to add was a proper background in order to give to the player's eyes something more interesting to see than a boring solid color. For the moment, I just added a static sprite, but I guess it would be nice to implement a fancy parallax scrolling effect in the future.

Then I realized that something was missing. Tiles and entities could be added and positioned freely in the scene and, as all normal people that like symmetry, I also wanted to destroy them, not by interacting through the editor, but as Mario does by punching (or hitting with his head?)!

Clone this wiki locally