Heyzzah everybody,

I was just wondering if someone could take a look at this and give me some tips. Also, if anyone wants to hop on board this project and collaborate to make a legitimate class-based game engine (of sorts) with APIs and SDKs and crap, just notify me and I can work out a way to work together.

Thanks,

-Will

Note 1: This is a class-based program, so it is split up into several programs.

Note 2: I calculated that is program only takes up about 712 units of space (calculator doesn't specify the unit used to measure the amount of RAM or ARC).

prgmJUPITER (base program):

```
ClrHome:ClrDraw
prgmθ99JUPTR //This is a program used to state the variables needed during development (code below)
While A≥0 or K≠21 //Repeats until the players health is null (I'll fix the quit key later, which is supposed to the 2nd button)
prgmθ98JUPTR //Controls the player (code below)
prgmZ99JUPTR //Assembles the subprograms for the experimental enemy AI (code below)
End
```

prgmθ99JUPTR (subprogram that states the necessary vars. in the development stage):

```
{47,31→L₁ //Player's starting position
{1,1→L₂ //AI's starting position (has yet to change when it spawns via algorithm)
DelVar K
20→A:1→B //"A" determines how much health the player has. "B" is used in For( statements.
0→Xmin:94→Xmax:10→Xscl //Makes 1 pixel 1 point on graph
0→Ymin:62→Ymax:10→Yscl
1→Xres
RectGC:CoordOff
GridOff:AxesOff
LabelOff:ExprOff
```

prgmθ98JUPTR (player program; will probably be renamed to θ99JUPTR once I don't need the vars. program):

```
For(B,1,5
getKey→K
If Ans
Pt-Off(L₁(1),L₁(2),3) //Removes the player's previous position
min(61,max(1,L₁(2)+sum(ΔList(Ans={34,25→L₁(2) //Controls the y of the player (adapted from a different program found on the main TI-Basic starter kit; I don't completely understand how this works, but it does)
min(93,max(1,L₁(1)+sum(ΔList(K={24,26→L₁(1) //Controls the x of the player
Pt-On(L₁(1),L₁(2),3) //Displays players current postion
End
```

prgmZ99JUPTR (assembly program for the first AI):

```
If abs(L₁(1)-L₂(1))>6 or abs(L₁(2)-L₂(2))>6 //Asks if it greater than 6 pixels away from player position
prgmY99JUPTR //If the statement above is true, it triggers pathfinding program
If abs(L₁(1)-L₂(1))≤6 or abs(L₁(2)-L₂(2))≤6 //Checks if the AI is within 6 pixels of the player
prgmX99JUPTR //Unfinished program that controls how much damage is dealt to the player
```

prgmY99JUPTR (pathfinding program for the enemy/AI; I will eventually implement a wall-check once I add that mechanic to class-based system):

```
Pt-Off(L₂(1),L₂(2),2) //Removes the enemy's previous position (it doesn't look pretty, but this uses the least code)
If L₁(1)-L₂(1)≥-(L₁(1)-L₂(1)) and abs(L₁(1)-(L₂(1)+1))≥6 //Asks if adding 1 to x makes it closer to player (can this code be optimized?)
L₂(1)+1→L₂(1) //Another way is L₂+{1,0→L₂
If L₁(2)-L₂(2)≥-(L₁(2)-L₂(2)) and abs(L₁(1)-(L₂(1)+1))≥6 //Asks if adding 1 to y makes it closer to player
L₂(2)+1→L₂(2) //Another way is L₂+{0,1→L₂
If L₁(1)-L₂(1)≤-(L₁(1)-L₂(1)) and abs(L₁(1)-(L₂(1)-1))≥6 //Asks if subtracting 1 from x makes it closer to player
L₂(1)-1→L₂(1) //Another way is L₂-{1,0→L₂
If L₁(2)-L₂(2)≤-(L₁(2)-L₂(2)) and abs(L₁(2)-(L₂(2)-1))≥6 //Asks if subtracting 1 from y makes it closer to player
L₂(2)-1→L₂(2) //Another way is L₂-{0,1→L₂
Pt-On(L₂(1),L₂(2),2) //Displays the enemy's/AI's position
```