Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. ---LEVEL STRUCTURE---
  2.  
  3. Subpixel - The smallest unit
  4. Pixel - 65536 subpixels
  5. Tile - 16x16 pixels
  6. Chunk* - 4x4 tiles
  7. Page - 4x4 chunks
  8. Playfield - 4x4 pages
  9.  
  10. *Arbitrary, not an integral structure to the engine, just the level format to make design a little quicker
  11.  
  12.  
  13. The only active objects are those within the current playfield pages. The player is to remain within the middle 2x2 pages. If they exit, shift pages and load a new layer and/or column.
  14.  
  15. Certain tiles can be designated as floor tiles. Floor tiles have 16 4-bit integers, each entry represents the height of a column from the bottom of the tile to the top. The player's primary collision point is in the bottom-center of his box. When on the ground, this point ALWAYS syncs with the current terrain height. To factor slopes into movement speed modifiers, two points at the left and right edges of the player's box are used, also syncing to the terrain column height below them. The difference between these is calculated as an angle, and this value is reported to the player movement routine.
  16.  
  17.  
  18. ---PLAYER MOVEMENT---
  19.  
  20. If both horizontal directions are pressed at once in sequence, enable the latter but keep the former disabled until they release the former.
  21.  
  22. Stopspeed only kicks in if the following conditions are met: On the ground, speed has decreased since the last tic, speed is within deadzone.
  23.  
  24. Step height is 8
  25.  
  26. Max speed is 4
  27. Stop speed is 0.0625
  28. Air movement is 0.015625
  29. Ground acceleration is 0.03125
  30. Ground deceleration is 0.0625
  31. Ground break is 0.125
  32.  
  33. 45 degree slope = 0.5 accel up, 2.0 accel down. 1.0 break up, 0.5 break down.
  34. 67.5 degree slope = 0.0 accel up, 4.0 accel down. Any slope steeper than this still has 4.0 accel down, as it's capped.
  35. Anything greater than 45 degrees and gravity starts to apply, gradually from 45*< at 0.0%<, to 100% at 90*.
  36.  
  37. Player box size is 12x28.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement