Re: TIB: BFS Final Game


[Prev][Next][Index][Thread]

Re: TIB: BFS Final Game



About your Matrix RPG engine.  It sounds cool, but what calc is it for?
 
I also have developed an RPG engine using matrices, but I have taken a different approach.  Here's what I did.
 
I begin by storing a matrix (8x12) into [B].  Next, I run the matrix through a graphics engine program that interprets the number in each matrix spot and draws a certain shape within that 8x8 pixel grid.  Here's what some of the coding looks like:
 
Lbl 0
T+1->T
If T>12
Then
1->T
S+1->S
End
If S>0
Then
2->X: 3->Y        ;This is just for later on in the programming.
Return
End
[B](S,T)->D        ;Takes current Matrix spot number and stores it into D
8(S-1)->F
8(T-1)->G           ;These two commands create the 8x8 pixel grid
If not D               ;If D=0, next spot over.
Goto 0
 
An example of the drawing:
 
If D=17
Then
Line(G,-F-3,G+4,-F-3
Line(G+4,-F-3,G+4,-F-7
Line(G,-F-4,G+3,-F-4
Line(G+3,-F-4,G+3,-F-7
Goto 0
End
 
It draws the level pretty fast, actually.  When I have the sprite move, I have it move within the 8x8 pixel grid.  That way, the program only has to check if the next spot over in the direction the sprite is moving.