BooBoo Hello World Tutorial

Topic: BooBoo

By tremblin
2025-05-22, 5:40am
(0)
Avatar
Replies (3)
By tremblin
2025-05-22, 6:15am
Avatar
In a nutshell:

1) Create a directory called My Game/data/scripts
2) Edit data/scripts/main.boo e.g.

; keep clearing screen to a random colour
function draw
{
    number r g b
    rand r 0 255
    rand g 0 255
    rand b 0 255
    clear r g b
}


3) Copy BooBoo.exe and SDL2.dll to "My Game"

You now have a BooBoo game...

4) Use compress_cpa and uncompress_cpa (just fixed it on Windows, will be fixed next version) if you want a single archive for all your game scripts/data

5) For other data files, check the documentation for directory structure. For example image_load loads from data/gfx/images, but you can have subdirectories like data/gfx/images/backgrounds, and when you call image_load you pass it "backgrounds/foo.png", ignoring the data/gfx/images part.
By tremblin
2025-05-22, 7:03am
Avatar
There are a few standard files you can supply...

data/shim5.json - you can supply some default parameters to your game like window title or window size etc. See the template included with BooBoo for how to use it

data/gfx/fonts/font.ttf - a default font used for some things

data/gfx/images/misc/icon[16,24,32,256].png - icons used when the program is running - to changed the file icon in file manager you will need to recompile BooBoo

C:\Users\PelvisJohnson\Saved Games\BooBoo\shim5.json - as a user you can override settings by placing them in your Saved Games\BooBoo\shim5.json file
By tremblin
2025-05-22, 8:39am
Avatar
Here is a link to a fixed version of uncompress_cpa.exe: uncompress_cpa.exe

The next version of BooBoo will have this included... the one in the current version doesn't work on Windows since mkdir can't create nested directories on Windows.