Switch to full style
Share your games and programs with the community.
Post a reply


Wed Aug 06, 2014 4:28 pm

A fast paced racing game where you have to finish a lap as fast as possible while avoiding obstacles.


L/R Arrows: turn
A: Thrust
B: Brake
C: Exit

Download & source
Download .zip containing source, hex, elf
GitHub repository

Easily create your own map by editing world.ino
Fast and smooth driving
Smooth camera which looks in the direction you're going depending on your speed
Accepts large maps (the provided maps is 32*32, 128*64 tiles should fit)
Different obstacles: ice, sand, etc.
5 best scores saved in EEPROM along with their name

To do
More maps
Read maps from SD card
Map editor

Re: UFO-Race

Wed Aug 06, 2014 4:36 pm

That is super! Oh my! mini map and all! :D

Re: UFO-Race

Wed Aug 06, 2014 4:58 pm

Just spotted this while having a look through your GitHub, very cool, can't wait to play it and see how you've coded it!

Re: UFO-Race

Wed Aug 06, 2014 5:57 pm

Very fun. Thanks!

and I like that I can use it for examples with movement speed.. terrain effecting speed and map making!

Re: UFO-Race

Wed Aug 06, 2014 6:06 pm

treflip wrote:and I like that I can use it for examples with movement speed.. terrain effecting speed and map making!

Yeah that was initially intended as an example an ended up being a games few hours later :lol:

Re: UFO-Race

Wed Aug 06, 2014 7:48 pm

Oh, Nice! (Now the first song from F-zero is stuck in my head, and I haven't even tried loading this game up yet)

Re: UFO-Race

Thu Aug 07, 2014 4:36 am

trying to make a map (harder that I thought) and I got a record of 628 on the deafault map. later today, I played again and the crabator high acore data showed up. any idea of why?

Re: UFO-Race

Thu Aug 07, 2014 9:23 am

My record is 608 ;)

If Crabator is on your Gamebuino and you upload UFO-Game via USB, the loader don't know that the game changed, and the EEPROM isn't erased (so it still contains Crabator's high scores). You should always get back to the loader by pressing 'C' in the main menu to backup you EEPROM and avoiding messing up you saved games.

What didn't you understand in making your own map? You only have to change the values in the array "world". Each "0x" is followed by 2 characters each representing one tile. For example 0xDC represents a "block_up" and a "block_left". If you change the size of the world don't forget to change WORLD_W and WORLD_H accordingly.

#define WORLD_W 32
#define WORLD_H 32
const byte world[WORLD_W*WORLD_H/2] PROGMEM = {

To know which value correspond to which tile you can see it just above the variable "world" :

// array containing the different sprites
#define NUM_SPRITES 16
const byte* sprites[NUM_SPRITES] = {
  road,              //0
  power_right,       //1
  power_down,        //2
  power_left,        //3
  power_up,          //4
  sand,              //5
  ice,               //6
  start,             //7
  block_bouncer,     //8
  block_single,      //9
  block_right,       //A
  block_down,        //B
  block_left,        //C
  block_up,          //D
  block_horizontal,  //E
  block_vertical     //F

Re: UFO-Race

Thu Aug 07, 2014 9:38 pm

I was wondering how the level was encoded, that's pretty neat. Is the ability to save the highscore list a part of the stock library I'm assuming so.

Re: UFO-Race

Thu Aug 07, 2014 10:45 pm

Nope, the highscore saving to EEPROM is not part of the library. It's all in the file highscore.ino so you can copy/past it to your own game. Although mind that here the highest score is the lowest value here, so you might have to reverse it for your game.
The fact the the EEPROM (containing the high scores) is saved and backed up from the micro SD card when you switch between games is part of the loader.
Post a reply