
Pixi Battle
-Context
Pixi Battle is a discord bot game made in a gap year after my ES technician diploma at the CPNV.
When I’ve started to make some discord bots, I discovered that with discord.js we can make and send gifs, so I’ve got the idea to make a bot that generates gifs of a fight.
The idea is absurd because it takes a lot of time to generate a gif and send it, even discord has a limit of 8MB for gifs, but I wanted to make it anyway for fun.
History
NodeJS
First, I’ve made a simple bot in JS that generates a gif of a fight between two characters, the complete fight is generated and sent in a gif.
After that, I’ve implemented the level up system and made the fight continue until the player dies or kills a certain number of enemies.
This gif has taken 8s to be generated
Then, after some times, I searched for a library or language faster than JS to generate gifs, I tried Rust and C++, and choose C++.
C++
I needed to re-implement the bot in C++ and it was a good opportunity to learn C++ in preparation for my next school (SAE Institute).
A result of the last turn of a player
Numerous improvements were made in the C++ version, the fight was faster, the code was cleaner, and the bot was more stable.
That's the last version of the bot
The UI of the turn actions
The UI of the player choosing a target for his attack move
The last version of the bot was able to generate a gif in less than 300ms, which was a good improvement compared to the first version in JS.
The project was stopped in 20 August 2023 because I’ve started Colorless Odyssey project and this one is way too hard to work on it because there is no support, no tools and takes too much time to make a feature.
Gameplay
TODO
Difficulties
TODO
Conclusion
TODO