A very, very quick and dumb toy inspired by an episode of the podcast 2 Good Boys. You're Guy Woodward, and you must regret. There is no win state.
Mega Tanks is a Scorched Earth clone for Pico-8, featuring random, deformable terrain generation, rubbish sound effects and turn-based play for 2-4 players.
Controls:
Z to shoot, hold down for increased power.
X to bring up the weapon selection, although right now all weapons are the same.
Left and right to move
Up to use your jets
*Down to move your aiming reticle.
The direction of rotation of the reticle is reversed every time you release the key, to stop players having to wait a whole cycle if they miss the angle they want slightly.
This is naturally unfinished but is mechanically complete. I intend to add more weapons over time :)
Small update: shells now collide with tanks :)
Hi there,
I'm making a scorched earth-style game and it's all coming together pretty well, but I'm having some real problems with collision. Right now what I've got is pretty rudimentary but I can't work out how to do it any better. Basically when the tank fires a shot, the shot moves in a parabola with variables yspeed and xspeed that get added on to the y and x positions of the shot each frame. The shot cannot collide with anything for two frames (to prevent collision with the tank itself) but after that, the shot should explode on contact with any pixel that isn't the colour of the background (i.e. black). However, if moving at a decent speed it will usually move through walls for a frame or so before exploding.
I've attached the cartridge and the relevant collision code.
function shot:update() if self.timeout > 0 then self.x = flr(self.x + self.xspeed) self.y = flr(self.y + self.yspeed) self.yspeed = self.yspeed + gravity self.timeout -= 1 else if self.x>=127 then self.x = 127 fired = false end if self.x<=0 then self.x = 0 fired = false end if self.y>=127 then self.y = 127 fired = false explode = true sfx(1,1) end if pget(self.x,self.y+3)!=0 and pget(self.x,self.y+3)!=textclr then fired = false explode = true sfx(1,1) end self.x = flr(self.x + self.xspeed) self.y = flr(self.y + self.yspeed) self.yspeed = self.yspeed + gravity end end |
