Ard-Drivin - Fast Paced Racing Sim

(Rem) #1


Hello everyone!

My pal (L-P) and I (Rem) are preparing a little racing game for the good old arduboy.

Technical info so far:

  • Game runs at a constant rate of 67 frames per second
  • Rendered in 3 colors: black, gray, white
  • Grayscale is achieved by flickering quickly between black and white, and also alternating the dithering pattern, so it looks more stable. The resulting grayscale is almost perfectly stable, except for a sort of visible subtle scanline glitch
  • Sprite scaling (pre-rendered scaled sprites, to be precise)
  • Sound (using ArduboyTones library)
  • It uses Arduboy2 lib, although most of the drawing routines have been written from scratch
  • Custom font!
  • png to Arduboy conversion made using Processing 3
  • Bold text!

Complete source code on Github:

Eried's Unofficial Repo :)
$12 Arduboy compatible system
Eried's Unofficial Repo :)
(Rem) #2

Here’s the output after a build, so there is plenty of storage space left and a lot of free ram too:

Sketch uses 19,342 bytes (67%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,617 bytes (63%) of dynamic memory, leaving 943 bytes for local variables. Maximum is 2,560 bytes.


Is the gray colour from flipping pixels, or is it just ‘faked gray’ with alternate black and white? It looks really nice from the scrrenshots.

(Rem) #4

On the title screen, it is simply “fake gray” with a fixed dithering. (I don’t know why we didn’t use a proper gray in that screen).

However in the game part itself, the grayscale is both a fast flickering black-white combined with an alternating dithering; so the result looks very stable, almost like a perfect gray. Try it on your 'boy to see for yourself if it works correctly, as I only tested on my Arduboy.


Hi there, I’m L-P, the artist on the game. Rem has already mentionned the technical specs on 'Ard Drivin, but since this is a Time Attack type of game, we’d love for you to post your best scores (number of cars passed in 99 seconds!) - My current best is 37.

So give us your feedback once you’ve played the game for a bit!


That sounds awesome, i will check it out for sure. stable gray is an interesting technical challenge, sounds like you guys have got it pretty close.

(Rem) #7

I just pushed on Github a new version of the title screen using grayscale.
It would interesting to know if it flickers or if it looks stable on your Arduboy (and everyone that is willing to try and reply).

I calculated and tested precise timing values using my own Arduboy, but I can’t know if they are all manufactured exactly equal, or if external factor such as temperature, etc. can slightly affect the LCD refresh timing.

Here’s a close-up photo of the title screen on my arduboy. You can see in the photo that the gray is made of a dithering pattern of apparent gray tones:

(Holmes) #8

WOW. That’s all I can say. This looks top-tier. Cannot wait.

1 Like
(spinal) #9

Dammit!, I thought I was going to have the first grey game :frowning: Great work!

(Marco) #10

Like on your Arduboy, on my is pretty perfect.
I can see some scanline dither but during game I’m too concentraded to see it :smile:.
Great job!

1 Like
(Boti Kis) #11

This is simply AMAZING!

(Boti Kis) #12

Mind == BLOW. really good job.

1 Like
(Scott) #13

If you have so much space available, why have you disabled the boot logo?


I’m having a n error saying #include "pics/font.h"
Any advice?

(Kevin) #15


(Rem) #16

Hello HZ128,

you seem to be missing the ‘pics’ subfolder: Did you get everything from the GitHub repository?
The complete project looks like this:

Can you confirm if you have the folder, and if it contains font.h (amongst other files)

(Rem) #17

If you have so much space available, why have you disabled the boot logo?


Good question: It is simply because I am not using the Arduboy2 standard library. I would need to copy the logo function back inside the project, which should be quite doable.


@remz I do have that folder and it does contain font.h

(Josh Goebel) #19

Not only that but the batteries voltage affects the refresh timing also… it’s always changing as the battery runs down.

(Rem) #20

Not only that but the batteries voltage affects the refresh timing also… it’s always changing as the battery runs down.

Hi Dreamer3,

You are totally, I have never checked that. I just tested leaving my Arduboy on, in the game: it lasted for about 3.5 hours. The scanline glitch speed changed from “very slow” at the beginning, and near the end of the battery it was super fast.
It is not too much distracting or flickering to prevent the grayscale from working, but it is definitely something important to keep in mind.