Want to port your games and applications over to Love2D? This library makes it easy to add Text layers, Sprites, Backgrounds, and Animations, while maintaining the SmileBASIC aesthetic!
WARNING: Due to copyright concerns, the default SmileBASIC Sprites and Backgrounds are not distributed with this library. Replace both
resources/tiles.png with their actual versions before using this library. You can also just use a different spritesheet and tilesheet, but that sorta misses the point of this entire library... (The text is distributed with this because why not)
(Please note that I am not SmileBoom or associated with SmileBoom.)
Pretty gosh darn useable! The animation syntax is likely to change, but you can also use it the way I'm using it in
This repo is split into a bunch of separate folders and files.
docs/: Contains the documentation. You can read it online here!
game/: You don't have to worry about anything here. You can easily throw it away. This does have
twothree test programs that test Sprites, Backgrounds, Text, Basic Z-sorting, Animations, and... shaders? for some reason?
animTest.lua: A demonstration of animations!
apiTest.lua: WHOOAAAAAAA fish (Demonstrates loading a map from a file, Sprite callbacks, Sprite definitions, blend modes, Background callbacks, Text colors, and transparency)
textTest.lua: Random text colors and printing! Also shaders for some reason! This also demonstrates a "cut out" effect for text with a foreground color of 0 (transparent).
funky.frag: I split the shader into another file.
othertest.png: Both of these are used with the shader I'm messing around with.
maps/: For now, it contains one example map (
map1.v360map) that you can use. It's in my horrible file format, too!
resources/: Some things in this are important, some things in this aren't.
characters.csv: Very important.
Stolen from otyaSmileBASICGenerously donated by 12Me21. Used for the text layer's font.
sprites.csv: Relatively important. If you leave these out, that's completely fine. Used for Sprite definitions.
font_16x8.png: Not important. If you want some debug fonts, here you go. The 8x8 one is the regular SmileBASIC font. The 16x8 one is made by me.
icon.png: Not important. Fish.
sprites.png: Very important. REPLACE THIS WITH THE ACTUAL VERSION BEFORE USING. Used in
text.png: Very important. Used in
tiles.png: Very important. REPLACE THIS WITH THE ACTUAL VERSION BEFORE USING. Used in
SmileBASIC/backgrounds.lua. Inconsistent naming, but okay.
SmileBASIC/: Contains all the modules. Or whatever they're called.
animations.lua: Unfinished. For animating Sprites and Backgrounds.
backgrounds.lua: Finished. For creating tile backgrounds.
smilebasic.lua: Finished? Abstract thing that Backgrounds, Sprites, and Text all inherit from.
sprites.lua: Finished? For creating movable, rotatable, stretchable, animatable, dyeable pieces of a spritesheet.
text.lua: Finished. For creating text screens and printing text to them.
zsorting.lua: Finished? For sorting all things that inherit from
smilebasic.lua, and drawing them in order.
main.luaruns this after setting up a bunch of things. I styled it after PICO-8's game loop thing. For now, it's just a game selector. If you want to modify this: use
main.lua: This is the template I usually start with when making things in Love2D.
watch.lua: This is a small library that keeps track of when a condition is met, how long it has happened for, and when it stops being true. Useful for buttons and other inputs.
profile.lua: This won't show up in the actual repo, but it's a lightweight profiler for Love2D. Disabled by default and not included, so you have to download it from here.
README.MD: You're already there.
- Completely separate the main.lua and everything else.
main.luais my Love2D template, and I don't want that to get in the way of anyone wanting to use this.
- The new icon I drew has both the red and blue parts split 50/50. This is not the case in the actual Love2D logo. Too lazy to fix
- Add attributes to text
Tell me! I really want to help people port their SmileBASIC programs to other languages so SmileBASIC can live on. Feel free to create an Issue or do a Pull Request! I don't quite know how Git works!
Just don't steal it and pass it off as your own thing, okay?