Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
New micro-game engine with scripting language
skinmarquee Dec 29, 2023
I've been working on a scripting language and game API for the past year or so. The goal was to make something fun to use and get something on screen quickly. It's called BooBoo!

Keep in mind 1) I'm not an artist, I'm more inclined to programming and 2) I've been busy with the language/engine itself, so the examples only scratch the surface of what you can do, but here are some screenshots:









There is also a CLI version included without the game library. I haven't quite figured out how to monetize it properly but one of the posts on my site is important to me, something my Gram said about not working for free. And this project has really captured my interest so I want to keep working on it. So the license right now requires $30 USD for a lifetime license if you want to use it commercially or redistribute the interpreter, but it's free for personal use.

The backend engine should be very fast, the language is still young but fairly speedy for the most part. It took quite a hit recently when I allowed any type in expressions instead of only numbers. Before that it was blowing Python away, now not as much.

The link to download it is: https://cmykilluminati.net/downloads/

There is also a map editor on the download page. BooBoo supports drawing and other operations like pathfinding on those maps.

Last edited by skinmarquee on 29 December 2023 at 7:13 pm UTC
skinmarquee Dec 30, 2023
Here's the 4th screenshot I posted's code. It's a little town you can walk around with music, and you can pick up some apples and carrots (all assets are from my game Dog-O.)

 
number music
mml_load music "music/town.mml"
mml_play music 0.5 1

number pickup
mml_load pickup "sfx/pickup.mml"

number W H
= W 240
= H 135
resize W H

number sprite
sprite_load sprite "pleasant"

number apple_img carrot_img
image_load apple_img "misc/apple.png"
image_load carrot_img "misc/carrot.png"

number tilemap
tilemap_load tilemap "map.wm3"
        
vector anim
vector frame
vector_add frame 8
vector_add frame 7
vector_add anim frame
vector_clear frame
vector_add frame 12
vector_add frame 7
vector_add anim frame
tilemap_set_animated_tiles tilemap 500 4 3 anim

vector collectibles
vector groups
tilemap_get_groups tilemap groups
number num_groups
vector_size groups num_groups
number i
for i 0 (< i num_groups) 1 next_group
    vector group
    = group [groups i]
    vector c
    if (& [group 0] 1) apple carrot
        vector_add c apple_img
    :apple
        vector_add c carrot_img
    :carrot
    vector_add c [group 1]
    vector_add c [group 2]
    vector_add collectibles c
:next_group

number TILE_SIZE px py dir_x dir_y moving move_count MOVE_TIME
= TILE_SIZE 16
= px 19
= py 11
= moving 0
= MOVE_TIME 20
= dir_x 0
= dir_y 1

function suffix_from_dirs dx dy
{
    if (&& (== dx 0) (== dy 1)) south (&& (== dx 0) (== dy -1)) north (&& (== dx 1) (== dy 0)) east west
        return "_s"
    :south
        return "_n"
    :north
        return "_e"
    :east
        return "_w"
    :west
}

function draw
{
    number ox oy sx sy

    = ox (- (+ (/ TILE_SIZE 2) (* px TILE_SIZE)) (/ W 2))
    = oy (- (+ (/ TILE_SIZE 2) (* py TILE_SIZE)) (/ H 2))

    = sx (* px TILE_SIZE)
    = sy (* py TILE_SIZE)

    if (== moving 1) draw_moving
        number dx dy
        = dx dir_x
        = dy dir_y
        number inc
        = inc TILE_SIZE
        number p
        = p move_count
        / p MOVE_TIME
        * inc p
        * dx inc
        * dy inc
        + ox dx
        + oy dy
        + sx dx
        + sy dy
    :draw_moving

    number map_w map_h
    tilemap_size tilemap map_w map_h
    * map_w TILE_SIZE
    * map_h TILE_SIZE

    if (< ox 0) too_left (> ox (- map_w W)) too_right
        = ox 0
    :too_left
        = ox (- map_w W)
    :too_right

    if (< oy 0) too_up (> oy (- map_h H)) too_down
        = oy 0
    :too_up
        = oy (- map_h H)
    :too_down

    number layers
    tilemap_num_layers tilemap layers

    tilemap_draw tilemap 0 1 (* ox -1) (* oy -1)

    number i
    number sz
    vector_size collectibles sz
    for i 0 (< i sz) 1 next_collectible
        vector c
        vector_get collectibles c i
        number dx dy
        = dx (- (* [c 1] TILE_SIZE) ox)
        = dy (- (* [c 2] TILE_SIZE) oy)
        image_draw [c 0] 255 255 255 255 dx dy 0 0
    :next_collectible

    sprite_draw sprite 255 255 255 255 (- sx ox) (- sy oy) 0 0
    
    tilemap_draw tilemap 2 (- layers 1) (* ox -1) (* oy -1)
}

function run
{
    include "poll_joystick.inc"

    number map_w map_h
    tilemap_size tilemap map_w map_h

    if (== moving 1) do_moving not_moving
        + move_count 1
        if (>= move_count MOVE_TIME) done_moving
            if (== dir_x -1) check_l (== dir_x 1) check_r (== dir_y -1) check_u (== dir_y 1) check_d
                if (!= joy_l 1) done_l
                    = moving 0
                :done_l
            :check_l
                if (!= joy_r 1) done_r
                    = moving 0
                :done_r
            :check_r
                if (!= joy_u 1) done_u
                    = moving 0
                :done_u
            :check_u
                if (!= joy_d 1) done_d
                    = moving 0
                :done_d
            :check_d
            + px dir_x
            + py dir_y
            = move_count 0
            if (== moving 1) check_solids2
                number xx
                number yy
                = xx px
                = yy py
                + xx dir_x
                + yy dir_y
                number s
                tilemap_is_solid tilemap s xx yy
                if (== s 1) stop
                    = moving 0
                :stop
            :check_solids2
            if (== moving 0) stand
                string suffix
                call_result suffix suffix_from_dirs dir_x dir_y
                string a
                = a "stand"
                + a suffix
                sprite_set_animation sprite a
            :stand
        :done_moving
    :do_moving
        if (== joy_l 1) go_left (== joy_r 1) go_right (== joy_u 1) go_up (== joy_d 1) go_down
            = moving 1
            = move_count 0
            = dir_x -1
            = dir_y 0
        :go_left
            = moving 1
            = move_count 0
            = dir_x 1
            = dir_y 0
        :go_right
            = moving 1
            = move_count 0
            = dir_x 0
            = dir_y -1
        :go_up
            = moving 1
            = move_count 0
            = dir_x 0
            = dir_y 1
        :go_down
        if (== moving 1) check_solids
            number xx yy
            = xx px
            = yy py
            + xx dir_x
            + yy dir_y
            if (== 0 (&& (>= xx 0) (>= yy 0) (< xx map_w) (< yy map_h))) cant_move continue_check
                = moving 0
            :cant_move
                number solid
                tilemap_is_solid tilemap solid xx yy
                if (== 1 solid) cant_move2
                    = moving 0
                :cant_move2
            :continue_check
        :check_solids
        string suffix
        call_result suffix suffix_from_dirs dir_x dir_y
        string a
        if (== moving 1) walk stand2
            = a "walk"
            + a suffix
            sprite_set_animation sprite a
        :walk
            = a "stand"
            + a suffix
            sprite_set_animation sprite a
        :stand2
    :not_moving

    ? joy_a 1
    jne no_pickup

    number dx dy
    = dx (+ px dir_x)
    = dy (+ py dir_y)

    number i sz
    vector_size collectibles sz
    for i 0 (< i sz) 1 next_pickup_check
        vector c
        vector_get collectibles c i
        number cx cy
        = cx [c 1]
        = cy [c 2]
        if (&& (== cx dx) (== cy dy)) pick_it_up
            mml_play pickup 1 0
            vector_erase collectibles i
            goto no_pickup
        :pick_it_up
    :next_pickup_check

:no_pickup
}


Last edited by skinmarquee on 30 December 2023 at 7:17 pm UTC
skinmarquee Dec 30, 2023
Indentation fixed.
redman Dec 31, 2023
I have some questions,

  • who is your main target with this engine?

  • do you have a game to showcase what can do?

  • do you have tutorials?

  • why a new language ?



And I believe that is amazing what you are doing!
skinmarquee Dec 31, 2023
Quoting: redmanI have some questions,
who is your main target with this engine?

Not any particular person but the games I see coming from it are Atari/NES/SNES type stuff.

Quotedo you have a game to showcase what can do?

It comes with several games, they're fairly simple though. There's a lot of other non-game examples as well.

I haven't had time nor decent art to make a full-fledged game yet, other than a couple Atari-style games with highscores and stuff.

Quotedo you have tutorials?

No! That's a good idea.

Quotewhy a new language ?

And I believe that is amazing what you are doing!

Thanks! First of all I didn't like how Lua interfaces with C/C++, I find it very tedious to use. And I was looking to integrate a scripting language into my engine. So I created BooBoo for that, it is just build as a library so it can be used from any C++ program. Second to needing a scripting language, I always wanted something to create animations and mockups, little things like that, so I made a little game library that uses my engine and the scripting language.

Last edited by skinmarquee on 31 December 2023 at 1:18 am UTC
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.