Close

Terra graphics issues - resolved

A project log for Arduino Desktop

The desktop with an arduino as the main processor. Multitasking, Gaming, Graphics, and (later) File IO

dylan-brophyDylan Brophy 04/15/2017 at 07:390 Comments

While making the game Terra (a clone of Terraria for Arduino) I realized the graphics were drawing way too slowly. This is a problem I commonly find in anything that draws graphics from an arduino. The problem was that rendering each block was very slow. My solution was to tessellate the blocks by finding rows of the same blocks and filling them with the same color. Took me some time to perfect this, and it can DEFINITELY be improved (larger tessellation : bigger than just rows). Here is what the game is currently looking like:

I have a little character in the center. Instead of moving the character I move the environment. This is for two reasons:

A: Not all of the world is visible at any given time. This allows the easy drawing of the part of the world currently being seen.

B: The character has a different set of 4 colors than the world. So if the player moved I would have to recolor tiles a TON. Not good. (Each tile can only use 4 colors)

Well, so far Terra has controls, working tessellation for fast redraws, and a randomly generated world. But super long ways to go. This should be better than paying for the game XD.

Discussions