Posts Tagged ‘mato’

Day 16: Shooting

Posted by of Polygon Toys (twitter: @pekuja)
Saturday, January 23rd, 2010 6:09 pm

mato-shooty2I’ve added shooting and aiming to Mato. I’ve also added gamepad controls, tailored for an Xbox 360 controller. The game currently has just one weapon, similar to the chaingun in Liero, but I’ll be adding more as I go on. The aiming is done with the second analog stick, while you can use the first analog stick to move left and right as well as control the direction of digging, so you can dig straight down, for example. The gun has analog control over the firing rate, with a maximum firing rate of 8 bullets a second. The clip is infinite right now, but that will change for the final version.

One thing I’ve noticed when writing Lua code is that it’s pretty easy to write horribly bad code. I don’t have to define classes, I’ll just use create an ad hoc table with the necessary fields. My code is a horrible mess right now, but I am going to refactor it eventually. It’s kinda nice to just make a mess of it all and write quick hacks.

Digging holes

Posted by of Polygon Toys (twitter: @pekuja)
Saturday, January 23rd, 2010 11:27 am

Digging in MatoHey, this actually is kinda like a game now. I can move around with the red worm and dig holes. Well, I guess I’ve got the destructible terrain covered already, even though I thought that would be a really difficult thing to nail. Frankly, I expected the simple approach of modifying the image on the fly not to work fast enough, especially because Löve is using OpenGL behind the scenes, so I basically need to upload the fullscreen texture to the GPU every time I modify the terrain. I guess the real hard part will be making the different weapons.

[cache: storing page]