[Game]Racers [wip]

@Zuzu36 its just drawing Hello World!

try using mbed, its the easiest way to compile i find

Sorry… That was really not that what it should do :confused:
The easiest way for my is CODE::BLOCKS
I know theres an compiler command to do this (wich one is it? Do you know it :hugs:)

@Zuzu36: you can compile your indentical source code in:

  • Code::Blocks to make a PC executable
  • in EmBitz offline compiler to create a Pokitto Binary
  • in mbed onlinde compiler to create a Pokitto Binary

To create a Pokitto binary, all you need to do is:

  1. go to https://os.mbed.com/account/login/?next=/accounts/login/ and create an account
  2. go to https://os.mbed.com/teams/Pokitto-Community-Team/code/HelloWorld/ and press “Import Into Compiler”
  3. Go to main.cpp, and replace “Hello World” code with your own code
  4. Press “compile” in the online compiler

… and you have a Pokitto Binary

EDIT: come to the mbed cloud, make an account, and I will walk you through the steps


Whats wrong?!
In the Sim all my codes work and on Mbed are still errors? How is this possible?
It seems you need to help my again @jonne :wink:

Different versions of C++ standard. Code::Blocks & emBitz is C++11, mbed online is older C++98

in C++11 you can do this:

short x=0; //declaration and initialization to zero

in C++98 (mbed online) you must do this:

short x; //declaration
x=0; //initialization

Racers.bin (45,7 KB)

I hope it works, this time it is the right .bin. If anybody want´s to try it out please :slight_smile:

1 Like

I’m glad someone asked something that caused this to be brought up.
Not having C++11 support is a major pitfall.

1 Like

Yes, it´s complicaded especially for beginners, but hey! It´s (hopefully) working!

Yep, it works on the hardware. The colors really pop on the screen.

Here’s my thoughts on the game so far:

  • Changing lanes feels responsive and smooth. I like that you can change your mind and switch back into your original lane before you move all the way into the other lane.
  • The game feels like it already has potential to be fun and addictive with some gameplay tweaks.
  • There are currently way too many cars that spawn, and they appear too close together. It happens too often that I get trapped by a random formation of cars that I had no way to predict. It feels like getting a good high score is up to random luck.
  • The car moves between lanes a bit too slow for my taste. It makes it harder to get that feeling of weaving between cars at high speed, because I usually can’t make it one or two lanes over in a tight gap before getting hit.
  • Maybe it would be nice to be able to move forward and backward, as well as change lanes? I’m not sure about this, but I was wondering if it might give more options.
  • Maybe you could animate the road and lane markers too, to make it look more like you’re driving fast. I like the look of the track, but since it doesn’t move it kind of looks like your car is standing still and the other cars are driving backwards right now.

Anyway, I know you’re planning to add more to the game, so I figure this is still in-progress. Good job so far, looking forward to more.


First, thank you for testing @wuuff!
I don’t know whats wrong the timing, in SIM all works good (Is HW locked to max. 30 FPS?)
Moving tracks will be added in next update!


hardware is less then 30fps, and depending on what graphics mode or how much stuff your drawing or computing can slow down dramatically.
cant really give you a correct frame count

1 Like

I do like the 98 version better, to me it reads a little easier. But does it take up more memory since its 2 lines instead of 1 line ?

You can do things 98 style if you want, other version isn’t mandatory.
Bear in mind though that you don’t do the initialisation immediately underneath the declaration as Jonne’s example might suggest, the initialisation happens elsewhere (usually in the constructor).
Personally I prefer C++11 style because it’s easy to see what the default value of a member variable is without having to look elsewhere (i.e. at the constructor).

As far as C++98 vs C++11 goes there are much bigger changes than that.
(Though I suspect mbed online is probably C++03, I’d be surprised if it were C++98.)

Just noticed this : https://wiki.python.org/moin/TOOWTDI
If Python really is simpler, in the way you can only do it one way, i might wanna try that. ( @Hanski)

1 Like

Python is an easier language for beginners, but there’s a memory overhead involved in using it and programs written with it won’t be as fast as those written with C++.
(I don’t know how big the memory and speed difference is though.)

C++ is more flexible and (arguably) more powerful but that power and flexibility comes at the cost of complexity.
Conversely Python is a lot less complicated but that simplicity comes with restrictions in flexibility and (arguably) power.

you can just write more in a c style, you dont have to use everything c++ is giving you like templates and even classes

i mainly miss auto in C++98 :stuck_out_tongue:

True, though the only reason I can think for avoiding them is if you don’t understand them.

I’d miss nullptr, constexpr, enum class, auto, decltype, static_assert, template aliases, rvalue references… C++11 was a really big change.

there allot of things in c++ i dont understand, and i did a cource on it XD

@wuuff here´s an improved version, there was only some mistakes with FPS…
Also i added the scrolling background :slight_smile:

Racers A 1.1.bin (46,6 KB)


It’s a lot better. I like how everything moves faster, including your car. However, I still got trapped a few times, although it’s a lot rarer. It seems like the background isn’t scrolling for me though.

1 Like