NetHack/Rogue

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post 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.
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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?
Snake
New Member
Posts: 35
Joined: Thu 17 Mar, 2005 7:49 pm
Location: Currently violently murdering terrorist in a deep jungle somewhere in Tselinoyarsk.
Contact:

Post by Snake »

don't panic my next post is BIG :P
Last edited by Snake on Thu 08 Dec, 2005 7:31 pm, edited 1 time in total.
This is Snake, do you read me?
Snake
New Member
Posts: 35
Joined: Thu 17 Mar, 2005 7:49 pm
Location: Currently violently murdering terrorist in a deep jungle somewhere in Tselinoyarsk.
Contact:

Post 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 :)
This is Snake, do you read me?
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I'll try to help out, as soon as I get my calc. working or get a new one :(.
Snake
New Member
Posts: 35
Joined: Thu 17 Mar, 2005 7:49 pm
Location: Currently violently murdering terrorist in a deep jungle somewhere in Tselinoyarsk.
Contact:

Post by Snake »

thanks a lot :)
This is Snake, do you read me?
Snake
New Member
Posts: 35
Joined: Thu 17 Mar, 2005 7:49 pm
Location: Currently violently murdering terrorist in a deep jungle somewhere in Tselinoyarsk.
Contact:

Post by Snake »

UP :P

hoping someone will help me with this one :D
This is Snake, do you read me?
User avatar
NanoWar
Extreme Poster
Posts: 365
Joined: Fri 17 Dec, 2004 6:39 pm
Location: #$&"%§!
Contact:

Post 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.
Revolution Software
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post 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.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post 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.
Image Image Image
User avatar
DJ_O
Calc King
Posts: 2324
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post by DJ_O »

any progress?

(sa avance?)
Image Image Image Now active at https://discord.gg/cuZcfcF (CodeWalrus server)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

he posted his code, help him with that to see progress 8) .
User avatar
DJ_O
Calc King
Posts: 2324
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post by DJ_O »

too bad I have issue understanding people code :(
Image Image Image Now active at https://discord.gg/cuZcfcF (CodeWalrus server)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Last he posted I tried to help, but it seems to be missing a program or two.
Post Reply