Drag Race - Partial Game

I’ve started on a simple drag racing game.
As a noob to C/C++ coding, I think I’ve done ok so far.
Any and all help / guidance is welcome - the to do list is rather big, and I’m sure the code is a shocking mess for some people !

The files can be found here: https://github.com/Slade1972/DragRacer


1 Like

First, I’ll just say that in the Arduino world it’s more common to use spaces instead of tabs for indenting. That’s what the Arduino IDE does, with a single indent size of two spaces.

Thanks, but I’m not using the Arduino IDE. I’m using Visual Studio with a Visual Micro addon that allows code completion. Without that, there’s no way I’d be bothered to put the effort in to learn to code in C++.

Maybe Arduino should be dragged, kicking and screaming, into today’s world and use the tab for indents. It’s much easier to use, and less key presses compared to hitting the space bar multiple times :slight_smile:

1 Like

Can’t its editor be configured to use space indenting and allow the number of spaces to be specified? I would think an editor sophisticated enough to do code completion would allow setting of the tab behaviour.

Note that if your sketch is loaded into the Arduino IDE, it will automatically convert tabs to two spaces. If anyone using the IDE makes changes and submits the new code to you, you may have to do some reformatting to incorporate it.

Perhaps they should, but until then it would be nice if you played by their rules.

No idea. I’m not a mechanic, I don’t play “under the hood” as it were. I work on the philosophy of “if it ain’t broken, don’t try and fix it”, given my limited knowledge.

I’m fine with adjusting indents and things. It’s honestly of little consequence. I realise that for some people it may well irk them, like a constant noise, but I’ll adjust things if need be. Thanks for the input.

I had a quick look, I didn’t see an option to adjust the tab / indent spacing.

Does this help?

Ok, I changed the indentation.
Your OCD’s can now rest a little :stuck_out_tongue: