http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Calculator Discussion \ Do not bother.... I won't reply to your posts....

Click here to log in (you must be logged in to post comments).

AuthorComment
Jayko
Probe
Posted: 4 Jul 2005
19:23 GMT
Total Posts: 13
RPG Starter Kit
version 1.0
By: TI-Freakware
http://geocities.com/thorneycroft_225

Installation:

Send all of the .8xp programs to your 83+/SE/84+/SE. The program sets up its own variables.

Running the program:

Just run prgmA. This sets up the variables, and begins demo play. Please note there really is nothing to do inside the game yet, because you have to program it in there! :)

For the programmers:

The simple program will give you a solid foundation to start building an RPG based on the homescreen, using strings to store the levels. The calculator also uses the strings for hit detection, as well as being able to use the strings to determine if the character needs to go into a town, dungeon, etc.

More details: (ü is the sto -> symbol)

prgmA - size: 47 bytes

ClrHome ;
3üW:50üT ;The variable w is for the loop engine, T is the string ;location
1üL:4üQ ;L is which level you are on the map, up and down, Q is ;the character position, up and down
2üM:2üP ;M is which level you are on the map, left and right, P ;is where the character is at, left to right.
prgmZLVL ;This program has all the levels stored into it
prgmZGA ;This is the main engine.


prgmZCH - size: 171 bytes

If sub(Str1,T,1)="V":Then ;Using the sub command to find out ;where the cahracter is at on the screen
ClrHome ;
Disp "THE VILLAGE HAS","NOT BEEN BUILT. ;This doesn't have to be sotred ;here, and for speed, you may want to create ;the village in a seperate program
Pause ;
T+1üT:P+1üP ;These 2 equations make the character move to ;the right, one space, upon exiting the town
prgmZLVL ;
Return:End ;
If sub(Str1,T,1)="T":Then ;This determines that you land on the T
If L=2 and M=2:Then ;I was designating T as a dungeon, and you want ;multiple dungeons, you need to know which ;screen this particular dungeon was on
ClrHome ;
Disp "THERE IS NO","SPOON... ;
Pause ;
T+1üT:P+1üP ;
prgmZLVL:Return:End ;
End ;


prgmZGA - size: 444

While W=3 ;This is the start of the loop
Output(Q,P,"Ä ;This is the pi symbol (supposed to be anyways)
DelVar K ;This keeps variable K 'clean'
If sub(Str1,T,1)ø" ":Then:prgmZCH:End ;This checks to see if you step ;on a town, or dungeon or anything else you put ;in there
getKeyüK ;
If K=24:Then ;Left arrow...
If P=1:Then ;This checks to see if it is on the left side ;of the screen, if it is, will go to the screen left of ;it
M-1üM:T+15üT ;This moves to the left one screen, this adds to the ;string locator, to adjust for the position of where ;the character will be
15+PüP ;this moves the character's position to the far right
prgmZLVL ;
End ;
If P>1:Then ;
If sub(Str1,T-1,1)ø"X":Then ;This is used to determine if there is ;an 'X' blocking the way to the left
Output(Q,P," ;One space, used to clear the characters movement
P-1üP:T-1üT ;moves the characters place and string location 1 to ;the left
End:End:End ;
If K=25:Then ;Up key
If Q=1:Then ;
L-1üL:T+112üT ;
Q+7üQ ;
prgmZLVL ;
End ;
If Q>1:Then ;
If sub(Str1,T-16,1)ø"X":Then ;
Output(Q,P," ;
Q-1üQ:T-16üT ;
End:End:End ;
If K=26:Then ;Right key
If P=16:Then ;
M+1üM:T-15üT ;
P-15üP ;
prgmZLVL ;
End ;
If P<16:Then ;
If sub(Str1,T+1,1)ø"X":Then ;
Output(Q,P," ;
P+1üP:T+1üT ;
End:End:End ;
If K=34:Then ;Down Key
If Q=8:Then ;
L+1üL:T-112üT ;
Q-7üQ ;
prgmZLVL ;
End ;
If Q<8:Then ;
If sub(Str1,T+16,1)ø"X":Then ;
Output(Q,P," ;
Q+1üQ:T+16üT ;
End:End:End ;
End ;End of the loop


prgmZLVL - size: 612 bytes

If L=1:Then ;This is the top of the map
If M=1:Then ;this is the first section on the top row
"XXXXXXXXXXXXXXXXXX XX X XX XXX X XX XXXXXXXXX XXXXV XXXXXXXX XXXXXX XX X XXXXX XX XXX X XXXX XXX XXX X XXX"üStr1
End ;this is what the calc will use to display the map
If M=2:Then ;this is the second section on the top row
"XXXXXXXXXXXXXXXX XX X XX X XXXX XXXXXXXX X X X XX XXX X X X X XX XXXX X XX X X X"üStr1
End:End ;
If L=2:Then ;second row
If M=1:Then ;first section
"X XXX XXX X XXXX X XXX X X XX XXX X XX XX XXXX XXX X XX XXXX XX X XXX XX XXX XXXXXXXXXXXXXXXXX"üStr1
End ;
If M=2:Then ;second section
"X X X X XXX X X XXX XXXXX X XX XXX XXXX XX XX XXX XXXX XXX XX XX XX T XX XXXXXXXXXXXXXXXXX"üStr1
End:End ;
ClrHome ;
Output(1,1,Str1 ;Since using Output will automatically text wrap, we will use this to quickly upload the map



Here is what the 2x2 map should look like:

M=1 M=2
XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
XX XX X
X XX XXX X X X X X
L=1 X XXXXXXXXX XXX X X XXXX X
XV XXXXXXXX XXX XXXXXXX X X X X
XXX XX X XXX X XXX X X X X X
XX XX XXX X XXX X XXXX X X
X XXX XXX X XXX X X X X

X XXX XXX X XXX X X X X
X X XXX XXX X X
L=2 X X XX XXX XXX XXXXX X X
X XX XX XXXX X X XXX XXXX XX X
XX X XX XXXX X X XXX XXXX XXX X
X X XXX X X XX X
X XXX X X XX X
XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX



The map is designated by sectors, defined by variables L and M. As you can see, if L and M equal 1, then it brings up the left most pic. where as l=2 and m=1 will bring up the left, lower pic. You can make as many maps as you like, since it will be blocked by the walls, anyways. In a sense, the hit detection to map detection is very dynamic.

If you need more letter designations for more locations, you can just add them into the prgmZCH. If you are using one letter for multiple purposes (i.e. treasure Chest) then you need to make sure that when you look up the character ? (Or equivilent) that you also include which screen to look on, so it knows exactly which one to open.

Credits:
Daniel Thorneycroft - Author of the file
Kevin Ouellet - reminded me about the Output commands text wrap, speeding up the map display.


If there are any questions, please feel free to email me at tifreak8x@hotmail.com and I will gladly answer all your questions.





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org