Ok, so what I have done is split the big matrix into 8 smaller matrices, 4 rows of 2, and am currently working on making movement happen. my head, for whatever reason, doesn't want to do movement The problem is, while the game does run faster when rooms aren't being loaded in, the program itself is 4 times the size of the original one, and is verrryyyy RAM heavy… but the RAM was true with your other one, too, so that isn't a concern. This is just so you know that It might take me a bit longer, as I want this to be smaller before uploading it.
As Of May 12, I have made it down to 947 bytes, compared to what you have, which is 390 bytes. It also uses 10467 bytes of RAM for 9 8x16 matrices, 8 of them for rooms, one for the current room in use. Here is what I've come up with to make the game run faster while in rooms. Room making and loading is going to be slow no matter what I do.
Can't remember how to do a hidden block
ClrHome
Menu("SPACEGAME","CREATE",1,"RESUME",2,"QUIT",3,"DELETE",4 //while support for QUIT and DELETE is there, they have not been programmed in.
Lbl 1
DelVar [A]DelVar [B]DelVar [C]DelVar [D]DelVar [E]DelVar [F]DelVar [G]DelVar [H]DelVar [I] //clearing and setting up matrcies
{8,16→dim([A]:{8,16→dim([B]:{8,16→dim([C]:{8,16→dim([D]:{8,16→dim([E]:{8,16→dim([F]:{8,16→dim([G]:{8,16→dim([G]:{8,16→dim([H]:{8,16→dim([I]
For(C,1,8 //room generation begins
Output(1,1,"ROOM //what room it is working on (won't affect speed)
Output(1,6,C
Output(1,7,"/8
For(A,1,8 //loop for random number placement
For(B,1,16
randInt(1,2→[I](A,B
End:End
If C=1:[I]→[A] //loading room into matrix memory
If C=2:[I]→[B]
If C=3:[I]→[C]
If C=4:[I]→[D]
If C=5:[I]→[E]
If C=6:[I]→[F]
If C=7:[I]→[G]
If C=8:[I]→[H]
End //end room generation
1→F:1→G:1→A
Lbl 2
DelVar D
While D≠105 //start player interaction loop
A→E
If A=1:[A]→[I] //loading current room into active matrix
If A=2:[B]→[I]
If A=3:[C]→[I]
If A=4:[D]→[I]
If A=5:[E]→[I]
If A=6:[F]→[I]
If A=7:[G]→[I]
If A=8:[H]→[I]
For(B,1,8 //loading active room
For(C,1,16
Output(B,C,sub("H .",[I](B,C)+1,1
End:End
Output(G,F,"X
A→E
While E=A //player loop
Repeat D //player input loop
getKey→D
End
F→H:G→I //start basic movment
F-(D=24)+(D=26→F
G+(D=34)-(D=25→G //end basic movment
If F=0 or F=17 or G=0 or G=9:Goto 5 //at the edge of a room, do this
Output(I,H,sub("H .",[I](I,H)+1,1 //outputting player
Output(G,F,"X
Lbl 6
End:End
Lbl 5 //start new room finder
A+((F=17)((A=1)+(A=3)+(A=5)+(A=7)))-((F=0)((A=2)+(A=4)+(A=6)+(A=8)))-(2(G=0)((A=3)+(A=4)+(A=5)+(A=6)+(A=7)+(A=8)))+(2(G=9)((A=1)+(A=2)+(A=3)+(A=4)+(A=5)+(A=6→A //"equation" to find what new room needs to be loaded into active memory
If E≠A and G=0:8→G //resetting player as current place will crash game start
If E≠A and G=9:1→G
If E≠A and F=0:16→F
If E≠A and F=17:1→F
If E=A and G=0:1→G
If E=A and G=9:8→G
If E=A and F=0:1→F
If E=A and F=17:16→F //resetting player end
If E≠A
Output(I,H," //one space
Goto 6
the Gotos that I have shouldn't cause any memory errors. If you have any questions, just ask!
As of May 13, the revised program is 747 Bytes of information, with the matrices taking up the same amount of room. This should be the last update I do, as I can see no further optimizations
ClrHome
Menu("SPACEGAME","CREATE",1,"RESUME",2 //Got rid of close and delete, the game will close if you press enter
Lbl 1
{8,16→dim([I] //gone are the Delvars and dim(s as I found out that only one is needed for the program to work
For(C,1,8
Output(1,1,"ROOM
Output(1,6,C
Output(1,7,"/8
For(A,1,8
For(B,1,16
randInt(1,2→[I](A,B
End:End
If C=1:[I]→[A]
If C=2:[I]→[B]
If C=3:[I]→[C]
If C=4:[I]→[D]
If C=5:[I]→[E]
If C=6:[I]→[F]
If C=7:[I]→[G]
If C=8:[I]→[H]
End
1→F:Ans→G:Ans→A //Ans is faster
Lbl 2
DelVar D
While D≠105
A→E
If A=1:[A]→[I]
If A=2:[B]→[I]
If A=3:[C]→[I]
If A=4:[D]→[I]
If A=5:[E]→[I]
If A=6:[F]→[I]
If A=7:[G]→[I]
If A=8:[H]→[I]
For(B,1,8
For(C,1,16
Output(B,C,sub("H .",[I](B,C)+1,1
End:End
While A=E
Output(G,F,"X //moved to a better location
Repeat D
getKey→D
End
F→H:G→I
F-(D=24)+(D=26→F
G+(D=34)-(D=25→G
If F=0 or F=17 or G=0 or G=9:Goto 5
Lbl 6
Output(I,H,sub("H .",[I](I,H)+1,1
End:End
Lbl 5
A+(F=17)((A=1)+(A=3)+(A=5)+(A=7))-(F=0)((A=2)+(A=4)+(A=6)+(A=8))-2(G=0)((A=3)+(A=4)+(A=5)+(A=6)+(A=7)+(A=8))+2(G=9)((A=1)+(A=2)+(A=3)+(A=4)+(A=5)+(A=6→A //shortened this by getting rid of parentheses
G+8(G=0)(A≠E)+(G=0)(A=E)-8(G=9)(A≠E)-(G=9)(A=E→G //changed the 8 If statements to two equations
F+16(F=0)(A≠E)+(F=0)(A=E)-16(F=17)(A≠E)-(F=17)(A=E→F
Goto 6
Again, if you have any questions, please ask