hexyz is tower defense game, and a lua library for dealing with hexagonal grids
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.0 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
  1. settings = am.load_state("settings", "json") or {
  2. fullscreen = false,
  3. window_width = 1920,
  4. window_height = 1080,
  5. music_volume = 0.1,
  6. sfx_volume = 0.1,
  7. }
  8. math.randomseed(os.time())
  9. math.random()
  10. math.random()
  11. math.random()
  12. math.random()
  13. do
  14. win = am.window{
  15. width = settings.window_width,
  16. height = settings.window_height,
  17. title = "hexyz",
  18. mode = settings.fullscreen and "fullscreen" or "windowed",
  19. highdpi = true,
  20. letterbox = true,
  21. resizable = true, -- user should probably set their resolution instead of resizing the window, but hey.
  22. }
  23. end
  24. -- assets and/or trivial code
  25. require "color"
  26. require "sound"
  27. require "texture"
  28. require "src/entity"
  29. require "src/extra"
  30. require "src/geometry"
  31. require "src/hexyz"
  32. require "src/game"
  33. require "src/gui"
  34. require "src/grid"
  35. require "src/mob"
  36. require "src/projectile"
  37. require "src/tower"
  38. function main_action() end
  39. function main_scene() end
  40. win.scene = am.group()
  41. game_init(nil)
  42. noglobals()