1
0

params.gd 1.6 KB

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