magicbottle

now an anji main and 水月の運び-ing away

  • they/them
Bench 1RM58 kg
Squat 1RM85 kg
Deadlift 1RM105 kg
ClimbingNewb
ProgrammingC, Rust, Python
CSS Crimes?Sometimes
Gender?Sometimes
Affection?Affectionate
DiscordMagicBottle#9930

posts from @magicbottle tagged #programming

also: #software development, #coding

After starting to play Pseudoregalia, which is incredible btw, I got the itch to work on a 3D platformer. I've done very little programming in a modern game engine before so I decided to pick up Godot and try it.

I'm kind of shocked just how instantly rewarding it has been, compared to all the other kinds of programming I do for fun.

Here's a list of things I've done / problems I've run into and solved:

  • I made a little placeholder character in blender, and made two very trivial animations. This is the most I've ever used blender in my life and like, yeah, my character has two bones and the animations are just making the head look around, but importing that into Godot and having the animations work was an absolutely thrilling feeling.


I just learned that there's about to be a Game Boy game jam starting on June 14th. I've never participated in a game jam before but I'm very intrigued because I just spent the last couple of days doing some GB programming and writing Rust bindings for the SameBoy emulator.

If you've never written a program in assembly before, I highly recommend the experience and consoles like the Game Boy are a fun place to start since they are so well documented & emulated and have fun debugging tools.



if you haven't done it before it's very cool, the main loop only requires additions and comparisons once set up with the right constants. something like

for y in y_min..y_max {
    let start_e0 = e0;
    let start_e1 = e1;
    let start_e2 = e2;
    for x in x_min..x_max {
        let inside =  e0 > 0. && e1 > 0. && e2 > 0.;
        let color = if inside { GREEN } else { RED };
        draw_circle((x * 10) as f32, (y * 10) as f32, 3.0, color);
        e0 += dy0;
        e1 += dy1;
        e2 += dy2;
    }
    e0 = start_e0;
    e1 = start_e1;
    e2 = start_e2;
    e0 -= dx0; // y is down!
    e1 -= dx1;
    e2 -= dx2;
}
syntax highlighting by codehost

(ignoring the fact that i'm multiplying for my visualization)

if you want to learn where those constants came from and how they work you can read A Parallel Algorithm for Polygon Rendering by Pineda. This part of A Trip through the Graphics Pipeline has also been helpful though a bit obtuse without the paper.