Sprig Engine banner

Sprig Engine

5 devlogs
64h 48m 29s

A Unity inspired game engine on the Sprig. Features includes a script editor, sprite editor, scene editor, save system, custom renderer, load balancer, console, and interpreter.

Updated Project: I have been working on this project since July, a…

A Unity inspired game engine on the Sprig. Features includes a script editor, sprite editor, scene editor, save system, custom renderer, load balancer, console, and interpreter.

Updated Project: I have been working on this project since July, and wanted to track my time to get rewards

Demo Repository

Loading README...

Kevin Hoherz

Shipped this project!

I built a game engine for the hack club Sprig. It has an interpreter, editor, load balancer, physics engine, and more! I learned about C, optimization, collision detection, and interpreters. My favorite part was the load balancer that makes sure both cores work together to process everything.

Kevin Hoherz

I worked on the collision system, console, load balancing, and other improvements. Starting with the collision system, I worked on the collision resolution. I have it calculating the direction the objects need to move, but have not finished it yet (this is why there is no picture of the collision). I also created the console for the script. Any print statements or errors with the user code will show up there. Furthermore, I added a load balancer during runtime. I found core 1 (responsible for rendering) was often idle, so I created a load balancer allowing it to process collision data, speeding up collision. Finally, I made some other small adjustments to fix bugs.

Attachment
Attachment
0
Kevin Hoherz

I spent a long time fixing the collision detection. It has been outdated since I added rotation to objects. The collision detection separates space into cells, and then uses the separating axis theorem (SAT) to detect collisions and send messages to the scripts on the objects.

0
Kevin Hoherz

I made a lot of progress on the sprite editor and interpreter. For the sprite editor I fixed the color palette by autogenerating the colors using a separate program. Then I added tools for drawing, filling, erasing, and color picking. I created a unity program to help draw the icons. The interpreter took longer. The first thing I did was create a linked list that could hold any type. Then I created the while and if statements using an instruction stack. Next I used the same instruction stack to add function calls. I added object oriented ‘paths’ so I could get properties from other objects by script. In order to add lists to my language, I had to do a large refactor on my shunt yard algorithm (a 900 line function!), but I did get it working. The video of the spinning sprite shows a script calling a function on a different object!

Attachment
Attachment
Attachment
0