@Zuzu36 its just drawing
try using mbed, its the easiest way to compile i find
Sorry… That was really not that what it should do
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 )
@Zuzu36: you can compile your indentical source code in:
To create a Pokitto binary, all you need to do is:
… and you have a Pokitto Binary
EDIT: come to the mbed cloud, make an account, and I will walk you through the steps
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
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
I’m glad someone asked something that caused this to be brought up.
Not having C++11 support is a major pitfall.
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.
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
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.)
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
True, though the only reason I can think for avoiding them is if you don’t understand them.
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
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.