I don't think I ever seen a game specifically like this before. I like it that the movement for the user and the COM is fast. I could say you could make the COM faster, so that instead of If C>1, change it to If C, but it would make it too fast to the point where neither of you could attack each other. You could try Battlesquid's CEmu suggestion, to see if it works for the CE and CSE as well. There can be some optimizations in the code. Also, try making the code a little shorter, and the computer smarter to attack you. I get the idea of the If randInt(0,1, but I think you could make it better than that. Anyways, I got a college test tomorrow, so wish me luck!

I notice that a few logic optimizations could be made. Any "and" statements could be changed to multiplication, and "or" statements could be changed to addition; both of which are faster than the boolean logic.

randInt(0,1) can be rand<.5, since rand is faster than randInt. This also makes the probability a bit more clear. For example, randInt(0,3) corresponds to a 25% probability of a 0, or a 75% probability of success. This would be the same thing as rand<.75; See how the second one is more readable? Since rand is from 0 to 1, there is a 75% chance that it will be less than .75 or a 25% chance that it will be greater. We can also ignore less than or equal to, since it will never be exact to the tenths digit

If Y=B and randInt(0,1) and max(A={X-1,X+1
- could be -
If (Y=B)(rand<.5)*max(A={X-1,X+1
If A=Ans or X=A:Then
- could be -
If (A=Ans)+(X=A):Then
- or -
If sum(A={Ans,X:Then
Repeat E or max(K={45,21,105
- could be -
Repeat E+max(K={45,21,105

So I decided to actually copy the code from the .txt and try the game, but I was surprised that the com didn't move even though there was code for it to. Anyways, since I had free time I decided to try and fix it. Anyways, I looked at it and I was able to completely get rid of the labels (Good job on not having memory leaks in the original code, but labels still can be messy). I also made it so the computer movement speed and attack speed are adjustable. I made it so that the variables E, C, O, and N are not used at all, and I got it down to 550 bytes instead of 604. In addition, you had a bug where you couldn't attack unless the player was at the same spot as the com, and also where the com would never attack the player. I'll post the code when I get home from travelling, which should be in a day or two. In the meantime maybe you should try and fix those few bugs

Some of those "bugs" are actually typos in the code. I will fix these, so the game actually works. I have made a full version game, which I will soon upload the .8xp or .8xg file here. This current program is just a sample (demo) of the actuall game.

The released game is supposed to be 4,145 bytes with 358 lines of code. This will be in a GROUP file, containing the original sample program, and the full program.

For all intents and purposes, yes they are the same. However, the logical or is slower due to how it functions, although it is negligibly slower in most cases. Here is how the code would function:

E or max(K={45,21,105 functions like this:
Check if E; put result it in "bit" 1
Check if max(K={45,21,105; put result in "bit" 2
If either "bit" is 1, return 1; else return 0;
E+max(K={45,21,105 functions like this:
Take the value of E and add it to max(K={45,21,105; store the result in "register" 1
If the value in register 1 is 0, return 0; else return 1;

Obviously that's not exactly how it functions, but its generally how the logic is implemented on a bit-wise level. Note also that some processors will skip checking further arguments to or as soon as it finds that one is true, but I don't believe any of the TI's do this. Now, when running 1, 10, or even 1000 comparisons there is a difference which is negligible. However, when I ran 10,000 checks in a for loop with the timer on a TI-84+SE emulated in WabbitEmu, the times were slightly different. Using E or max(K={45,21,105 it took 106 seconds. When using E+max(K={45,21,105 my test only took 103 seconds.

So yes, you are right. There is no practical difference. But there is still a difference. I will also make note that the larger the comparands, the slower addition becomes. Again though, the difference is almost nonexistent.

The gameplay portion has a few optimizations, but I had a few things come up at work that greatly reduce the amount of time I have to optimize it. However, here is the code I came up with for the original demo you had uploaded. Its a bit shorter, and as I said earlier, contains no labels and is fairly adjustable as for com attack rate and movement rate.

I would like to mention that there was a fair bit of optimization in the peicewise statements. You may have noticed I was able to get rid of N, and O simply by putting what sets N and O into what changes A and B.