[WIP] A simple isometric engine

Hello everyone,
I’m new to the Arduboy community, so after the tutorials I started out with creating a simple isometric graphics engine.

screen%20Isometrik

It’s still pretty barebones and I’m not sure yet what in which direction I want to go with this (puzzle, adventure, tactics RPG). So far, there is rudimentary clipping and simple jumping functionality. Even so, the CPU gets pushed to it’s limits even at 30 fps. I’m sure there are some neat tricks to improve it, so if you know one let me know! You can try it out here:

https://felipemanga.github.io/ProjectABE/?url=https://github.com/DthEgn/ArduboyIsometricEngine/blob/master/Isometrische_Grafik_v3.ino.leonardo.hex

10 Likes

Great work … I can see this being the basis of a great game!

I found recently when working on my own project was that drawPlusMask() was roughly 20% more efficient that drawExternalMask() which, when rendering an entire screen, makes a huge difference.

Another thing, I wonder if you might be better rendering the blocks with the sides already in place - even if the sides are going to be covered by the next tile drawn. Removing the decision and subsequent drawing of tile faces may save time - you never know. One reason I say this is the the drawFastVLine is not really efficient …

 void Arduboy2Base::drawFastVLine
  553 (int16_t x, int16_t y, uint8_t h, uint8_t color)
  554 {
  555   int end = y+h;
  556   for (int a = max(0,y); a < min(end,HEIGHT); a++)
  557   {
  558     drawPixel(x,a,color);
  559   }
  560 }

I recently wrote a drawFastVLine equivalent that was 16 - 20 times faster depending on the number of bytes the line spanned.

3 Likes

Looks really good.
But be aware of that the CPU wasn’t really a powerful one (and counting the numbers, I really can’t think of a real 3D game on here)

1 Like

Thank you for your kind words.
I’ll take a closer look at your suggestions, @filmote. It may be prematurely miserly, but I’m a bit worried about the additional memory needs for drawPlusMask(). Right now, I use the same mask for each tile, as they are the same size.
You are correct, the line drawing also had me worried. With my current method (drawErasing the sides of each tile so those drawn previously don’t shine through), I may have to implement it differently. Now that I think about it, I could have the side texture already include the lines and then handle the edge of the map with some sort of hacky method. So many different possibilities…

1 Like

Ah, of course … yes having to incorporate the mask would chew up progmem.

Just so you know it can be done !

ESCD_TEAMarg

9 Likes

I recently saw a screenshot of it the animation is even better. It looks awesome and shouts Alien 8 all over it :smiley:

3 Likes

Is that a game I can play? @JO3RI

Get ? nope … work in progress

3 Likes

@filmote I will definitely take another look at that if CPU becomes a bigger issue than memory. In case of doubt, I can still split a game into multiple parts.
@JO3RI i Oh fantastic, I saw pictures of your project on Twitter and wondered if you were still working on it. So I guess you have the “room-based arcade adventure” already covered :smiley:
@CDR_Xavier I will definitely be adding other objects/agents next. CPU usage is directly related to non-0-height tiles on the screen (because of all the face drawing).
Haha if you want to use the engine for your tank game, you are welcome to do it.

1 Like

Always room for two - especially if the game’s objectives are different.

1 Like

You’re right, but right now I’m leaning towards tactics RPG. I wonder if anyone has done something similar before… I need to implement some pathfinding algorithm as well (A* maybe?)

1 Like

Someone is working on one at the moment,
and before that there was this.

good job! :fu::clap:

1 Like