params.gd 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. # Colors
  16. const COLOR_PINK := Color("#f92672")
  17. const COLOR_BLUE := Color("#66d9ef")
  18. const COLOR_GREEN := Color("#a6e22e")
  19. const COLOR_ORANGE := Color("#fd971f")
  20. const COLOR_GREY := Color("#787878")
  21. const COLOR_RED := Color(0.988, 0.147, 0.030)
  22. # Physics layers (bit values)
  23. const LAYER_WALLS := 1
  24. const LAYER_PADDLE := 2
  25. const LAYER_BLOCKS := 4
  26. const LAYER_BALLS := 8
  27. const LAYER_POWER_UPS := 16
  28. # Power-up drop chances, rolled every POWER_UP_INTERVAL seconds
  29. const DROP_LEVEL_SAVE := 0.03
  30. const DROP_TRIPLE_BALL := 0.06 # multiplied by seconds since a ball last touched anything
  31. const DROP_PADDLE_BALL := 0.05
  32. const DROP_SUPER_BALL := 0.03
  33. const POWER_UP_INTERVAL := 2.5
  34. const POWER_UP_PADDLE_SECONDS := 10.0
  35. # Hours without playing before the saved level drops by one
  36. const LOSE_HOURS := 12
  37. # Text
  38. const MSG_TRIPLE_BALLS := "Triple Balls!"
  39. const MSG_LEVEL_SAVED := "Level Saved!"
  40. const MSG_OVER := "Game Over..."
  41. const MSG_DOUBLE_PADDLE := "Doubled paddle!"
  42. const MSG_HALF_PADDLE := "Half paddle :("
  43. const MSG_LEVEL_BACK := "You are at level %d. In %.1f hour(s) you will regrow a level."
  44. const MSG_NEXT_LEVEL := "Next Level"
  45. const MSG_RESTART := "Restart"
  46. const MSG_SUPER_BALL := "Super Ball!"