Legend World Adventure Quest, Championship Edition Super Turbo
“If you only ever play one video game in your entire life, this is it!” – Game Xtremist Chronicle
“To be in the presence of true game genius is a gift few will experience. Play this game!” – Video Game Journal Magazine
“Wow! Just Wow. Perfection in pixels.” – Game journalist person
Game description;
On a hollow planet, 400 times the diameter of Earth, Xzanik faces the greatest challenge of any life. Survive the vast labyrinth of the villains’ mega-huge world. From vast forest mazes, winding mountainous cliff walls, to the depth of fiery catacombs – the hero must trudge. Imperceptible, impossible, incomprehensible obstacles await.
As the planet spins faster and faster, darkness falls across the monstrous planet every few minutes – seeing and remembering is Xzanik’s only power.
Unparalleled adventures, unparalleled graphics, unparalleled parallels at every turn. Venture forth, if you dare!
---------------------------------------------
The BBC Micro:bit is a surprisingly powerful tool for a lot of tasks. I wanted to use the LED matrix “screen” for something more than just troubleshooting the code. I wanted to make a game!
I wanted to make an adventure game. Something reminiscent to old PC games from the 12” floppy disk days. With the limited screen size and controls, I put together something simple.
The software works as follows:
- The game starts and shows you a map with obstacles. Soon, the map disappears, leaving your player character in the upper left of the screen. The player character is a high-resolution single pixel.
- The goal is to get to the other side of the screen without touching an obstacle. If you do touch a wall, the map will reset.
- Repeat endlessly.
First, let’s gather all the necessary components you’ll need to build this project.
Let’s make it a mobile gaming platform too! I am recommending a battery pack. I used 2x AA rechargeable batteries out of curiosity; if rechargeable AA cells are usually at 1.2V, will it be enough to power everything at 2.4V or less, without issues? --- The answer is, yes, it’s fine. J
1x 3 V battery pack (For mobile gaming! )
2x AA batteries
Video game demonstration:
STEP 1
Load the code onto the Micro:bit.
I am providing the hex file you need to drag and drop onto the Micro:bit, and the python code as two separate files. For the below process, just use the hex file.
Plug the MicroUSB cable into the Micro:bit, and plug the other end of the cable to a PC or MAC.
At this point, you are going to copy over the code to the Micro:bit. I am providing the program (code) in this posts that needs to be copied over. When the Micro:bit plugs into a computer, it shows up as a USB flash drive. All you have to do is copy the file over to the Micro:bit, like it’s a USB Flash Drive, and the Micro:bit will reset, and the program is active.
You could leave it plugged into your computer, or use that 5V USB power adapter to make the project a bit more mobile.
STEP 2
Insert the batteries into the battery holder, and plug said holder into the Micro:bit.
The game will immediately start. You’ll see the word “START” scroll across the screen first.
- The game will flash the map 3 times. Then the player character will appear at the upper left of the screen.
STEP 3
- You need to get from the upper left of the screen to the bottom right.
- If you succeed, a “happy face” will appear.
- If you fail and hit an obstacle, it will show a “sad face.”
Here are the game controls:
● Button A goes down
● Long press Button A, will go back up
● Button B goes to the right
● Long press Button B, will go left
● Press both A & B at the same time will go at a down angle. Down one, to the right one.
● Long press A & B at the same time, will go up at an angle. Up one, to the right one.
STEP 4
The game will go on endlessly.
Enjoy!
Code talk
I commented the code, so please take a look at it in the "microbit game 3.py" file. I use Notepad++ for code, in case you were wondering.
With the comment, you should be able to see what each section does.
But here are a few sections that I thought were worth mentioning:
I store each map as an array. One digit for each "pixel" LED.
For generating maps, I used the random.randint() function in Python to generate pseudo-random numbers for the maps. I think as the maps go on, there are too many obstacles. So, I suggest tweaking these parameters a bit. Change x+y < 8 to maybe x+y < 6 or even 5.
In the main game loop is where I added the constant polling of the buttons. I am taking this out to show you how you could use the buttons for a game or anything else for that matter.
First I check button A, then check button B. Eventually, one of these has to be pressed, so I start analyzing what is going on once a press is detected. The next step is to see if the other button is pressed. Then, I deal with a "simultaneous button press." In this case, the player moves at an angle on the map.
Conclusion
This is a simple game, yes. It is also a foundation for much more.
If I had more time and resources:
- I could add a plan for the map progression. In other words, an ultimate goal.
- I could use an external controller without much work. The Micro:bit has a lot of I/O.
- I thought about adding items that the player must find. But, did you ever play any of the old adventure games from the old PC and Atari days? They are maddening. So, I thought, for now… a memory game is better.