Re: TIB: BFS Final game


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

Re: TIB: BFS Final game




	First, the matrix will change as the level progresses, but i am not that far
yet.  A and B represent the set of coordinates taken from the two lists.  L1
and L2 represent the walls in the level, L1=x var, L2 =y var.  So when you
move the cursor, it adds one to a&b which are originally zero, then says if
new cursor x=L1(a)<-(which var in the list) and new cursor y=L2(b) then store
the old cursor vars as the new cursor position so you cant walk through the
wall. Else add one to a & b, and reapeat the loop; it does this loop until it
reaches the end of the list or encounters a matching set and therefore checked
all of the possible walls for the cursor.  so basically, L1 and L2 contain
every wall edge on the screen, L1 bieng x L2 bieng y, and i use a variable
that increases by one each loop to determine the set of coordinates taken from
L1&L2 then say if this set of coordinates =the cursor coordinates, use the old
cursor coordinates.


Follow-Ups: