https://github.com/hopson97/luabird
Flappy Bird experiment using raw Lua C API with SFML for graphics
https://github.com/hopson97/luabird
Last synced: 3 months ago
JSON representation
Flappy Bird experiment using raw Lua C API with SFML for graphics
- Host: GitHub
- URL: https://github.com/hopson97/luabird
- Owner: Hopson97
- License: mit
- Created: 2020-07-25T20:27:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-26T17:10:23.000Z (over 5 years ago)
- Last Synced: 2025-01-17T13:48:29.554Z (12 months ago)
- Language: C++
- Size: 257 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LuaBird
Wanted to learn how to the C++ Lua API, so I threw this masterpiece together.
The C++ side creates a "Sprite" usertype, that allows the creation of the game.
The main loop in the C++ calls the "update" function defined in the Lua code once per frame for updating, and then iterates through a global Sprite table (defined in the lua `game/_lib.lua`) for rendering.
Screenshot:

## Building and Running
### Libraries
SFML is required.
These can be installed from your project manager. For example, on Debian/ Ubuntu:
```sh
sudo apt install libsfml-dev
```
If this is not possible (eg windows), you can install these manually from their respective websites:
https://www.sfml-dev.org/download.php
### Linux
To build, at the root of the project:
```sh
sh scripts/build.sh
```
To run, at the root of the project:
```sh
sh scripts/run.sh
```
To build and run in release mode, simply add the `release` suffix:
```sh
sh scripts/build.sh release
sh scripts/run.sh release
```
You can also create a deployable build (that can be sent) by doing:
```sh
sh scripts/deploy.sh
```