Entity Example

Published 2023-06-12


Someone over in Discord asked about some entity drawing code in Hug Arena, so I took a look a stab at explaining it. I realized the code in Hug Arena is similar to a technique I've used quite a bit, so I put together a small example cartridge demonstrating the technique.

The sample is commented code that demonstrates how to draw two types of objects that update the same way each frame, but draw differently.

In "Remains of El Dorado" I used this for most objects drawn in the game, you can check out that cartridge to see how this works on a larger scale.