Graphical improvements (new bird palette; increased fliers contrast; less prominent bg)

This commit is contained in:
Jaidyn Ann 2020-09-20 16:32:51 -05:00
parent 76a636d1a1
commit 1fa1b3ce39
4 changed files with 23 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -19,8 +19,9 @@ function love.load ()
mode = menu mode = menu
vScale = 0 vScale = 0
maxScore = 0 maxScore = 0
math.randomseed(os.time())
psystem = nil dieParticle = nil
love.graphics.setDefaultFilter("nearest", "nearest", 0) love.graphics.setDefaultFilter("nearest", "nearest", 0)
bg = love.graphics.newImage("art/bg/sky.png") bg = love.graphics.newImage("art/bg/sky.png")
a_ttf = love.graphics.newFont("art/font/alagard.ttf") a_ttf = love.graphics.newFont("art/font/alagard.ttf")
@ -56,9 +57,9 @@ function love.draw ()
love.graphics.draw(bg, 0, 0) love.graphics.draw(bg, 0, 0)
love.graphics.draw(bg, 512, 0) love.graphics.draw(bg, 512, 0)
love.graphics.draw(waveText, 200, 220, 0, 2, 2) love.graphics.draw(waveText, 200, 340, 0, 2, 2)
love.graphics.draw(lifeText, 125, 225, 0, 1.3, 1.3) love.graphics.draw(lifeText, 125, 355, 0, 1.3, 1.3)
love.graphics.draw(bigText, 300, 200, 0, 3.5, 3.5) love.graphics.draw(bigText, 300, 300, 0, 3.5, 3.5)
if ( mode == menu ) then if ( mode == menu ) then
menu_draw() menu_draw()
@ -104,7 +105,7 @@ end
-------------------- --------------------
function menu_load () function menu_load ()
mode = menu mode = menu
psystem = nil dieParticle = nil
waveText:set("[Enter]") waveText:set("[Enter]")
lifeText:set("") lifeText:set("")
bigText:set("Bats & Pray") bigText:set("Bats & Pray")
@ -142,9 +143,8 @@ end
-------------------- --------------------
function gameover_load () function gameover_load ()
mode = gameover mode = gameover
psystem = nil dieParticle = nil
lifeText:set("High Score") lifeText:set("Best " .. maxScore)
waveText:set(" " .. maxScore)
bigText:set("Game Over") bigText:set("Game Over")
end end
@ -191,14 +191,14 @@ function game_load ()
birdRegistry = {} birdRegistry = {}
-- death particles -- death particles
ded = love.graphics.newImage("art/sprites/particle.png") diePArt = love.graphics.newImage("art/sprites/particle.png")
psystem = love.graphics.newParticleSystem(ded, 30) dieParticle = love.graphics.newParticleSystem(diePArt, 30)
psystem:setParticleLifetime(1) -- Particles live at least 2s and at most 5s. dieParticle:setParticleLifetime(.5) -- Particles live at least 2s and at most 5s.
psystem:setSizeVariation(1) dieParticle:setSizeVariation(1)
psystem:setEmissionRate(0) dieParticle:setEmissionRate(0)
psystem:setLinearAcceleration(-200, -200, 200, 200) -- Random movement in all directions. dieParticle:setLinearAcceleration(-200, -200, 200, 200) -- Random movement in all directions.
psystem:setSpeed(40, 50) dieParticle:setSpeed(40, 50)
psystem:setColors(1, 1, 1, 1, 1, 1, 1, 0) dieParticle:setColors(1, 1, 1, 1, 1, 1, 1, 0)
end end
-------------------- --------------------
@ -206,7 +206,7 @@ end
-------------------- --------------------
function game_update ( dt ) function game_update ( dt )
bird_n = table.maxn( birdRegistry ) bird_n = table.maxn( birdRegistry )
psystem:update ( dt ) dieParticle:update ( dt )
if ( bird_n == 0 ) then if ( bird_n == 0 ) then
nextWave() nextWave()
@ -231,8 +231,8 @@ function game_draw ()
end end
player:draw() player:draw()
if ( psystem ) then if ( dieParticle ) then
love.graphics.draw(psystem) love.graphics.draw(dieParticle)
end end
end end
@ -400,8 +400,8 @@ end
-- kill the Flier, show cool particles -- kill the Flier, show cool particles
function Flier:kill () function Flier:kill ()
self.living = false self.living = false
psystem:moveTo(self.x, self.y) dieParticle:moveTo(self.x, self.y)
psystem:emit(30) dieParticle:emit(30)
end end
-- run after Flier falls through screen -- run after Flier falls through screen
@ -491,8 +491,8 @@ function Bird:initialize ( x, y )
-- animations -- animations
birdSheet = love.graphics.newImage("art/sprites/bird.png") birdSheet = love.graphics.newImage("art/sprites/bird.png")
flapFrames = { {2,3,4,5}, {7,8,9,10}, {7,8,9,10} } flapFrames = { {2,3,4,5}, {7,8,9,10}, {12,13,14,15} }
idleFrames = { {1}, {6}, {6} } idleFrames = { {1}, {6}, {11} }
birdFlapAnim = animx.newAnimation{ birdFlapAnim = animx.newAnimation{
img = birdSheet, tileWidth = 32, tileHeight = 32, frames = flapFrames[self.species] img = birdSheet, tileWidth = 32, tileHeight = 32, frames = flapFrames[self.species]