Pathfinding A* on an 8-bit hardware
During the last entire year, I was working on a study of old 8-bit technologies.
For the sake of this study, I worked on the development of an A* pathfinding algorithm using C on the ColecoVision processor (the Z80). The challenge of this project was to put such a complex algorithm on 1kB of RAM.
This project brings me a certain mastery of the C language especially in optimization. For example, replacing arrays by just several bits and manage them using bitshifting in C.
To give a simple explanation, the main optimisation of the project was that the map was divided in a grid of nodes, each node has all his attributes on 2 bytes, as shown on the image below:
This project brings me a certain mastery of the C language especially in optimization. For example, replacing arrays by just several bits and manage them using bitshifting in C.
To give a simple explanation, the main optimisation of the project was that the map was divided in a grid of nodes, each node has all his attributes on 2 bytes, as shown on the image below:
Thanks to this solution, I could save a lot of memory and I manage to run this pathifinding algorithm on this hardware.
I also managed to realize some tests using the Assembly language to compare the performances of the two programs. Unfortunately, I didn't had enough time to finish this project. Nevertehless, I had enough resources to complete my study.
0 comments:
Post a Comment