1
0

params.gd 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. class_name Params
  2. ## Game tuning values, ported from the cocos2d-x params.h.
  3. # Ball
  4. const BALL_RADIUS := 15.0
  5. const THROW_ANGLE := 20.0 # degrees either side of straight up
  6. const INITIAL_SPEED := 500.0
  7. const BALL_BOUNCE := 1.005 # every bounce speeds the ball up a little
  8. const BALL_GRAVITY := 250.0 # px/s², pulls sideways-bouncing balls back to the paddle
  9. # Core
  10. const CORE_RADIUS := 50.0
  11. # Paddle
  12. const PADDLE_WIDTH := 120.0
  13. const PADDLE_HEIGHT := 10.0
  14. const PADDLE_ALTITUDE := 90.0 # distance from the bottom of the screen
  15. const PADDLE_CLEARANCE := 3.5 * 2.0 * BALL_RADIUS # min space between the outer ring and the paddle
  16. # Colors
  17. const COLOR_PINK := Color("#f92672")
  18. const COLOR_BLUE := Color("#66d9ef")
  19. const COLOR_GREEN := Color("#a6e22e")
  20. const COLOR_ORANGE := Color("#fd971f")
  21. const COLOR_GREY := Color("#787878")
  22. const COLOR_RED := Color(0.988, 0.147, 0.030)
  23. # Physics layers (bit values)
  24. const LAYER_WALLS := 1
  25. const LAYER_PADDLE := 2
  26. const LAYER_BLOCKS := 4
  27. const LAYER_BALLS := 8
  28. const LAYER_POWER_UPS := 16
  29. # Power-up drop chances, rolled every POWER_UP_INTERVAL seconds
  30. const DROP_LEVEL_SAVE := 0.03
  31. const DROP_TRIPLE_BALL := 0.06 # multiplied by seconds since a ball last touched anything
  32. const DROP_PADDLE_BALL := 0.05
  33. const DROP_SUPER_BALL := 0.03
  34. const POWER_UP_INTERVAL := 2.5
  35. const POWER_UP_PADDLE_SECONDS := 10.0
  36. # Hours without playing before the saved level drops by one
  37. const LOSE_HOURS := 12
  38. # Text
  39. const MSG_TRIPLE_BALLS := "Triple Balls!"
  40. const MSG_LEVEL_SAVED := "Level Saved!"
  41. const MSG_OVER := "Game Over..."
  42. const MSG_DOUBLE_PADDLE := "Doubled paddle!"
  43. const MSG_HALF_PADDLE := "Half paddle :("
  44. const MSG_LEVEL_BACK := "You are at level %d. In %.1f hour(s) you will regrow a level."
  45. const MSG_NEXT_LEVEL := "Next Level"
  46. const MSG_RESTART := "Restart"
  47. const MSG_SUPER_BALL := "Super Ball!"