Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 20 Aug 2003 02:14:31 pm    Post subject:

hi, ive got a very mean problem, my RPG has no walls, doors or sprites, it is simply walking code, and a text( to show the charecter, when i get to line 25,18 the darn thing stops! my guy won't go any farther to the left, i can go farther if i put the charecter on the other side of the "wall".


ALSO there are some places where i will "jump" ahead and up 2 spaces, it cant be my code, i think, because there is no code to do that!


I am using the HORIZ command but the regular big screen does the wall thang too!


plz hizzelp /\/\3
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 20 Aug 2003 02:45:28 pm    Post subject:

It wouldn't hurt if you showed us your code anyways.
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 20 Aug 2003 03:14:06 pm    Post subject:

ok, back by popular demand..... SCOURCE CODE!


18->x
13->y
Horiz
Lbl A
getkey
text Y,X,"8"
TEXT(Y,X-1," ''
if ans = 26
X+1->X
if ans = 24
X-1->X
if ans = 25
Y-1-> Y
if ans = 34
Y+1->Y
Goto A


Thats it guys, i get a data error at the "wall" if i try to pass at the top of the screen and i tries alot of different letters and symbols for the charecter, none helped



Thx
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 20 Aug 2003 04:28:47 pm    Post subject:

Quote:
TEXT(Y,X-1," ''

You could do If ANS:Then :TEXT(Y,X-1," ''):End, so that way it doesn't slow do the loop by clearing the 8 each time.

Quote:
Horiz

Why do you use this? (i know what it does but why do you slpit the screen?)

Quote:
if ans = 26
Then
X+1->X
End
if ans = 24
Then
X-1->X
End
if ans = 25
Then
Y-1-> Y
End
if ans = 34
Then
Y+1->Y
End


is faster

Quote:
Lbl A
[Code]
Goto A


If you do,
Quote:
For(X,1,2
0->X
[Your Code here]
End


(if you want to end the for, just set X to 2
Like:
Quote:
If Ans=21
Then
2->X
End


That would stop the prgm

Also i had that problem, with the jumping, and it not moving right, DON'T USE X AND Y, the calc. gets them confused sometimes and switches then, Use A and B, never X, Y, use them for loops or something else.

opps. i rewrote your code.
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 20 Aug 2003 07:17:02 pm    Post subject:

i had the wall prob with usin A and B too Razz

i use horiz for 2 reasons

1. it keeps the town size smaller so you can get to and fro faster
2. i think its alot better to write words on the home screen and keep the graph screen uncluttered, also i think it may be faster...


the TEXT(Y,X-1," " deletes the trail of the 8

as for the FOR( thing.... ??NANI??WHAT??HUH??
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 20 Aug 2003 11:40:21 pm    Post subject:

Babyboy wrote:
ok, back by popular demand..... SCOURCE CODE!


18->x
13->y
Horiz
Lbl A
getkey
text Y,X,"8"
TEXT(Y,X-1," ''
if ans = 26
X+1->X
if ans = 24
X-1->X
if ans = 25
Y-1-> Y
if ans = 34
Y+1->Y
Goto A


Thats it guys, i get a data error at the "wall" if i try to pass at the top of the screen and i tries alot of different letters and symbols for the charecter, none helped



Thx

If I were you I would do this instead.

18->A
13->B
Horiz
Repeat K (does not equal) 45
Getkey->K
Text(B,A,"8"
Text(B,A-1," ''
A+(K=26)->A
A-(K=24)->A
B+(K=34)->B
B-(K=25)->B
End
Stop

Boolean logic is faster and much more optimized than your version.
If you press clear it will exit the program.

Also you will need to add code to erase above the text when you are moving down or it will leave a trail.

Also it is true you should never use the x and y vars. The reason being that any time that something is done with the graphscreen they are changed.
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 21 Aug 2003 12:50:02 am    Post subject:

Justin W. wrote:
If I were you I would do this instead.

18->A
13->B
Horiz
Repeat K (does not equal) 45
Getkey->K
Text(B,A,"8"
Text(B,A-1," ''
A+(K=26)->A
A-(K=24)->A
B+(K=34)->B
B-(K=25)->B
End
Stop

Boolean logic is faster and much more optimized than your version.
If you press clear it will exit the program.

Also you will need to add code to erase above the text when you are moving down or it will leave a trail.

Also it is true you should never use the x and y vars. The reason being that any time that something is done with the graphscreen they are changed.


Instead of that, you could do this:
A+(K=26)-(K=24)->A
B+(K=34)-(K=25)->B

i don't think you need the parenthesis's (yah right Very Happy ) after the 24 or 25 either
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 21 Aug 2003 03:42:30 pm    Post subject:

thanks for the code!
it cleared up all of the probs i was having with the wall and jumping, but for the life of me i cant get rid of that trail! i got the one on the left to go away but the one on the bottom confuses me to no end, i know ive gotten it to go away before but for the life of me i don't remember how!! Wacko
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 21 Aug 2003 09:06:52 pm    Post subject:

try a few more spaces, some times that is what it needs
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 22 Aug 2003 02:32:56 am    Post subject:

Repeat K=45
getKey->K
If K:Text(B,A," " //4 spaces, could improve the if to "If:Then:Text(B,A," ":End" to gain some speed
A+(K=26)-(K=24->A
B+(K=34)-(K=25->A
Text(B,A,"X //draw character
End
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 24 Aug 2003 10:47:08 am    Post subject:

hey all, i got a request, does anyone have a person pic? or a tutorial to make one, i wanna draw a dude for my game but i no good...
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Aug 2003 11:28:50 am    Post subject:

Dimensions?
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 24 Aug 2003 12:37:45 pm    Post subject:

the four corners-


10,35.5 20,35.5





10,4.06 20,4.06




so, 10 X 31?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Aug 2003 12:41:12 pm    Post subject:

How should he look?
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 25 Aug 2003 10:02:23 am    Post subject:

whatever tickles your fancy
i don't really have a storyline so ill go on what he (she?) looks like
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 25 Aug 2003 10:14:43 am    Post subject:



EDIT: Feel free to edit.


Last edited by Guest on 25 Aug 2003 10:15:29 am; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 25 Aug 2003 05:50:40 pm    Post subject:

that is pretty cool lookin' man! i really like it!
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 25 Aug 2003 09:07:59 pm    Post subject:

wow! thanks! ill use that one, it looks great! ofcourse ill put you in charecter design Laughing



Thanks
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Aug 2003 09:58:42 am    Post subject:

Glad to help, besides, I had 2 minutes to waste.
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 01 Sep 2003 04:43:47 pm    Post subject:

ok, ive got more woes, i have been working on that game again and thought i would optimize Laughing but it turned out horrible, the darn char won't move at all!

this is the code


Code:
Lbl A
RecallPic 1
Text(A,B,"8"
Text(A,B-1," "
B+(K=26)-(K=24)B
A+(K=34)-(K=25)A
Text(A+6,B,"   "
If K=21
Then
ClrHome
Menu("Pause ","Resume",RE,"Save and quit",SQ
Lbl RE
If Z=1
Goto A
If Z=2
Goto B
If Z=3
Goto C
End

If Z=1
Then
B+(K=26)-(K=24)B
A+(K=34)-(K=25)A
If A=10 and B<37
11A
If A=16 and B<37
15A
If A10 and B=37
38B
If A16 and B=37
38B
If B=40
Goto 2Z
If A=11 and B=9
Goto W1
If A=11 and B=26
Goto TA
Goto A
End

If Z=2
Then
B+(K=26)-(K=24)B
A+(K=34)-(K=25)A
If B40
1Z
If A16 and B=47
46B
If A10 and B=47
46B
If A=10 and B48
11A
If A=11 and B=61
Goto IT
If A=24 and B=46
Goto IN
If A=11 and B=85
goto MA
If A=2 and B=42 Goto B1
Goto A
End
If Z=3
B+(K=26)-(K=24)B
A+(K=34)-(K=25)A
Then
If A=23
24A
If A=34
35A
If K
Then
randInt(1,5F
If F=5
Goto BA
End
If A=24 and B=46
Goto IN
Goto A
End
B+(K=26)-(K=24)B
A+(K=34)-(K=25)A
Goto A
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are GMT - 5 Hours

 

Advertisement