Skip to content

Commit

Permalink
v0.5
Browse files Browse the repository at this point in the history
+ added new skin (Pupsbird)
+ added parallax background
+ added sounds
+ improved game visuals
+ several tweaks to values (jump height, gravity, etc)
+ bug fixes
  • Loading branch information
nirokay committed Mar 29, 2022
1 parent b5373cc commit 36f5671
Show file tree
Hide file tree
Showing 39 changed files with 308 additions and 73 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FlöppyBird is yet another open-source Flappy Bird clone (please don't sue me) w

---

## __1. Changelog (v0.4.1)__

+ space bar after death to quick restart
+ mouse controls (jump with mouse)
+ fix build bug (build files now included)
+ config controls fix
+ coin gain _(future use: in-game skins etc)_
+ speed increase with pipe pass
## __1. Changelog (v0.5)__

+ added new skin (Pupsbird)
+ added parallax background
+ added sounds
+ improved game visuals
+ several tweaks to values (jump height, gravity, etc)
+ bug fixes

---

Expand Down
13 changes: 12 additions & 1 deletion assets/images.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@ image = {}
image.icon = load("icon.png")
image.coin = load("coin.png")

path = "assets/img/skins/"
path = "assets/img/background/"
image.background = {
clouds = load("clouds.png"),
sky = load("sky.png"),
cities = load("cities.png")
}

path = "assets/img/skins/"
image.skin = {
default = load("default.png"),
duckjpg = load("duck.jpg"),
bopcat = {
idle = load("bopIDLE.jpg"),
flop = load("bopFLOP.jpg")
},
pupsbird = {
idle = load("pupsbirdIDLE.png"),
flop = load("pupsbirdFLOP.png"),
dead = load("pupsbirdDEAD.png")
}
}

Expand Down
Binary file added assets/img/background/cities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/background/clouds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/background/sky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/skins/pupsbirdDEAD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/skins/pupsbirdFLOP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/skins/pupsbirdIDLE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added assets/sound/player/Jump2.wav
Binary file not shown.
Binary file added assets/sound/player/Jump3.wav
Binary file not shown.
Binary file added assets/sound/player/Jump4.wav
Binary file not shown.
File renamed without changes.
Binary file added assets/sound/player/yay1.wav
Binary file not shown.
Binary file added assets/sound/player/yay2.wav
Binary file not shown.
Binary file added assets/sound/player/yay3.wav
Binary file not shown.
Binary file added assets/sound/ui/buy.wav
Binary file not shown.
Binary file added assets/sound/ui/equip1.wav
Binary file not shown.
Binary file added assets/sound/ui/equip2.wav
Binary file not shown.
Binary file added assets/sound/ui/pageDOWN.wav
Binary file not shown.
Binary file added assets/sound/ui/pageUP.wav
Binary file not shown.
Binary file added assets/sound/ui/select_no.wav
Binary file not shown.
Binary file added assets/sound/ui/select_yes.wav
Binary file not shown.
Binary file removed assets/sound/yay.wav
Binary file not shown.
35 changes: 32 additions & 3 deletions assets/sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,38 @@ local function load(file, type)
end

sound = {
hurt = load("hurt.wav", "static"),
jump = load("jump.wav", "static"),
yay = load("yay.wav", "static")
ui = {
page = {
up = load("ui/pageUP.wav", "static"), -- Credit: "Cleyton Kauffman - https://soundcloud.com/cleytonkauffman" ( CC BY-SA 4.0 )
down = load("ui/pageDOWN.wav", "static") -- Credit: "Cleyton Kauffman - https://soundcloud.com/cleytonkauffman" ( CC BY-SA 4.0 )
},
select = {
yes = load("ui/select_yes.wav", "static"), -- Credit: "Jesús Lastra" ( CC-BY 3.0 )
no = load("ui/select_no.wav", "static") -- Credit: "Jesús Lastra" ( CC-BY 3.0 )
},
equip = {
load("ui/equip1.wav", "static"), -- Credit: "artisticdude" ( GPL 3.0 )
load("ui/equip2.wav", "static") -- Credit: "artisticdude" ( GPL 3.0 )
},
buy = load("ui/buy.wav", "static") -- Credit: "artisticdude" ( GPL 3.0 )
},

player = {
score = {
load("player/yay1.wav", "static")--[[,
load("player/yay2.wav", "static"),
load("player/yay3.wav", "static")]]
},
jump = {
load("player/Jump1.wav", "static")--[[,
load("player/Jump2.wav", "static"),
load("player/Jump3.wav", "static"),
load("player/Jump4.wav", "static")]]
},
hurt = {
load("player/hurt.wav", "static")
}
}
}

return sound
21 changes: 13 additions & 8 deletions conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ function love.conf(t)
t.modules.window = true

-- Storage:
t.identity = string.lower(info.authors[1])..".floppybird"
t.identity = string.lower(info.authors[1])..".floppybird"
t.externalstorage = true
t.console = false

-- Permissions:
t.accelerometerjoystick = false
t.audio.mic = false
t.audio.mixwithsystem = true
t.audio.mic = false
t.audio.mixwithsystem = true

-- Window:
t.window.title = info.title .. " v" .. info.version
t.window.icon = "assets/img/icon.png"
t.window.width = 640
t.window.height = 780
t.window.resizable = false
local w, h = 700, 900
t.window.title = info.title .. " v" .. info.version
t.window.icon = "assets/img/icon.png"
t.window.width = w
t.window.height = h

t.window.resizable = true
t.window.minwidth = w
t.window.minheight = h
end
82 changes: 52 additions & 30 deletions data/config.lua
Original file line number Diff line number Diff line change
@@ -1,64 +1,86 @@
config = {
-- Toggle Deabug Console Output:
debugEnabled = true,
debugEnabled = true -- toggle debug console output
}
-- Colours for all objects: (rgb255 in table format)

-- Colours for all objects: (rgb255 in table format: {red, green, blue [, alpha] } )
config.colour = {
bird = {204, 175, 61, 0.3},
pipe = {57, 187, 60, 1},
bird = {204, 175, 061, 0},
pipe = {069, 150, 044, 1}, --{57, 187, 60, 1},

sky = {90, 160, 201},
sky = {090, 160, 201},

ground = {
grass = {44, 71, 37, 1},
dirt = {56, 42, 29, 1}
grass = {044, 071, 037, 1},
dirt = {056, 042, 029, 1}
}
}

-- All about the player:
config.player = {
radius = 25,
jump = 9,
gravity = 0.15,
maxSpeed = 7,
startSpeed = 4,
radius = 25, -- player collision radius (collider is a square tho, lol)
jump = 6.3, -- jump force
gravity = 0.17, -- gravity pull (pixels / frame)
maxSpeed = 9, -- maximal movement speed (up and down)
startSpeed = 4, -- initial "jump"

-- Player Coin Gain (Coin/Pipe):
coinGain = 0.5,
coinGain = 0.5, -- coin/pipe

-- Animation:
defaultSkinID = "default",
flopRate = 20
defaultSkinID = "default", -- default skin
flopRate = 25 -- frames spent displaying jump sprite
}

-- All about Pipes:
config.pipe = {
startGap = width/3, --9*width/8,
amount = 5,
distance = width*0.45,
width = 45,
startGap = width/3, -- distance between player and first pipe at start
amount = 7, -- amount of pipes that are calculated and rendered
distance = width*0.49, -- distance between pipes
width = 65, -- pipe width

gap = {
min = 2 * config.player.radius * 4.2,
max = 2 * config.player.radius * 6.5
min = 2 * config.player.radius * 3.8, -- minimum and...
max = 2 * config.player.radius * 5.5 -- ... maximum size of the gap (where player flies through)
},

topPart = {
width = 7, -- width and...
height = 25, -- ... height of the pipe top part
offset = 7 -- y axis pixel offset (0 = no offset, <0 = "down", >0 = "up")
},

draw = {
shade = 0.7, -- Shade beginning (range = 1 - 0 ; x -> 1 = less shadow ; x -> 0 = more shadow)
shd_harsh = 0.8, -- Shadow Harshness (1 = no shadow, <1 = darker, >1 = lighter)
topShade = 1.06 -- Add additional shading onto top part
}
}

-- Screen X-Axis Scroll:
config.scroll = {
speed = 1.5,
increment = 0.02
speed = 1.45, -- initial scroll speed (pixels / frame)
increment = 0.01 -- scroll speed increase when passing a pipe
}

-- Everything Shop-related:
config.shop = {
indent = 5,
pageButton = 50,
indent = 5, -- indentation to shop edge
pageButton = 50, -- size of the page up/down button

skinsPerPage = 5, -- amount of skins per page
spacing = 10, -- space between skins to keep stuff looking clean

skinsPerPage = 5,
spacing = 10,
animationSpeed = 60 -- how many frames to show a sprite-frame
}

-- Background Stuff:
config.background = {
cloudSpeed = -0.05 -- speed of cloud movement (without parallax)
}

animationSpeed = 60
-- Background Prallax values: (0 = static ; <0 = movement towards east ; >0 = movement towards west)
config.prallax = {
clouds = 0.01,
cities = 0.1
}


Expand Down
2 changes: 1 addition & 1 deletion data/font.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ font = {
bttn = love.graphics.newFont(50),
shop = {
name = love.graphics.newFont(22),
desc = love.graphics.newFont(15)
desc = love.graphics.newFont(14)
}
}

Expand Down
17 changes: 15 additions & 2 deletions data/info.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
info = {}

info.title = "Flöppy Bird"
info.version = "0.4.1"
info.version = "0.4.2"
info.authors = {
"NiroUwU"
}
info.credits = {
code = {
"NiroUwU"
},
art = {
"NiroUwU"
},
sound = {
"NiroUwU",
"Cleyton Kauffman",
"Jesús Lastra"
}
}

return info
return info
7 changes: 4 additions & 3 deletions data/skins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ end


skins = {
init("Old Classic", "default", "This bird seems familiar...", 0, {image.skin.default}),
init("duck.jpg", "duckjpg", "wha- what? Why is this duck here?", 40, {image.skin.duckjpg}),
init("Bop-Cat", "bopbop", "The sight of this cat is hypnotising.", 69, {image.skin.bopcat.idle, image.skin.bopcat.flop})
init("Old Classic", "default", "This bird seems familiar...", 0, {image.skin.default}),
init("duck.jpg", "duckjpg", "wha- what? Why is this duck here?", 69, {image.skin.duckjpg}),
init("Bop-Cat", "bopbop", "The sight of this cat is hypnotising.", 130, {image.skin.bopcat.idle, image.skin.bopcat.flop}),
init("Pupsbird", "pupsbird", "A very friendly alien bird.", 220, {image.skin.pupsbird.idle, image.skin.pupsbird.flop, image.skin.pupsbird.dead})
}

for i,v in pairs(skins) do
Expand Down
9 changes: 7 additions & 2 deletions import.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,19 @@ save = load("save")

-- Import Classes:
switch("src/class")
load("Gui")
load("Button")

switch("src/class/Object")
load("Player")
load("Pipe")
load("Ground")
load("Background")

switch("src/class/Shop")
load("Shop")
load("Shopbutton")
load("Gui")
load("Button")



-- DATA:
Expand Down
14 changes: 9 additions & 5 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function love.load()
-- Game Objects Declaration:
-- Ground:
ground = Ground(70)
-- Background:
background = Background()
-- Pipes:
pipe = {}
regenerateAll()
Expand Down Expand Up @@ -56,7 +58,7 @@ function love.load()
scroll = {
speed = config.scroll.speed,
increment = config.scroll.increment,
current = config.scroll.speeds
current = config.scroll.speed
},
restartCooldown = {
current = 0,
Expand Down Expand Up @@ -85,6 +87,7 @@ end
function resetGame(alsoPipes)
-- Reset Objects:
player:reset()
background:reset()
player.frame = player.skin.img[1]
resetScroll()
if alsoPipes then
Expand Down Expand Up @@ -125,7 +128,7 @@ function playerFail()
-- Animation and Sound:
player:jump(0.3)
player.frame = player.skin.img[3]
love.audio.play(sound.hurt)
easy.sound.playRandom(sound.player.hurt)
updateHighscore()

-- No-loop Loop thingy:
Expand Down Expand Up @@ -158,6 +161,9 @@ end
-- MAIN:

function love.update(dt)
width, height = love.graphics.getDimensions()

background:update()
ground:update()
if game.active then
-- In Game:
Expand Down Expand Up @@ -185,9 +191,7 @@ function love.update(dt)
end

function love.draw()
-- Set BAckground Colour:
local c = config.colour.sky
love.graphics.setBackgroundColor(c[1]/255, c[2]/255, c[3]/255)
background:draw()

-- Draw Game Objects:
for i, p in pairs(pipe) do
Expand Down
Loading

0 comments on commit 36f5671

Please sign in to comment.