Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: LOVE-Party/LD24_Jam
base: 72fd12a746
...
head fork: LOVE-Party/LD24_Jam
compare: 507c8f28b2
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Aug 31, 2012
@Textmode Textmode Tweaked the turret's firing rate fd74f30
@Textmode Textmode made 'score' a player, rather than gamestate, property 165716b
@Textmode Textmode minor cleanup to hull.turret 42ffced
@Textmode Textmode Added crate powerup, made turret powerup respect damage
added a 'crate' power up in three levels, granting
addition score (25, 50, and 100pt).
the 'turret' powerup now creates a turret roughly as damaged as the
powerup itself was, thus a pickup damaged to 50% health will yield a
turret that is half dead.
507c8f2
View
BIN  gfx/pu_crate01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  gfx/pu_crate02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  gfx/pu_crate03.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 hull/turret.lua
@@ -15,8 +15,8 @@ function _M.new(t)
e = ship.new(t)
e.shooting = true
- e.owner = t.owner or nil
- e.facing = (e.owner and e.owner.facing) or math.random()*math.pi*2
+ e.owner = t.owner or nil
+ e.facing = (e.owner and e.owner.facing) or math.random()*math.pi*2
e.shooting = false
return setmetatable(e, _MT)
@@ -27,13 +27,12 @@ function _M:think(dt)
local own = e.owner
self.facing = own.facing
self.shooting = own.shooting
- self.shot_rate = own.shot_rate*2 -- thats half the firing rate
+ self.shot_rate = own.shot_rate/.66 -- thats 2/3 the firing rate
local theta, d = self.hardpoint, 16
self.pos_x = own.pos_x + math.cos(theta) * d
self.pos_y = own.pos_y + math.sin(theta) * d
else
- self.facing = math.random
self.shooting = true
end
end
View
31 powerup.lua
@@ -12,19 +12,23 @@ setmetatable(_M, _MMT)
-------------------------------------------------------------------------
local Image = love.graphics.newImage
icons = {
- generic = Image "gfx/RepairPack.png";
- heal10 = Image "gfx/RepairPack.png";
- heal30 = Image "gfx/RepairPack2.png";
- heal60 = Image "gfx/RepairPack3.png";
- heal100 = Image "gfx/RepairPack4.png";
- turret = Image "gfx/pu_turret.png";
+ generic = Image "gfx/pu_crate01.png";
+ heal10 = Image "gfx/RepairPack.png";
+ heal30 = Image "gfx/RepairPack2.png";
+ heal60 = Image "gfx/RepairPack3.png";
+ heal100 = Image "gfx/RepairPack4.png";
+ turret = Image "gfx/pu_turret.png";
+ crate_low = Image "gfx/pu_crate01.png";
+ crate_mid = Image "gfx/pu_crate02.png";
+ crate_high = Image "gfx/pu_crate03.png";
}
-------------------------------------------------------------------------
function _M.getRandomPowerup(t)
local p = _M.new(t)
- local set = {'heal10', 'heal30', 'heal60', 'heal100', 'turret'}
+ local set = {'heal10', 'heal30', 'heal60', 'heal100', 'turret',
+ 'crate_high', 'crate_mid', 'crate_low'}
p.effect = set[math.random(#set)]
return _M.new(p)
end
@@ -74,9 +78,22 @@ function _M:doeffect(e)
e:heal(e.shieldmax*impact)
elseif self.effect == 'turret' then
local t = turret.new{owner = e}
+ t.shield = t.shieldmax * impact
e:addentity(t)
local tau = math.pi*2
t.hardpoint = math.random() * tau
+ elseif self.effect == 'crate_low' then
+ if e.score then
+ e.score = e.score + (25 * impact)
+ end
+ elseif self.effect == 'crate_mid' then
+ if e.score then
+ e.score = e.score + (50 * impact)
+ end
+ elseif self.effect == 'crate_high' then
+ if e.score then
+ e.score = e.score + (100 * impact)
+ end
else
print("Unknown powerup effect", self.effect)
end
View
2  smissionover.lua
@@ -50,7 +50,7 @@ end
function _M:settype(kind)
print('setting mission over kind', kind)
if kind == 'fail' then
- self.message = ("You died horribly.\nYour score: %08d"):format(Gamestate.space.score)
+ self.message = ("You died horribly.\nYour score: %08d"):format(Gamestate.space.player.score)
elseif kind == 'win' then
error "The only winning move is not to play."
else -- unknown kind
View
6 space.lua
@@ -75,7 +75,6 @@ state.level.addentity = function(self, ent)
end
state.level.width = #state.level.data;
-state.score = 0
local score_font = love.graphics.newFont(32)
-- Automatically creates and caches requested widths of the Health/shield
@@ -102,6 +101,7 @@ function state:enter()
self.player.shieldmax = 100 -- and this
self.player.shield = self.player.shieldmax
self.player.state = 'alive'
+ self.player.score = 0
self.timer = 0
self.endtimer = false
self.level.scrolling = true
@@ -242,7 +242,7 @@ function state:update(dt)
-- Add to score
if self.player.state ~= "dead" then
- self.score = self.score + 2*dt
+ self.player.score = self.player.score + 2*dt
end
end
@@ -293,7 +293,7 @@ function state:draw()
lg.draw(GUI_ScoreBar, 485, 500, 0, 1.5, 1.5)
lg.setFont(score_font)
lg.setColor(0, 255, 0)
- lg.print(("Score: %08d"):format(self.score), 500, 500)
+ lg.print(("Score: %08d"):format(self.player.score), 500, 500)
end
function state:drawlevel()

No commit comments for this range

Something went wrong with that request. Please try again.