It’s not the worst I’ve ever seen.
At least you’ve got a
struct in there and the names are generally good so it’s readable (although the lack of indentation makes reading it a bit harder than it should be).
How many suggestions are you willing to take in one go?
I’ll start with a simple one:
Make your loop counters local variables instead of global variables.
CPUs have a kind of on-board fast memory called ‘registers’ that are faster than RAM,
and local variables can be assigned to registers when possible.
Global variables can’t be assigned to registers,
they have to live in ‘RAM’, which is (sometimes) slower and needs more CPU instructions to be accessed.
I think slugamma is my favourite in terms of design,
with Bubblue in second and Kribbit or Poltergrab third.
Extra points for using portmanteaus for naming.
(I’m guessing Kribbit is a portmanteau of ‘kero’ and ‘ribbit’?
Okard and Spymera are the only ones I’m having trouble deciphering.)
10 posts were split to a new topic: Monpals - Bugfixing and improvements
Wow this is great, a pet battling game. People always ask if Arduboy has Pokemon on it but this is pretty similar! Now I can recommend people to check this game out.