Just measured everything as is...
Here is what I have:
So my old version, the 2nd prototype, took 8165 bytes from the 27k available and kept a performance from 8-20 averaging at 14.
It sported 2 different players with ~4 attacks each. This number is here just for reference as that version was very streamlined for memory usage and a bit for performance.
So, current version sports 783 bytes for the system, 106 for a dummy background and then what you see on the table for the states stand, walk, duck, jump, pushed, push.
In general,I would love to be able to keep each state size to a max 500 bytes and to perform at 4.
There will be 4 types of characters using this system:
.Player, biggest one in size at ~6kb.
.Full enemy, at ~5kb, is a clonable enemy with plenty of moves, each clone uses a different set.
.Enemy, at 4kb, are unique bosses.
.Short enemy, at 2 or 3kb, are simpler smaller enemies, like the hawk and the dogs.
Back on the table, it is clear we have the stand, walk and jump states going over what I intend.
Standing is hard because it is the state the computer is checking lots of joystick combinations, that is very time consuming . This state is expected to get bigger in size and heavy on performance as I still have to add checks for the attacks. A drastic solution to fasten it up would be to skip drawing the standing player if he is already there.
Walking is currently a monster in size and perf and should get worse when adding the attacks that requires movement. While I don´t believe I will be able to get its size much shorter, I´m certain I can get a 1/3rd speed boost by changing the first IF layers to an ON GOTO thing. So things are fine here too.
Jumping is already quite optimized but still needs the flykick added to it.
Now why all this deep craze about perf and memory?? Shouldn't they be in check by now?
Yeah yeah...but see, stand, walk duck and jump are heavy processing motions that will be happening most of the time during game, so the game speed is defined here. The state that takes longer, say 5.5, will set all other states to its.
While I would always like faster and smaller, what there is so far is fine. At 5.5 we would have the game going at 13, 1 point faster than last prototype. I believe now it is time to do a final pass on these fundamental states and work with the found values on forth.
edit: how to know the game speed from the chart? Choose any combination of 2 states from STD to PUSH, add their perf number and add 2 (BASE) to the result.