Page 3 of 3

Posted: Thu 08 Dec, 2005 1:34 am
by threefingeredguy
Hahaha, it's a good thing to have vocabulary, it means you know a lot of words. I think you speak english well.

You can do something like

Code: Select all

If EnemyX<YourX+8 or YourX-8<EnemyX
EnemyX - (EnemyX>YourX) + (EnemyX<YourX) ->EnemyX
and do the same for Y values.

Posted: Thu 08 Dec, 2005 1:36 am
by kalan_vod
threefingeredguy wrote:Hahaha, it's a good thing to have vocabulary, it means you know a lot of words. I think you speak english well.

You can do something like

Code: Select all

If EnemyX<YourX+8 or YourX-8<EnemyX
EnemyX - (EnemyX>YourX) + (EnemyX<YourX) ->EnemyX
and do the same for Y values.
Does the bounds have any effect in rouge, like not the off screen, but in the game?

Posted: Thu 08 Dec, 2005 7:30 pm
by Snake
don't panic my next post is BIG :P

Posted: Thu 08 Dec, 2005 7:30 pm
by Snake
in fact the player "@" cannot go off screen cause it always look like that

HHHHHHHHHHHHHHHH
H................................H
H................................H
H................................H
H................................H
H................................H
H................................H
HHHHHHHHHHHHHHHH

and and you can't go outside cause :

Code: Select all

If sub(Str0,(16(Y-1))+X,1)="H
(X and Y are the position on the screen of the "@")

actually the movement routine is complete (i only have to integrate the movement for the ennemy (wich is almost done...)
I have many programs, but now i only need to show you Two of these

Program ROGUE:

Code: Select all

AxesOff:ClrDraw:ClrHome:2->H:2->Y
Output(1,1,"   Rogue v0.1
Output(3,4,"Loading
Output(4,1,"Generating area
69!:Output(3,11,".
1:prgmROGUEGEN                               //Map generator program
Output(4,1,"Generating char-               //Loaded with funciton "1"
Output(5,1,"acter data
69!:Output(3,12,".
1:prgmROGUECHA                              //Character generation program
Output(4,1,"Working out mon-             //Loaded with function "1" 
Output(5,13'".
1:prgmROGUEMON                             //Monster Generation program
Output(4,1,"Done, press                     //Loaded with function "1"
Output(5,1,"ENTER to begin
Pause
ClrHome
Repeat 0                                           //Engine start HERE
Output(1,1,Str0                                 //The map is stored in Str0
Output(L2(2),L2(1),"k                        //Display the kobold (monster)
Ouput(Y,X,"@                                   //Display yourself "@"
Repeat Ans
getkey->K
End
X->A:Y->B
X+(K=26)-(K=24->X
Y+(K=34)-(K=25->Y
X-(X>16)+(X<1->X
Y-(Y>8)-(Y<1->Y
Output(1,1,Str0
If sub(Str0,(16(y-1))+X,1)="H
Then
A->X
B->Y
Output(8,1,"You bumped into
Pause
Output(8,1,"a wall                
End
if K=55 and sub(Str0,(16(Y-1))+X,1)=">        //This is the stairs :p
Then
L+1->L
L:prgmROGUEGEN                                        //Map generation program
End                                                            //with function "L" (level var)
If K=55 and sub(Str0,(16(Y-1))+X,1)="<      //This is the stairs :p
Then
L-1->L
L`:prgmROGUEGEN
End
If L>2                                                         //This is only an alpha
Then                                                          //don't expect 30 levels :p
ClrHomt
Output(4,7,"Woot!
End
If L<1:Then
ClrHome
Disp "Loser!! you ascended!!!
Pause:ClrHome
Stop
End
2:prgmROGUEMON       //AI is loaded HERE after you chose what you will
End                             //do
And this is the second program ROGUEMON wich is essentially the monster generation things, and IA calculation

Program ROGUEMON :

Code: Select all

If Ans=1:Then
If L=1:{8,6,8,6,3,20,10,2,5,0,0,0,1}->L2           //{8,6,8,6} is the equi-
Return:End                                      //valence of X,Y,A,B in prgmROGUE
If Ans=2:Then
L2(2)-Y->T                         //L2(2) is in fact the equivalent of the Y
L2(1)-X->U                        //Same here but for X
If T>1:L2(2)-1->L2(2)
If T<-1:L2(2)+1->L2(2)
If U>1:L2(1)-1->:L2(1)
If U<-1L2(1)+1->L2(1)
If sub(Str0,(16(L2(2)-1))+L2(1),1)!="H
Then
L2(3)->L2(1)
L2(4)->L2(2)
End
L2(1)->L2(3)
L2(2)->L2(4)
Return:End
I know this need many optimisation and i intend to do it, but for now, let's just concentrate on the more complicated task, like the IA wich is BAAAAD now :p

i need your help :)

Posted: Thu 08 Dec, 2005 9:02 pm
by kalan_vod
I'll try to help out, as soon as I get my calc. working or get a new one :(.

Posted: Fri 09 Dec, 2005 5:13 am
by Snake
thanks a lot :)

Posted: Wed 21 Dec, 2005 5:22 am
by Snake
UP :P

hoping someone will help me with this one :D

Posted: Wed 21 Dec, 2005 11:01 am
by NanoWar
One thing:
What I dont like with basic programs is when you have to send hundreds of little progs to your calc.
Cant you just make one program?

And dont say its impossible to call a routine within a basic program.

Posted: Wed 21 Dec, 2005 3:05 pm
by DarkerLine
It's always possible to rewrite a program to avoid calling subprograms. In some cases, however, it requires fundamentally changing the way you store data.

Posted: Wed 21 Dec, 2005 9:03 pm
by Liazon
Or get an 89Ti and embrace the power of 68k Basic! Sometimes I feel the structure resembles C, so you can make your own subprogram within the program.

Posted: Fri 10 Feb, 2006 2:50 am
by DJ_O
any progress?

(sa avance?)

Posted: Fri 10 Feb, 2006 4:00 am
by kalan_vod
he posted his code, help him with that to see progress 8) .

Posted: Fri 10 Feb, 2006 1:08 pm
by DJ_O
too bad I have issue understanding people code :(

Posted: Fri 10 Feb, 2006 4:03 pm
by kalan_vod
Last he posted I tried to help, but it seems to be missing a program or two.