├── .gitignore ├── Faststart.sublime-project ├── Faststart.sublime-workspace ├── README.md ├── fast.sublime-workspace ├── game ├── assets │ └── fonts │ │ ├── battlenet.ttf │ │ ├── born2bsportyv2.ttf │ │ ├── extrude.ttf │ │ ├── font licences.txt │ │ ├── handwriting.ttf │ │ ├── helvetipixel.ttf │ │ ├── megaman10.ttf │ │ ├── minimal4.ttf │ │ ├── minimal5.ttf │ │ ├── monocons.ttf │ │ ├── pixelfraktur.ttf │ │ └── vcrfont.ttf └── lib │ └── lume.lua └── src ├── conf.moon ├── data └── global.moon ├── main.moon ├── objects └── player.moon ├── scenes ├── defeatScene.moon ├── gameScene.moon ├── mainMenu.moon ├── pause.moon └── victoryScene.moon ├── systems ├── entity.moon └── scene.moon └── util.moon /.gitignore: -------------------------------------------------------------------------------- 1 | game/* 2 | !game/assets/ 3 | !game/lib/ 4 | bin/* -------------------------------------------------------------------------------- /Faststart.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "build_systems": [ 3 | { 4 | "shell_cmd": "moonc -t game/. src/. && love game/.", 5 | "file_regex": "^\\s*(.+):(\\d+): (?:lines \\d+-\\d+|character(?:s \\d+-| )(\\d+)) : (.*)$", 6 | "name": "Compile my project", 7 | "working_dir": "${project_path:${folder:${file_path}}}" 8 | } 9 | ], 10 | "folders": [ 11 | { 12 | "name": "My Project Name", 13 | "path": ".", 14 | "folder_exclude_patterns": [ 15 | ".git" 16 | ], 17 | "file_exclude_patterns": [ 18 | "*.sublime-*" 19 | ] 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /Faststart.sublime-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete": 3 | { 4 | "selected_items": 5 | [ 6 | [ 7 | "global", 8 | "globalKeyEntry" 9 | ], 10 | [ 11 | "ke", 12 | "love.keyboard.isDown" 13 | ], 14 | [ 15 | "for", 16 | "for\tfor i=1,10" 17 | ], 18 | [ 19 | "time", 20 | "timeAndAngle" 21 | ], 22 | [ 23 | "proje", 24 | "projectileTimesAndAngles" 25 | ], 26 | [ 27 | "fl", 28 | "float3\tcontext" 29 | ], 30 | [ 31 | "dea", 32 | "delay" 33 | ], 34 | [ 35 | "ch", 36 | "charging" 37 | ], 38 | [ 39 | "cha", 40 | "charginTimer" 41 | ], 42 | [ 43 | "power", 44 | "powerMultiplier" 45 | ], 46 | [ 47 | "v", 48 | "Vector3" 49 | ], 50 | [ 51 | "targ", 52 | "targetRoom" 53 | ], 54 | [ 55 | "in", 56 | "interpolationFactor" 57 | ], 58 | [ 59 | "floa", 60 | "float4\tcontext" 61 | ], 62 | [ 63 | "icew", 64 | "iceWaitLoop" 65 | ], 66 | [ 67 | "Aim", 68 | "Anim" 69 | ], 70 | [ 71 | "fire", 72 | "fireball" 73 | ], 74 | [ 75 | "red", 76 | "ready_to_enter" 77 | ], 78 | [ 79 | "Star", 80 | "StartCoroutine" 81 | ], 82 | [ 83 | "mission", 84 | "mission_update" 85 | ], 86 | [ 87 | "doc", 88 | "docked" 89 | ], 90 | [ 91 | "fun", 92 | "function\tfunction" 93 | ], 94 | [ 95 | "func", 96 | "function\tfunction" 97 | ], 98 | [ 99 | "Idle", 100 | "idleB" 101 | ], 102 | [ 103 | "opt", 104 | "options" 105 | ], 106 | [ 107 | "bade", 108 | "badelineBoss" 109 | ], 110 | [ 111 | "lo", 112 | "love" 113 | ], 114 | [ 115 | "pl", 116 | "playery" 117 | ], 118 | [ 119 | "id", 120 | "idle" 121 | ], 122 | [ 123 | "th", 124 | "throw" 125 | ], 126 | [ 127 | "run", 128 | "runSlow" 129 | ], 130 | [ 131 | "idl", 132 | "idle_carry" 133 | ], 134 | [ 135 | "sp", 136 | "speedy" 137 | ], 138 | [ 139 | "scro", 140 | "scrolly" 141 | ], 142 | [ 143 | "class", 144 | "class\tclass name extends..." 145 | ], 146 | [ 147 | "actors", 148 | "actors_to_add" 149 | ], 150 | [ 151 | "goto", 152 | "goto" 153 | ] 154 | ] 155 | }, 156 | "buffers": 157 | [ 158 | { 159 | "file": "src/main.moon", 160 | "settings": 161 | { 162 | "buffer_size": 836, 163 | "encoding": "UTF-8", 164 | "line_ending": "Windows" 165 | } 166 | }, 167 | { 168 | "file": "README.md", 169 | "settings": 170 | { 171 | "buffer_size": 1239, 172 | "encoding": "UTF-8", 173 | "line_ending": "Windows" 174 | } 175 | }, 176 | { 177 | "file": "src/scenes/mainMenu.moon", 178 | "settings": 179 | { 180 | "buffer_size": 294, 181 | "encoding": "UTF-8", 182 | "line_ending": "Windows" 183 | } 184 | }, 185 | { 186 | "file": "src/util.moon", 187 | "settings": 188 | { 189 | "buffer_size": 87, 190 | "encoding": "UTF-8", 191 | "line_ending": "Windows" 192 | } 193 | }, 194 | { 195 | "file": "src/data/global.moon", 196 | "settings": 197 | { 198 | "buffer_size": 254, 199 | "encoding": "UTF-8", 200 | "line_ending": "Windows" 201 | } 202 | }, 203 | { 204 | "file": "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Compile Moon and Run Love.sublime-build", 205 | "settings": 206 | { 207 | "buffer_size": 107, 208 | "encoding": "UTF-8", 209 | "line_ending": "Windows" 210 | } 211 | } 212 | ], 213 | "build_system": "", 214 | "build_system_choices": 215 | [ 216 | [ 217 | [ 218 | [ 219 | "Packages/Moonscripty/Moonscript.sublime-build", 220 | "" 221 | ], 222 | [ 223 | "Packages/Moonscripty/Moonscript.sublime-build", 224 | "Run" 225 | ], 226 | [ 227 | "Packages/Moonscripty/Moonscript.sublime-build", 228 | "moonc: show output" 229 | ], 230 | [ 231 | "Packages/Moonscripty/Moonscript.sublime-build", 232 | "love: run project" 233 | ], 234 | [ 235 | "Packages/Moonscripty/Moonscript.sublime-build", 236 | "love: run file" 237 | ], 238 | [ 239 | "Packages/Moonscripty/Moonscript.sublime-build", 240 | "moonc: compile project" 241 | ], 242 | [ 243 | "Packages/Moonscripty/Moonscript.sublime-build", 244 | "moonc: run lint on file" 245 | ], 246 | [ 247 | "Packages/Moonscripty/Moonscript.sublime-build", 248 | "moonc: run lint on project" 249 | ], 250 | [ 251 | "Packages/Moonscripty/Moonscript.sublime-build", 252 | "ldoc: File" 253 | ], 254 | [ 255 | "Packages/Moonscripty/Moonscript.sublime-build", 256 | "ldoc: Project" 257 | ] 258 | ], 259 | [ 260 | "Packages/Moonscripty/Moonscript.sublime-build", 261 | "love: run project" 262 | ] 263 | ], 264 | [ 265 | [ 266 | [ 267 | "Packages/Python/Python.sublime-build", 268 | "" 269 | ], 270 | [ 271 | "Packages/Python/Python.sublime-build", 272 | "Syntax Check" 273 | ] 274 | ], 275 | [ 276 | "Packages/Python/Python.sublime-build", 277 | "" 278 | ] 279 | ] 280 | ], 281 | "build_varint": "", 282 | "command_palette": 283 | { 284 | "height": 392.0, 285 | "last_filter": "", 286 | "selected_items": 287 | [ 288 | [ 289 | "instal", 290 | "Package Control: Install Package" 291 | ], 292 | [ 293 | "in", 294 | "Package Control: Install Package" 295 | ], 296 | [ 297 | "install", 298 | "Package Control: Install Package" 299 | ], 300 | [ 301 | "remove p", 302 | "Package Control: Remove Package" 303 | ], 304 | [ 305 | "pack", 306 | "Install Package Control" 307 | ] 308 | ], 309 | "width": 444.0 310 | }, 311 | "console": 312 | { 313 | "height": 146.0, 314 | "history": 315 | [ 316 | "2+2", 317 | "print(\"hey\")", 318 | "print \"hey\"", 319 | "moon" 320 | ] 321 | }, 322 | "distraction_free": 323 | { 324 | "menu_visible": true, 325 | "show_minimap": false, 326 | "show_open_files": false, 327 | "show_tabs": false, 328 | "side_bar_visible": false, 329 | "status_bar_visible": false 330 | }, 331 | "expanded_folders": 332 | [ 333 | "/D/dev/Love2DTemplate" 334 | ], 335 | "file_history": 336 | [ 337 | "/D/dev/Love2DTemplate/Faststart.sublime-project", 338 | "/D/dev/Love2DTemplate/src/data/scenes.moon", 339 | "/D/dev/Love2DTemplate/.gitignore", 340 | "/D/dev/Love2DTemplate/src/conf.moon", 341 | "/D/dev/Love2DTemplate/lua/main.lua", 342 | "/D/dev/Love2DTemplate/lua/conf.lua", 343 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/.gitignore", 344 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/src/scenes/mainMenu.moon", 345 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/src/scene.moon", 346 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/run.bat", 347 | "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Run Bat File.sublime-build", 348 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/lua/main.lua", 349 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.moon", 350 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/conf.moon", 351 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.lua", 352 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/conf.lua", 353 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/game.moon", 354 | "/D/Dropbox/Jobs/LuaLike/game.moon", 355 | "/D/Dropbox/Jobs/Programing Sketches/Crusoe/main.lua", 356 | "/D/Dropbox/Jobs/LuaLike/LuaLike.sublime-workspace", 357 | "/D/Dropbox/Jobs/LuaLike/conf.lua", 358 | "/D/Dropbox/Jobs/LuaLike/helpers.lua", 359 | "/D/Dropbox/Jobs/LuaLike/LuaLike.sublime-project", 360 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.moon]", 361 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/gunfire.lua", 362 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/unload.lua", 363 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/thenumber3.activeitem", 364 | "/D/Dropbox/starbound ideas", 365 | "/D/Downloads/Download.csv", 366 | "/D/dev/Starbound/assets/packed/items/active/weapons/protectorate/violiumbroadsword/violiumbroadsword.activeitem", 367 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/beamfire.lua", 368 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/hammersmash.weaponability", 369 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/hammersmash.lua", 370 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/flipslash.lua", 371 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/gun.lua", 372 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/flipslash.weaponability", 373 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/sirensong.activeitem", 374 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/sirensong.lua", 375 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldbarrier.projectile", 376 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/bullet-1/bullet-1.projectile", 377 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/default.frames", 378 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/bramble2.projectile", 379 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/bramble.projectile", 380 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/default.frames", 381 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/physicalswoosh.png", 382 | "/D/dev/Starbound/assets/packed/projectiles/explosions/weakexplosion/weakexplosion.config", 383 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldbarrier.frames", 384 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smokeexplosion/smokeexplosion.config", 385 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smoke/smoke.projectile", 386 | "/D/dev/Starbound/assets/packed/damage/default.damage", 387 | "/D/dev/Starbound/assets/packed/projectiles/explosions/paintexplosionpurple/paintexplosionpurple.projectile", 388 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smoke/smoke.config", 389 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/apex/blacktruncheon.activeitem", 390 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/apex/blacktruncheon.animation", 391 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musket.animation", 392 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musketload.lua", 393 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musket.activeitem", 394 | "/D/dev/Starbound/assets/packed/items/active/weapons/other/electricrailgun/electricrailgun.animation", 395 | "/D/dev/Starbound/assets/packed/projectiles/physics.config", 396 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/brambleseed/brambleseed.projectile", 397 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble2.projectile", 398 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble.projectile", 399 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldexaust.projectile", 400 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshield.projectile", 401 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/human/portableshield.thrownitem", 402 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/human/thedefender.activeitem", 403 | "/D/dev/Starbound/assets/packed/tilesets/packed/objects-by-type/physics.json", 404 | "/D/dev/Starbound/assets/packed/projectiles/lavaprojectile/lavaprojectile.projectile", 405 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/revolverbullet/revolverbullet.projectile", 406 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/durasteelassaultrifle.activeitem", 407 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/erchiusbeam/erchiusbeam.lua", 408 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/chargefire/chargefire.lua", 409 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/assaultrifle/commonassaultrifle.activeitem", 410 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/lance/lance.lua", 411 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/lance/lance.weaponability", 412 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/flamethrower/flamethrower.lua", 413 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/guidedrocket/guidedrocket.lua", 414 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/stickyshot/stickyshot.weaponability", 415 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/burstshot/burstshot.lua", 416 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/flashlight/flashlight.lua", 417 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/emptyclip.lua", 418 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/durasteelassaultrifle.png", 419 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/tungstenmagnum.activeitem", 420 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/bouncybullet/bouncybullet.projectile", 421 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/piercingbullet/piercingbullet.projectile", 422 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/durasteelrevolver.activeitem", 423 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/elementalaura/elementalaura.lua", 424 | "/D/dev/Starbound/assets/packed/items/active/weapons/other/electrobaton/electrobaton.activeitem", 425 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/staff/forcecage/forcecage.projectile", 426 | "/D/dev/Starbound/assets/packed/stats/effects/paralysis/longParalysis.statuseffect", 427 | "/D/dev/Starbound/assets/packed/stats/effects/paralysis/paralysis.statuseffect", 428 | "/D/dev/Starbound/assets/packed/stats/effects/doomed/doomed.lua", 429 | "/D/dev/Starbound/assets/packed/stats/effects/stun/stun.statuseffect", 430 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/doomshot/doomshot.projectile", 431 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/unrand/doomcannon/doomcannon.activeitem", 432 | "/D/dev/Starbound/assets/packed/stats/effects/doomed/l6doomed.statuseffect", 433 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostsnare.lua", 434 | "/D/dev/Starbound/assets/packed/stats/effects/stun/stun.lua", 435 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostslow.lua", 436 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostslow.statuseffect", 437 | "/D/dev/Starbound/assets/packed/stats/effects/dontstarve/dontstarve.lua", 438 | "/D/dev/Starbound/assets/packed/stats/effects/dontstarve/dontstarve.statuseffect", 439 | "/D/dev/ExOk/exok1/Assets/Shaders/RimLit.shader", 440 | "/D/dev/ExOk/exok1/Assets/Shaders/ToonLit.shader", 441 | "/D/dev/ExOk/exok1/Assets/Shaders/Wiggle.shader", 442 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/default.frames", 443 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshield.frames", 444 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/broadswordcombo.weaponability", 445 | "/D/dev/Starbound/assets/packed/projectiles/throwable/glowbomb/glowbomb.projectile", 446 | "/D/dev/Starbound/assets/packed/items/active/weapons/staff/abilities/effectzone/forcecage.weaponability", 447 | "/D/dev/Starbound/assets/packed/items/active/weapons/staff/abilities/effectzone/effectzone.lua", 448 | "/D/dev/Starbound/assets/packed/projectiles/throwable/firework2/firework2.projectile", 449 | "/D/dev/Starbound/assets/packed/projectiles/throwable/glowgas/glowgas.projectile", 450 | "/D/dev/Starbound/assets/packed/items/active/weapons/protectorate/feroziumstaff/feroziumstaff.activeitem", 451 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musketfire.lua", 452 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/kunaiblast/kunaiblast.weaponability", 453 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/theeel/sirensong.lua", 454 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/kunaiblast/kunaiblast.lua", 455 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/meleeweapon.lua", 456 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/theeel/theeel.activeitem", 457 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/astraltear/astraltear.weaponability", 458 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/astraltear/astraltear.lua", 459 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/floran/seedgun.activeitem", 460 | "/D/dev/Starbound/assets/packed/stats/effects/weakpoison/weakpoison.lua", 461 | "/D/dev/Starbound/assets/packed/projectiles/explosions/bigboulderexplosion/bigboulderexplosion.projectile", 462 | "/D/dev/Starbound/assets/packed/projectiles/explosions/bigboulderexplosion/bigboulderexplosion.frames", 463 | "/D/dev/Starbound/assets/packed/projectiles/npcs/razorleaf/leafgust.projectile", 464 | "/D/dev/Starbound/assets/packed/projectiles/throwable/firework3/firework3.projectile" 465 | ], 466 | "find": 467 | { 468 | "height": 40.0 469 | }, 470 | "find_in_files": 471 | { 472 | "height": 104.0, 473 | "where_history": 474 | [ 475 | ] 476 | }, 477 | "find_state": 478 | { 479 | "case_sensitive": false, 480 | "find_history": 481 | [ 482 | ], 483 | "highlight": true, 484 | "in_selection": false, 485 | "preserve_case": false, 486 | "regex": false, 487 | "replace_history": 488 | [ 489 | ], 490 | "reverse": false, 491 | "show_context": true, 492 | "use_buffer2": true, 493 | "whole_word": false, 494 | "wrap": true 495 | }, 496 | "groups": 497 | [ 498 | { 499 | "selected": 1, 500 | "sheets": 501 | [ 502 | { 503 | "buffer": 0, 504 | "file": "src/main.moon", 505 | "semi_transient": false, 506 | "settings": 507 | { 508 | "buffer_size": 836, 509 | "regions": 510 | { 511 | }, 512 | "selection": 513 | [ 514 | [ 515 | 314, 516 | 314 517 | ] 518 | ], 519 | "settings": 520 | { 521 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage", 522 | "translate_tabs_to_spaces": false 523 | }, 524 | "translation.x": 0.0, 525 | "translation.y": 120.0, 526 | "zoom_level": 1.0 527 | }, 528 | "stack_index": 1, 529 | "type": "text" 530 | }, 531 | { 532 | "buffer": 1, 533 | "file": "README.md", 534 | "semi_transient": true, 535 | "settings": 536 | { 537 | "buffer_size": 1239, 538 | "regions": 539 | { 540 | }, 541 | "selection": 542 | [ 543 | [ 544 | 449, 545 | 219 546 | ] 547 | ], 548 | "settings": 549 | { 550 | "syntax": "Packages/Markdown/Markdown.sublime-syntax" 551 | }, 552 | "translation.x": 0.0, 553 | "translation.y": 0.0, 554 | "zoom_level": 1.0 555 | }, 556 | "stack_index": 0, 557 | "type": "text" 558 | }, 559 | { 560 | "buffer": 2, 561 | "file": "src/scenes/mainMenu.moon", 562 | "semi_transient": false, 563 | "settings": 564 | { 565 | "buffer_size": 294, 566 | "regions": 567 | { 568 | }, 569 | "selection": 570 | [ 571 | [ 572 | 65, 573 | 65 574 | ] 575 | ], 576 | "settings": 577 | { 578 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 579 | }, 580 | "translation.x": 0.0, 581 | "translation.y": 0.0, 582 | "zoom_level": 1.0 583 | }, 584 | "stack_index": 2, 585 | "type": "text" 586 | }, 587 | { 588 | "buffer": 3, 589 | "file": "src/util.moon", 590 | "semi_transient": false, 591 | "settings": 592 | { 593 | "buffer_size": 87, 594 | "regions": 595 | { 596 | }, 597 | "selection": 598 | [ 599 | [ 600 | 7, 601 | 7 602 | ] 603 | ], 604 | "settings": 605 | { 606 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 607 | }, 608 | "translation.x": 0.0, 609 | "translation.y": 0.0, 610 | "zoom_level": 1.0 611 | }, 612 | "stack_index": 3, 613 | "type": "text" 614 | }, 615 | { 616 | "buffer": 4, 617 | "file": "src/data/global.moon", 618 | "semi_transient": false, 619 | "settings": 620 | { 621 | "buffer_size": 254, 622 | "regions": 623 | { 624 | }, 625 | "selection": 626 | [ 627 | [ 628 | 253, 629 | 253 630 | ] 631 | ], 632 | "settings": 633 | { 634 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 635 | }, 636 | "translation.x": 0.0, 637 | "translation.y": 0.0, 638 | "zoom_level": 1.0 639 | }, 640 | "stack_index": 4, 641 | "type": "text" 642 | }, 643 | { 644 | "buffer": 5, 645 | "file": "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Compile Moon and Run Love.sublime-build", 646 | "semi_transient": false, 647 | "settings": 648 | { 649 | "buffer_size": 107, 650 | "regions": 651 | { 652 | }, 653 | "selection": 654 | [ 655 | [ 656 | 1, 657 | 1 658 | ] 659 | ], 660 | "settings": 661 | { 662 | "syntax": "Packages/JavaScript/JSON.sublime-syntax" 663 | }, 664 | "translation.x": 0.0, 665 | "translation.y": 0.0, 666 | "zoom_level": 1.0 667 | }, 668 | "stack_index": 5, 669 | "type": "text" 670 | } 671 | ] 672 | } 673 | ], 674 | "incremental_find": 675 | { 676 | "height": 28.0 677 | }, 678 | "input": 679 | { 680 | "height": 40.0 681 | }, 682 | "layout": 683 | { 684 | "cells": 685 | [ 686 | [ 687 | 0, 688 | 0, 689 | 1, 690 | 1 691 | ] 692 | ], 693 | "cols": 694 | [ 695 | 0.0, 696 | 1.0 697 | ], 698 | "rows": 699 | [ 700 | 0.0, 701 | 1.0 702 | ] 703 | }, 704 | "menu_visible": true, 705 | "output.exec": 706 | { 707 | "height": 237.0 708 | }, 709 | "output.find_results": 710 | { 711 | "height": 0.0 712 | }, 713 | "pinned_build_system": "Compile my project", 714 | "project": "Faststart.sublime-project", 715 | "replace": 716 | { 717 | "height": 52.0 718 | }, 719 | "save_all_on_build": true, 720 | "select_file": 721 | { 722 | "height": 0.0, 723 | "last_filter": "", 724 | "selected_items": 725 | [ 726 | ], 727 | "width": 0.0 728 | }, 729 | "select_project": 730 | { 731 | "height": 0.0, 732 | "last_filter": "", 733 | "selected_items": 734 | [ 735 | ], 736 | "width": 0.0 737 | }, 738 | "select_symbol": 739 | { 740 | "height": 0.0, 741 | "last_filter": "", 742 | "selected_items": 743 | [ 744 | ], 745 | "width": 0.0 746 | }, 747 | "selected_group": 0, 748 | "settings": 749 | { 750 | }, 751 | "show_minimap": true, 752 | "show_open_files": false, 753 | "show_tabs": true, 754 | "side_bar_visible": true, 755 | "side_bar_width": 296.0, 756 | "status_bar_visible": true, 757 | "template_settings": 758 | { 759 | } 760 | } 761 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MoonLove-Faststart 2 | Some templates and basic engine structure using Lua, Love and Moonscript. Intended to be used specially in game jams such as Ludum Dare and for rapid game prototyping. 3 | 4 | ## Getting Started 5 | Install both [Love](https://love2d.org/) and [Moonscript](https://moonscript.org/) and make sure they are both in your system PATH. You can check that by opening a console and typing "love" and "moon", they both should give message asking for paramenters. 6 | With that all set, open the ```Faststart.sublime-project``` file and select the "Compile my Project" build system (```Tools > Build System > Compile My Project```) and press Control + B to run your project! 7 | 8 | ## Here's how the folders are supposed to work: 9 | * **bin:** This is where the .exe or similar will be placed when you pack your game for distribution. 10 | * **game:** Lua files that Löve will use will be placed here by the compiler. 11 | * **game/assets:** Images, sound and other asset files shoud be placed here. 12 | * **game/lib:** External libs are placed here. 13 | * **src:** Moon files that will be compiled into Lua files by sublime. 14 | 15 | ## Usage 16 | First add the root folder to Sublime (Project > Add Folder to Project). Then you can just make your game in the ```src/``` folder, placing your .moon files in there. Select the build Compile Moon and Run Love build system (Tools > Build System > Compile Moon and Run Love) and press Control + B to run your game. 17 | 18 | ## Utilities 19 | Other libraries included 20 | * [Lume](https://github.com/rxi/lume/): An amazing library full of great utilities for games. 21 | 22 | ## To Do 23 | There is still a **lot** of things to improve here, here's the main ones for now: 24 | * Make a better engine framework 25 | * Scripts for packing your Love File 26 | * General utilities 27 | * Placeholder assets 28 | -------------------------------------------------------------------------------- /fast.sublime-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete": 3 | { 4 | "selected_items": 5 | [ 6 | [ 7 | "ke", 8 | "love.keyboard.isDown" 9 | ], 10 | [ 11 | "for", 12 | "for\tfor i=1,10" 13 | ], 14 | [ 15 | "time", 16 | "timeAndAngle" 17 | ], 18 | [ 19 | "proje", 20 | "projectileTimesAndAngles" 21 | ], 22 | [ 23 | "fl", 24 | "float3\tcontext" 25 | ], 26 | [ 27 | "dea", 28 | "delay" 29 | ], 30 | [ 31 | "ch", 32 | "charging" 33 | ], 34 | [ 35 | "cha", 36 | "charginTimer" 37 | ], 38 | [ 39 | "power", 40 | "powerMultiplier" 41 | ], 42 | [ 43 | "v", 44 | "Vector3" 45 | ], 46 | [ 47 | "targ", 48 | "targetRoom" 49 | ], 50 | [ 51 | "in", 52 | "interpolationFactor" 53 | ], 54 | [ 55 | "floa", 56 | "float4\tcontext" 57 | ], 58 | [ 59 | "icew", 60 | "iceWaitLoop" 61 | ], 62 | [ 63 | "Aim", 64 | "Anim" 65 | ], 66 | [ 67 | "fire", 68 | "fireball" 69 | ], 70 | [ 71 | "red", 72 | "ready_to_enter" 73 | ], 74 | [ 75 | "Star", 76 | "StartCoroutine" 77 | ], 78 | [ 79 | "mission", 80 | "mission_update" 81 | ], 82 | [ 83 | "doc", 84 | "docked" 85 | ], 86 | [ 87 | "fun", 88 | "function\tfunction" 89 | ], 90 | [ 91 | "func", 92 | "function\tfunction" 93 | ], 94 | [ 95 | "Idle", 96 | "idleB" 97 | ], 98 | [ 99 | "opt", 100 | "options" 101 | ], 102 | [ 103 | "bade", 104 | "badelineBoss" 105 | ], 106 | [ 107 | "lo", 108 | "love" 109 | ], 110 | [ 111 | "pl", 112 | "playery" 113 | ], 114 | [ 115 | "id", 116 | "idle" 117 | ], 118 | [ 119 | "th", 120 | "throw" 121 | ], 122 | [ 123 | "run", 124 | "runSlow" 125 | ], 126 | [ 127 | "idl", 128 | "idle_carry" 129 | ], 130 | [ 131 | "sp", 132 | "speedy" 133 | ], 134 | [ 135 | "scro", 136 | "scrolly" 137 | ], 138 | [ 139 | "class", 140 | "class\tclass name extends..." 141 | ], 142 | [ 143 | "actors", 144 | "actors_to_add" 145 | ], 146 | [ 147 | "goto", 148 | "goto" 149 | ] 150 | ] 151 | }, 152 | "buffers": 153 | [ 154 | { 155 | "file": "src/main.moon", 156 | "settings": 157 | { 158 | "buffer_size": 641, 159 | "encoding": "UTF-8", 160 | "line_ending": "Windows" 161 | } 162 | }, 163 | { 164 | "file": "src/scenes/mainMenu.moon", 165 | "settings": 166 | { 167 | "buffer_size": 181, 168 | "encoding": "UTF-8", 169 | "line_ending": "Windows" 170 | } 171 | }, 172 | { 173 | "file": "src/scenes/gameScene.moon", 174 | "settings": 175 | { 176 | "buffer_size": 238, 177 | "encoding": "UTF-8", 178 | "line_ending": "Windows" 179 | } 180 | }, 181 | { 182 | "file": "src/scenes/defeatScene.moon", 183 | "settings": 184 | { 185 | "buffer_size": 181, 186 | "encoding": "UTF-8", 187 | "line_ending": "Windows" 188 | } 189 | }, 190 | { 191 | "file": "src/scenes/victoryScene.moon", 192 | "settings": 193 | { 194 | "buffer_size": 183, 195 | "encoding": "UTF-8", 196 | "line_ending": "Windows" 197 | } 198 | }, 199 | { 200 | "file": "src/scenes/scene.moon", 201 | "settings": 202 | { 203 | "buffer_size": 120, 204 | "encoding": "UTF-8", 205 | "line_ending": "Windows" 206 | } 207 | }, 208 | { 209 | "file": "src/conf.moon", 210 | "settings": 211 | { 212 | "buffer_size": 903, 213 | "encoding": "UTF-8", 214 | "line_ending": "Windows", 215 | "name": "love.conf=(t)=>" 216 | } 217 | }, 218 | { 219 | "file": "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Compile Moon and Run Love.sublime-build", 220 | "settings": 221 | { 222 | "buffer_size": 107, 223 | "encoding": "UTF-8", 224 | "line_ending": "Windows" 225 | } 226 | } 227 | ], 228 | "build_system": "Packages/Moonscripty/Moonscript.sublime-build", 229 | "build_system_choices": 230 | [ 231 | [ 232 | [ 233 | [ 234 | "Packages/Moonscripty/Moonscript.sublime-build", 235 | "" 236 | ], 237 | [ 238 | "Packages/Moonscripty/Moonscript.sublime-build", 239 | "Run" 240 | ], 241 | [ 242 | "Packages/Moonscripty/Moonscript.sublime-build", 243 | "moonc: show output" 244 | ], 245 | [ 246 | "Packages/Moonscripty/Moonscript.sublime-build", 247 | "love: run project" 248 | ], 249 | [ 250 | "Packages/Moonscripty/Moonscript.sublime-build", 251 | "love: run file" 252 | ], 253 | [ 254 | "Packages/Moonscripty/Moonscript.sublime-build", 255 | "moonc: compile project" 256 | ], 257 | [ 258 | "Packages/Moonscripty/Moonscript.sublime-build", 259 | "moonc: run lint on file" 260 | ], 261 | [ 262 | "Packages/Moonscripty/Moonscript.sublime-build", 263 | "moonc: run lint on project" 264 | ], 265 | [ 266 | "Packages/Moonscripty/Moonscript.sublime-build", 267 | "ldoc: File" 268 | ], 269 | [ 270 | "Packages/Moonscripty/Moonscript.sublime-build", 271 | "ldoc: Project" 272 | ] 273 | ], 274 | [ 275 | "Packages/Moonscripty/Moonscript.sublime-build", 276 | "love: run project" 277 | ] 278 | ], 279 | [ 280 | [ 281 | [ 282 | "Packages/Python/Python.sublime-build", 283 | "" 284 | ], 285 | [ 286 | "Packages/Python/Python.sublime-build", 287 | "Syntax Check" 288 | ] 289 | ], 290 | [ 291 | "Packages/Python/Python.sublime-build", 292 | "" 293 | ] 294 | ] 295 | ], 296 | "build_varint": "love: run project", 297 | "command_palette": 298 | { 299 | "height": 392.0, 300 | "last_filter": "", 301 | "selected_items": 302 | [ 303 | [ 304 | "instal", 305 | "Package Control: Install Package" 306 | ], 307 | [ 308 | "in", 309 | "Package Control: Install Package" 310 | ], 311 | [ 312 | "install", 313 | "Package Control: Install Package" 314 | ], 315 | [ 316 | "remove p", 317 | "Package Control: Remove Package" 318 | ], 319 | [ 320 | "pack", 321 | "Install Package Control" 322 | ] 323 | ], 324 | "width": 444.0 325 | }, 326 | "console": 327 | { 328 | "height": 146.0, 329 | "history": 330 | [ 331 | "2+2", 332 | "print(\"hey\")", 333 | "print \"hey\"", 334 | "moon" 335 | ] 336 | }, 337 | "distraction_free": 338 | { 339 | "menu_visible": true, 340 | "show_minimap": false, 341 | "show_open_files": false, 342 | "show_tabs": false, 343 | "side_bar_visible": false, 344 | "status_bar_visible": false 345 | }, 346 | "expanded_folders": 347 | [ 348 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate", 349 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/lua" 350 | ], 351 | "file_history": 352 | [ 353 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/.gitignore", 354 | "/D/Dropbox/Jobs/LudumDare/RebuildResist/conf.lua", 355 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/lib/lume.lua", 356 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/src/scenes/mainMenu.moon", 357 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/src/scene.moon", 358 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/run.bat", 359 | "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Run Bat File.sublime-build", 360 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/lua/main.lua", 361 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.moon", 362 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/conf.moon", 363 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.lua", 364 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/conf.lua", 365 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/game.moon", 366 | "/D/Dropbox/Jobs/LuaLike/game.moon", 367 | "/D/Dropbox/Jobs/Programing Sketches/Crusoe/main.lua", 368 | "/D/Dropbox/Jobs/LuaLike/LuaLike.sublime-workspace", 369 | "/D/Dropbox/Jobs/LuaLike/conf.lua", 370 | "/D/Dropbox/Jobs/LuaLike/helpers.lua", 371 | "/D/Dropbox/Jobs/LuaLike/LuaLike.sublime-project", 372 | "/D/Dropbox/Jobs/LudumDare/Love2DTemplate/main.moon]", 373 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/gunfire.lua", 374 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/unload.lua", 375 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/thenumber3.activeitem", 376 | "/D/Dropbox/starbound ideas", 377 | "/D/Downloads/Download.csv", 378 | "/D/dev/Starbound/assets/packed/items/active/weapons/protectorate/violiumbroadsword/violiumbroadsword.activeitem", 379 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/beamfire.lua", 380 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/hammersmash.weaponability", 381 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/hammersmash.lua", 382 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/flipslash.lua", 383 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/gun.lua", 384 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/flipslash.weaponability", 385 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/sirensong.activeitem", 386 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/sirensong.lua", 387 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldbarrier.projectile", 388 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/bullet-1/bullet-1.projectile", 389 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/default.frames", 390 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/bramble2.projectile", 391 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/bramble/bramble.projectile", 392 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/default.frames", 393 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/flipslash/physicalswoosh.png", 394 | "/D/dev/Starbound/assets/packed/projectiles/explosions/weakexplosion/weakexplosion.config", 395 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldbarrier.frames", 396 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smokeexplosion/smokeexplosion.config", 397 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smoke/smoke.projectile", 398 | "/D/dev/Starbound/assets/packed/damage/default.damage", 399 | "/D/dev/Starbound/assets/packed/projectiles/explosions/paintexplosionpurple/paintexplosionpurple.projectile", 400 | "/D/dev/Starbound/assets/packed/projectiles/explosions/smoke/smoke.config", 401 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/apex/blacktruncheon.activeitem", 402 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/apex/blacktruncheon.animation", 403 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musket.animation", 404 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musketload.lua", 405 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musket.activeitem", 406 | "/D/dev/Starbound/assets/packed/items/active/weapons/other/electricrailgun/electricrailgun.animation", 407 | "/D/dev/Starbound/assets/packed/projectiles/physics.config", 408 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/brambleseed/brambleseed.projectile", 409 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble2.projectile", 410 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble.projectile", 411 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshieldexaust.projectile", 412 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshield.projectile", 413 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/human/portableshield.thrownitem", 414 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/human/thedefender.activeitem", 415 | "/D/dev/Starbound/assets/packed/tilesets/packed/objects-by-type/physics.json", 416 | "/D/dev/Starbound/assets/packed/projectiles/lavaprojectile/lavaprojectile.projectile", 417 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/revolverbullet/revolverbullet.projectile", 418 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/durasteelassaultrifle.activeitem", 419 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/erchiusbeam/erchiusbeam.lua", 420 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/chargefire/chargefire.lua", 421 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/assaultrifle/commonassaultrifle.activeitem", 422 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/lance/lance.lua", 423 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/lance/lance.weaponability", 424 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/flamethrower/flamethrower.lua", 425 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/guidedrocket/guidedrocket.lua", 426 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/stickyshot/stickyshot.weaponability", 427 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/burstshot/burstshot.lua", 428 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/abilities/flashlight/flashlight.lua", 429 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/emptyclip.lua", 430 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/durasteelassaultrifle.png", 431 | "/D/dev/Starbound/assets/packed/items/active/weapons/novakid/tungstenmagnum.activeitem", 432 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/bouncybullet/bouncybullet.projectile", 433 | "/D/dev/Starbound/assets/packed/projectiles/guns/bullets/piercingbullet/piercingbullet.projectile", 434 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/novakid/durasteelrevolver.activeitem", 435 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/hammer/elementalaura/elementalaura.lua", 436 | "/D/dev/Starbound/assets/packed/items/active/weapons/other/electrobaton/electrobaton.activeitem", 437 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/staff/forcecage/forcecage.projectile", 438 | "/D/dev/Starbound/assets/packed/stats/effects/paralysis/longParalysis.statuseffect", 439 | "/D/dev/Starbound/assets/packed/stats/effects/paralysis/paralysis.statuseffect", 440 | "/D/dev/Starbound/assets/packed/stats/effects/doomed/doomed.lua", 441 | "/D/dev/Starbound/assets/packed/stats/effects/stun/stun.statuseffect", 442 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/doomshot/doomshot.projectile", 443 | "/D/dev/Starbound/assets/packed/items/active/weapons/ranged/unrand/doomcannon/doomcannon.activeitem", 444 | "/D/dev/Starbound/assets/packed/stats/effects/doomed/l6doomed.statuseffect", 445 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostsnare.lua", 446 | "/D/dev/Starbound/assets/packed/stats/effects/stun/stun.lua", 447 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostslow.lua", 448 | "/D/dev/Starbound/assets/packed/stats/effects/frostslow/frostslow.statuseffect", 449 | "/D/dev/Starbound/assets/packed/stats/effects/dontstarve/dontstarve.lua", 450 | "/D/dev/Starbound/assets/packed/stats/effects/dontstarve/dontstarve.statuseffect", 451 | "/D/dev/ExOk/exok1/Assets/Shaders/RimLit.shader", 452 | "/D/dev/ExOk/exok1/Assets/Shaders/ToonLit.shader", 453 | "/D/dev/ExOk/exok1/Assets/Shaders/Wiggle.shader", 454 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/default.frames", 455 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/species/portableshield.frames", 456 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/broadswordcombo.weaponability", 457 | "/D/dev/Starbound/assets/packed/projectiles/throwable/glowbomb/glowbomb.projectile", 458 | "/D/dev/Starbound/assets/packed/items/active/weapons/staff/abilities/effectzone/forcecage.weaponability", 459 | "/D/dev/Starbound/assets/packed/items/active/weapons/staff/abilities/effectzone/effectzone.lua", 460 | "/D/dev/Starbound/assets/packed/projectiles/throwable/firework2/firework2.projectile", 461 | "/D/dev/Starbound/assets/packed/projectiles/throwable/glowgas/glowgas.projectile", 462 | "/D/dev/Starbound/assets/packed/items/active/weapons/protectorate/feroziumstaff/feroziumstaff.activeitem", 463 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/glitch/musketfire.lua", 464 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/kunaiblast/kunaiblast.weaponability", 465 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/theeel/sirensong.lua", 466 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/kunaiblast/kunaiblast.lua", 467 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/meleeweapon.lua", 468 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/hylotl/theeel/theeel.activeitem", 469 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/astraltear/astraltear.weaponability", 470 | "/D/dev/Starbound/assets/packed/items/active/weapons/melee/abilities/broadsword/astraltear/astraltear.lua", 471 | "/D/dev/Starbound/assets/packed/items/active/weapons/species/floran/seedgun.activeitem", 472 | "/D/dev/Starbound/assets/packed/stats/effects/weakpoison/weakpoison.lua", 473 | "/D/dev/Starbound/assets/packed/projectiles/explosions/bigboulderexplosion/bigboulderexplosion.projectile", 474 | "/D/dev/Starbound/assets/packed/projectiles/explosions/bigboulderexplosion/bigboulderexplosion.frames", 475 | "/D/dev/Starbound/assets/packed/projectiles/npcs/razorleaf/leafgust.projectile", 476 | "/D/dev/Starbound/assets/packed/projectiles/throwable/firework3/firework3.projectile", 477 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble2.frames", 478 | "/D/dev/Starbound/assets/packed/projectiles/throwable/thorngrenade/thorngrenade.projectile", 479 | "/D/dev/Starbound/assets/packed/projectiles/activeitems/bramble/bramble.frames", 480 | "/D/dev/Starbound/assets/packed/projectiles/guns/grenades/fruitthorn/fruitthorn.projectile" 481 | ], 482 | "find": 483 | { 484 | "height": 40.0 485 | }, 486 | "find_in_files": 487 | { 488 | "height": 104.0, 489 | "where_history": 490 | [ 491 | "D:\\dev\\OutThereSomewhereFP", 492 | "D:\\dev\\OutThereSomewhereFP\\bin\\level" 493 | ] 494 | }, 495 | "find_state": 496 | { 497 | "case_sensitive": false, 498 | "find_history": 499 | [ 500 | "moonscript", 501 | "print", 502 | "moons", 503 | "parti", 504 | "sets", 505 | "state", 506 | "partDamageArea", 507 | "damag", 508 | "groun", 509 | "swo", 510 | "fire", 511 | "animatedParts", 512 | "animationCustom", 513 | "idle", 514 | "wa", 515 | "handle", 516 | "black", 517 | "muzz", 518 | "0.45", 519 | "0.35", 520 | "8", 521 | "3.0", 522 | "0.2", 523 | "grenade", 524 | "durasteelassaultrifle", 525 | "aim", 526 | "aimVector", 527 | "dire", 528 | "angl", 529 | "proj", 530 | "angle", 531 | "proje", 532 | "currentAngle", 533 | "timeAndAngle", 534 | "newTimesAndAngles", 535 | "projectileTimesAndAngles", 536 | "EmptyClip", 537 | "SirenSong", 538 | "6", 539 | "00", 540 | "doom", 541 | "elect", 542 | "stat", 543 | "shock", 544 | "DIRECTIONAL", 545 | "Diffuse", 546 | "SV_Target", 547 | "UNITY_FOG_COORDS", 548 | "fogcoo", 549 | "fogCoord", 550 | "fog", 551 | "_Wiggle", 552 | "0.1", 553 | "0.03", 554 | "projectilet", 555 | "],\n", 556 | "KunaiBlast", 557 | "GunFire", 558 | "astral", 559 | "}\n", 560 | "80,", 561 | "80", 562 | "bramble", 563 | "poisonbarrel", 564 | "fruitthorn", 565 | "projec", 566 | "blade", 567 | "blede", 568 | "tran", 569 | "transfo", 570 | "blade", 571 | "tran", 572 | "baseWeaponRotation", 573 | "trans", 574 | "weapon", 575 | "charges", 576 | "handle", 577 | "print", 578 | "MeleeSlash", 579 | "baseDps", 580 | "inflictedh", 581 | "dama", 582 | "charge", 583 | "fra", 584 | "frame", 585 | "animat", 586 | "\"fire", 587 | "5", 588 | "arm", 589 | "muzzle", 590 | "fra", 591 | "muzzl", 592 | "animator", 593 | "fullc", 594 | "anima", 595 | "light", 596 | "idle", 597 | "drawframe", 598 | "anima", 599 | "fram", 600 | "wait", 601 | "cooldown", 602 | "elemental", 603 | "proj", 604 | "hamm", 605 | "\\", 606 | "GreatWave", 607 | "greatwave", 608 | "GreatWave", 609 | "elec", 610 | "png", 611 | "defa", 612 | "png", 613 | "frames", 614 | "ele", 615 | "laun", 616 | "glowstickblue", 617 | "glowstickblueicon", 618 | "glowstickblue", 619 | "exmachina", 620 | "sporegun", 621 | "gristlegun", 622 | "ironshortsword", 623 | "cavebow", 624 | "muzzl", 625 | "titaniummachinepistol", 626 | "two", 627 | "twoHanded" 628 | ], 629 | "highlight": true, 630 | "in_selection": false, 631 | "preserve_case": false, 632 | "regex": false, 633 | "replace_history": 634 | [ 635 | "_Color", 636 | "_Colorv", 637 | ",", 638 | "TMS" 639 | ], 640 | "reverse": false, 641 | "show_context": true, 642 | "use_buffer2": true, 643 | "whole_word": false, 644 | "wrap": true 645 | }, 646 | "groups": 647 | [ 648 | { 649 | "selected": 6, 650 | "sheets": 651 | [ 652 | { 653 | "buffer": 0, 654 | "file": "src/main.moon", 655 | "semi_transient": false, 656 | "settings": 657 | { 658 | "buffer_size": 641, 659 | "regions": 660 | { 661 | }, 662 | "selection": 663 | [ 664 | [ 665 | 92, 666 | 94 667 | ] 668 | ], 669 | "settings": 670 | { 671 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 672 | }, 673 | "translation.x": 0.0, 674 | "translation.y": 0.0, 675 | "zoom_level": 1.0 676 | }, 677 | "stack_index": 4, 678 | "type": "text" 679 | }, 680 | { 681 | "buffer": 1, 682 | "file": "src/scenes/mainMenu.moon", 683 | "semi_transient": false, 684 | "settings": 685 | { 686 | "buffer_size": 181, 687 | "regions": 688 | { 689 | }, 690 | "selection": 691 | [ 692 | [ 693 | 181, 694 | 181 695 | ] 696 | ], 697 | "settings": 698 | { 699 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 700 | }, 701 | "translation.x": 0.0, 702 | "translation.y": 0.0, 703 | "zoom_level": 1.0 704 | }, 705 | "stack_index": 5, 706 | "type": "text" 707 | }, 708 | { 709 | "buffer": 2, 710 | "file": "src/scenes/gameScene.moon", 711 | "semi_transient": false, 712 | "settings": 713 | { 714 | "buffer_size": 238, 715 | "regions": 716 | { 717 | }, 718 | "selection": 719 | [ 720 | [ 721 | 173, 722 | 185 723 | ] 724 | ], 725 | "settings": 726 | { 727 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 728 | }, 729 | "translation.x": 0.0, 730 | "translation.y": 0.0, 731 | "zoom_level": 1.0 732 | }, 733 | "stack_index": 6, 734 | "type": "text" 735 | }, 736 | { 737 | "buffer": 3, 738 | "file": "src/scenes/defeatScene.moon", 739 | "semi_transient": false, 740 | "settings": 741 | { 742 | "buffer_size": 181, 743 | "regions": 744 | { 745 | }, 746 | "selection": 747 | [ 748 | [ 749 | 166, 750 | 179 751 | ] 752 | ], 753 | "settings": 754 | { 755 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 756 | }, 757 | "translation.x": 0.0, 758 | "translation.y": 0.0, 759 | "zoom_level": 1.0 760 | }, 761 | "stack_index": 7, 762 | "type": "text" 763 | }, 764 | { 765 | "buffer": 4, 766 | "file": "src/scenes/victoryScene.moon", 767 | "semi_transient": false, 768 | "settings": 769 | { 770 | "buffer_size": 183, 771 | "regions": 772 | { 773 | }, 774 | "selection": 775 | [ 776 | [ 777 | 39, 778 | 39 779 | ] 780 | ], 781 | "settings": 782 | { 783 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage" 784 | }, 785 | "translation.x": 0.0, 786 | "translation.y": 0.0, 787 | "zoom_level": 1.0 788 | }, 789 | "stack_index": 2, 790 | "type": "text" 791 | }, 792 | { 793 | "buffer": 5, 794 | "file": "src/scenes/scene.moon", 795 | "semi_transient": false, 796 | "settings": 797 | { 798 | "buffer_size": 120, 799 | "regions": 800 | { 801 | }, 802 | "selection": 803 | [ 804 | [ 805 | 120, 806 | 120 807 | ] 808 | ], 809 | "settings": 810 | { 811 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage", 812 | "translate_tabs_to_spaces": false 813 | }, 814 | "translation.x": 0.0, 815 | "translation.y": 0.0, 816 | "zoom_level": 1.0 817 | }, 818 | "stack_index": 3, 819 | "type": "text" 820 | }, 821 | { 822 | "buffer": 6, 823 | "file": "src/conf.moon", 824 | "semi_transient": false, 825 | "settings": 826 | { 827 | "buffer_size": 903, 828 | "regions": 829 | { 830 | }, 831 | "selection": 832 | [ 833 | [ 834 | 264, 835 | 268 836 | ] 837 | ], 838 | "settings": 839 | { 840 | "auto_name": "love.conf=(t)=>", 841 | "syntax": "Packages/Moonscripty/Syntaxes/MoonScript.tmLanguage", 842 | "translate_tabs_to_spaces": false 843 | }, 844 | "translation.x": 0.0, 845 | "translation.y": 0.0, 846 | "zoom_level": 1.0 847 | }, 848 | "stack_index": 0, 849 | "type": "text" 850 | }, 851 | { 852 | "buffer": 7, 853 | "file": "/C/Users/saint/AppData/Roaming/Sublime Text 3/Packages/User/Compile Moon and Run Love.sublime-build", 854 | "semi_transient": false, 855 | "settings": 856 | { 857 | "buffer_size": 107, 858 | "regions": 859 | { 860 | }, 861 | "selection": 862 | [ 863 | [ 864 | 107, 865 | 107 866 | ] 867 | ], 868 | "settings": 869 | { 870 | "syntax": "Packages/JavaScript/JSON.sublime-syntax" 871 | }, 872 | "translation.x": 0.0, 873 | "translation.y": 0.0, 874 | "zoom_level": 1.0 875 | }, 876 | "stack_index": 1, 877 | "type": "text" 878 | } 879 | ] 880 | } 881 | ], 882 | "incremental_find": 883 | { 884 | "height": 27.0 885 | }, 886 | "input": 887 | { 888 | "height": 40.0 889 | }, 890 | "layout": 891 | { 892 | "cells": 893 | [ 894 | [ 895 | 0, 896 | 0, 897 | 1, 898 | 1 899 | ] 900 | ], 901 | "cols": 902 | [ 903 | 0.0, 904 | 1.0 905 | ], 906 | "rows": 907 | [ 908 | 0.0, 909 | 1.0 910 | ] 911 | }, 912 | "menu_visible": true, 913 | "output.exec": 914 | { 915 | "height": 237.0 916 | }, 917 | "output.find_results": 918 | { 919 | "height": 0.0 920 | }, 921 | "pinned_build_system": "Packages/User/Compile Moon and Run Love.sublime-build", 922 | "project": "fast.sublime-project", 923 | "replace": 924 | { 925 | "height": 50.0 926 | }, 927 | "save_all_on_build": true, 928 | "select_file": 929 | { 930 | "height": 0.0, 931 | "last_filter": "", 932 | "selected_items": 933 | [ 934 | ], 935 | "width": 0.0 936 | }, 937 | "select_project": 938 | { 939 | "height": 0.0, 940 | "last_filter": "", 941 | "selected_items": 942 | [ 943 | ], 944 | "width": 0.0 945 | }, 946 | "select_symbol": 947 | { 948 | "height": 0.0, 949 | "last_filter": "", 950 | "selected_items": 951 | [ 952 | ], 953 | "width": 0.0 954 | }, 955 | "selected_group": 0, 956 | "settings": 957 | { 958 | }, 959 | "show_minimap": true, 960 | "show_open_files": false, 961 | "show_tabs": true, 962 | "side_bar_visible": true, 963 | "side_bar_width": 188.0, 964 | "status_bar_visible": true, 965 | "template_settings": 966 | { 967 | } 968 | } 969 | -------------------------------------------------------------------------------- /game/assets/fonts/battlenet.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/battlenet.ttf -------------------------------------------------------------------------------- /game/assets/fonts/born2bsportyv2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/born2bsportyv2.ttf -------------------------------------------------------------------------------- /game/assets/fonts/extrude.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/extrude.ttf -------------------------------------------------------------------------------- /game/assets/fonts/font licences.txt: -------------------------------------------------------------------------------- 1 | HelvetiPixel by pentacom (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=381) 2 | licence: Public Domain 3 | 4 | Born2bSportyV2 by JapanYoshi (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=383) 5 | license : (Public Domain) 6 | 7 | PixelFraktur by Extant (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=467) 8 | license : (Public Domain) 9 | 10 | Extrude by Nic (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=238) 11 | license : (Public Domain) 12 | 13 | Minimal4, Minimal5 and Monocons by Pedro Medeiros 14 | license : (Public Domain) 15 | 16 | VCR Font by VCR Electronic Fonts (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=1225) 17 | license : (Public Domain) 18 | 19 | MEGAMAN10 by YahooXD (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=528) 20 | license : (Public Domain) 21 | 22 | battlenet by Tom Israels (http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=125) 23 | license : (Public Domain) -------------------------------------------------------------------------------- /game/assets/fonts/handwriting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/handwriting.ttf -------------------------------------------------------------------------------- /game/assets/fonts/helvetipixel.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/helvetipixel.ttf -------------------------------------------------------------------------------- /game/assets/fonts/megaman10.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/megaman10.ttf -------------------------------------------------------------------------------- /game/assets/fonts/minimal4.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/minimal4.ttf -------------------------------------------------------------------------------- /game/assets/fonts/minimal5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/minimal5.ttf -------------------------------------------------------------------------------- /game/assets/fonts/monocons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/monocons.ttf -------------------------------------------------------------------------------- /game/assets/fonts/pixelfraktur.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/pixelfraktur.ttf -------------------------------------------------------------------------------- /game/assets/fonts/vcrfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saint11/MoonLove-Faststart/c1ec2ca0e5b798dd463e6d21314683d5c89007cd/game/assets/fonts/vcrfont.ttf -------------------------------------------------------------------------------- /game/lib/lume.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- lume 3 | -- 4 | -- Copyright (c) 2018 rxi 5 | -- 6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | -- this software and associated documentation files (the "Software"), to deal in 8 | -- the Software without restriction, including without limitation the rights to 9 | -- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | -- of the Software, and to permit persons to whom the Software is furnished to do 11 | -- so, subject to the following conditions: 12 | -- 13 | -- The above copyright notice and this permission notice shall be included in all 14 | -- copies or substantial portions of the Software. 15 | -- 16 | -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | -- SOFTWARE. 23 | -- 24 | 25 | local lume = { _version = "2.3.0" } 26 | 27 | local pairs, ipairs = pairs, ipairs 28 | local type, assert, unpack = type, assert, unpack or table.unpack 29 | local tostring, tonumber = tostring, tonumber 30 | local math_floor = math.floor 31 | local math_ceil = math.ceil 32 | local math_atan2 = math.atan2 or math.atan 33 | local math_sqrt = math.sqrt 34 | local math_abs = math.abs 35 | 36 | local noop = function() 37 | end 38 | 39 | local identity = function(x) 40 | return x 41 | end 42 | 43 | local patternescape = function(str) 44 | return str:gsub("[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1") 45 | end 46 | 47 | local absindex = function(len, i) 48 | return i < 0 and (len + i + 1) or i 49 | end 50 | 51 | local iscallable = function(x) 52 | if type(x) == "function" then return true end 53 | local mt = getmetatable(x) 54 | return mt and mt.__call ~= nil 55 | end 56 | 57 | local getiter = function(x) 58 | if lume.isarray(x) then 59 | return ipairs 60 | elseif type(x) == "table" then 61 | return pairs 62 | end 63 | error("expected table", 3) 64 | end 65 | 66 | local iteratee = function(x) 67 | if x == nil then return identity end 68 | if iscallable(x) then return x end 69 | if type(x) == "table" then 70 | return function(z) 71 | for k, v in pairs(x) do 72 | if z[k] ~= v then return false end 73 | end 74 | return true 75 | end 76 | end 77 | return function(z) return z[x] end 78 | end 79 | 80 | 81 | 82 | function lume.clamp(x, min, max) 83 | return x < min and min or (x > max and max or x) 84 | end 85 | 86 | 87 | function lume.round(x, increment) 88 | if increment then return lume.round(x / increment) * increment end 89 | return x >= 0 and math_floor(x + .5) or math_ceil(x - .5) 90 | end 91 | 92 | 93 | function lume.sign(x) 94 | return x < 0 and -1 or 1 95 | end 96 | 97 | 98 | function lume.lerp(a, b, amount) 99 | return a + (b - a) * lume.clamp(amount, 0, 1) 100 | end 101 | 102 | 103 | function lume.smooth(a, b, amount) 104 | local t = lume.clamp(amount, 0, 1) 105 | local m = t * t * (3 - 2 * t) 106 | return a + (b - a) * m 107 | end 108 | 109 | 110 | function lume.pingpong(x) 111 | return 1 - math_abs(1 - x % 2) 112 | end 113 | 114 | 115 | function lume.distance(x1, y1, x2, y2, squared) 116 | local dx = x1 - x2 117 | local dy = y1 - y2 118 | local s = dx * dx + dy * dy 119 | return squared and s or math_sqrt(s) 120 | end 121 | 122 | 123 | function lume.angle(x1, y1, x2, y2) 124 | return math_atan2(y2 - y1, x2 - x1) 125 | end 126 | 127 | 128 | function lume.vector(angle, magnitude) 129 | return math.cos(angle) * magnitude, math.sin(angle) * magnitude 130 | end 131 | 132 | 133 | function lume.random(a, b) 134 | if not a then a, b = 0, 1 end 135 | if not b then b = 0 end 136 | return a + math.random() * (b - a) 137 | end 138 | 139 | 140 | function lume.randomchoice(t) 141 | return t[math.random(#t)] 142 | end 143 | 144 | 145 | function lume.weightedchoice(t) 146 | local sum = 0 147 | for _, v in pairs(t) do 148 | assert(v >= 0, "weight value less than zero") 149 | sum = sum + v 150 | end 151 | assert(sum ~= 0, "all weights are zero") 152 | local rnd = lume.random(sum) 153 | for k, v in pairs(t) do 154 | if rnd < v then return k end 155 | rnd = rnd - v 156 | end 157 | end 158 | 159 | 160 | function lume.isarray(x) 161 | return (type(x) == "table" and x[1] ~= nil) and true or false 162 | end 163 | 164 | 165 | function lume.push(t, ...) 166 | local n = select("#", ...) 167 | for i = 1, n do 168 | t[#t + 1] = select(i, ...) 169 | end 170 | return ... 171 | end 172 | 173 | 174 | function lume.remove(t, x) 175 | local iter = getiter(t) 176 | for i, v in iter(t) do 177 | if v == x then 178 | if lume.isarray(t) then 179 | table.remove(t, i) 180 | break 181 | else 182 | t[i] = nil 183 | break 184 | end 185 | end 186 | end 187 | return x 188 | end 189 | 190 | 191 | function lume.clear(t) 192 | local iter = getiter(t) 193 | for k in iter(t) do 194 | t[k] = nil 195 | end 196 | return t 197 | end 198 | 199 | 200 | function lume.extend(t, ...) 201 | for i = 1, select("#", ...) do 202 | local x = select(i, ...) 203 | if x then 204 | for k, v in pairs(x) do 205 | t[k] = v 206 | end 207 | end 208 | end 209 | return t 210 | end 211 | 212 | 213 | function lume.shuffle(t) 214 | local rtn = {} 215 | for i = 1, #t do 216 | local r = math.random(i) 217 | if r ~= i then 218 | rtn[i] = rtn[r] 219 | end 220 | rtn[r] = t[i] 221 | end 222 | return rtn 223 | end 224 | 225 | 226 | function lume.sort(t, comp) 227 | local rtn = lume.clone(t) 228 | if comp then 229 | if type(comp) == "string" then 230 | table.sort(rtn, function(a, b) return a[comp] < b[comp] end) 231 | else 232 | table.sort(rtn, comp) 233 | end 234 | else 235 | table.sort(rtn) 236 | end 237 | return rtn 238 | end 239 | 240 | 241 | function lume.array(...) 242 | local t = {} 243 | for x in ... do t[#t + 1] = x end 244 | return t 245 | end 246 | 247 | 248 | function lume.each(t, fn, ...) 249 | local iter = getiter(t) 250 | if type(fn) == "string" then 251 | for _, v in iter(t) do v[fn](v, ...) end 252 | else 253 | for _, v in iter(t) do fn(v, ...) end 254 | end 255 | return t 256 | end 257 | 258 | 259 | function lume.map(t, fn) 260 | fn = iteratee(fn) 261 | local iter = getiter(t) 262 | local rtn = {} 263 | for k, v in iter(t) do rtn[k] = fn(v) end 264 | return rtn 265 | end 266 | 267 | 268 | function lume.all(t, fn) 269 | fn = iteratee(fn) 270 | local iter = getiter(t) 271 | for _, v in iter(t) do 272 | if not fn(v) then return false end 273 | end 274 | return true 275 | end 276 | 277 | 278 | function lume.any(t, fn) 279 | fn = iteratee(fn) 280 | local iter = getiter(t) 281 | for _, v in iter(t) do 282 | if fn(v) then return true end 283 | end 284 | return false 285 | end 286 | 287 | 288 | function lume.reduce(t, fn, first) 289 | local acc = first 290 | local started = first and true or false 291 | local iter = getiter(t) 292 | for _, v in iter(t) do 293 | if started then 294 | acc = fn(acc, v) 295 | else 296 | acc = v 297 | started = true 298 | end 299 | end 300 | assert(started, "reduce of an empty table with no first value") 301 | return acc 302 | end 303 | 304 | 305 | function lume.unique(t) 306 | local rtn = {} 307 | for k in pairs(lume.invert(t)) do 308 | rtn[#rtn + 1] = k 309 | end 310 | return rtn 311 | end 312 | 313 | 314 | function lume.filter(t, fn, retainkeys) 315 | fn = iteratee(fn) 316 | local iter = getiter(t) 317 | local rtn = {} 318 | if retainkeys then 319 | for k, v in iter(t) do 320 | if fn(v) then rtn[k] = v end 321 | end 322 | else 323 | for _, v in iter(t) do 324 | if fn(v) then rtn[#rtn + 1] = v end 325 | end 326 | end 327 | return rtn 328 | end 329 | 330 | 331 | function lume.reject(t, fn, retainkeys) 332 | fn = iteratee(fn) 333 | local iter = getiter(t) 334 | local rtn = {} 335 | if retainkeys then 336 | for k, v in iter(t) do 337 | if not fn(v) then rtn[k] = v end 338 | end 339 | else 340 | for _, v in iter(t) do 341 | if not fn(v) then rtn[#rtn + 1] = v end 342 | end 343 | end 344 | return rtn 345 | end 346 | 347 | 348 | function lume.merge(...) 349 | local rtn = {} 350 | for i = 1, select("#", ...) do 351 | local t = select(i, ...) 352 | local iter = getiter(t) 353 | for k, v in iter(t) do 354 | rtn[k] = v 355 | end 356 | end 357 | return rtn 358 | end 359 | 360 | 361 | function lume.concat(...) 362 | local rtn = {} 363 | for i = 1, select("#", ...) do 364 | local t = select(i, ...) 365 | if t ~= nil then 366 | local iter = getiter(t) 367 | for _, v in iter(t) do 368 | rtn[#rtn + 1] = v 369 | end 370 | end 371 | end 372 | return rtn 373 | end 374 | 375 | 376 | function lume.find(t, value) 377 | local iter = getiter(t) 378 | for k, v in iter(t) do 379 | if v == value then return k end 380 | end 381 | return nil 382 | end 383 | 384 | 385 | function lume.match(t, fn) 386 | fn = iteratee(fn) 387 | local iter = getiter(t) 388 | for k, v in iter(t) do 389 | if fn(v) then return v, k end 390 | end 391 | return nil 392 | end 393 | 394 | 395 | function lume.count(t, fn) 396 | local count = 0 397 | local iter = getiter(t) 398 | if fn then 399 | fn = iteratee(fn) 400 | for _, v in iter(t) do 401 | if fn(v) then count = count + 1 end 402 | end 403 | else 404 | if lume.isarray(t) then 405 | return #t 406 | end 407 | for _ in iter(t) do count = count + 1 end 408 | end 409 | return count 410 | end 411 | 412 | 413 | function lume.slice(t, i, j) 414 | i = i and absindex(#t, i) or 1 415 | j = j and absindex(#t, j) or #t 416 | local rtn = {} 417 | for x = i < 1 and 1 or i, j > #t and #t or j do 418 | rtn[#rtn + 1] = t[x] 419 | end 420 | return rtn 421 | end 422 | 423 | 424 | function lume.first(t, n) 425 | if not n then return t[1] end 426 | return lume.slice(t, 1, n) 427 | end 428 | 429 | 430 | function lume.last(t, n) 431 | if not n then return t[#t] end 432 | return lume.slice(t, -n, -1) 433 | end 434 | 435 | 436 | function lume.invert(t) 437 | local rtn = {} 438 | for k, v in pairs(t) do rtn[v] = k end 439 | return rtn 440 | end 441 | 442 | 443 | function lume.pick(t, ...) 444 | local rtn = {} 445 | for i = 1, select("#", ...) do 446 | local k = select(i, ...) 447 | rtn[k] = t[k] 448 | end 449 | return rtn 450 | end 451 | 452 | 453 | function lume.keys(t) 454 | local rtn = {} 455 | local iter = getiter(t) 456 | for k in iter(t) do rtn[#rtn + 1] = k end 457 | return rtn 458 | end 459 | 460 | 461 | function lume.clone(t) 462 | local rtn = {} 463 | for k, v in pairs(t) do rtn[k] = v end 464 | return rtn 465 | end 466 | 467 | 468 | function lume.fn(fn, ...) 469 | assert(iscallable(fn), "expected a function as the first argument") 470 | local args = { ... } 471 | return function(...) 472 | local a = lume.concat(args, { ... }) 473 | return fn(unpack(a)) 474 | end 475 | end 476 | 477 | 478 | function lume.once(fn, ...) 479 | local f = lume.fn(fn, ...) 480 | local done = false 481 | return function(...) 482 | if done then return end 483 | done = true 484 | return f(...) 485 | end 486 | end 487 | 488 | 489 | local memoize_fnkey = {} 490 | local memoize_nil = {} 491 | 492 | function lume.memoize(fn) 493 | local cache = {} 494 | return function(...) 495 | local c = cache 496 | for i = 1, select("#", ...) do 497 | local a = select(i, ...) or memoize_nil 498 | c[a] = c[a] or {} 499 | c = c[a] 500 | end 501 | c[memoize_fnkey] = c[memoize_fnkey] or {fn(...)} 502 | return unpack(c[memoize_fnkey]) 503 | end 504 | end 505 | 506 | 507 | function lume.combine(...) 508 | local n = select('#', ...) 509 | if n == 0 then return noop end 510 | if n == 1 then 511 | local fn = select(1, ...) 512 | if not fn then return noop end 513 | assert(iscallable(fn), "expected a function or nil") 514 | return fn 515 | end 516 | local funcs = {} 517 | for i = 1, n do 518 | local fn = select(i, ...) 519 | if fn ~= nil then 520 | assert(iscallable(fn), "expected a function or nil") 521 | funcs[#funcs + 1] = fn 522 | end 523 | end 524 | return function(...) 525 | for _, f in ipairs(funcs) do f(...) end 526 | end 527 | end 528 | 529 | 530 | function lume.call(fn, ...) 531 | if fn then 532 | return fn(...) 533 | end 534 | end 535 | 536 | 537 | function lume.time(fn, ...) 538 | local start = os.clock() 539 | local rtn = {fn(...)} 540 | return (os.clock() - start), unpack(rtn) 541 | end 542 | 543 | 544 | local lambda_cache = {} 545 | 546 | function lume.lambda(str) 547 | if not lambda_cache[str] then 548 | local args, body = str:match([[^([%w,_ ]-)%->(.-)$]]) 549 | assert(args and body, "bad string lambda") 550 | local s = "return function(" .. args .. ")\nreturn " .. body .. "\nend" 551 | lambda_cache[str] = lume.dostring(s) 552 | end 553 | return lambda_cache[str] 554 | end 555 | 556 | 557 | local serialize 558 | 559 | local serialize_map = { 560 | [ "boolean" ] = tostring, 561 | [ "nil" ] = tostring, 562 | [ "string" ] = function(v) return string.format("%q", v) end, 563 | [ "number" ] = function(v) 564 | if v ~= v then return "0/0" -- nan 565 | elseif v == 1 / 0 then return "1/0" -- inf 566 | elseif v == -1 / 0 then return "-1/0" end -- -inf 567 | return tostring(v) 568 | end, 569 | [ "table" ] = function(t, stk) 570 | stk = stk or {} 571 | if stk[t] then error("circular reference") end 572 | local rtn = {} 573 | stk[t] = true 574 | for k, v in pairs(t) do 575 | rtn[#rtn + 1] = "[" .. serialize(k, stk) .. "]=" .. serialize(v, stk) 576 | end 577 | stk[t] = nil 578 | return "{" .. table.concat(rtn, ",") .. "}" 579 | end 580 | } 581 | 582 | setmetatable(serialize_map, { 583 | __index = function(_, k) error("unsupported serialize type: " .. k) end 584 | }) 585 | 586 | serialize = function(x, stk) 587 | return serialize_map[type(x)](x, stk) 588 | end 589 | 590 | function lume.serialize(x) 591 | return serialize(x) 592 | end 593 | 594 | 595 | function lume.deserialize(str) 596 | return lume.dostring("return " .. str) 597 | end 598 | 599 | 600 | function lume.split(str, sep) 601 | if not sep then 602 | return lume.array(str:gmatch("([%S]+)")) 603 | else 604 | assert(sep ~= "", "empty separator") 605 | local psep = patternescape(sep) 606 | return lume.array((str..sep):gmatch("(.-)("..psep..")")) 607 | end 608 | end 609 | 610 | 611 | function lume.trim(str, chars) 612 | if not chars then return str:match("^[%s]*(.-)[%s]*$") end 613 | chars = patternescape(chars) 614 | return str:match("^[" .. chars .. "]*(.-)[" .. chars .. "]*$") 615 | end 616 | 617 | 618 | function lume.wordwrap(str, limit) 619 | limit = limit or 72 620 | local check 621 | if type(limit) == "number" then 622 | check = function(s) return #s >= limit end 623 | else 624 | check = limit 625 | end 626 | local rtn = {} 627 | local line = "" 628 | for word, spaces in str:gmatch("(%S+)(%s*)") do 629 | local s = line .. word 630 | if check(s) then 631 | table.insert(rtn, line .. "\n") 632 | line = word 633 | else 634 | line = s 635 | end 636 | for c in spaces:gmatch(".") do 637 | if c == "\n" then 638 | table.insert(rtn, line .. "\n") 639 | line = "" 640 | else 641 | line = line .. c 642 | end 643 | end 644 | end 645 | table.insert(rtn, line) 646 | return table.concat(rtn) 647 | end 648 | 649 | 650 | function lume.format(str, vars) 651 | if not vars then return str end 652 | local f = function(x) 653 | return tostring(vars[x] or vars[tonumber(x)] or "{" .. x .. "}") 654 | end 655 | return (str:gsub("{(.-)}", f)) 656 | end 657 | 658 | 659 | function lume.trace(...) 660 | local info = debug.getinfo(2, "Sl") 661 | local t = { info.short_src .. ":" .. info.currentline .. ":" } 662 | for i = 1, select("#", ...) do 663 | local x = select(i, ...) 664 | if type(x) == "number" then 665 | x = string.format("%g", lume.round(x, .01)) 666 | end 667 | t[#t + 1] = tostring(x) 668 | end 669 | print(table.concat(t, " ")) 670 | end 671 | 672 | 673 | function lume.dostring(str) 674 | return assert((loadstring or load)(str))() 675 | end 676 | 677 | 678 | function lume.uuid() 679 | local fn = function(x) 680 | local r = math.random(16) - 1 681 | r = (x == "x") and (r + 1) or (r % 4) + 9 682 | return ("0123456789abcdef"):sub(r, r) 683 | end 684 | return (("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"):gsub("[xy]", fn)) 685 | end 686 | 687 | 688 | function lume.hotswap(modname) 689 | local oldglobal = lume.clone(_G) 690 | local updated = {} 691 | local function update(old, new) 692 | if updated[old] then return end 693 | updated[old] = true 694 | local oldmt, newmt = getmetatable(old), getmetatable(new) 695 | if oldmt and newmt then update(oldmt, newmt) end 696 | for k, v in pairs(new) do 697 | if type(v) == "table" then update(old[k], v) else old[k] = v end 698 | end 699 | end 700 | local err = nil 701 | local function onerror(e) 702 | for k in pairs(_G) do _G[k] = oldglobal[k] end 703 | err = lume.trim(e) 704 | end 705 | local ok, oldmod = pcall(require, modname) 706 | oldmod = ok and oldmod or nil 707 | xpcall(function() 708 | package.loaded[modname] = nil 709 | local newmod = require(modname) 710 | if type(oldmod) == "table" then update(oldmod, newmod) end 711 | for k, v in pairs(oldglobal) do 712 | if v ~= _G[k] and type(v) == "table" then 713 | update(v, _G[k]) 714 | _G[k] = v 715 | end 716 | end 717 | end, onerror) 718 | package.loaded[modname] = oldmod 719 | if err then return nil, err end 720 | return oldmod 721 | end 722 | 723 | 724 | local ripairs_iter = function(t, i) 725 | i = i - 1 726 | local v = t[i] 727 | if v ~= nil then 728 | return i, v 729 | end 730 | end 731 | 732 | function lume.ripairs(t) 733 | return ripairs_iter, t, (#t + 1) 734 | end 735 | 736 | 737 | function lume.color(str, mul) 738 | mul = mul or 1 739 | local r, g, b, a 740 | r, g, b = str:match("#(%x%x)(%x%x)(%x%x)") 741 | if r then 742 | r = tonumber(r, 16) / 0xff 743 | g = tonumber(g, 16) / 0xff 744 | b = tonumber(b, 16) / 0xff 745 | a = 1 746 | elseif str:match("rgba?%s*%([%d%s%.,]+%)") then 747 | local f = str:gmatch("[%d.]+") 748 | r = (f() or 0) / 0xff 749 | g = (f() or 0) / 0xff 750 | b = (f() or 0) / 0xff 751 | a = f() or 1 752 | else 753 | error(("bad color string '%s'"):format(str)) 754 | end 755 | return r * mul, g * mul, b * mul, a * mul 756 | end 757 | 758 | 759 | local chain_mt = {} 760 | chain_mt.__index = lume.map(lume.filter(lume, iscallable, true), 761 | function(fn) 762 | return function(self, ...) 763 | self._value = fn(self._value, ...) 764 | return self 765 | end 766 | end) 767 | chain_mt.__index.result = function(x) return x._value end 768 | 769 | function lume.chain(value) 770 | return setmetatable({ _value = value }, chain_mt) 771 | end 772 | 773 | setmetatable(lume, { 774 | __call = function(_, ...) 775 | return lume.chain(...) 776 | end 777 | }) 778 | 779 | 780 | return lume -------------------------------------------------------------------------------- /src/conf.moon: -------------------------------------------------------------------------------- 1 | love.conf=(t)-> 2 | t.author="Pedro Medeiros de Almeida (@saint11) - MiniBoss" 3 | t.url="http://studiominiboss.com" 4 | 5 | t.identity = "" -- The name of the save directory (string) 6 | t.version = "11.1" -- The LÖVE version this game was made for (string) 7 | t.console = false -- Attach a console (boolean, Windows only) 8 | 9 | t.window.title = "" -- The window title (string) 10 | t.window.resizable = true -- Let the window be user-resizable (boolean) 11 | t.window.minwidth = 380 -- Minimum window width if the window is resizable (number) 12 | t.window.minheight = 240 -- Minimum window height if the window is resizable (number) 13 | t.window.fullscreen = false -- Enable fullscreen (boolean) 14 | t.window.fullscreentype = "desktop" -- Choose between "normal" fullscreen or "desktop" fullscreen mode (string) 15 | t.window.vsync = true -- Enable vertical sync (boolean) 16 | 17 | -------------------------------------------------------------------------------- /src/data/global.moon: -------------------------------------------------------------------------------- 1 | { 2 | -- You can include any other data variables in here like this: {variable} 3 | 4 | -- Game properties 5 | esc_closes: false 6 | show_scene_name: true 7 | 8 | -- Text 9 | game_name: "Game Tittle" 10 | author: "Pedro Medeiros" 11 | 12 | 13 | -- main menu 14 | title: "{game_name}" 15 | new_game: "New Game" 16 | credits: "Credits" 17 | exit: "Exit" 18 | 19 | footnote: "A game by {author}" 20 | 21 | -- game 22 | paused: "PAUSED" 23 | } -------------------------------------------------------------------------------- /src/main.moon: -------------------------------------------------------------------------------- 1 | -- You need this for live console update in Sublime Text 2 | io.stdout\setvbuf("no") 3 | 4 | love.load=()-> 5 | -- external libs 6 | export lume = require "lib/lume" 7 | 8 | -- Game data 9 | export data = {} 10 | data.global = require "/data/global" 11 | 12 | require "util" 13 | 14 | -- Engine Systems 15 | require "systems/scene" 16 | require "systems/entity" 17 | 18 | -- Game Scenes 19 | require "scenes/mainMenu" 20 | require "scenes/gameScene" 21 | require "scenes/pause" 22 | require "scenes/victoryScene" 23 | require "scenes/defeatScene" 24 | 25 | -- Game objects 26 | require "objects/player" 27 | 28 | initLoveShortcuts! 29 | initFonts! 30 | 31 | -- Window size and border 32 | export w_width = 380 33 | export w_height = 240 34 | export s_scale = 2 35 | 36 | -- Colors 37 | export white = {255,255,255,255} 38 | export black = {0,0,0,255} 39 | 40 | --Graphics 41 | export camera={x:0,y:0} 42 | lg.setDefaultFilter("nearest","nearest") 43 | love.window.setMode(w_width*s_scale, w_height*s_scale) 44 | export canvas = love.graphics.newCanvas(w_width, w_height) 45 | canvas\setFilter("nearest","nearest") 46 | 47 | changeSceneTo MainMenuScene() 48 | 49 | love.draw=()-> 50 | pre_draw! 51 | currentScene\draw() 52 | post_draw! 53 | 54 | love.update=(dt)-> 55 | currentScene\update(dt) 56 | if lk.isDown("escape") and data.global.esc_closes 57 | love.event.quit! 58 | 59 | 60 | love.keypressed=(key, scan, isrepeat)=> 61 | currentScene\keypressed(key,scan,isrepeat) 62 | 63 | -- Engine functions: 64 | 65 | export changeSceneTo=(newScene)-> 66 | print "Changing scene to " .. (newScene.__class.__name or "null") 67 | export currentScene = newScene 68 | 69 | export initLoveShortcuts=-> 70 | export lf = love.filesystem 71 | export ls = love.sound 72 | export la = love.audio 73 | export lp = love.physics 74 | export lt = love.thread 75 | export li = love.image 76 | export lg = love.graphics 77 | export lm = love.math 78 | export lk = love.keyboard 79 | 80 | export initFonts=-> 81 | -- You can comment out the fonts you won't use to save up loading time 82 | data.fonts = { 83 | battlenet: lg.newFont("assets/fonts/battlenet.ttf", 16) 84 | born2bsporty: lg.newFont("assets/fonts/born2bsportyv2.ttf", 16) 85 | extrude: lg.newFont("assets/fonts/extrude.ttf", 16) 86 | helvetipixel: lg.newFont("assets/fonts/helvetipixel.ttf", 16) 87 | megaman: lg.newFont("assets/fonts/megaman10.ttf", 16) 88 | min4: lg.newFont("assets/fonts/minimal4.ttf", 16) 89 | min5: lg.newFont("assets/fonts/minimal5.ttf", 16) 90 | monocons: lg.newFont("assets/fonts/monocons.ttf", 8) 91 | pixelfraktur: lg.newFont("assets/fonts/pixelfraktur.ttf", 16) 92 | vcr: lg.newFont("assets/fonts/vcrfont.ttf", 16) 93 | handwriting: lg.newFont("assets/fonts/handwriting.ttf", 24) 94 | } 95 | for k,v in pairs(data.fonts) 96 | v\setFilter("nearest","nearest") 97 | 98 | export pre_draw=-> 99 | lg.setCanvas canvas 100 | lg.setColor black 101 | lg.rectangle("fill", 0, 0, w_width, w_height) 102 | lg.setColor white 103 | 104 | export post_draw=-> 105 | lg.setCanvas! 106 | lg.setColor white 107 | lg.draw canvas, 0, 0, 0, s_scale, s_scale 108 | -------------------------------------------------------------------------------- /src/objects/player.moon: -------------------------------------------------------------------------------- 1 | export class Player extends Entity 2 | new: (x, y)=> 3 | super(x, y) 4 | @speed = 40 5 | 6 | update: (dt)=> 7 | if lk.isDown("left") 8 | @x = math.max(@x- dt*@speed, 0) 9 | 10 | if lk.isDown("right") 11 | @x = math.min(@x + dt*@speed, w_width - 16) 12 | 13 | if lk.isDown("up") 14 | @y = math.max(@y - dt*@speed, 0) 15 | 16 | if lk.isDown("down") 17 | @y = math.min(@y + dt*@speed, w_height - 16) 18 | 19 | draw: ()=> 20 | lg.rectangle "fill", @x, @y, 16, 16 -------------------------------------------------------------------------------- /src/scenes/defeatScene.moon: -------------------------------------------------------------------------------- 1 | export class DefeatScene extends Scene 2 | new: ()=> 3 | @fade_time_max = 1 4 | @fade_time = @fade_time_max 5 | 6 | draw: ()=> 7 | if (data.global.show_scene_name) 8 | lg.setFont(data.fonts.min4) 9 | lg.print "Defeat scene",10,10 10 | 11 | lg.setColor 0,0,0, @fade_time/@fade_time_max 12 | lg.rectangle "fill", 0, 0, w_width, w_height 13 | 14 | update: (dt)=> 15 | @fade_time = math.max(@fade_time - dt, 0) 16 | 17 | keypressed: (key, scan, isrepeat)=> 18 | if lume.any({"space","return","escape"}, (x)->x==key) 19 | changeSceneTo MainMenuScene() 20 | -------------------------------------------------------------------------------- /src/scenes/gameScene.moon: -------------------------------------------------------------------------------- 1 | export class GameScene extends Scene 2 | new: ()=> 3 | @entities = {} 4 | @entities_to_add = {} 5 | @entities_to_remove = {} 6 | 7 | @add(Player(w_width/2 - 8, w_height/2 - 8)) 8 | 9 | draw: ()=> 10 | if (data.global.show_scene_name) 11 | lg.setFont(data.fonts.min4) 12 | lg.print "Game scene",10,10 13 | 14 | for i,e in ipairs(@entities) 15 | e\draw(dt) 16 | 17 | update: (dt)=> 18 | -- add entities 19 | for i,e in ipairs(@entities_to_add) 20 | lume.push(@entities, e) 21 | 22 | -- run update loop 23 | for i,e in ipairs(@entities) 24 | e\update(dt) 25 | 26 | -- remove entities 27 | for i,e in ipairs(@entities_to_remove) 28 | lume.remove(@entities, e) 29 | 30 | @entities_to_add = {} 31 | @entities_to_remove = {} 32 | 33 | keypressed: (key, scan, isrepeat)=> 34 | -- Pause 35 | if key=="p" 36 | changeSceneTo PauseScene(self) 37 | 38 | if key=="v" 39 | changeSceneTo VictoryScene() 40 | if key=="d" 41 | changeSceneTo DefeatScene() 42 | 43 | add: (e)=> 44 | lume.push(@entities_to_add, e) 45 | e.scene = self 46 | 47 | remove: (e)=> 48 | lume.push(@entities_to_remove, e) -------------------------------------------------------------------------------- /src/scenes/mainMenu.moon: -------------------------------------------------------------------------------- 1 | export class MainMenuScene extends Scene 2 | new: ()=> 3 | @createOptions { 4 | { 5 | text:getText("new_game") 6 | y:100 7 | action:=> 8 | changeSceneTo GameScene() 9 | }, 10 | { 11 | text:getText("exit") 12 | y:114 13 | action:=> 14 | love.event.quit! 15 | }, 16 | } 17 | 18 | draw: ()=> 19 | lg.setColor white 20 | lg.setFont(data.fonts.extrude) 21 | 22 | lg.printf getText("title"),0, 50, w_width/2, "center", 0, 2, 2 23 | 24 | lg.setFont(data.fonts.battlenet) 25 | for i,option in ipairs(@options) 26 | if i==@current 27 | lg.setColor(1,1,1,0.1) 28 | lg.rectangle("fill", 0, option.y + 2, w_width, 12) 29 | 30 | lg.setColor white 31 | lg.printf option.text,0, option.y, w_width, "center" 32 | 33 | lg.setFont(data.fonts.min5) 34 | lg.printf getText("footnote"),0, w_height - 20, w_width, "center" 35 | 36 | update: (dt)=> 37 | -- Nothing yet 38 | 39 | keypressed: (key, scan, isrepeat)=> 40 | if (key=="down") 41 | @current = math.min(@current + 1, #@options) 42 | 43 | if (key=="up") 44 | @current = math.max(@current - 1, 1) 45 | 46 | if (key=="return" or key=="space") 47 | if @options[@current].action != nil 48 | @options[@current].action! 49 | 50 | createOptions:(options)=> 51 | @options = options 52 | @current = 1 -------------------------------------------------------------------------------- /src/scenes/pause.moon: -------------------------------------------------------------------------------- 1 | export class PauseScene extends Scene 2 | new: (real_scene)=> 3 | @real_scene = real_scene 4 | @fade_time_max = 0.5 5 | @fade_time = @fade_time_max 6 | 7 | draw: ()=> 8 | lg.setFont(data.fonts.vcr) 9 | 10 | @real_scene\draw() 11 | 12 | lg.setColor 0,0,0, (1 - @fade_time/@fade_time_max)*.5 13 | lg.rectangle "fill", 0, 0, w_width, w_height 14 | 15 | lg.setColor white 16 | lg.setFont(data.fonts.vcr) 17 | lg.printf getText("paused"),0, w_height/2, w_width, "center", 0 18 | 19 | update: (dt)=> 20 | @fade_time = math.max(@fade_time - dt, 0) 21 | 22 | keypressed: (key, scan, isrepeat)=> 23 | if lume.any({"p", "space","return","escape"}, (x)->x==key) and not isrepeat 24 | changeSceneTo @real_scene 25 | -------------------------------------------------------------------------------- /src/scenes/victoryScene.moon: -------------------------------------------------------------------------------- 1 | export class VictoryScene extends Scene 2 | new: ()=> 3 | @fade_time_max = 1 4 | @fade_time = @fade_time_max 5 | 6 | draw: ()=> 7 | if (data.global.show_scene_name) 8 | lg.setFont(data.fonts.min4) 9 | lg.print "Victory scene",10,10 10 | 11 | lg.setColor 0,0,0, @fade_time/@fade_time_max 12 | lg.rectangle "fill", 0, 0, w_width, w_height 13 | 14 | update: (dt)=> 15 | @fade_time = math.max(@fade_time - dt, 0) 16 | 17 | keypressed: (key, scan, isrepeat)=> 18 | if lume.any({"space","return","escape"}, (x)->x==key) 19 | changeSceneTo MainMenuScene() -------------------------------------------------------------------------------- /src/systems/entity.moon: -------------------------------------------------------------------------------- 1 | export class Entity 2 | new: (x, y)=> 3 | @x = x 4 | @y = y 5 | 6 | update: (dt)=> 7 | 8 | draw: ()=> 9 | 10 | removeSelf:()=> 11 | @scene.remove(self) -------------------------------------------------------------------------------- /src/systems/scene.moon: -------------------------------------------------------------------------------- 1 | export class Scene 2 | new: ()=> 3 | --do something 4 | 5 | draw: ()=> 6 | lg.setFont(data.fonts.min4) 7 | lg.print "EMPTY SCENE",10,10 8 | 9 | update: (dt)=> 10 | --do something 11 | 12 | keypressed: (key, scan, isrepeat)=> 13 | --do something 14 | -------------------------------------------------------------------------------- /src/util.moon: -------------------------------------------------------------------------------- 1 | export getText=(globalKeyEntry)-> 2 | lume.format(data.global[globalKeyEntry],data.global) --------------------------------------------------------------------------------