A86: Command & Conquer 86 (BASIC+ASM)


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

A86: Command & Conquer 86 (BASIC+ASM)




Hello, I am the author of Command & Conquer 85 (BASIC)  (the game sucked, so
don't bother wasting 21 K of mem).  I decided the game sucked so bad, that I
got a TI-86, and rewrote the program from the ground up, and managed to get
the user to be able to build up to 65 gunners, 65 tanks, 51 harvesters, 3
harvester dump stations, 15 power stations, 1 weapons factory, 1 barracks, and
2 obelisks.  (I'm not kidding..the program is in BASIC and is about 36K)  It
isn't even that slow either!!  The trouble is:  the only part that IS slow, is
where it draws the tiberium, and some things in the AI (like chosing a
direction to move around an obstacle).  To overcome the problem, I want to do
the graphics and the AI in ASM...HOWEVER, I need to know how to make an 86 ASM
program that can 'look' at the different elements of lists and matrices.  Now,
I have NO idea how to do this!!  Also, since it is the AI we are talking about
here, I need it to be able to change the elements on the list too!

Here is the routine I have right now in BASIC to draw the tiberium, and you
will quickly learn that this part of the program is VERY slow (luckily, it is
almost the only part of it that is slow):

Text(0,0,"Drawing Tiberium...       %")
dim MAP->A
For(Y,1,A(1))
Text(0,66,round((Y/A(1))100,0))
(Y*8)-7-yMin->D
If D<1:A(1)->X
If D=>1 and D=<65
Then
For(X,1,A(2))
(X*8)-7-xMin->E
If E<1:A(2)->X
If MAP(Y,X)==3 and E=>1 and E=<93
Then
For(C,(X*8)-7,(X*8)+1,2)
For(B,(Y*8)-7,(Y*8)+1,2)
PtOn(C,B)
End
End
End
End
End
End

(yes, there are 6 Ends)
Note:  The matrix: MAP, is 29 across, and 19 down...It is all zeroes, except
1's are buildings, 2's are units, and 3's are tiberium

If someone could PLEASE let me know how to do this in ASM, it would be
WONDERFUL!!!