Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dinosteven

Pages: 1 ... 11 12 [13]
181
TI-BASIC / Re: Jump code help please
« on: July 27, 2012, 10:43:00 am »
Also, I suggest that you make your jumping by 1 unit at a time. When I made a jump game, what I did for jumping was adding the 'force' upward to the position, and lowering the 'force' upward according to gravity, until it was on top of a block. Ex:
Code: [Select]
:Y-C->Y
:If not(pxl-test(Y+2,X
:C-1->C
Unfortunately, that means that it sometimes skips a few pixels and falls through the block... I failed and gave up on it, but now I realize that instead of doing that, you can do this:
Code: [Select]
:Y-(C>0)->Y
:Y+(C<0)->Y
:If not(pxl-test(Y+2,X
:C-1->C
The (C>0) will always be 1 until C is 0 or lower, and it will go up by 1 every time. The (C<0) will always be 1 when C is 0 or lower, and it will go down every time. :)

182
TI-BASIC / Re: Jump code help please
« on: July 27, 2012, 02:33:36 am »
Code: [Select]
:If not(pxl-test(Y+2,X)
:Y+1->Y  // or whatever you want to do for gravity
You should also use this to check if they should be able to jump or not:
Code: [Select]
:If (K=21)pxl-test(Y+2,X
:5->J // something that starts the jump

183
Axe / Re: Input
« on: July 25, 2012, 11:23:04 pm »
Thanks, makes sense.

184
Axe / Re: Input
« on: July 25, 2012, 09:02:01 pm »
I got it from ztrumpet's Jump! source. Here's the code that he used to input a name:
Spoiler For Spoiler:
:Disp "Type Your Name:"
:Output(0,5)
:"WRMH"→GDB5
:det(3)
:"VQLG"
:det(3)
:"ZUPKFC"
:det(1)
:" YTOJEB"
:det(2)
:"XSNIDA"
:"                "→GDB9
:
:Repeat B=54 and (A≠0
:getKey→B
:If B=56 and (A≠0
:A-1→A
:Output(A,5,' '►Frac)
:Output(A,5)
:End
:If B=15
:0→A
:Output(0,5,GDB9)
:Output(0,5)
:End
:If A<16
:If B>10 and (B<48)
:If {B+GDB5-11}→C
:Disp C►Frac
:C→{A+L1}
:A+1→A
:End
:End
:End
:End
:While A<19
:0→{A+L1}
:A+1→A
:End

It starts with the setting of some strings, then somehow uses those strings as a 'getKey # to letter' algorithm. Now that I think about it and look at my calc's keys, they look like the letters in each column of keys... I still don't fully understand how it works, though.

EDIT:  :ninja:, and thanks!

185
Axe / Input
« on: July 25, 2012, 06:05:56 pm »
I tried looking at the source of a bunch of Axe games, but all I got was a bunch of stuff like :" YTOJEB"
??? It made no sense!
I've tried using the input command, but I couldn't get that to work, either.

So, how?

186
Axe / Re: Data() and appvars
« on: July 21, 2012, 06:55:29 pm »
Yes! After an update to Axe v 1.1.2, RAM clearing, compiling, and running, the error message disappeared.
Thanks for all the help!

187
Axe / Re: Data() and appvars
« on: July 21, 2012, 06:17:10 pm »
Why did everything turn into a 0? It's probably because of the line
:Copy(GDB1,A,64)
But how can I fix this?

188
Axe / Re: Data() and appvars
« on: July 21, 2012, 05:16:28 pm »
So it worked, and my calc's just trolling me by giving me the "ERR:MEMORY". Weird, but it works!

EDIT: No, it didn't. To access it in my game, I stored it to a variable S, since I couldn't use GDB1. After modifying my game to fit S, the map completely disappeared, except for the upper left corner. I assume that everything was changed to '0', and that it was mapping at 0,0
What to do?

189
Axe / Re: Data() and appvars
« on: July 21, 2012, 04:47:10 pm »
Code: [Select]
:.A
:"appvAPPVAR"→Str1
:GetCalc(Str1,64)→A
:Data(10,11,10,21,10,31,10,41,20,11,20,21,20,31,20,41,30,11,30,21,30,31,30,41,40,11,40,21,40,31,40,41,50,11,50,21,50,31,50,41,60,11,60,21,60,31,60,41,70,11,70,21,70,31,70,41,80,11,80,21,80,31,80,41)→GDB1
:Copy(GDB1,A,64)

I've got Axe v 1.0.5
And I compiled it for NoShell, running it with BrandonW's Noshell.
But even though it says "ERR:MEMORY", appvAPPVAR appears in the Memory menu with size 79 now. What size is it for you?

190
Axe / Re: Data() and appvars
« on: July 21, 2012, 04:33:32 pm »
While running.

191
Axe / Re: Data() and appvars
« on: July 21, 2012, 04:30:30 pm »
I tried it, but got an "ERR:MEMORY" even though I still have 9434 bytes of RAM left.
 appvAPPVAR now has size 143.
???

192
Axe / Re: Data() and appvars
« on: July 21, 2012, 04:03:48 pm »
Yeah, that makes sense. For some reason, I thought a byte was 4 bits.
So 1 byte is enough to hold all #s up to 255, right?

193
Axe / Re: Data() and appvars
« on: July 21, 2012, 03:55:11 pm »
Thanks!

But shouldn't the size be larger? I don't think you can store a number like 41 in 1 bit. Or byte? EDIT: Byte
Don't you need 8 bits/2 bytes for numbers up to 256?

194
Axe / Data() and appvars
« on: July 21, 2012, 03:38:27 pm »
I've got a list defined in one of my games that stores coordinates. Like this:
Data(10,11,10,21,10,31,10,41,20,11,20,21,20,31
etc. .... 40,31,40,41)→GDB1
The coordinates are for parts of a map. So far I've only got 1, but I want to make more and store them in appvars. And I really don't understand appvars - at all.  :'(
How do I define it with it's length? The list has 32 coordinates, meaning 64 numbers in it. What length is that? Can I do this:
GetCalc("appvAPPVAR",64)
to define it or is that completely wrong?
Once that's done, how do I store the list into it?
And more. Because when I checked the External Vars Tutorial, it just talks about numbers, not lists.
Essentially, can I either be told that it's not possible, or be told a step-by-step-super-detailed tutorial on how to do it?

Pages: 1 ... 11 12 [13]