Home | Steam | Itch | Documents | About
- About Bitty Engine
- Glance
- Redistributing
- Getting Bitty Engine
- Compiling from source
- Community and contributing
- Documentation
Bitty Engine is a cross-platform itty bitty Game Engine and open-source Framework. The full featured engine is programmable in Lua and integrated with built-in editors. It keeps the nature of both engine's productivity, and fantasy computer/console's ease to iterate. It boosts your commercial/non-commercial projects, prototypes, game jams, or just thought experiments.
Bitty Engine has everything built-in for coding, graphics composing, etc; it has a full featured debugger for breakpoint, variable inspecting, stepping, and call-stack traversing; it offers a set of well-designed API with full documentation; it builds fast binaries with code and asset obfuscating, moreover its package size is small (around 10MB with empty project, other engine outputs more than 10 times bigger).
It is supposed to be your ultimate 2D game creating software.
Bitty Engine offers a set of orthogonal features that makes game development comfortable and enjoyable.
Resources
APIResources.load(...)
,Resources.unload(...)
Resources.wait(...)
,Resources.collect(...)
- Etc.
- Graphics API
- Shapes:
plot(...)
,line(...)
,circ(...)
,ellipse(...)
,rect(...)
,tri(...)
- Text:
text(...)
,font(...)
,measure(...)
- Texture:
tex(...)
- Sprite:
spr(...)
- Map:
map(...)
clip(...)
,camera(...)
- Etc.
- Shapes:
- Input API
- Gamepad
- Keyboard
- Mouse and touch
- Audio API
- Supports MP3, OGG, WAV, FLAC, etc.
- Physics API
Space
,Shape
,Body
,Arbiter
, etc.
- Libraries
- Algorithms,
Archive
,Bytes
,Color
,DateTime
, Encoding,File
, Filesystem,Image
,Json
, Math,Network
,Platform
,Web
- Algorithms,
- Application interfaces
Application
,Canvas
,Project
,Debug
- Display: configurable resolution
- Code: Lua, supports multiple source files
- Image: either true-color (PNG, JPG, BMP, TGA) or paletted, up to 1024x1024 pixels per file
- Palette: 256 colors with transparency support
- Sprite: up to 1024x1024 pixels per frame, up to 1024 frames per sprite
- Map: up to 4096x4096 tiles per page
- Font: supports Bitmap and TrueType
- Audio: 1 BGM channel, 4 SFX channels; supports MP3, OGG, WAV, FLAC, etc.
- Gamepad: 6 buttons for each pad (D-Pad + A/B), up to 2 players
- Keyboard and mouse: supported
local obj = nil
function setup()
obj = Resources.load('hero.spr')
obj:play('move', true, true)
end
function update(delta)
spr(obj, 208, 128, 64, 64)
end
See more in examples.
Bitty Engine helps you to make standalone binaries for Windows, MacOS, Linux, and HTML (WebAssembly). It is redistributable for both non-commercial and commercial use without extra fee, your project is totally yours.
Everything is done with Bitty Engine (pro) by nothing more than a few mouse clicks.
Put an image at "../icon.png" relative to executable to customize the icon dynamically. Put an image at "../splash.png" as well to customize the splash, the image could be transparent.
The pro version is available on Steam and Itch.
See version comparison.
A C++14 capable compiler is required, any compiler came after 2014 should be ok. You need to get this repository and its submodules before build:
git clone https://github.com/paladin-t/bitty.git
cd bitty
git submodule init
git submodule update
Details
See the README under the "src" directory for source code architecture.
There are some customizable macros:
BITTY_MULTITHREAD_ENABLED[=1]
: indicates whether project code executes on a thread separately from graphicsBITTY_DEBUG_ENABLED[=1]
: indicates whether project code debug is enabled; requiresBITTY_MULTITHREAD_ENABLED==1
; disable this to build a pure runnerBITTY_NETWORK_ENABLED[=1]
: indicates whether theNetwork
API is enabledBITTY_WEB_ENABLED[=1]
: indicates whether theWeb
API is enabled; disable this if you don't need web accessibilityBITTY_SPLASH_ENABLED[=1]
: indicates whether the splash is enabledBITTY_EFFECTS_ENABLED[=0]
: whether full screen effects is enabledBITTY_PROJECT_STRATEGY_MAP_BATCH_ENABLED[=0]
: indicates whether map batch is preferred; it might speed up map rendering if enabled, but requires more memory and could be slow withmset(...)
Once you have setup and built a binary, it loads from "../data" or "../data.bit" automatically as startup project. Otherwise it shows a programmable workspace.
Dependencies: Visual Studio (with C++ development tools installed).
Steps
- Build SDL2
- Compile from "lib/sdl/VisualC/SDL.sln"
- Execute
lib/sdl/copy_win.cmd
- Build SDL2_mixer
- Compile from "lib/sdl_mixer/VisualC/SDL_mixer.sln" (need to setup SDL2 including and linking paths from previous step manually)
- Execute
lib/sdl_mixer/copy_win.cmd
- Build Bitty Engine
- Compile from "bitty.sln"
Dependencies: Xcode.
Steps
- Build cURL
- Execute:
cd lib/curl ./MacOSX-Framework cd ../..
- Execute:
- Build SDL2
- Compile framework from "lib/sdl/Xcode/SDL/SDL.xcodeproj"
- Reveal "SDL2.framework" in Finder
- Copy "SDL2.framework" to both "lib/sdl/lib/" and "/Library/Frameworks/" (used in following step)
- Build SDL2_mixer
- Compile framework from "lib/sdl_mixer/Xcode/SDL_mixer.xcodeproj"
- Reveal "SDL2_mixer.framework" in Finder
- Copy "SDL2_mixer.framework" to "lib/sdl_mixer/lib/"
- Build Bitty Engine
- Compile from "bitty.xcodeproj"
Dependencies: CMake, GCC.
Steps
- Build cURL
- Execute:
cd lib/curl ./configure make cd ../..
- Execute
lib/curl/copy_linux.sh
- Execute:
- Build libuv
- Execute:
cd lib/libuv sh autogen.sh ./configure make make install cd ../..
- Execute
lib/libuv/copy_linux.sh
- Execute:
- Build SDL2
- Execute:
cd lib/sdl ./configure make sudo make install cd ../..
- Execute
lib/sdl/copy_linux.sh
- Execute:
- Build SDL2_mixer
- Install necessary dependencies to enable extra audio format support, eg. for Ubuntu execute:
sudo apt install libflac-dev libfluidsynth-dev libmodplug-dev libmpg123-dev libopus-dev libopusfile-dev libvorbis-dev
- Execute:
cd lib/sdl_mixer ./configure make cd ../..
- Execute
lib/sdl_mixer/copy_linux.sh
- Install necessary dependencies to enable extra audio format support, eg. for Ubuntu execute:
- Build Bitty Engine
- Execute:
cd bitty.linux cmake . && make cd ..
- Execute:
Details
You can also setup your own build pipeline for other platforms. The "lib" and "src" directories are almost what you need. See the README under the "src" directory for code architecture.
The "platform_*" files contain most platform dependent code, you'll probably make a specific port.
Note the file dialog library is only usable on desktop builds, make your own adaption if you need it on other platforms.