Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nirokay committed Mar 20, 2022
1 parent 09fec7e commit 96d3ad6
Show file tree
Hide file tree
Showing 45 changed files with 3,947 additions and 0 deletions.
Binary file added .build/love/OpenAL32.dll
Binary file not shown.
Binary file added .build/love/SDL2.dll
Binary file not shown.
1,404 changes: 1,404 additions & 0 deletions .build/love/changes.txt

Large diffs are not rendered by default.

Binary file added .build/love/game.ico
Binary file not shown.
1,184 changes: 1,184 additions & 0 deletions .build/love/license.txt

Large diffs are not rendered by default.

Binary file added .build/love/love.dll
Binary file not shown.
Binary file added .build/love/love.exe
Binary file not shown.
Binary file added .build/love/love.ico
Binary file not shown.
Binary file added .build/love/lovec.exe
Binary file not shown.
Binary file added .build/love/lua51.dll
Binary file not shown.
Binary file added .build/love/mpg123.dll
Binary file not shown.
Binary file added .build/love/msvcp120.dll
Binary file not shown.
Binary file added .build/love/msvcr120.dll
Binary file not shown.
111 changes: 111 additions & 0 deletions .build/love/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, macOS, Linux, Android, and iOS.

[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/chc0hdr08wv1d5c7?svg=true)](https://ci.appveyor.com/project/AlexSzpakowski/love)
[![Build Status: Github CI](https://github.com/love2d/love/workflows/continuous-integration/badge.svg)](https://github.com/love2d/love/actions?query=workflow%3Acontinuous-integration)

Documentation
-------------

We use our [wiki][wiki] for documentation.
If you need further help, feel free to ask on our [forums][forums], our [Discord server][discord], or our IRC channel [#love on OFTC][irc].

Repository
----------

We use the 'main' branch for patch development of the current major release, and therefore it should not be considered stable.
There may also be a branch for the next major version in development, which is named after that version.

We tag all our releases (since we started using mercurial and git), and have binary downloads available for them.

Experimental changes are developed in a separate [love-experiments][love-experiments] repository.

Builds
------

Files for releases are in the [releases][releases] section on GitHub. [The site][site] has links to files and additional platform content for the latest release.

There are also unstable/nightly builds:

- Builds for some platforms are automatically created after each commit and are available through GitHub's CI interfaces.
- For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa]
- For arch linux there's [love-git][aur] in the AUR.

Contributing
------------

The best places to contribute are through the issue tracker and the official Discord server or IRC channel.

For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle].
Changes and new features typically get discussed in the issue tracker or on Discord or the forums before a pull request is made.

Compilation
-----------

### Windows
Follow the instructions at the [megasource][megasource] repository page.

### *nix
Run `platform/unix/automagic` from the repository root, then run ./configure and make.

$ platform/unix/automagic
$ ./configure
$ make

When using a source release, automagic has already been run, and the first step can be skipped.

### macOS
Download or clone [this repository][dependencies-apple] and copy, move, or symlink the `macOS/Frameworks` subfolder into love's `platform/xcode/macosx` folder.

Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target.

### iOS
Building for iOS requires macOS and Xcode.

#### LÖVE 11.4 and newer
Download the `love-apple-dependencies` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios],
unzip it, and place the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder.

Or, download or clone [this repository][dependencies-apple] and copy, move, or symlink the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder.

Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target.

See `readme-iOS.rtf` for more information.

#### LÖVE 11.3 and older
Download the `ios-libraries` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios],
unzip it, and place the `include` and `libraries` subfolders into love's `platform/xcode/ios` folder.

Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target.

See `readme-iOS.rtf` for more information.

### Android
Visit the [Android build repository][android-repository] for build instructions.

Dependencies
------------

- SDL2
- OpenGL 2.1+ / OpenGL ES 2+
- OpenAL
- Lua / LuaJIT / LLVM-lua
- FreeType
- ModPlug
- mpg123
- Vorbisfile
- Theora

[site]: https://love2d.org
[wiki]: https://love2d.org/wiki
[forums]: https://love2d.org/forums
[discord]: https://discord.gg/rhUets9
[irc]: irc://irc.oftc.net/love
[dependencies-apple]: https://github.com/love2d/love-apple-dependencies
[dependencies-ios]: https://github.com/love2d/love/releases
[megasource]: https://github.com/love2d/megasource
[unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable
[aur]: https://aur.archlinux.org/packages/love-git
[love-experiments]: https://github.com/slime73/love-experiments
[codestyle]: https://love2d.org/wiki/Code_Style
[android-repository]: https://github.com/love2d/love-android
[releases]: https://github.com/love2d/love/releases
27 changes: 27 additions & 0 deletions .build/make-exe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
echo -e "\e[1;33m Building .exe! \e[0m"
doZip=true
path="./.build"

# Windows Folder
winDir=$1-win
winPATH=$path"/builds/$winDir"
mkdir "$winPATH"

# Creating .exe
cat $path"/love/love.exe" $path"/builds/$1.love" > "$1.exe"
mv "$1.exe" "$winPATH"

# Moving dll's
cp $path"/love/"*".dll" "$winPATH"

# Zip it if $doZip == "true"
if [[ $doZip == "true" ]]; then
currentPath=$( pwd )
cd "$path/builds"
name=$1"-win.zip"
zip "$name" -r "$winDir"

cd "$currentPath"
rm -rf "$winPATH"
fi
4 changes: 4 additions & 0 deletions .build/make-love.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
echo -e "\e[1;33m Building .love \e[0m"
zip -9 -r $1.love . -x ./.build/**\* ./.git/**\*
mv $1.love ./.build/builds
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.build/builds
Empty file modified LICENSE
100644 → 100755
Empty file.
33 changes: 33 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# FloppyBird
FlöppyBird is yet another open-source Flappy Bird clone (please don't sue me) written in Lua, using the Löve2d Game Engine.



## Changelog:
*wow so empty*



## Roadmap:
(✅ added features, 🔜 planned features, ❓ unsure)

* 🔜 Unlockable Skins for your bird
* 🔜 Background and Foreground objects (clouds, grass, small rocks, etc.)
* ❓ Special Abilities



## Building from source:
Building from source is easy! Execute the following command:

`./build.sh BUILD_NAME`

The final build will be located in `/.build/builds/`. The build script builds a native Windows Executable and a .love file, which can be run with the Löve2d Game Engine.



### Installing Löve2d Game Engine:
Love2d comes with Lua built into it, you dont have to download Lua 5.4 seperatly.

* Arch Linux: `sudo pacman -S love`
* Debian/Ubuntu: `sudo snap install love`
* Windows and other systems: [Love2d Download](https://love2d.org)

16 changes: 16 additions & 0 deletions assets/images.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local path = "assets/img/"
local function load(file)
return love.graphics.newImage(path .. file)
end

image = {}

image.icon = load("icon.png")

path = "assets/img/skins/"
image.skin = {
default = load("default.png"),
duckjpg = load("duck.jpg")
}

return image
Binary file added assets/img/icon.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/default.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/duck.jpg
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/sound/hurt.wav
Binary file not shown.
Binary file added assets/sound/jump.wav
Binary file not shown.
Binary file added assets/sound/yay.wav
Binary file not shown.
12 changes: 12 additions & 0 deletions assets/sounds.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local path = "assets/sound/"
local function load(file, type)
return love.audio.newSource(path .. file, type)
end

sound = {
hurt = load("hurt.wav", "static"),
jump = load("jump.wav", "static"),
yay = load("yay.wav", "static")
}

return sound
24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
project=$1

# Check if main.lua exists:
if [[ ! -f "main.lua" ]]; then
echo -e "\e[31m !! Could not find main.lua file, terminating build process !! \e[0m"
exit 1
fi

# Give Permissions and check for build directory:
chmod +x -R ./.build
if [[ ! -d ./.build/builds ]]; then
mkdir ./.build/builds
fi

# Build .love
./.build/make-love.sh $project

# Build .exe
./.build/make-exe.sh $project

# End
echo -e "\e[1;33m Finished Building Project! \e[0m"
exit 0
41 changes: 41 additions & 0 deletions conf.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local info = require("data/info")

function love.conf(t)
t.version = "11.4"

-- Modules:
t.modules.audio = true
t.modules.data = true
t.modules.event = true
t.modules.font = true
t.modules.graphics = true
t.modules.image = true
t.modules.joystick = false
t.modules.keyboard = true
t.modules.math = true
t.modules.mouse = true
t.modules.physics = false
t.modules.sound = true
t.modules.system = true
t.modules.thread = true
t.modules.timer = true
t.modules.touch = false
t.modules.video = true
t.modules.window = true

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

-- Permissions:
t.accelerometerjoystick = false
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
end
47 changes: 47 additions & 0 deletions data/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
config = {
-- Toggle Deabug Console Output:
debugEnabled = true,
}
-- Colours for all objects: (rgb255 in table format)
config.colour = {
bird = {204, 175, 61, 0.3},
pipe = {57, 187, 60, 1},

sky = {90, 160, 201},

ground = {
grass = {44, 71, 37, 1},
dirt = {56, 42, 29, 1}
}
}

-- All about the player:
config.player = {
radius = 25,
jump = 9,
gravity = 0.15,
maxSpeed = 7,
startSpeed = 4
}

-- All about Pipes:
config.pipe = {
startGap = width/3, --9*width/8,
amount = 5,
distance = width*0.45,
width = 45,

gap = {
min = 2 * config.player.radius * 4.2,
max = 2 * config.player.radius * 6.5
}
}

-- Screen X-Axis Scroll:
config.scroll = {
speed = 1.5,
increment = 0.1
}


return config
11 changes: 11 additions & 0 deletions data/controls.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
controls = {
-- Mouse Stuff:
mouse = {
click = 1
},

-- Keyboard Stuff:
player = {
jump = "space"
}
}
7 changes: 7 additions & 0 deletions data/font.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
font = {
default = love.graphics.newFont(25),
big = love.graphics.newFont(60),
bttn = love.graphics.newFont(50)
}

return font
9 changes: 9 additions & 0 deletions data/info.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
info = {}

info.title = "Flöppy Bird"
info.version = "0.4"
info.authors = {
"NiroUwU"
}

return info
Loading

0 comments on commit 96d3ad6

Please sign in to comment.