ILLUMINATI NORTH logo BooBoo script

Started by troutsneeze, Dec 25, 2022, 06:47 PM

Previous topic - Next topic

troutsneeze

It's a super simple one.

number outer
number inner
image_load outer "misc/outer.png"
image_load inner "misc/inner.png"

number angle
= angle 0.0

function run
{
+ angle 0.0418
}

function draw
{
clear 0 0 0
image_draw_rotated_scaled inner 255 255 255 255 128 128 320 160 0.0 1.0 1.0 0 0
image_draw_rotated_scaled outer 255 255 255 255 129 148 320 180 angle 1.0 1.0 0 0
}

1) It loads two images (the eye (inner) and the triangle (outer)). Numbers are what's used to store an image identifier

2) Defines a number to hold an angle, sets it to 0

3) The run function is special, it gets called 60 times a second. The angle is increased by an amount equal to 1 rotation every 2.5 seconds (it's in radians)

4) The draw function is also special. It gets called at refresh rate. This just clears the screen to black, draws the eye, then draws the triangle, using our angle to rotate it

You can see the logo at the top of this page: https://illnorth.com. I've attached the 2 images to this post. You can try it yourself by downloading BooBoo from https://b1stable.com/downloads, then put the images in data/gfx/images/misc, make a file with the code above and run

BooBoo illnorth.boo

Make sure illnorth.boo is beside BooBoo.exe.

The images are put inside data/gfx/images/misc due to the engine's ability to pack everything into a datafile. For BooBoo, I left everything unpacked. When loading an image, it uses data/gfx/images as the base path, you can use whatever structure you want beyond that. There are also ways to use any path or load files outside of the datafile, but BooBoo is simplified.