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 - yrinfish

Pages: 1 ... 7 8 [9] 10
121
Axe / getKey question
« on: March 17, 2011, 10:11:51 am »
I'm trying to make a key remapping function for DionJump, in Settings, users can edit the keys and the number is saved to an appvar.

But when I try to check the keys, it doesn't work...
Code: [Select]
:If getKey({K+2}) // K is the pointer to the appvar.
: ...
:End

Here is my source, the getKey is changed back to getKey(41), to make the game work. Please don't ask questions about the rest of the code, it isn't really good code, I know that...
WHOA, that's BIG, BIIIIIIIIIIIIIIIIIIIG, did I make that in 4 days ???
Spoiler For Spoiler:
:.NEWJUMP
:DiagnosticOff
:Fix 5
:.---------DATA
:[30]→Pic0
:[8CFC22A5E121A2FCFCA221E1A522FC8C1C62898581621C10020505050505050208151715151715080002050205020502]
:"vsnewJump→Str0
:"vinewJump→Str1
:det(128)→GDB0:
:.--------START
:sub(IN,1,Str0,1,6,Pic0,Str1)
:GetCalc(Str1)→L:GetCalc(Str0)→K:ClrDraw
:ClrHome
:.---------MENU
:Lbl RE
:Normal
:0→D→F→H→M→N→O→P→R→W→X→Y→Z→θ
:Fix 1
:Text(9,9,"DionJump"
:Line(40,20,89,20)
:Line(39,21,39,61)
:Line(40,62,89,62)
:Line(90,61,90,21)
:Text(42,22,"Easy")
:Text(42,30,"Normal")
:Text(42,38,"Hard")
:Text(42,46,"Insane")
:Text(42,54,"Settings")
:DispGraph
:Repeat getKey(9)
: If getKey(1) and (M<4)
:  M+1→M
:  1
: ElseIf getKey(4) and (M>0)
:  M-1→M
:  1
: Else
:  0
: End
: If
:  rref(40,8*M+21,50,9)
:  DispGraph
:  Pause 400
:  rref(40,8*M+21,50,9)
: End
:End
:Fix 0
:Pause 500
:.--------APPLY
:If M=0
: 125→R
:ElseIf M=1
: 080→R
:ElseIf M=2
: 040→R
:ElseIf M=3
: 020→R
:Else
: Goto HLP
:End
:If Full
: R*3→R
:End
:{K+2}→N
:{K+3}→O
:{K+4}→P
:.----INIT GAME
:3→{GDB0+56}
:1→{GDB0+57}
:For(I,0,10)
: rand^27*2+GDB0→M
: 3→{M}
: rand^96→{M+1}
: rand^27*2+58+GDB0→M
: 3→{M}
: rand^96→{M+1}
:End
:32→Y:16→X
:.----GAME LOOP
:While 1
:Pause R
:.---------KEYS
:If getKey(49)
: Return
:End
:0→θ
:If getKey(54)
: -3→θ
: 0→F
:ElseIf getKey(41)
: 3→θ
: 8→F
:End
:.----DATA EDIT
:Z-1→Z
:Y+θ+4^64-4→Y
:For(I,0,63)
: 2*I+GDB0→M
: If {M+1}>95 or ({M+1}=0)
:  0→{M}r
: End
:End
:
:.---COLLISSION
:For(I,0,12)
: Y+I-6*2+GDB0→M: If X<<0
:  Text(2,14,"Luckily we've got doctors..."
:  Text(5,26,"Otherwise you'd be pretty")
:  Text(32,32,"dead now.")
:  Text(7,57,"Press [ENTER] to restart.")
:  DispGraphClrDraw
:  Repeat getKey:  End
:  If getKey(9)
:   Pause 1000
:   Goto RE
:  End
:  ClrHome
:  Fix 4
:  Return
: ElseIf {M+1}+8+1000>(X+Z+1000) and ({M+1}+1000<(X+992)
:  If {M}<6 and ({M}>2)
:   {M+1}+8→X
:   0→Z
:  End
: ElseIf {M+1}=(X-8)
:  If {M}=3
:   8→Z
:  ElseIf {M}=4
:   10→Z
:  ElseIf {M}=5
:   0→{M}r
:  End
: End
:End
:
:
:
:
:.----DATA EDIT
:X+Z→X
:If X>70 and (X<100)
: X-70→M
: X-M→X
: H+M→H
: For(I,0,63)
:  {I*2+GDB0+1}-M→{I*2+GDB0+1}
: End
: !If rand^20
:  sub(GEN,4,M)
:  H→D
: Else!If rand^15
:  sub(GEN,5,M)
: ElseIf H-D>25
:  sub(GEN,3,0,95)
:  H→D
: End
:End
:
:.------DRAWING
:For(I,0,64)
: If {2*I+GDB0}
:  Pt-On({2*I+GDB0+1},I,8*{2*I+GDB0}+L)
: End
:End
:Text(74,0,H►Dec:Pt-On(X,Y,L+F)
:
:DispGraphClrDraw
:End
:
:prgmLINIT
:
:
:.-------BARGEN
:Lbl GEN
:While {rand^64*2+GDB0→A}
:End
:r1→{A}
:If r2
: 95-(rand^r2)→{A+1}
:Else
: r3→{A+1}
:End
:Return
:
:Lbl HLP
:ClrDraw
:Fix 1
:Text(9,9,"Settings"
:Line(40,20,89,20)
:Line(39,21,39,61)
:Line(40,62,89,62)
:Line(90,61,90,21)
:Text(42,22,"Change")
:Text(42,30,"Controls")
:Text(42,38,"About")
:Text(42,46,"You lost")
:Text(42,54,"Back")
:DispGraph
:sub(CHS)
:!If M
: 9→A
:ElseIf M=1
: ClrDraw
: Fix 0
: Text(9,9,"Press the key to go left.")
: DispGraph
: sub(PCK)→{K+2}: Text(66,9,"right.")
: DispGraph
: sub(PCK)→{K+3}: Text(60,9,"quit.           ")
: DispGraph
: sub(PCK)→{K+4}:ElseIf M=2
: 11→A
:ElseIf M=3
: 0→M
:Else
: Goto RE
:End
:Text(45,57,"Press a key...")
:DispGraphClrDraw
:Pause 1000
:Repeat getKey
:End
:Goto RE
:
:Lbl CHS
:Repeat getKey(9)
: If getKey(1) and (M<4)
:  M+1→M
:  1
: ElseIf getKey(4) and (M>0)
:  M-1→M
:  1
: Else
:  0
: End
: If
:  rref(40,8*M+21,50,9)
:  DispGraph
:  Pause 400
:  rref(40,8*M+21,50,9)
: End
:End
:Fix 0
:Pause 500
:M
:Return
:
:Lbl PCK
:Pause 1000
:Repeat getKey
:End
:getKey

122
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 16, 2011, 05:24:22 pm »
Ok, i'll ask it there tomorrow.

123
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 16, 2011, 04:10:01 pm »
Halted until I understand getKey, sorry, but the key remapping just doesn't want to work.
Also, this is my 4th post in a row.

124
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 16, 2011, 01:13:18 pm »
Why the ******, ***** and **** doesn't that zarking
Code: [Select]
:9—>A
:If getKey(A)
:…
:End
work, it is in the documentation that it should work...


125
Site Feedback and Questions / Re: Site funding and maintenance
« on: March 16, 2011, 02:31:10 am »
Where does DJ tell this? What am I missing?

126
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 15, 2011, 05:50:47 pm »
Ok, dying works, ((((almost))))
The problem was the place in the game loop where I checked it (as an elseIf behind some almost always true others...
I only need to make the game somewhat harder.

Still to do:
Function to remap keys
Orientation switch
Making you lose the game
And also making you lose this game
Put some things in Settings
Add the scoresaver (not much work)
Make the menuscreen more attractive

And:
Actually upload it :P

127
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 15, 2011, 10:21:24 am »
Argh, the being able to die bit is hard, without negative numbers.
But... collision checking works really good, and I made a dissappearing block, and one that makes you jump higher.

128
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 14, 2011, 04:16:22 pm »
Ok, generator is working (a little bit) but you still can't die...
Suddenly it crashed and ihadtopullabattery.

Todo:
Orientation switch
Be able to die
Fix generator to make the game harder
Smoother graphics
Trace the random crash
Add dissapearing blocks/bars (how should I call those?)
Maybe other keys

129
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 14, 2011, 02:31:29 pm »
Ok, no, because of the way I did it, that won't be possible. I will try something like it, though.
Gravity, menu, and initial generator are working. I'm currently making the in-game generator.

130
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 14, 2011, 07:37:14 am »
What do you mean with fractional movements? I cant draw sprites on half of a pixel ofc...

And no, I won't rewrite it again, adding functions will be easy after this rewrite.
The rewriting goes faster than I thought. I think it will be ready soon.

131
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 13, 2011, 06:13:35 pm »
Good luck with the rewriting. :)
Ty

I hope it works after the rewriting...

I'm thinking of storing all the data in an array like this
X-pos (not sideways) 8-bit, thing (power-up, black hole, bar) 8-bit, and 8 bits of data (bar is moving to the left, and such)
If I want to do collision checking, I only need to check 8 fields.

132
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 13, 2011, 05:21:45 pm »
Whoa, rewriting the entire game is booooooooooooooooooooring... I'm currently creating the menu, it hadn't got one, so this is an improvement.
How do I flip the whole screen? Maybe copying the buffer in to the backbuffer in reverse order?
  • was for using a powerup, but it doesn't work anymore, doesn't matter, I didn't like it.


Oh, last thing, won't Mohammed be angry at me bacause, with a menu and more, it starts looking like his one?

133
The Axe Parser Project / Re: List of all programs made with Axe Parser
« on: March 13, 2011, 03:44:58 pm »
I've made DionJump with Axe, and it is in progress, the thread is in Other projects.

134
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 13, 2011, 03:31:37 pm »
I included the source, so you can see it.

I'm rewriting the core, so any changes to it won't be useful to me. 

135
TI Z80 / Re: DionJump: a DoodleJump clone for the calcs
« on: March 13, 2011, 02:04:20 pm »
@ztrumpet Where is it?
@DeepThought H2G2!!!!!!!!!! And, I'm rewriting it and I'll include it

Pages: 1 ... 7 8 [9] 10