November 24, 2020, 06:45:48 AM

Author Topic: [bb] Basic & Charged Jumping in 3D by Nexinarus [ 1+ years ago ]  (Read 762 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : Basic & Charged Jumping in 3D
Author : Nexinarus
Posted : 1+ years ago

Description : Ive read many topics on jumping this past couple years. Most of them had the same problem. When you press and hold the [JUMP] key, the character bounces like a jack rabbit.

Well from help from the Blitz Community, and lots of tinkering, trial and error. I think I may have a solution.

The object of jumping is to press the [JUMP] button for a single jump. Not multiple ones.  

---------------------------------------
         ;if jumping is labeled as false check for collisions. If none you are still in the air, therefore, still jumping
         If jump=False
            If CountCollisions(player1)=0 jump=True
            velud=0
         End If
         ;make sure your assending/desending is decreased constantly. Think of it as gravity
         velud=velud-1
         ;check for collisions. If a collision is found vertically, you are no longer jumping. (Turn Jumping off)
         For checkallCollisions=1 To CountCollisions(player1)
            If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
               jump=False
               velud=0-1
               Exit
            ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
               jump=True
               velud=0-1
               Exit
            End If
         Next

         ;here's where things change. Instead of keydown. use keyhit and then do the vertical check again. without the vertical check, you may not jump when ou want to.
         If KeyHit(mjp)
            For checkallCollisions=1 To CountCollisions(player1)
               If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
                  jump=False
                  velud=0-1
                  Exit
               End If
            Next
            ;if jumping is false set to true and set a velocity number. You should then be all set.
            If jump=False
               velud=8;8,11,14,16,18 (1-5 blocks respectfully)
               jump=True
            End If
         End If
---------------------------------------

I hope this helps. Like i said, this is basic jumping without the jack-rabbit jumping when the jump button is pressed.

Here is the charged jumping.
--------------------------------------
      ;while the charcter is falling check for collisions vertically. If you land on something reduce pull to -1, if you hit your head. do the same thing. It will stop the acceleration and start the deceleration.
         velud=veluD-1
         For checkallCollisions=1 To CountCollisions(player1)
            If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
               velud=-1
               Exit
            ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
               velud=-1
               Exit
            End If
         Next
         ;if you press the [JUMP] button, do a single jump. (just like the other jump routine).
         If KeyHit(mjp)
            For checkallCollisions=1 To CountCollisions(player1)
               If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
                  velud=8
                  Exit
               End If
            Next
         End If
         ;if you charge the jump. increase the power of the jump when the [JUMP] button is released. Oh yeah, check for vertical collisions along the way.
         If KeyDown(mjp)=True
            tmpvud=tmpvud+1
            If tmpvud>18 tmpvud=18
         ElseIf KeyDown(mjp)=False
            For checkallCollisions=1 To CountCollisions(player1)
               If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
                  velud=tmpvud
                  Exit
               End If
            Next
            tmpvud=-1
         End If
----------------------------------------
Well that's it. There is now traditional jumping, and charged jumping.
I didn't do the extended jumping like mario where you hold down the [jump] button to go higher.  I didn't think it was needed after doing the chargedjumping routine. But I'm sure someone can figure it out now with jumping finally figured out completely.

Traditional Jumping - Tap [JUMP] to jump:
    Based on any game with jumping.
Charged Jumping - Tap [Jump] to jump, Hold & release [Jump] to charge jump:
    Based on Spider-Man 2 (PlayStation2) jumping.
Mario Jumping - Not done, didn't think it's needed after the charged jumping. But it should be easy to figure out now with the other 2 Jump Routines as a starting point.


Code :
Code: BlitzBasic
  1. Global mup=200,MDN=208,mlt=203,mrt=205,mjp=57,mst=28
  2. ;input user keys here before the program starts
  3. Color 255,255,255
  4. For x=0 To 6
  5.         Cls
  6.         Text 10, 0,"   Up:"
  7.         Text 10,12," Down:"
  8.         Text 10,24," Left:"
  9.         Text 10,36,"Right:"
  10.         Text 10,48," Jump:"
  11.         Text 10,60,"Shoot:"
  12.         If X<6 Text 10,84,"[ESC] Use Defaults"
  13.        
  14.         If x<6 Rect 58,x*12,8,12
  15.         If x>0 Text 58,0,mup
  16.         If x>1 Text 58,12,mdn
  17.         If x>2 Text 58,24,mlt
  18.         If x>3 Text 58,36,mrt
  19.         If x>4 Text 58,48,mjp
  20.         If x>5 Text 58,60,mst
  21.         If x=6 Text 10,84,"Press any key to continue..."
  22. .redo
  23.         confirm=False
  24.         FlushKeys
  25.         Repeat
  26.                 For keyz=0 To 255
  27.                         If KeyHit(keyz)
  28.                                 If x=0 mup=keyz
  29.                                 If x=1 mdn=keyz
  30.                                 If x=2 mlt=keyz
  31.                                 If x=3 mrt=keyz
  32.                                 If x=4 mjp=keyz
  33.                                 If x=5 mst=keyz
  34.                                 confirm=True
  35.                         End If
  36.                 Next
  37.         Until confirm=True
  38.         If X<6
  39.                 If MUP=1 Or MDN=1 Or MLT=1 Or MRT=1 Or MJP=1 Or MST=1
  40.                         mup=200
  41.                         MDN=208
  42.                         mlt=203
  43.                         mrt=205
  44.                         mjp=57
  45.                         mst=28
  46.                         x=5
  47.                 End If
  48.         End If 
  49.         If x=0
  50.                 If mup=15 Goto redo
  51.         ElseIf x=1
  52.                 If mdn= 15 Goto redo
  53.                 If mdn=mup Goto redo
  54.         ElseIf x=2
  55.                 If mlt= 15 Goto redo
  56.                 If mlt=mup Goto redo
  57.                 If mlt=mdn Goto redo
  58.         ElseIf x=3
  59.                 If mRt= 15 Goto redo
  60.                 If mRT=mup Goto redo
  61.                 If mRT=mdn Goto redo
  62.                 If mRT=mLT Goto redo
  63.         ElseIf x=4
  64.                 If mJP= 15 Goto redo
  65.                 If mJP=mup Goto redo
  66.                 If mJP=mdn Goto redo
  67.                 If mJP=mLT Goto redo
  68.                 If mJP=mRT Goto redo
  69.         ElseIf x=5
  70.                 If mST= 15 Goto redo
  71.                 If mST=mup Goto redo
  72.                 If mST=mdn Goto redo
  73.                 If mST=mLT Goto redo
  74.                 If mST=mRT Goto redo
  75.                 If mST=mJP Goto redo
  76.         End If
  77. Next
  78. ;ADDED DATA---------------------------------------
  79. RESTOREBMP ;CREATE CHARACTGER AND BULLET AND BEAM
  80. ;-------------------------------------------------
  81.  
  82. Const PERIOD=32 ;(1024/PERIOD) = FPS (FRAMES PER SECOND)
  83.  
  84. ;SET GRAPHICS MODE AND LOAD STUFF HERE.
  85. Graphics3D 640,480,16,3
  86.  
  87. Global TIME=MilliSecs()-PERIOD,ELAPSED,FRAMETICKS,TWEEN#
  88. ;TIME = CALCULATE TIME PERIOD
  89. ;ELLAPSE = TIME ELLAPSED (TIME PASSED) This changes throughout the program
  90. ;FRAMETICKS = How many frames have ellapsed (passe)
  91. ;TWEEN# = used to get inbetween frames
  92.  
  93.  
  94. ;ADDED DATA--------------------------------------------------------------------
  95. Const CLSN_PLYR=1,CLSN_OBJS=2,CLSN_GRND=3
  96. Collisions CLSN_PLYR,CLSN_OBJS,2,2
  97. Collisions CLSN_PLYR,CLSN_GRND,2,2
  98.  
  99. AmbientLight 84,168,252
  100.  
  101. PLANE1TEX=CreateTexture(32,32)
  102. SetBuffer TextureBuffer(PLANE1TEX)
  103. Color 84,84,252
  104. Rect 0,0,32,32
  105. For ALLLINES=0 To 2
  106.         Color 42-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42,210-(ALLLINES Mod 2)*42
  107.         Line ALLLINES,1,ALLLINES+29,30
  108.         Line ALLLINES,30,ALLLINES+29,1
  109. Next
  110. Color 0,0,0
  111. For ALLSQUARES=0 To 3
  112.         Rect ALLSQUARES/2*16,16*(ALLSQUARES Mod 2),16,16,0
  113. Next
  114. Color 0,0,168
  115. Line 0,0,31,31
  116. Line 0,31,31,0
  117.  
  118. PLANE2TEX=CreateTexture(32,32)
  119. SetBuffer TextureBuffer(PLANE2TEX)
  120. Color 252,84,84
  121. Rect 0,0,32,32
  122. For ALLLINES=0 To 2
  123.         Color 210-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42
  124.         Line ALLLINES,1,ALLLINES+29,30
  125.         Line ALLLINES,30,ALLLINES+29,1
  126. Next
  127. Color 0,0,0
  128. For ALLSQUARES=0 To 3
  129.         Rect ALLSQUARES/2*16,16*(ALLSQUARES Mod 2),16,16,0
  130. Next
  131. Color 168,0,0
  132. Line 0,0,31,31
  133. Line 0,31,31,0
  134. ;------------------------------------------------------------------------------
  135.  
  136. SetBuffer BackBuffer() ;Double buffering
  137.  
  138.  
  139. ;ADDED DATA--------------------------------------------------------------------
  140.  
  141. ;cubes
  142. cube=CreateCube()
  143. EntityColor cube,1,1,255
  144. ScaleEntity cube,.5,.5,.5
  145. PositionEntity cube,-5,1.5,0
  146. EntityType cube,clsn_objs
  147.  
  148. cube=CreateCube()
  149. EntityColor cube,255,1,1
  150. ScaleEntity cube,.25*2,.25*2,.25*2
  151. PositionEntity cube,0,.25*2,0
  152. EntityType cube,clsn_objs
  153.  
  154. cube=CreateCube()
  155. EntityColor cube,1,255,1
  156. ScaleEntity cube,.25*6,.25*12,.25*6
  157. PositionEntity cube,5,.25*12,0
  158. EntityType cube,clsn_objs
  159.  
  160. ;light
  161. btllight=CreateLight(2)
  162. PositionEntity btllight,0,10,0
  163.  
  164. ;charsize x,y
  165. sizex=16*1
  166. sizey=16*1
  167. plyrdir=0 ;player direction
  168. WALKSPEED=2 ;PLAYER'S WALKING SPEED
  169.  
  170. player1=CreateSprite()
  171. plyr1tex=LoadAnimTexture("char1.bmp",7,32,32,0,2)
  172. EntityTexture player1,plyr1tex,0
  173. SpriteViewMode player1,2
  174. PositionEntity player1,0,5,0
  175. ScaleSprite player1,0.03125*sizex,0.03125*sizey
  176. EntityRadius player1,0.0078125*sizex,0.015625*sizey
  177. EntityType player1,clsn_plyr
  178. ;delete when done----------
  179. sphere=CreateSphere(32,player1)
  180. EntityAlpha sphere,.5
  181. ScaleEntity sphere,0.0078125*sizex,0.015625*sizey,0.0078125*sizex
  182. PositionEntity sphere,0,0,0
  183. ;--------------------------
  184.  
  185. ;player camera
  186. camera=CreateCamera(player1)
  187. CameraViewport camera,0,0,GraphicsWidth(),GraphicsHeight()
  188. CameraProjMode camera,2
  189. PositionEntity camera,0,10,-10
  190. RotateEntity camera,45,0,0
  191. CameraZoom camera,.5
  192. ;fixed camera
  193. smlcam=CreateCamera()
  194. CameraViewport smlcam,GraphicsWidth()*7/8,GraphicsHeight()*7/8,GraphicsWidth()/8,GraphicsHeight()/8
  195. CameraProjMode smlcam,2
  196. PositionEntity smlcam,3,10,-10
  197. RotateEntity smlcam,45,0,0
  198. CameraZoom smlcam,.5
  199.  
  200. ;battlefield
  201. btlcube=CreateCube()
  202. ScaleEntity btlcube,12,Float(1)/256,4
  203. ScaleTexture plane1tex,Float(1)/24,Float(1)/8
  204. EntityTexture btlcube,plane1tex
  205. PositionEntity btlcube,0,0,0
  206. EntityType btlcube,clsn_grnd
  207.  
  208. ;exitfield
  209. exitcube=CreateCube()
  210. ScaleEntity exitcube,12+8,Float(1)/256,4+8
  211. ScaleTexture plane2tex,Float(1)/40,Float(1)/24
  212. EntityTexture exitcube,plane2tex
  213. PositionEntity EXITcube,0,-Float(1)/256,0
  214. EntityType EXITcube,clsn_grnd
  215.  
  216. FLUSH ; FLUSH INPUTS
  217. ;------------------------------------------------------------------------------
  218.  
  219.  
  220. ;BEGINNING OF PROGRAM
  221.  
  222. Repeat
  223.         ;WAIT FOR ELLAPSED TIME
  224.         Repeat
  225.                 ELAPSED=MilliSecs()-TIME
  226.         Until ELAPSED
  227.        
  228.         FRAMETICKS=ELAPSED/PERIOD ;how many 'frames' have elapsed
  229.        
  230.         Tween#=Float(elapsed Mod period)/Float(period) ;fractional remainder
  231.        
  232.         ;check each frame
  233.         For checkticks=1 To frameticks
  234.                 time=time+period ;goto next time period
  235.                 If checkticks=frameticks Then CaptureWorld ; capture each frame in 3d world within time period
  236.                 ;place images/entties and inputs here--------------------------------------------
  237.        
  238.                
  239.                 ;ADDED DATA----------------------------------
  240.                 If jroutine=1;new jump routine stumped
  241.  
  242. ;----------------------------original charge jump code
  243. ;                       velud=veluD-1
  244. ;                       If CountCollisions(player1)>0 velud=-1
  245. ;                       If KeyHit(mjp)
  246. ;                               If CountCollisions(player1)>0 velud=8;8,11,14,16,18 (1-5 blocks respectfully)
  247. ;                       End If
  248. ;                       If KeyDown(mjp)=True
  249. ;                               tmpvud=tmpvud+1
  250. ;                               If tmpvud>18 tmpvud=18
  251. ;                       ElseIf KeyDown(mjp)=False
  252. ;                               If CountCollisions(player1)>0 velud=tmpvud
  253. ;                               tmpvud=-1
  254. ;                       End If
  255. ;------------------------------------------------------
  256.  
  257.                         velud=veluD-1
  258.                         For checkallCollisions=1 To CountCollisions(player1)
  259.                                 If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
  260.                                         velud=-1
  261.                                         Exit
  262.                                 ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
  263.                                         velud=-1
  264.                                         Exit
  265.                                 End If
  266.                         Next
  267.  
  268.                         If KeyHit(mjp)
  269.                                 For checkallCollisions=1 To CountCollisions(player1)
  270.                                         If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
  271.                                                 velud=8
  272.                                                 Exit
  273.                                         End If
  274.                                 Next
  275.                         End If
  276.                         If KeyDown(mjp)=True
  277.                                 tmpvud=tmpvud+1
  278.                                 If tmpvud>18 tmpvud=18
  279.                         ElseIf KeyDown(mjp)=False
  280.                                 For checkallCollisions=1 To CountCollisions(player1)
  281.                                         If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
  282.                                                 velud=tmpvud
  283.                                                 Exit
  284.                                         End If
  285.                                 Next
  286.                                 tmpvud=-1
  287.                         End If
  288.  
  289.                 ElseIf jroutine=0;jump routine with help from blitz forum community
  290.                         If jump=False
  291.                                 If CountCollisions(player1)=0 jump=True
  292.                                 velud=0
  293.                         End If
  294.                         velud=velud-1
  295.                         For checkallCollisions=1 To CountCollisions(player1)
  296.                                 If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
  297.                                         jump=False
  298.                                         velud=-1
  299.                                         Exit
  300.                                 ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
  301.                                         jump=True
  302.                                         velud=-1
  303.                                         Exit
  304.                                 End If
  305.                         Next
  306.                         If KeyHit(mjp)
  307.                                 For checkallCollisions=1 To CountCollisions(player1)
  308.                                         If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
  309.                                                 jump=False
  310.                                                 velud=-1
  311.                                                 Exit
  312.                                         End If
  313.                                 Next
  314.                                 If jump=False
  315.                                         velud=8;8,11,14,16,18 (1-5 blocks respectfully)
  316.                                         jump=True
  317.                                 End If
  318.                         End If
  319.                 End If
  320.                 If KeyHit(15) jroutine=Not jroutine ;tab ;toggles jumping routines
  321.                
  322.                 ;move up
  323.                 If KeyDown(mup)=True
  324.                         If CountCollisions(PLAYER1)=0
  325.                                 If VELNS=0 VELN=1
  326.                         ElseIf CountCollisions(PLAYER1)>0
  327.                                 veln=veln+walkspeed
  328.                                 If veln>5*walkspeed veln=5*walkspeed
  329.                         End If
  330.                 ElseIf KeyDown(mup)=False
  331.                         If CountCollisions(PLAYER1)>0
  332.                                 veln=veln-walkspeed
  333.                                 If veln<0 veln=0
  334.                         End If
  335.                 End If
  336.                 ;move down
  337.                 If KeyDown(mdn)=True
  338.                         If CountCollisions(PLAYER1)=0
  339.                                 If VELNS=0 VELS=1
  340.                         ElseIf CountCollisions(PLAYER1)>0
  341.                                 vels=vels+walkspeed
  342.                                 If vels>5*walkspeed vels=5*walkspeed
  343.                         End If
  344.                 ElseIf KeyDown(mdn)=False
  345.                         If CountCollisions(PLAYER1)>0
  346.                                 vels=vels-walkspeed
  347.                                 If vels<0 vels=0
  348.                         End If
  349.                 End If
  350.                 velns=veln-vels ;balances north(up) and south(down) movement
  351.                 ;move left
  352.                 If KeyDown(mlt)=True
  353.                         If CountCollisions(PLAYER1)=0
  354.                                 If VELWE=0 VELW=1
  355.                         ElseIf CountCollisions(PLAYER1)>0
  356.                                 velw=velw+walkspeed
  357.                                 If velw>5*walkspeed velw=5*walkspeed
  358.                         End If
  359.                 ElseIf KeyDown(mlt)=False
  360.                         If CountCollisions(PLAYER1)>0
  361.                                 velw=velw-walkspeed
  362.                                 If velw<0 velw=0
  363.                         End If
  364.                 End If
  365.                 ;move RIGHT
  366.                 If KeyDown(mrt)=True
  367.                         If CountCollisions(PLAYER1)=0
  368.                                 If VELWE=0 VELE=1
  369.                         ElseIf CountCollisions(PLAYER1)>0
  370.                                 velE=velE+walkspeed
  371.                                 If velE>5*walkspeed velE=5*walkspeed
  372.                         End If
  373.                 ElseIf KeyDown(mRT)=False
  374.                         If CountCollisions(PLAYER1)>0
  375.                                 velE=velE-walkspeed
  376.                                 If velE<0 velE=0
  377.                         End If
  378.                 End If
  379.                 velWE=velE-velW ;balances west(left) and east(right) movement
  380.                 If velwe<>0 tmpdir=-(Sgn(velwe)-1)/2 ;calculate char dir using valwe
  381.                 If tmpdir<>plyrdir
  382.                         plyrdir=tmpdir
  383.                         direction(player1,plyr1tex,tmpdir)
  384.                 End If
  385.                 ;CHARACTER MOVEMENT
  386.                 MoveEntity player1,Float(velwe)/160,Float(velud)/32,Float(velns)/160
  387.                 ;--------------------------------------------
  388.                 ;--------------------------------------------------------------------------------
  389.                 UpdateWorld ;UPDATE YOUR 3D WORLD
  390.         Next
  391.         RenderWorld TWEEN# ; RENDERS CURRENT SCREEN FROM BACKGROUND BUFFER (INCLUDING TWEENING)
  392.        
  393.         ;ADDED TEXT---------------------------------------------------------
  394.         Color 255,255,255
  395.         Text 0, 0,EntityX(PLAYER1)+","+EntityY(PLAYER1)+","+EntityZ(PLAYER1)
  396.         Text 0,10,VELNS+", "+VELWE+", "+VELUD
  397.         Text 0,20,"[TAB] Toggle jumping: "+jroutine
  398.         Text 20,30,"press [JUMP] to Jump."
  399.         If jroutine=1 Text 20,40,"hold & release [JUMP] to ChargeJump"
  400.         ;-------------------------------------------------------------------
  401.         Flip ; show new screen update
  402. Until KeyHit(1) Or (EntityCollided(Player1,CLSN_GRND)=exitcube) Or (EntityY(player1)<-2 Or EntityY(player1)>11);END MAIN LOOP
  403.  
  404. ;CLEAN UP STUFF
  405. time=0
  406. elapsed=0
  407. frameticks=0
  408. tween#=0
  409. checkticks=0
  410.  
  411. ClearWorld ;remove entities, brushes, textures from memory (anything missed)
  412. ClearCollisions ;clear all collisions from memory
  413. EndGraphics
  414. flush
  415.  
  416.  
  417. Function DIRECTION(SPR,TEX,FRM);CHANGE IMAGE ON SPRITE
  418.         EntityTexture SPR,TEX,FRM
  419. End Function
  420.  
  421. Function flush() ;flush all inputs from memory
  422.         FlushKeys ;clear keyboard presses
  423.         FlushMouse ;clear mouse clicks
  424.         FlushJoy ;clear joystick presses
  425. End Function
  426.  
  427. Function restorebmp()
  428.         ;set gfxmode
  429.         Graphics 320,240,16,3
  430.         ;Create Image
  431.         tmp=CreateImage(64,32)
  432.         ;set buffer to image
  433.         SetBuffer ImageBuffer(tmp)
  434.         ;if char1.bmp doesn't exist... make it
  435.         If FileType("char1.bmp")=2 DeleteDir "char1.bmp"
  436.         If FileType("char1.bmp")=0
  437.                 Cls
  438.                 Restore char
  439.                 For v=0 To 31
  440.                         For h=0 To 31
  441.                                 Read c
  442.                                 If c>0
  443.                                         Color (c-1)*84+7*(c=1),(c-1)*84+7*(c=1),(c-1)*84+7*(c=1)
  444.                                         Plot h,v
  445.                                         Plot 63-h,v
  446.                                 End If
  447.                         Next
  448.                 Next
  449.                 SaveImage tmp,"char1.bmp"
  450.         End If
  451.         ;if laser1.bmp doesn't exist... make it
  452.         If FileType("laser1.bmp")=2 DeleteDir "laser1.bmp"
  453.         If FileType("laser1.bmp")=0
  454.                 Cls
  455.                 For c=0 To 3
  456.                         Color c*63+63,c*63+63,c*63+63
  457.                         Rect 8,c+12,16,7-2*c
  458.                         Rect c+12+32,8,7-2*c,16
  459.                 Next
  460.                 SaveImage tmp,"laser1.bmp"
  461.         End If
  462.         ;if bullet1.bmp doesn't exist... make it
  463.         If FileType("bullet1.bmp")=2 DeleteDir "bullet1.bmp"
  464.         If FileType("bullet1.bmp")=0
  465.                 Cls
  466.                 For c=0 To 3
  467.                         Color c*63+63,c*63+63,c*63+63
  468.                         Oval c*3/2+8,c*3/2+8,16-2*(c*3/2),16-2*(c*3/2)
  469.                         Oval c+2+32+8,c+2+8,16-2*(c+2),16-2*(c+2)
  470.                 Next
  471.                 SaveImage tmp,"bullet1.bmp"
  472.         End If
  473. End Function
  474.  
  475.  
  476. .char
  477. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  478. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  479. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  480. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  481. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  482. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  483. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  484. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  485. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  486. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  487. Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0
  488. Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0
  489. Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0
  490. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  491. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  492. Data 0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,4,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0
  493. Data 0,0,0,0,0,0,0,0,0,0,0,1,4,4,1,4,4,4,1,2,2,1,0,0,0,0,0,0,0,0,0,0
  494. Data 0,0,0,0,0,0,0,0,0,0,1,3,3,1,1,4,1,4,3,2,2,1,0,0,0,0,0,0,0,0,0,0
  495. Data 0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,4,1,1,3,2,2,1,0,0,0,0,0,0,0,0,0,0
  496. Data 0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
  497. Data 0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  498. Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,1,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0
  499. Data 0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,1,3,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0
  500. Data 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
  501. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  502. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  503. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  504. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  505. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  506. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  507. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  508. Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0


Comments :


Captain Wicker (crazy hillbilly)(Posted 1+ years ago)

 AWESOME!!!!!!!!!! ((O)_(O))


Nexinarus(Posted 1+ years ago)

 I hope this helps everyone.It would be cool to hear if anyone used these jump routines.


Captain Wicker (crazy hillbilly)(Posted 1+ years ago)

 How did you make the player image?


Nexinarus(Posted 1+ years ago)

 Its in the Data statement. Then look at the routine RestoreBMP.It is pretty straight forward. Well, it is to me.If you need a further explanation, let me know.


Captain Wicker (crazy hillbilly)(Posted 1+ years ago)

 It is very cool to be able to actually make a character image from code. Nice work! :)


Nexinarus(Posted 1+ years ago)

 Thanks. It really isnt that hard to do so. I plan on making backup image files like that. You know just incase files are missing.  I do know that happens from time to time.


Nexinarus(Posted 1+ years ago)

 I have an update for the jumping routines. When i looked over the code it appears i didnot need a "jump" variable.i changed
Code: [Select]
If jroutine=1;new jump routine stumped

;----------------------------original charge jump code
; velud=veluD-1
; If CountCollisions(player1)>0 velud=-1
; If KeyHit(mjp)
; If CountCollisions(player1)>0 velud=8;8,11,14,16,18 (1-5 blocks respectfully)
; End If
; If KeyDown(mjp)=True
; tmpvud=tmpvud+1
; If tmpvud>18 tmpvud=18
; ElseIf KeyDown(mjp)=False
; If CountCollisions(player1)>0 velud=tmpvud
; tmpvud=-1
; End If
;------------------------------------------------------

velud=veluD-1
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=-1
Exit
ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
velud=-1
Exit
End If
Next

If KeyHit(mjp)
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=8
Exit
End If
Next
End If
If KeyDown(mjp)=True
tmpvud=tmpvud+1
If tmpvud>18 tmpvud=18
ElseIf KeyDown(mjp)=False
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=tmpvud
Exit
End If
Next
tmpvud=-1
End If

ElseIf jroutine=0;jump routine with help from blitz forum community
If jump=False
If CountCollisions(player1)=0 jump=True
velud=0
End If
velud=velud-1
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
jump=False
velud=-1
Exit
ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
jump=True
velud=-1
Exit
End If
Next
If KeyHit(mjp)
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
jump=False
velud=-1
Exit
End If
Next
If jump=False
velud=8;8,11,14,16,18 (1-5 blocks respectfully)
jump=True
End If
End If
End If
into this:
Code: [Select]
velud=veluD-1
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=-1
Exit
ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
velud=-1
Exit
End If
Next

If KeyHit(mjp)
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=8
Exit
End If
Next
End If
If KeyDown(mjp)=True
tmpvud=tmpvud+1*(jroutine=1)
If tmpvud>14 tmpvud=14
ElseIf KeyDown(mjp)=False
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=tmpvud
Exit
End If
Next
tmpvud=-1
End If
and it works the same exact way. Talk about removing some sensless code huh?Well below is the full update. I am still keeping the original code (at the start of the archive thread) just in case if it is easier to understand.
Code: [Select]
Global mup=200,MDN=208,mlt=203,mrt=205,mjp=57,mst=28
;input user keys here before the program starts
Color 255,255,255
For x=0 To 6
Cls
Text 10, 0,"   Up:"
Text 10,12," Down:"
Text 10,24," Left:"
Text 10,36,"Right:"
Text 10,48," Jump:"
Text 10,60,"Shoot:"
If X<6 Text 10,84,"[ESC] Use Defaults"

If x<6 Rect 58,x*12,8,12
If x>0 Text 58,0,mup
If x>1 Text 58,12,mdn
If x>2 Text 58,24,mlt
If x>3 Text 58,36,mrt
If x>4 Text 58,48,mjp
If x>5 Text 58,60,mst
If x=6 Text 10,84,"Press any key to continue..."
.redo
confirm=False
FlushKeys
Repeat
For keyz=0 To 255
If KeyHit(keyz)
If x=0 mup=keyz
If x=1 mdn=keyz
If x=2 mlt=keyz
If x=3 mrt=keyz
If x=4 mjp=keyz
If x=5 mst=keyz
confirm=True
End If
Next
Until confirm=True
If X<6
If MUP=1 Or MDN=1 Or MLT=1 Or MRT=1 Or MJP=1 Or MST=1
mup=200
MDN=208
mlt=203
mrt=205
mjp=57
mst=28
x=5
End If
End If
If x=0
If mup=15 Goto redo
ElseIf x=1
If mdn= 15 Goto redo
If mdn=mup Goto redo
ElseIf x=2
If mlt= 15 Goto redo
If mlt=mup Goto redo
If mlt=mdn Goto redo
ElseIf x=3
If mRt= 15 Goto redo
If mRT=mup Goto redo
If mRT=mdn Goto redo
If mRT=mLT Goto redo
ElseIf x=4
If mJP= 15 Goto redo
If mJP=mup Goto redo
If mJP=mdn Goto redo
If mJP=mLT Goto redo
If mJP=mRT Goto redo
ElseIf x=5
If mST= 15 Goto redo
If mST=mup Goto redo
If mST=mdn Goto redo
If mST=mLT Goto redo
If mST=mRT Goto redo
If mST=mJP Goto redo
End If
Next
;ADDED DATA---------------------------------------
RESTOREBMP ;CREATE CHARACTGER AND BULLET AND BEAM
;-------------------------------------------------

Const PERIOD=32 ;(1024/PERIOD) = FPS (FRAMES PER SECOND)

;SET GRAPHICS MODE AND LOAD STUFF HERE.
Graphics3D 640,480,16,2

Global TIME=MilliSecs()-PERIOD,ELAPSED,FRAMETICKS,TWEEN#
;TIME = CALCULATE TIME PERIOD
;ELLAPSE = TIME ELLAPSED (TIME PASSED) This changes throughout the program
;FRAMETICKS = How many frames have ellapsed (passe)
;TWEEN# = used to get inbetween frames


;ADDED DATA--------------------------------------------------------------------
Const CLSN_PLYR=1,CLSN_OBJS=2,CLSN_GRND=3
Collisions CLSN_PLYR,CLSN_OBJS,2,2
Collisions CLSN_PLYR,CLSN_GRND,2,2

AmbientLight 84,168,252

PLANE1TEX=CreateTexture(32,32)
SetBuffer TextureBuffer(PLANE1TEX)
Color 84,84,252
Rect 0,0,32,32
For ALLLINES=0 To 2
Color 42-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42,210-(ALLLINES Mod 2)*42
Line ALLLINES,1,ALLLINES+29,30
Line ALLLINES,30,ALLLINES+29,1
Next
Color 0,0,0
For ALLSQUARES=0 To 3
Rect ALLSQUARES/2*16,16*(ALLSQUARES Mod 2),16,16,0
Next
Color 0,0,168
Line 0,0,31,31
Line 0,31,31,0

PLANE2TEX=CreateTexture(32,32)
SetBuffer TextureBuffer(PLANE2TEX)
Color 252,84,84
Rect 0,0,32,32
For ALLLINES=0 To 2
Color 210-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42,42-(ALLLINES Mod 2)*42
Line ALLLINES,1,ALLLINES+29,30
Line ALLLINES,30,ALLLINES+29,1
Next
Color 0,0,0
For ALLSQUARES=0 To 3
Rect ALLSQUARES/2*16,16*(ALLSQUARES Mod 2),16,16,0
Next
Color 168,0,0
Line 0,0,31,31
Line 0,31,31,0
;------------------------------------------------------------------------------

SetBuffer BackBuffer() ;Double buffering


;ADDED DATA--------------------------------------------------------------------

;cubes
cube=CreateCube()
EntityColor cube,1,1,255
ScaleEntity cube,.5,.5,.5
PositionEntity cube,-5,1.5,0
EntityType cube,clsn_objs

cube=CreateCube()
EntityColor cube,255,1,1
ScaleEntity cube,.25*2,.25*2,.25*2
PositionEntity cube,0,.25*2,0
EntityType cube,clsn_objs

cube=CreateCube()
EntityColor cube,1,255,1
ScaleEntity cube,.25*6,.25*12,.25*6
PositionEntity cube,5,.25*12,0
EntityType cube,clsn_objs

;light
btllight=CreateLight(2)
PositionEntity btllight,0,10,0

;charsize x,y
sizex=16*1
sizey=16*1
plyrdir=0 ;player direction
WALKSPEED=2 ;PLAYER'S WALKING SPEED

player1=CreateSprite()
plyr1tex=LoadAnimTexture("char1.bmp",7,32,32,0,2)
EntityTexture player1,plyr1tex,0
SpriteViewMode player1,2
PositionEntity player1,0,5,0
ScaleSprite player1,0.03125*sizex,0.03125*sizey
EntityRadius player1,0.0078125*sizex,0.015625*sizey
EntityType player1,clsn_plyr
;delete when done----------
sphere=CreateSphere(32,player1)
EntityAlpha sphere,.5
ScaleEntity sphere,0.0078125*sizex,0.015625*sizey,0.0078125*sizex
PositionEntity sphere,0,0,0
;--------------------------

;player camera
camera=CreateCamera(player1)
CameraViewport camera,0,0,GraphicsWidth(),GraphicsHeight()
CameraProjMode camera,2
PositionEntity camera,0,10,-10
RotateEntity camera,45,0,0
CameraZoom camera,.5
;fixed camera
smlcam=CreateCamera()
CameraViewport smlcam,GraphicsWidth()*7/8,GraphicsHeight()*7/8,GraphicsWidth()/8,GraphicsHeight()/8
CameraProjMode smlcam,2
PositionEntity smlcam,3,10,-10
RotateEntity smlcam,45,0,0
CameraZoom smlcam,.5

;battlefield
btlcube=CreateCube()
ScaleEntity btlcube,12,Float(1)/256,4
ScaleTexture plane1tex,Float(1)/24,Float(1)/8
EntityTexture btlcube,plane1tex
PositionEntity btlcube,0,0,0
EntityType btlcube,clsn_grnd

;exitfield
exitcube=CreateCube()
ScaleEntity exitcube,12+8,Float(1)/256,4+8
ScaleTexture plane2tex,Float(1)/40,Float(1)/24
EntityTexture exitcube,plane2tex
PositionEntity EXITcube,0,-Float(1)/256,0
EntityType EXITcube,clsn_grnd

FLUSH ; FLUSH INPUTS
;------------------------------------------------------------------------------


;BEGINNING OF PROGRAM
jroutine=0
Repeat
;WAIT FOR ELLAPSED TIME
Repeat
ELAPSED=MilliSecs()-TIME
Until ELAPSED

FRAMETICKS=ELAPSED/PERIOD ;how many 'frames' have elapsed

Tween#=Float(elapsed Mod period)/Float(period) ;fractional remainder

;check each frame
For checkticks=1 To frameticks
time=time+period ;goto next time period
If checkticks=frameticks Then CaptureWorld ; capture each frame in 3d world within time period
;place images/entties and inputs here--------------------------------------------


;ADDED DATA----------------------------------
velud=veluD-1
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=-1
Exit
ElseIf CollisionNY(player1,checkallcollisions)<0;-0.03125*sizey
velud=-1
Exit
End If
Next

If KeyHit(mjp)
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=8
Exit
End If
Next
End If
If KeyDown(mjp)=True
tmpvud=tmpvud+1*(jroutine=1)
If tmpvud>14 tmpvud=14
ElseIf KeyDown(mjp)=False
For checkallCollisions=1 To CountCollisions(player1)
If CollisionNY(player1,checkallcollisions)>0;0.03125*sizey
velud=tmpvud
Exit
End If
Next
tmpvud=-1
End If

If KeyHit(15) jroutine=Not jroutine ;tab ;toggles jumping routines

;move up
If KeyDown(mup)=True
If CountCollisions(PLAYER1)=0
If VELNS=0 VELN=1
ElseIf CountCollisions(PLAYER1)>0
veln=veln+walkspeed
If veln>5*walkspeed veln=5*walkspeed
End If
ElseIf KeyDown(mup)=False
If CountCollisions(PLAYER1)>0
veln=veln-walkspeed
If veln<0 veln=0
End If
End If
;move down
If KeyDown(mdn)=True
If CountCollisions(PLAYER1)=0
If VELNS=0 VELS=1
ElseIf CountCollisions(PLAYER1)>0
vels=vels+walkspeed
If vels>5*walkspeed vels=5*walkspeed
End If
ElseIf KeyDown(mdn)=False
If CountCollisions(PLAYER1)>0
vels=vels-walkspeed
If vels<0 vels=0
End If
End If
velns=veln-vels ;balances north(up) and south(down) movement
;move left
If KeyDown(mlt)=True
If CountCollisions(PLAYER1)=0
If VELWE=0 VELW=1
ElseIf CountCollisions(PLAYER1)>0
velw=velw+walkspeed
If velw>5*walkspeed velw=5*walkspeed
End If
ElseIf KeyDown(mlt)=False
If CountCollisions(PLAYER1)>0
velw=velw-walkspeed
If velw<0 velw=0
End If
End If
;move RIGHT
If KeyDown(mrt)=True
If CountCollisions(PLAYER1)=0
If VELWE=0 VELE=1
ElseIf CountCollisions(PLAYER1)>0
velE=velE+walkspeed
If velE>5*walkspeed velE=5*walkspeed
End If
ElseIf KeyDown(mRT)=False
If CountCollisions(PLAYER1)>0
velE=velE-walkspeed
If velE<0 velE=0
End If
End If
velWE=velE-velW ;balances west(left) and east(right) movement
If velwe<>0 tmpdir=-(Sgn(velwe)-1)/2 ;calculate char dir using valwe
If tmpdir<>plyrdir
plyrdir=tmpdir
direction(player1,plyr1tex,tmpdir)
End If
;CHARACTER MOVEMENT
MoveEntity player1,Float(velwe)/160,Float(velud)/32,Float(velns)/160
;--------------------------------------------
;--------------------------------------------------------------------------------
UpdateWorld ;UPDATE YOUR 3D WORLD
Next
RenderWorld TWEEN# ; RENDERS CURRENT SCREEN FROM BACKGROUND BUFFER (INCLUDING TWEENING)

;ADDED TEXT---------------------------------------------------------
Color 255,255,255
Text 0, 0,EntityX(PLAYER1)+","+EntityY(PLAYER1)+","+EntityZ(PLAYER1)
Text 0,10,VELNS+", "+VELWE+", "+VELUD
Text 0,20,"[TAB] Toggle jumping: "+jroutine
Text 20,30,"press [JUMP] to Jump. "
If jroutine=1 Text 20,40,"hold & release [JUMP] to ChargeJump"
;-------------------------------------------------------------------
Flip ; show new screen update
Until KeyHit(1) Or (EntityCollided(Player1,CLSN_GRND)=exitcube) Or (EntityY(player1)<-2 Or EntityY(player1)>11);END MAIN LOOP

;CLEAN UP STUFF
time=0
elapsed=0
frameticks=0
tween#=0
checkticks=0

ClearWorld ;remove entities, brushes, textures from memory (anything missed)
ClearCollisions ;clear all collisions from memory
EndGraphics
flush


Function DIRECTION(SPR,TEX,FRM);CHANGE IMAGE ON SPRITE
EntityTexture SPR,TEX,FRM
End Function

Function flush() ;flush all inputs from memory
FlushKeys ;clear keyboard presses
FlushMouse ;clear mouse clicks
FlushJoy ;clear joystick presses
End Function

Function restorebmp()
;set gfxmode
Graphics 320,240,16,3
;Create Image
tmp=CreateImage(64,32)
;set buffer to image
SetBuffer ImageBuffer(tmp)
;if char1.bmp doesn't exist... make it
If FileType("char1.bmp")=2 DeleteDir "char1.bmp"
If FileType("char1.bmp")=0
Cls
Restore char
For v=0 To 31
For h=0 To 31
Read c
If c>0
Color (c-1)*84+7*(c=1),(c-1)*84+7*(c=1),(c-1)*84+7*(c=1)
Plot h,v
Plot 63-h,v
End If
Next
Next
SaveImage tmp,"char1.bmp"
End If
;if laser1.bmp doesn't exist... make it
If FileType("laser1.bmp")=2 DeleteDir "laser1.bmp"
If FileType("laser1.bmp")=0
Cls
For c=0 To 3
Color c*63+63,c*63+63,c*63+63
Rect 8,c+12,16,7-2*c
Rect c+12+32,8,7-2*c,16
Next
SaveImage tmp,"laser1.bmp"
End If
;if bullet1.bmp doesn't exist... make it
If FileType("bullet1.bmp")=2 DeleteDir "bullet1.bmp"
If FileType("bullet1.bmp")=0
Cls
For c=0 To 3
Color c*63+63,c*63+63,c*63+63
Oval c*3/2+8,c*3/2+8,16-2*(c*3/2),16-2*(c*3/2)
Oval c+2+32+8,c+2+8,16-2*(c+2),16-2*(c+2)
Next
SaveImage tmp,"bullet1.bmp"
End If
End Function


.char
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,4,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,1,4,4,1,4,4,4,1,2,2,1,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,1,3,3,1,1,4,1,4,3,2,2,1,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,4,1,1,3,2,2,1,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,1,2,2,2,1,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,1,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,1,3,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0



Darkseid2.0(Posted 1+ years ago)

 This is the best example of jumping code I have ever seen.Brilliant work. Keep it up.


Nexinarus(Posted 1+ years ago)

 The basics should work for 2d jumping as well. [/i]

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal