Inspiration

Having played games like _ scriptbuilder _, where users are set free in a sandbox and write scripts to create and define their universe, and games like _ Robo-Rally _, where users use pre-programmed controls to plan a Robot's movements in advance and guess how the enemy chose to react, I figured I'd combine the two.

What it does

Takes two Script files as input (I was using .txt but theoretically other file types supported), and creates the Car-Bot defined in the opening of the file. Different pieces of Robots are defined, each with their own perks. Examples of these perks are access to extra sensory functions, increased speed, advanced weaponry, and more memory for storage. The Script defines what pieces are used in the Car-bot, making it customisable.

The game displays the Car-bots and begins interpreting the script's commands for the bot's movements. Car-bots are limited by the amount of memory they have access to, their speed, and the number of senses they are allowed per round.

How I built it

Everything is in C++. I built it with the help of Energy Drinks and stackexchange.

Challenges I ran into

Building an interpreter is hard. Checking for all the possible bugs the user could put in a script and making sure items are interpreted and run correctly proved to be a much larger challenge than I had initially thought.

I also ran into trouble finding a suitable GUI that integrates well with C++. For now, the program uses the CLI, but I hope to move it to a cleaner output in the future.

Github hates me and won't let me upload.

Accomplishments that I'm proud of

Over 1000 lines of code and many hours were dropped into this project. Navigating the maze of creating a working interpreter is something I am very proud of

What I learned

I learned a lot about the pro's and cons of different GUIs. I learned how to resize the CLI during run-time, and I did so much string manipulation I could teach a class.

What's next for Robo-Car-Fight-Game-Thing (RCFGT)

So... I didn't finish. I'd estimate it at 75% of the way to being playable. Next up for it would be finishing the interpreter's ability to eval arithmetic in the proper order (It currently commits the exact opposite of order of operations). I need to fix 5 known semantic bugs. I need to balance movement speed. I need to sleep. I need to add the 12 other Car Pieces I had planned. I need to find a GUI that works well with this project. I hope to eventually get it on the web so players can play against each other's AI from across the world, and encourage the next generation and the current generation to share my love of programming.

Built With

Share this project:

Updates