Number of watchers on Github | 17 |
Number of open issues | 0 |
Main language | Assembly |
Open pull requests | 0+ |
Closed pull requests | 0+ |
Last commit | over 4 years ago |
Repo Created | over 4 years ago |
Repo Last Updated | almost 2 years ago |
Size | 533 KB |
Organization / Author | 2040atepi |
Contributors | 1 |
Page Updated | 2018-03-12 |
Do you use 2040AtePi? Leave a review! | |
View 2040AtePi activity | |
View on github | |
Fresh, new opensource launches 🚀🚀🚀 | |
Trendy new open source projects in your inbox!
View examples
|
2040 Ate Pi is a port of the game 2048 created by Gabrielle Cirulli, fully written in ARM11 Assembly for Raspberry Pi.
Introduction video: https://www.youtube.com/watch?v=QSlXWTzWZCY
It also includes a custom-built AI that can be improved. It is compatible with Revision B, and will be ported to version 2.
Feel free to contribute!
The main functionality of 2048 is implemented, with a graphical interface.
The recommended configuration is to use a joystick coupled with two buttons for Reset and AI mode. See below for GPIO pin details.
gcc-arm-none assembler
src/
gcc-arm-none assembler
path in the Makefile
make
in your Terminalkernel.img
file will be generated. Replace the kernel.img
file with it on the BOOT
partition of the SD card of the Raspberry Pi (assuming Raspbian is installed). Make sure to backup your kernel.img
file before. Button | Pin |
---|---|
18 | |
22 | |
23 | |
17 | |
Enable AI Mode | 24 |
Reset Game | 25 |
The game includes an Artificial Intelligence mode, which is toggle-able by one of the GPIO pins.
The AI used a randomized statistical approach to play the game. It calculates which way to move the board based on the following algorithm:
a. Play random moves until the game ends
b. Calculate the score
c. Repeat steps 2.a. to 2.c 1000 times.
d. Calculate the average score obtained
Connect the Raspberry Pi to an HDMI display.
Our configuration uses a joystick and two buttons for Reset and AI mode (see below). The GPIO pins used can be changed easily in button.s
.
There is always room for improvement. Here are some ideas:
To generate the assembly code for displaying the numbers, use our tile_generator
.
All you need to do is put black and white png images in the images/
directory and run genscript.sh
.
Note that the size of the images has to be 150x150 pixels and their names have to be of the form
Imperial College London and Raspberry Pi for Best ARM Final Year Project Prize (Year 1).
Cambridge University for providing a Raspberry Pi Graphics tutorial.
Uddhav Vaghela, Paul Balaji, Amin Karamlou.
Franklin Schrans, Jacek Burys, Saurav Mitra, Srikrishna Subrahmanyam
This project is protected under the MIT License.