On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Day 3

Done today

  • Movements and bullets are now controlled by physics.
  • Added obstacles on the battlefield.

Fighting with physics, round 2

Thanks to some tutorials, and a fresh head this morning, I was finally able to implement physics-based movements and collisions, for the player-controlled tank and the fired bullets. There is still a lot to do, but the basics are there. I was also able to put an (indestructible for now) obstacle on the battlefield, making sure the player’s tank react accordingly.

A funny thing I noticed while watching those tutorials, is that they both use the same assets pack I chose for my game. Well, it seems that the visual aspect won’t be where this game shines with originality!

War machine from JSON

I made it possible to assemble a war machine from a JSON string. It all goes through an intermediate class, which I’ll be able to use in the garage when it’s going to be the time to let the player assemble their machine. It’s still far from complete, as is does not contain things like health, armor, bullet types, damage, etc.

For now, it allows to select:

  • A hull: Each hull is a scene, with a sprite, collision shape and one or multiple attach points. The collider is re-parented to the war machine upon assembly.
  • Attachments: A list describing which attachments (e.g. cannons) are tied to which attach point, and to which firing group(s) they belong.

For now, this looks like this:

{
	"components": {
		"hull": {
			"prefab": "Hull_TankDarkHuge"
		},
		"attachments" : [[
			{
				"type": "cannons",
				"prefab": "Cannon_Dark02",
				"groups": [ 1, 2 ]
			}
		], [
			{
				"type": "cannons",
				"prefab": "Cannon_Dark02",
				"groups": [ 1 ]
			}
		]]
	}
}

And here is the tree for a hull with two attach points:

What’s next?

Tomorrow, I plan to work on the following:

  • Damage, health and destruction!