├── GameObject.lua ├── LICENSE ├── README.md ├── conf.lua ├── globals.lua ├── libraries ├── HC │ ├── HC-0.1-1.rockspec │ ├── README │ ├── class.lua │ ├── docs │ │ ├── Class.rst │ │ ├── MainModule.rst │ │ ├── Makefile │ │ ├── Polygon.rst │ │ ├── Shapes.rst │ │ ├── SpatialHash.rst │ │ ├── Vector.rst │ │ ├── conf.py │ │ ├── index.rst │ │ ├── license.rst │ │ ├── reference.rst │ │ └── tutorial.rst │ ├── gjk.lua │ ├── init.lua │ ├── polygon.lua │ ├── shapes.lua │ ├── spatialhash.lua │ └── vector-light.lua ├── ProFi.lua ├── STALKER-X │ └── Camera.lua ├── binser │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE.md │ ├── README.md │ ├── binser-scm-0.rockspec │ ├── binser.lua │ ├── rockspecs │ │ ├── binser-0.0-1.rockspec │ │ ├── binser-0.0-2.rockspec │ │ ├── binser-0.0-3.rockspec │ │ ├── binser-0.0-4.rockspec │ │ ├── binser-0.0-5.rockspec │ │ └── binser-0.0-6.rockspec │ └── spec │ │ └── binser_spec.lua ├── bitser │ ├── .travis.yml │ ├── README.md │ ├── USAGE.md │ ├── bitser.lua │ ├── cases │ │ ├── _new.lua │ │ ├── bigtable.lua │ │ ├── cthulhu.lua │ │ ├── intkeys.lua │ │ └── shared_table.lua │ ├── conf.lua │ ├── main.lua │ └── spec │ │ └── bitser_spec.lua ├── boipushy │ └── Input.lua ├── chrono │ └── Timer.lua ├── classic │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ └── classic.lua ├── draft │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── draft.lua │ ├── example_linker.lua │ └── main.lua ├── enhanced_timer │ └── EnhancedTimer.lua ├── grid │ └── grid.lua ├── hump │ ├── README.md │ ├── camera.lua │ ├── class.lua │ ├── docs │ │ ├── Makefile │ │ ├── _static │ │ │ ├── graph-tweens.js │ │ │ ├── in-out-interpolators.png │ │ │ ├── interpolators.png │ │ │ ├── inv-interpolators.png │ │ │ ├── vector-cross.png │ │ │ ├── vector-mirrorOn.png │ │ │ ├── vector-perpendicular.png │ │ │ ├── vector-projectOn.png │ │ │ └── vector-rotated.png │ │ ├── camera.rst │ │ ├── class.rst │ │ ├── conf.py │ │ ├── gamestate.rst │ │ ├── index.rst │ │ ├── license.rst │ │ ├── signal.rst │ │ ├── timer.rst │ │ ├── vector-light.rst │ │ └── vector.rst │ ├── gamestate.lua │ ├── signal.lua │ ├── spec │ │ └── timer_spec.lua │ ├── timer.lua │ ├── vector-light.lua │ └── vector.lua ├── mlib │ ├── Changes.txt │ ├── LICENSE.md │ ├── README.md │ └── mlib.lua ├── moses │ ├── .gitignore │ ├── .travis.yml │ ├── .travis │ │ ├── platform.sh │ │ ├── setenv_lua.sh │ │ └── setup_lua.sh │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── doc │ │ ├── index.html │ │ ├── topics │ │ │ └── tutorial.md.html │ │ └── tutorial.md │ ├── moses.lua │ ├── moses_min.lua │ ├── rockspec │ │ ├── moses-1.3-0.rockspec │ │ ├── moses-1.3-1.rockspec │ │ ├── moses-1.3.1-1.rockspec │ │ ├── moses-1.3.2-1.rockspec │ │ ├── moses-1.3.2.1-1.rockspec │ │ ├── moses-1.4.0-1.rockspec │ │ ├── moses-1.5.0-1.rockspec │ │ ├── moses-1.5.1-1.rockspec │ │ └── moses-1.6.0-1.rockspec │ └── spec │ │ ├── array_spec.lua │ │ ├── chaining_spec.lua │ │ ├── func_spec.lua │ │ ├── import_spec.lua │ │ ├── object_spec.lua │ │ └── table_spec.lua ├── profile.lua ├── ripple │ ├── .gitattributes │ ├── .gitignore │ ├── readme.md │ └── ripple.lua ├── ser │ ├── LICENSE.md │ ├── README.md │ ├── bigtest.lua │ ├── ser.lua │ └── tests.lua ├── sound.lua ├── steamworks.lua ├── utf8.lua └── windfield │ ├── init.lua │ └── mlib │ ├── Changes.txt │ ├── LICENSE.md │ ├── README.md │ └── mlib.lua ├── love ├── OpenAL32.dll ├── SDL2.dll ├── changes.txt ├── game.ico ├── license.txt ├── love.dll ├── love.exe ├── love.ico ├── lovec.exe ├── lua51.dll ├── moonscript.dll ├── mpg123.dll ├── msvcp120.dll ├── msvcr120.dll ├── readme.txt ├── steam_api.dll ├── steam_api64.dll └── steam_appid.txt ├── main.lua ├── objects ├── Ammo.lua ├── Area.lua ├── Attack.lua ├── Boost.lua ├── ConsoleInputLine.lua ├── ConsoleLine.lua ├── Drone.lua ├── EnemyProjectile.lua ├── Explosion.lua ├── HP.lua ├── HasteArea.lua ├── InfoText.lua ├── Item.lua ├── Key.lua ├── Line.lua ├── Node.lua ├── Paused.lua ├── Player.lua ├── Projectile.lua ├── ScoreScreen.lua ├── Shake.lua ├── SkillPoint.lua ├── Stat.lua ├── Tutorial.lua ├── effects │ ├── AmmoEffect.lua │ ├── AttackEffect.lua │ ├── BoostEffect.lua │ ├── CycleEffect.lua │ ├── EnemyDeathEffect.lua │ ├── ExplodeParticles.lua │ ├── GlitchBlockDisplacement.lua │ ├── GlitchDisplacement.lua │ ├── GlitchDisplacementC.lua │ ├── GlitherShootEffect.lua │ ├── LaserLine.lua │ ├── LightningLine.lua │ ├── PreAttackEffect.lua │ ├── ProjectileDeathEffect.lua │ ├── ProjectileTrails.lua │ ├── RGBShift.lua │ ├── ShapeEffect.lua │ ├── ShapeEffect2.lua │ ├── ShockwaveDisplacement.lua │ ├── ShootEffect.lua │ ├── TargetParticle.lua │ ├── TrailParticle.lua │ ├── TrailParticles.lua │ ├── TrailerShootEffect.lua │ └── WaverPreAttackEffect.lua ├── enemies │ ├── BigRock.lua │ ├── Glitcher.lua │ ├── Orbitter.lua │ ├── Reflecteer.lua │ ├── Rock.lua │ ├── Roller.lua │ ├── RollerPool.lua │ ├── Rotator.lua │ ├── RotatorPart.lua │ ├── Sapper.lua │ ├── Seeker.lua │ ├── Shooter.lua │ ├── Tanker.lua │ ├── Trailer.lua │ ├── Triad.lua │ └── Waver.lua └── modules │ ├── AboutModule.lua │ ├── ClearModule.lua │ ├── CreditsModule.lua │ ├── DeviceModule.lua │ ├── DisplayModule.lua │ ├── EffectsModule.lua │ ├── EscapeModule.lua │ ├── FullscreenModule.lua │ ├── HelpModule.lua │ ├── ResolutionModule.lua │ ├── ShutdownModule.lua │ └── SoundModule.lua ├── resources ├── fonts │ ├── Anonymous.ttf │ ├── Arch.ttf │ └── m5x7.ttf ├── graphics │ └── shockwave_displacement.png ├── shaders │ ├── combine.frag │ ├── displacement.frag │ ├── distort.frag │ ├── flat_color.frag │ ├── glitch.frag │ ├── grayscale.frag │ ├── rgb.frag │ └── rgb_shift.frag └── sounds │ ├── AIRGLOW - AIRGLOW - Memory Bank - 01 Memory Bank.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 02 Cepheid Disk.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 03 Electrifying Landscape.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 04 Blueshift.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 05 Far Apart.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 06 Lisa.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 07 New Touch.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 08 Spliff & Wesson.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 09 Innermission.ogg │ ├── AIRGLOW - AIRGLOW - Memory Bank - 10 System Shutdown.ogg │ ├── computer_background.ogg │ ├── computer_beep.ogg │ ├── computer_line.ogg │ ├── computer_startup.ogg │ ├── game_ammo.ogg │ ├── game_enemy_die.ogg │ ├── game_enemy_hit.ogg │ ├── game_engine.ogg │ ├── game_explosion.ogg │ ├── game_flame.ogg │ ├── game_hurt_1.ogg │ ├── game_hurt_2.ogg │ ├── game_hurt_3.ogg │ ├── game_hurt_small.ogg │ ├── game_item.ogg │ ├── game_key.ogg │ ├── game_laser.ogg │ ├── game_lightning_1.ogg │ ├── game_lightning_2.ogg │ ├── game_lightning_3.ogg │ ├── game_lightning_4.ogg │ ├── game_lightning_5.ogg │ ├── game_shoot_1.ogg │ ├── game_shoot_2.ogg │ ├── game_shoot_3.ogg │ ├── keystroke.ogg │ ├── keystroke_1.ogg │ ├── keystroke_10.ogg │ ├── keystroke_11.ogg │ ├── keystroke_12.ogg │ ├── keystroke_13.ogg │ ├── keystroke_14.ogg │ ├── keystroke_15.ogg │ ├── keystroke_16.ogg │ ├── keystroke_17.ogg │ ├── keystroke_18.ogg │ ├── keystroke_19.ogg │ ├── keystroke_2.ogg │ ├── keystroke_20.ogg │ ├── keystroke_21.ogg │ ├── keystroke_22.ogg │ ├── keystroke_23.ogg │ ├── keystroke_24.ogg │ ├── keystroke_25.ogg │ ├── keystroke_26.ogg │ ├── keystroke_27.ogg │ ├── keystroke_28.ogg │ ├── keystroke_3.ogg │ ├── keystroke_4.ogg │ ├── keystroke_5.ogg │ ├── keystroke_6.ogg │ ├── keystroke_7.ogg │ ├── keystroke_8.ogg │ ├── keystroke_9.ogg │ ├── menu_back.ogg │ ├── menu_click.ogg │ ├── menu_error.ogg │ ├── menu_select.ogg │ └── menu_switch.ogg ├── rooms ├── AchievementScreenshots.lua ├── Achievements.lua ├── Classes.lua ├── Console.lua ├── Director.lua ├── SkillTree.lua └── Stage.lua ├── tree.lua ├── tutorial ├── README.md ├── answers │ ├── 01 - Game Loop Answers.html │ ├── 02 - Libraries Answers.html │ ├── 03 - Rooms and Areas Answers.html │ ├── 04 - Exercises Answers.html │ ├── 05 - Game Basics Answers.html │ ├── 06 - Player Basics Answers.html │ ├── 07 - Player Stats and Attacks Answers.html │ ├── 08 - Enemies Answers.html │ └── 09 - Director and Gameplay Loop Answers.html └── tutorial-code │ ├── 01 - Game Loop │ └── main.lua │ ├── 02 - Libraries │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ └── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ ├── platform.sh │ │ │ ├── setenv_lua.sh │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ ├── index.html │ │ │ ├── topics │ │ │ │ └── tutorial.md.html │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ ├── moses-1.3-0.rockspec │ │ │ ├── moses-1.3-1.rockspec │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ ├── array_spec.lua │ │ │ ├── chaining_spec.lua │ │ │ ├── func_spec.lua │ │ │ ├── import_spec.lua │ │ │ ├── object_spec.lua │ │ │ └── table_spec.lua │ └── main.lua │ ├── 03 - Rooms and Areas │ ├── GameObject.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ └── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ ├── platform.sh │ │ │ ├── setenv_lua.sh │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ ├── index.html │ │ │ ├── topics │ │ │ │ └── tutorial.md.html │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ ├── moses-1.3-0.rockspec │ │ │ ├── moses-1.3-1.rockspec │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ ├── array_spec.lua │ │ │ ├── chaining_spec.lua │ │ │ ├── func_spec.lua │ │ │ ├── import_spec.lua │ │ │ ├── object_spec.lua │ │ │ └── table_spec.lua │ ├── main.lua │ ├── rooms │ │ ├── Area.lua │ │ └── Stage.lua │ └── utils.lua │ ├── 05 - Game Basics │ ├── GameObject.lua │ ├── conf.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Area.lua │ │ ├── Player.lua │ │ └── Shake.lua │ ├── rooms │ │ └── Stage.lua │ └── utils.lua │ ├── 06 - Player Basics │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Area.lua │ │ ├── ExplodeParticle.lua │ │ ├── Player.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── TickEffect.lua │ │ └── TrailParticle.lua │ ├── rooms │ │ └── Stage.lua │ └── utils.lua │ ├── 07 - Player Stats and Attacks │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── ExplodeParticle.lua │ │ ├── InfoText.lua │ │ ├── Player.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── TickEffect.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ └── Stage.lua │ └── utils.lua │ ├── 08 - Enemies │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── InfoText.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── TargetParticle.lua │ │ ├── TickEffect.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ └── Stage.lua │ └── utils.lua │ ├── 09 - Director and Gameplay Loop │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── InfoText.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── TargetParticle.lua │ │ ├── TickEffect.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Director.lua │ │ └── Stage.lua │ └── utils.lua │ ├── 10 - Coding Practices │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Attack.lua │ │ ├── AttackEffect.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── InfoText.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── SkillPoint.lua │ │ ├── TargetParticle.lua │ │ ├── TickEffect.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Director.lua │ │ └── Stage.lua │ └── utils.lua │ ├── 11 - Passives │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Attack.lua │ │ ├── AttackEffect.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── CycleEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── HasteArea.lua │ │ ├── InfoText.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── SkillPoint.lua │ │ ├── Stat.lua │ │ ├── TargetParticle.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Director.lua │ │ └── Stage.lua │ └── utils.lua │ ├── 12 - More Passives │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Attack.lua │ │ ├── AttackEffect.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── CycleEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── HasteArea.lua │ │ ├── InfoText.lua │ │ ├── LightningLine.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── ProjectileTrail.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── SkillPoint.lua │ │ ├── Stat.lua │ │ ├── TargetParticle.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Director.lua │ │ └── Stage.lua │ └── utils.lua │ ├── 13 - Skill Tree │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Attack.lua │ │ ├── AttackEffect.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── CycleEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── HasteArea.lua │ │ ├── InfoText.lua │ │ ├── LightningLine.lua │ │ ├── Line.lua │ │ ├── Node.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── ProjectileTrail.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── SkillPoint.lua │ │ ├── Stat.lua │ │ ├── TargetParticle.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Director.lua │ │ ├── SkillTree.lua │ │ └── Stage.lua │ ├── tree.lua │ └── utils.lua │ ├── 14 - Console │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ │ ├── boipushy │ │ │ └── Input.lua │ │ ├── classic │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── classic.lua │ │ ├── draft │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── draft.lua │ │ │ ├── example_linker.lua │ │ │ └── main.lua │ │ ├── enhanced_timer │ │ │ └── EnhancedTimer.lua │ │ ├── hump │ │ │ ├── README.md │ │ │ ├── camera.lua │ │ │ ├── class.lua │ │ │ ├── docs │ │ │ │ ├── Makefile │ │ │ │ ├── _static │ │ │ │ │ ├── graph-tweens.js │ │ │ │ │ ├── in-out-interpolators.png │ │ │ │ │ ├── interpolators.png │ │ │ │ │ ├── inv-interpolators.png │ │ │ │ │ ├── vector-cross.png │ │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ │ ├── vector-perpendicular.png │ │ │ │ │ ├── vector-projectOn.png │ │ │ │ │ └── vector-rotated.png │ │ │ │ ├── camera.rst │ │ │ │ ├── class.rst │ │ │ │ ├── conf.py │ │ │ │ ├── gamestate.rst │ │ │ │ ├── index.rst │ │ │ │ ├── license.rst │ │ │ │ ├── signal.rst │ │ │ │ ├── timer.rst │ │ │ │ ├── vector-light.rst │ │ │ │ └── vector.rst │ │ │ ├── gamestate.lua │ │ │ ├── signal.lua │ │ │ ├── spec │ │ │ │ └── timer_spec.lua │ │ │ ├── timer.lua │ │ │ ├── vector-light.lua │ │ │ └── vector.lua │ │ ├── moses │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── .travis │ │ │ │ ├── platform.sh │ │ │ │ ├── setenv_lua.sh │ │ │ │ └── setup_lua.sh │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── index.html │ │ │ │ ├── topics │ │ │ │ │ └── tutorial.md.html │ │ │ │ └── tutorial.md │ │ │ ├── moses.lua │ │ │ ├── moses_min.lua │ │ │ ├── rockspec │ │ │ │ ├── moses-1.3-0.rockspec │ │ │ │ ├── moses-1.3-1.rockspec │ │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ │ └── moses-1.6.0-1.rockspec │ │ │ └── spec │ │ │ │ ├── array_spec.lua │ │ │ │ ├── chaining_spec.lua │ │ │ │ ├── func_spec.lua │ │ │ │ ├── import_spec.lua │ │ │ │ ├── object_spec.lua │ │ │ │ └── table_spec.lua │ │ ├── utf8.lua │ │ └── windfield │ │ │ ├── init.lua │ │ │ └── mlib │ │ │ ├── Changes.txt │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ │ ├── Ammo.lua │ │ ├── AmmoEffect.lua │ │ ├── Area.lua │ │ ├── Attack.lua │ │ ├── AttackEffect.lua │ │ ├── Boost.lua │ │ ├── BoostEffect.lua │ │ ├── CycleEffect.lua │ │ ├── EnemyDeathEffect.lua │ │ ├── EnemyProjectile.lua │ │ ├── ExplodeParticle.lua │ │ ├── HasteArea.lua │ │ ├── InfoText.lua │ │ ├── LightningLine.lua │ │ ├── Line.lua │ │ ├── Node.lua │ │ ├── Player.lua │ │ ├── PreAttackEffect.lua │ │ ├── Projectile.lua │ │ ├── ProjectileDeathEffect.lua │ │ ├── ProjectileTrail.lua │ │ ├── ResolutionModule.lua │ │ ├── Rock.lua │ │ ├── Shake.lua │ │ ├── ShootEffect.lua │ │ ├── Shooter.lua │ │ ├── SkillPoint.lua │ │ ├── Stat.lua │ │ ├── TargetParticle.lua │ │ └── TrailParticle.lua │ ├── resources │ │ └── fonts │ │ │ ├── Anonymous.ttf │ │ │ └── m5x7.ttf │ ├── rooms │ │ ├── Console.lua │ │ ├── Director.lua │ │ ├── SkillTree.lua │ │ └── Stage.lua │ ├── tree.lua │ └── utils.lua │ └── 15 - Final │ ├── GameObject.lua │ ├── conf.lua │ ├── globals.lua │ ├── libraries │ ├── bitser │ │ ├── .travis.yml │ │ ├── README.md │ │ ├── USAGE.md │ │ ├── bitser.lua │ │ ├── cases │ │ │ ├── _new.lua │ │ │ ├── bigtable.lua │ │ │ ├── cthulhu.lua │ │ │ ├── intkeys.lua │ │ │ └── shared_table.lua │ │ ├── conf.lua │ │ ├── main.lua │ │ └── spec │ │ │ └── bitser_spec.lua │ ├── boipushy │ │ └── Input.lua │ ├── classic │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── classic.lua │ ├── draft │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── draft.lua │ │ ├── example_linker.lua │ │ └── main.lua │ ├── enhanced_timer │ │ └── EnhancedTimer.lua │ ├── hump │ │ ├── README.md │ │ ├── camera.lua │ │ ├── class.lua │ │ ├── docs │ │ │ ├── Makefile │ │ │ ├── _static │ │ │ │ ├── graph-tweens.js │ │ │ │ ├── in-out-interpolators.png │ │ │ │ ├── interpolators.png │ │ │ │ ├── inv-interpolators.png │ │ │ │ ├── vector-cross.png │ │ │ │ ├── vector-mirrorOn.png │ │ │ │ ├── vector-perpendicular.png │ │ │ │ ├── vector-projectOn.png │ │ │ │ └── vector-rotated.png │ │ │ ├── camera.rst │ │ │ ├── class.rst │ │ │ ├── conf.py │ │ │ ├── gamestate.rst │ │ │ ├── index.rst │ │ │ ├── license.rst │ │ │ ├── signal.rst │ │ │ ├── timer.rst │ │ │ ├── vector-light.rst │ │ │ └── vector.rst │ │ ├── gamestate.lua │ │ ├── signal.lua │ │ ├── spec │ │ │ └── timer_spec.lua │ │ ├── timer.lua │ │ ├── vector-light.lua │ │ └── vector.lua │ ├── moses │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── .travis │ │ │ ├── platform.sh │ │ │ ├── setenv_lua.sh │ │ │ └── setup_lua.sh │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc │ │ │ ├── index.html │ │ │ ├── topics │ │ │ │ └── tutorial.md.html │ │ │ └── tutorial.md │ │ ├── moses.lua │ │ ├── moses_min.lua │ │ ├── rockspec │ │ │ ├── moses-1.3-0.rockspec │ │ │ ├── moses-1.3-1.rockspec │ │ │ ├── moses-1.3.1-1.rockspec │ │ │ ├── moses-1.3.2-1.rockspec │ │ │ ├── moses-1.3.2.1-1.rockspec │ │ │ ├── moses-1.4.0-1.rockspec │ │ │ ├── moses-1.5.0-1.rockspec │ │ │ ├── moses-1.5.1-1.rockspec │ │ │ └── moses-1.6.0-1.rockspec │ │ └── spec │ │ │ ├── array_spec.lua │ │ │ ├── chaining_spec.lua │ │ │ ├── func_spec.lua │ │ │ ├── import_spec.lua │ │ │ ├── object_spec.lua │ │ │ └── table_spec.lua │ ├── utf8.lua │ └── windfield │ │ ├── init.lua │ │ └── mlib │ │ ├── Changes.txt │ │ ├── LICENSE.md │ │ ├── README.md │ │ └── mlib.lua │ ├── main.lua │ ├── objects │ ├── Ammo.lua │ ├── AmmoEffect.lua │ ├── Area.lua │ ├── Attack.lua │ ├── AttackEffect.lua │ ├── Boost.lua │ ├── BoostEffect.lua │ ├── CycleEffect.lua │ ├── EnemyDeathEffect.lua │ ├── EnemyProjectile.lua │ ├── ExplodeParticle.lua │ ├── HasteArea.lua │ ├── InfoText.lua │ ├── LightningLine.lua │ ├── Line.lua │ ├── Node.lua │ ├── Player.lua │ ├── PreAttackEffect.lua │ ├── Projectile.lua │ ├── ProjectileDeathEffect.lua │ ├── ProjectileTrail.lua │ ├── ResolutionModule.lua │ ├── Rock.lua │ ├── Shake.lua │ ├── ShootEffect.lua │ ├── Shooter.lua │ ├── SkillPoint.lua │ ├── Stat.lua │ ├── TargetParticle.lua │ └── TrailParticle.lua │ ├── resources │ ├── fonts │ │ ├── Anonymous.ttf │ │ └── m5x7.ttf │ └── shaders │ │ └── rgb_shift.frag │ ├── rooms │ ├── Console.lua │ ├── Director.lua │ ├── SkillTree.lua │ └── Stage.lua │ ├── tree.lua │ └── utils.lua └── utils.lua /libraries/HC/HC-0.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "HC" 2 | version = "0.1-1" 3 | source = { 4 | url = "git://github.com/vrld/HC.git" 5 | } 6 | description = {"General purpose 2D collision detection in pure Lua"} 7 | dependencies = { 8 | "lua = 5.1" 9 | } 10 | build = { 11 | type = "builtin", 12 | modules = { 13 | ["hardoncollider"] = "init.lua", 14 | ["hardoncollider.class"] = "class.lua", 15 | ["hardoncollider.gjk"] = "gjk.lua", 16 | ["hardoncollider.polygon"] = "polygon.lua", 17 | ["hardoncollider.shapes"] = "shapes.lua", 18 | ["hardoncollider.spatialhash"] = "spatialhash.lua", 19 | ["hardoncollider.vector-light"] = "vector-light.lua", 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libraries/HC/README: -------------------------------------------------------------------------------- 1 | General Purpose 2D Collision Detection System 2 | 3 | Documentation and examples here: 4 | http://hc.readthedocs.org/ 5 | -------------------------------------------------------------------------------- /libraries/HC/docs/Class.rst: -------------------------------------------------------------------------------- 1 | HC.class 2 | ======== 3 | 4 | :: 5 | 6 | class = require 'HC.class' 7 | 8 | See ``hump.class``. 9 | -------------------------------------------------------------------------------- /libraries/HC/docs/Vector.rst: -------------------------------------------------------------------------------- 1 | HC.vector 2 | ========= 3 | 4 | :: 5 | 6 | vector = require 'HC.vector' 7 | 8 | See ``hump.vector_light``. 9 | -------------------------------------------------------------------------------- /libraries/HC/docs/reference.rst: -------------------------------------------------------------------------------- 1 | Reference 2 | ========= 3 | 4 | HC is composed of several parts. Most of the time, you will only have to deal 5 | with the main module and the `Shapes` sub-module, but the other modules are 6 | at your disposal if you need them. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | HC 12 | HC.shapes 13 | HC.polygon 14 | HC.spatialhash 15 | HC.vector 16 | HC.class 17 | -------------------------------------------------------------------------------- /libraries/HC/docs/tutorial.rst: -------------------------------------------------------------------------------- 1 | Tutorial 2 | ======== 3 | 4 | To be rewritten. 5 | -------------------------------------------------------------------------------- /libraries/binser/.gitignore: -------------------------------------------------------------------------------- 1 | #Ignore generated rocks 2 | *.rock 3 | -------------------------------------------------------------------------------- /libraries/binser/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | sudo: false 4 | 5 | env: 6 | - LUA="lua 5.1" 7 | - LUA="lua 5.2" 8 | - LUA="lua 5.3" 9 | - LUA="luajit 2.0" 10 | - LUA="luajit 2.1" 11 | 12 | before_install: 13 | - pip install hererocks 14 | - hererocks env --$LUA -rlatest 15 | - source env/bin/activate 16 | - luarocks install busted 17 | 18 | script: 19 | - busted 20 | -------------------------------------------------------------------------------- /libraries/binser/binser-scm-0.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "scm-0" 3 | source = { 4 | url = "git://github.com/bakpakin/binser" 5 | } 6 | description = { 7 | summary = "Customizable Lua Serializer", 8 | detailed = [[ 9 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 10 | cycles, metatables, and custom types. 11 | ]], 12 | homepage = "https://github.com/bakpakin/binser", 13 | license = "MIT" 14 | } 15 | dependencies = { 16 | "lua >= 5.1" 17 | } 18 | build = { 19 | type = "builtin", 20 | modules = { 21 | binser = "binser.lua" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-1" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-2" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-3" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-4.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-4" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-5.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-5" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/binser/rockspecs/binser-0.0-6.rockspec: -------------------------------------------------------------------------------- 1 | package = "binser" 2 | version = "0.0-6" 3 | source = { 4 | url = "git://github.com/bakpakin/binser", 5 | tag = version 6 | } 7 | description = { 8 | summary = "Customizable Lua Serializer", 9 | detailed = [[ 10 | Fast Lua serialization for Lua 5.1, Lua 5.2, and LuaJIT that supports 11 | cycles, metatables, and custom types. 12 | ]], 13 | homepage = "https://github.com/bakpakin/binser", 14 | license = "MIT" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | binser = "binser.lua" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/bitser/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | sudo: false 3 | 4 | env: 5 | - LUA="luajit=2.0" 6 | 7 | before_install: 8 | - pip install hererocks 9 | - hererocks lua_install -r^ --$LUA 10 | - export PATH=$PATH:$PWD/lua_install/bin 11 | 12 | install: 13 | - luarocks install luacheck 14 | - luarocks install busted 15 | - luarocks install luacov 16 | - luarocks install luacov-coveralls 17 | - luarocks install middleclass 18 | - wget https://bitbucket.org/bartbes/slither/raw/bbd85db19b19d9d14470b4fa7b73029b6c070fb0/slither.lua 19 | - wget https://raw.githubusercontent.com/vrld/hump/038bc9025f1cb850355f4b073357b087b8122da9/class.lua 20 | 21 | script: 22 | - luacheck --std max+busted bitser.lua spec --globals love 23 | - busted --verbose --coverage 24 | 25 | after_success: 26 | - luacov-coveralls --include bitser -e $TRAVIS_BUILD_DIR/lua_install 27 | -------------------------------------------------------------------------------- /libraries/bitser/cases/_new.lua: -------------------------------------------------------------------------------- 1 | -- write your own! 2 | -- data to be tested, repetitions, number of tries 3 | return {}, 10000, 3 -------------------------------------------------------------------------------- /libraries/bitser/cases/bigtable.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | 3 | for i = 1, 2000 do 4 | t[i] = 100 5 | end 6 | 7 | return t, 500, 5 -------------------------------------------------------------------------------- /libraries/bitser/cases/cthulhu.lua: -------------------------------------------------------------------------------- 1 | local cthulhu = {{}, {}, {}} 2 | cthulhu.fhtagn = cthulhu 3 | cthulhu[1][cthulhu[2]] = cthulhu[3] 4 | cthulhu[2][cthulhu[1]] = cthulhu[2] 5 | cthulhu[3][cthulhu[3]] = cthulhu 6 | 7 | return cthulhu, 10000, 3 -------------------------------------------------------------------------------- /libraries/bitser/cases/intkeys.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | 3 | for i = 1, 200 do 4 | t[math.random(1000)] = math.random(100) 5 | end 6 | 7 | return t, 30000, 5 -------------------------------------------------------------------------------- /libraries/bitser/cases/shared_table.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | local x = {10, 50, 40, 30, 20} 3 | for i = 1, 40 do 4 | t[i] = x 5 | end 6 | return t, 10000, 3 -------------------------------------------------------------------------------- /libraries/bitser/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.version = "0.10.0" 3 | t.console = true 4 | end -------------------------------------------------------------------------------- /libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /libraries/moses/rockspec/moses-1.3-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.3-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.3.0.tar.gz", 5 | dir = "Moses-Moses-1.3.0" 6 | } 7 | description = { 8 | summary = "Utility library for functional programming in Lua", 9 | detailed = [[ 10 | A utility library provinding handy resources for common programming tasks and support for functional 11 | programming. It extends the built-in Lua table library, making easier operations on arrays, lists, 12 | collections and objects, through 85 weird, bizarre and odd functions. 13 | ]], 14 | homepage = "http://yonaba.github.com/Moses/", 15 | license = "MIT " 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | build = { 21 | type = "builtin", 22 | modules = { 23 | moses = "moses.lua" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /libraries/ripple/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /libraries/ripple/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /libraries/ser/bigtest.lua: -------------------------------------------------------------------------------- 1 | local serialize = require 'ser' 2 | 3 | local t = {} 4 | for i = 1, 15 do 5 | t[i] = {} 6 | for j = 1, 10 do 7 | t[i][j] = {{'woo'}} 8 | end 9 | end 10 | local s = serialize(t) 11 | print(s) 12 | loadstring(s)() 13 | -------------------------------------------------------------------------------- /love/OpenAL32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/OpenAL32.dll -------------------------------------------------------------------------------- /love/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/SDL2.dll -------------------------------------------------------------------------------- /love/game.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/game.ico -------------------------------------------------------------------------------- /love/love.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/love.dll -------------------------------------------------------------------------------- /love/love.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/love.exe -------------------------------------------------------------------------------- /love/love.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/love.ico -------------------------------------------------------------------------------- /love/lovec.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/lovec.exe -------------------------------------------------------------------------------- /love/lua51.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/lua51.dll -------------------------------------------------------------------------------- /love/moonscript.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/moonscript.dll -------------------------------------------------------------------------------- /love/mpg123.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/mpg123.dll -------------------------------------------------------------------------------- /love/msvcp120.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/msvcp120.dll -------------------------------------------------------------------------------- /love/msvcr120.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/msvcr120.dll -------------------------------------------------------------------------------- /love/steam_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/steam_api.dll -------------------------------------------------------------------------------- /love/steam_api64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/love/steam_api64.dll -------------------------------------------------------------------------------- /love/steam_appid.txt: -------------------------------------------------------------------------------- 1 | 760330 -------------------------------------------------------------------------------- /objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then self.value = self.base*(1 + self.additive) 15 | else self.value = self.base/(1 - self.additive) end 16 | 17 | self.additive = 0 18 | self.additives = {} 19 | end 20 | 21 | function Stat:increase(percentage) 22 | table.insert(self.additives, percentage*0.01) 23 | end 24 | 25 | function Stat:decrease(percentage) 26 | table.insert(self.additives, -percentage*0.01) 27 | end 28 | -------------------------------------------------------------------------------- /objects/effects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /objects/effects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /objects/effects/GlitchDisplacementC.lua: -------------------------------------------------------------------------------- 1 | GlitchDisplacementC = Object:extend() 2 | 3 | function GlitchDisplacementC:new(x, y, w, h, color) 4 | self.timer = Timer() 5 | self.x, self.y = x, y 6 | self.w, self.h = w, h 7 | self.color = color 8 | self.dead = false 9 | self.timer:after(random(0.05, 0.4), function() self.dead = true end) 10 | end 11 | 12 | function GlitchDisplacementC:update(dt) 13 | self.timer:update(dt) 14 | end 15 | 16 | function GlitchDisplacementC:draw() 17 | love.graphics.setColor(self.color) 18 | love.graphics.rectangle('fill', self.x - self.w/2, self.y - self.h/2, self.w, self.h) 19 | love.graphics.setColor(255, 255, 255, 255) 20 | end 21 | -------------------------------------------------------------------------------- /objects/effects/GlitherShootEffect.lua: -------------------------------------------------------------------------------- 1 | GlitcherShootEffect = GameObject:extend() 2 | 3 | function GlitcherShootEffect:new(area, x, y, opts) 4 | GlitcherShootEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 8 8 | self.timer:tween(0.1, self, {w = 0}, 'in-out-cubic', function() self.dead = true end) 9 | end 10 | 11 | function GlitcherShootEffect:update(dt) 12 | GlitcherShootEffect.super.update(self, dt) 13 | if self.parent then self.x, self.y = self.parent.x + self.dx, self.parent.y + self.dy end 14 | end 15 | 16 | function GlitcherShootEffect:draw() 17 | love.graphics.setColor(default_color) 18 | love.graphics.rectangle('fill', self.x - self.w/2, self.y - self.w/2, self.w, self.w) 19 | end 20 | 21 | function GlitcherShootEffect:destroy() 22 | GlitcherShootEffect.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /objects/effects/ShootEffect.lua: -------------------------------------------------------------------------------- 1 | ShootEffect = GameObject:extend() 2 | 3 | function ShootEffect:new(area, x, y, opts) 4 | ShootEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 8 8 | self.timer:tween(0.1, self, {w = 0}, 'in-out-cubic', function() self.dead = true end) 9 | end 10 | 11 | function ShootEffect:update(dt) 12 | ShootEffect.super.update(self, dt) 13 | if self.parent then self.x, self.y = self.parent.x + self.d*math.cos(self.parent.r), self.parent.y + self.d*math.sin(self.parent.r) end 14 | end 15 | 16 | function ShootEffect:draw() 17 | pushRotate(self.x, self.y, self.parent.r + math.pi/4) 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y - self.w/2, self.w, self.w) 20 | love.graphics.pop() 21 | end 22 | 23 | function ShootEffect:destroy() 24 | ShootEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /objects/effects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /objects/effects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | self.graphics_types = {'rgb_shift'} 7 | 8 | self.r = opts.r or random(4, 6) 9 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 10 | end 11 | 12 | function TrailParticle:update(dt) 13 | TrailParticle.super.update(self, dt) 14 | end 15 | 16 | function TrailParticle:draw() 17 | love.graphics.setColor(self.color) 18 | love.graphics.circle('fill', self.x, self.y, self.r) 19 | love.graphics.setColor(255, 255, 255) 20 | end 21 | 22 | function TrailParticle:destroy() 23 | TrailParticle.super.destroy(self) 24 | end 25 | -------------------------------------------------------------------------------- /resources/fonts/Anonymous.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/fonts/Anonymous.ttf -------------------------------------------------------------------------------- /resources/fonts/Arch.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/fonts/Arch.ttf -------------------------------------------------------------------------------- /resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /resources/graphics/shockwave_displacement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/graphics/shockwave_displacement.png -------------------------------------------------------------------------------- /resources/shaders/combine.frag: -------------------------------------------------------------------------------- 1 | vec4 effect(vec4 vcolor, Image texture, vec2 tc, vec2 pc) { 2 | vec4 tex_color = Texel(texture, tc); 3 | return vec4(vcolor.rgb + tex_color.rgb - 0.5, tex_color.a); 4 | } 5 | -------------------------------------------------------------------------------- /resources/shaders/displacement.frag: -------------------------------------------------------------------------------- 1 | extern Image displacement_map; 2 | 3 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 4 | vec4 displacement_pixel = Texel(displacement_map, tc); 5 | vec2 position = tc; 6 | position.x += (displacement_pixel.r*2.0 - 1.0)*0.025*displacement_pixel.a; 7 | position.y += (displacement_pixel.g*2.0 - 1.0)*0.025*displacement_pixel.a; 8 | return color*Texel(texture, position); 9 | } 10 | -------------------------------------------------------------------------------- /resources/shaders/flat_color.frag: -------------------------------------------------------------------------------- 1 | extern vec4 out_color; 2 | vec4 effect(vec4 vcolor, Image texture, vec2 tc, vec2 pc) { 3 | vec4 t = Texel(texture, tc); 4 | return vec4(out_color.rgb, t.a*out_color.a); 5 | } 6 | -------------------------------------------------------------------------------- /resources/shaders/glitch.frag: -------------------------------------------------------------------------------- 1 | extern Image glitch_map; 2 | 3 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 4 | vec4 glitch_pixel = Texel(glitch_map, tc); 5 | vec2 position = tc; 6 | position.x += (glitch_pixel.r*2.0 - 1.0); 7 | return color*Texel(texture, position); 8 | } 9 | -------------------------------------------------------------------------------- /resources/shaders/grayscale.frag: -------------------------------------------------------------------------------- 1 | extern float grayscale_amount = 0.0; 2 | 3 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 4 | vec4 current_pixel = Texel(texture, tc); 5 | float luminance = 0.299*current_pixel.r + 0.587*current_pixel.g + 0.114*current_pixel.b; 6 | vec4 monochrome = vec4(luminance, luminance, luminance, current_pixel.a); 7 | return mix(current_pixel, monochrome, grayscale_amount); 8 | } 9 | -------------------------------------------------------------------------------- /resources/shaders/rgb.frag: -------------------------------------------------------------------------------- 1 | extern Image rgb_map; 2 | 3 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 4 | vec4 shift_pixel = Texel(rgb_map, tc); 5 | vec2 rp = tc; 6 | rp.x -= (shift_pixel.r*2.0 - 1.0); 7 | vec2 bp = tc; 8 | bp.x += (shift_pixel.r*2.0 - 1.0); 9 | return color*vec4(Texel(texture, rp).r, Texel(texture, tc).g, Texel(texture, bp).b, Texel(texture, tc).a); 10 | } 11 | -------------------------------------------------------------------------------- /resources/shaders/rgb_shift.frag: -------------------------------------------------------------------------------- 1 | extern vec2 amount; 2 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 3 | return color*vec4(Texel(texture, tc - amount).r, Texel(texture, tc).g, Texel(texture, tc + amount).b, Texel(texture, tc).a); 4 | } 5 | 6 | -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 01 Memory Bank.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 01 Memory Bank.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 02 Cepheid Disk.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 02 Cepheid Disk.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 03 Electrifying Landscape.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 03 Electrifying Landscape.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 04 Blueshift.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 04 Blueshift.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 05 Far Apart.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 05 Far Apart.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 06 Lisa.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 06 Lisa.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 07 New Touch.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 07 New Touch.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 08 Spliff & Wesson.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 08 Spliff & Wesson.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 09 Innermission.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 09 Innermission.ogg -------------------------------------------------------------------------------- /resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 10 System Shutdown.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/AIRGLOW - AIRGLOW - Memory Bank - 10 System Shutdown.ogg -------------------------------------------------------------------------------- /resources/sounds/computer_background.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/computer_background.ogg -------------------------------------------------------------------------------- /resources/sounds/computer_beep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/computer_beep.ogg -------------------------------------------------------------------------------- /resources/sounds/computer_line.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/computer_line.ogg -------------------------------------------------------------------------------- /resources/sounds/computer_startup.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/computer_startup.ogg -------------------------------------------------------------------------------- /resources/sounds/game_ammo.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_ammo.ogg -------------------------------------------------------------------------------- /resources/sounds/game_enemy_die.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_enemy_die.ogg -------------------------------------------------------------------------------- /resources/sounds/game_enemy_hit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_enemy_hit.ogg -------------------------------------------------------------------------------- /resources/sounds/game_engine.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_engine.ogg -------------------------------------------------------------------------------- /resources/sounds/game_explosion.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_explosion.ogg -------------------------------------------------------------------------------- /resources/sounds/game_flame.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_flame.ogg -------------------------------------------------------------------------------- /resources/sounds/game_hurt_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_hurt_1.ogg -------------------------------------------------------------------------------- /resources/sounds/game_hurt_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_hurt_2.ogg -------------------------------------------------------------------------------- /resources/sounds/game_hurt_3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_hurt_3.ogg -------------------------------------------------------------------------------- /resources/sounds/game_hurt_small.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_hurt_small.ogg -------------------------------------------------------------------------------- /resources/sounds/game_item.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_item.ogg -------------------------------------------------------------------------------- /resources/sounds/game_key.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_key.ogg -------------------------------------------------------------------------------- /resources/sounds/game_laser.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_laser.ogg -------------------------------------------------------------------------------- /resources/sounds/game_lightning_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_lightning_1.ogg -------------------------------------------------------------------------------- /resources/sounds/game_lightning_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_lightning_2.ogg -------------------------------------------------------------------------------- /resources/sounds/game_lightning_3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_lightning_3.ogg -------------------------------------------------------------------------------- /resources/sounds/game_lightning_4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_lightning_4.ogg -------------------------------------------------------------------------------- /resources/sounds/game_lightning_5.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_lightning_5.ogg -------------------------------------------------------------------------------- /resources/sounds/game_shoot_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_shoot_1.ogg -------------------------------------------------------------------------------- /resources/sounds/game_shoot_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_shoot_2.ogg -------------------------------------------------------------------------------- /resources/sounds/game_shoot_3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/game_shoot_3.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_1.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_10.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_10.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_11.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_11.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_12.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_12.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_13.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_13.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_14.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_14.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_15.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_15.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_16.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_16.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_17.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_17.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_18.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_18.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_19.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_19.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_2.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_20.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_20.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_21.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_21.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_22.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_22.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_23.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_23.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_24.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_24.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_25.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_25.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_26.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_26.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_27.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_27.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_28.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_28.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_3.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_4.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_5.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_5.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_6.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_6.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_7.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_7.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_8.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_8.ogg -------------------------------------------------------------------------------- /resources/sounds/keystroke_9.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/keystroke_9.ogg -------------------------------------------------------------------------------- /resources/sounds/menu_back.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/menu_back.ogg -------------------------------------------------------------------------------- /resources/sounds/menu_click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/menu_click.ogg -------------------------------------------------------------------------------- /resources/sounds/menu_error.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/menu_error.ogg -------------------------------------------------------------------------------- /resources/sounds/menu_select.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/menu_select.ogg -------------------------------------------------------------------------------- /resources/sounds/menu_switch.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/resources/sounds/menu_switch.ogg -------------------------------------------------------------------------------- /tutorial/README.md: -------------------------------------------------------------------------------- 1 | The `answers` folder contains answers to exercises from articles 1 through 9. The `tutorial-code` folder contains the state of the tutorial at the end of each article. 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/02 - Libraries/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/02 - Libraries/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | end 14 | 15 | function GameObject:update(dt) 16 | if self.timer then self.timer:update(dt) end 17 | end 18 | 19 | function GameObject:draw() 20 | 21 | end 22 | 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/03 - Rooms and Areas/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/rooms/Area.lua: -------------------------------------------------------------------------------- 1 | Area = Object:extend() 2 | 3 | function Area:new(room) 4 | self.room = room 5 | self.game_objects = {} 6 | end 7 | 8 | function Area:update(dt) 9 | for i = #self.game_objects, 1, -1 do 10 | local game_object = self.game_objects[i] 11 | game_object:update(dt) 12 | if game_object.dead then table.remove(self.game_objects, i) end 13 | end 14 | end 15 | 16 | function Area:draw() 17 | for _, game_object in ipairs(self.game_objects) do game_object:draw() end 18 | end 19 | 20 | function Area:addGameObject(game_object_type, x, y, opts) 21 | local opts = opts or {} 22 | local game_object = _G[game_object_type](self, x or 0, y or 0, opts) 23 | table.insert(self.game_objects, game_object) 24 | return game_object 25 | end 26 | 27 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/rooms/Stage.lua: -------------------------------------------------------------------------------- 1 | Stage = Object:extend() 2 | 3 | function Stage:new() 4 | self.area = Area() 5 | end 6 | 7 | function Stage:update(dt) 8 | self.area:update(dt) 9 | end 10 | 11 | function Stage:draw() 12 | self.area:draw() 13 | end 14 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/03 - Rooms and Areas/utils.lua: -------------------------------------------------------------------------------- 1 | function UUID() 2 | local fn = function(x) 3 | local r = math.random(16) - 1 4 | r = (x == "x") and (r + 1) or (r % 4) + 9 5 | return ("0123456789abcdef"):sub(r, r) 6 | end 7 | return (("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"):gsub("[xy]", fn)) 8 | end 9 | 10 | function random(min, max) 11 | return (min > max and (love.math.random()*(min - max) + max)) or (love.math.random()*(max - min) + min) 12 | end 13 | 14 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | end 14 | 15 | function GameObject:update(dt) 16 | if self.timer then self.timer:update(dt) end 17 | if self.collider then self.x, self.y = self.collider:getPosition() end 18 | end 19 | 20 | function GameObject:draw() 21 | 22 | end 23 | 24 | function GameObject:destroy() 25 | self.timer:destroy() 26 | if self.collider then self.collider:destroy() end 27 | self.collider = nil 28 | end 29 | 30 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/05 - Game Basics/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/05 - Game Basics/utils.lua: -------------------------------------------------------------------------------- 1 | function UUID() 2 | local fn = function(x) 3 | local r = math.random(16) - 1 4 | r = (x == "x") and (r + 1) or (r % 4) + 9 5 | return ("0123456789abcdef"):sub(r, r) 6 | end 7 | return (("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"):gsub("[xy]", fn)) 8 | end 9 | 10 | function random(min, max) 11 | local min, max = min or 0, max or 1 12 | return (min > max and (love.math.random()*(min - max) + max)) or (love.math.random()*(max - min) + min) 13 | end 14 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/globals.lua: -------------------------------------------------------------------------------- 1 | default_color = {222, 222, 222} 2 | background_color = {16, 16, 16} 3 | ammo_color = {123, 200, 164} 4 | boost_color = {76, 195, 217} 5 | hp_color = {241, 103, 69} 6 | skill_point_color = {255, 198, 93} 7 | 8 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/06 - Player Basics/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/objects/TickEffect.lua: -------------------------------------------------------------------------------- 1 | TickEffect = GameObject:extend() 2 | 3 | function TickEffect:new(area, x, y, opts) 4 | TickEffect.super.new(self, area, x, y, opts) 5 | 6 | self.w, self.h = 48, 32 7 | self.y_offset = 0 8 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 9 | end 10 | 11 | function TickEffect:update(dt) 12 | TickEffect.super.update(self, dt) 13 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 14 | end 15 | 16 | function TickEffect:draw() 17 | love.graphics.setColor(default_color) 18 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 19 | love.graphics.setColor(255, 255, 255) 20 | end 21 | 22 | function TickEffect:destroy() 23 | TickEffect.super.destroy(self) 24 | end 25 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/06 - Player Basics/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/objects/TickEffect.lua: -------------------------------------------------------------------------------- 1 | TickEffect = GameObject:extend() 2 | 3 | function TickEffect:new(area, x, y, opts) 4 | TickEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function TickEffect:update(dt) 13 | TickEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function TickEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function TickEffect:destroy() 24 | TickEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/07 - Player Stats and Attacks/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/07 - Player Stats and Attacks/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/objects/TickEffect.lua: -------------------------------------------------------------------------------- 1 | TickEffect = GameObject:extend() 2 | 3 | function TickEffect:new(area, x, y, opts) 4 | TickEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function TickEffect:update(dt) 13 | TickEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function TickEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function TickEffect:destroy() 24 | TickEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/08 - Enemies/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/08 - Enemies/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/objects/TickEffect.lua: -------------------------------------------------------------------------------- 1 | TickEffect = GameObject:extend() 2 | 3 | function TickEffect:new(area, x, y, opts) 4 | TickEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function TickEffect:update(dt) 13 | TickEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function TickEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function TickEffect:destroy() 24 | TickEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/09 - Director and Gameplay Loop/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/09 - Director and Gameplay Loop/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/objects/TickEffect.lua: -------------------------------------------------------------------------------- 1 | TickEffect = GameObject:extend() 2 | 3 | function TickEffect:new(area, x, y, opts) 4 | TickEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function TickEffect:update(dt) 13 | TickEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function TickEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function TickEffect:destroy() 24 | TickEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/10 - Coding Practices/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/10 - Coding Practices/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/objects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then 15 | self.value = self.base*(1 + self.additive) 16 | else 17 | self.value = self.base/(1 - self.additive) 18 | end 19 | 20 | self.additive = 0 21 | self.additives = {} 22 | end 23 | 24 | function Stat:increase(percentage) 25 | table.insert(self.additives, percentage*0.01) 26 | end 27 | 28 | function Stat:decrease(percentage) 29 | table.insert(self.additives, -percentage*0.01) 30 | end 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/11 - Passives/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/11 - Passives/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/objects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then 15 | self.value = self.base*(1 + self.additive) 16 | else 17 | self.value = self.base/(1 - self.additive) 18 | end 19 | 20 | self.additive = 0 21 | self.additives = {} 22 | end 23 | 24 | function Stat:increase(percentage) 25 | table.insert(self.additives, percentage*0.01) 26 | end 27 | 28 | function Stat:decrease(percentage) 29 | table.insert(self.additives, -percentage*0.01) 30 | end 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/12 - More Passives/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/12 - More Passives/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/Line.lua: -------------------------------------------------------------------------------- 1 | Line = Object:extend() 2 | 3 | function Line:new(tree, node_1_id, node_2_id) 4 | self.node_1_id, self.node_2_id = node_1_id, node_2_id 5 | self.node_1, self.node_2 = tree[node_1_id], tree[node_2_id] 6 | self.active = false 7 | end 8 | 9 | function Line:update(dt) 10 | if fn.any(bought_node_indexes, self.node_1_id) and fn.any(bought_node_indexes, self.node_2_id) then self.active = true else self.active = false end 11 | end 12 | 13 | function Line:draw() 14 | local r, g, b = unpack(default_color) 15 | if self.active then love.graphics.setColor(r, g, b, 255) 16 | else love.graphics.setColor(r, g, b, 32) end 17 | love.graphics.line(self.node_1.x, self.node_1.y, self.node_2.x, self.node_2.y) 18 | love.graphics.setColor(r, g, b, 255) 19 | end 20 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then 15 | self.value = self.base*(1 + self.additive) 16 | else 17 | self.value = self.base/(1 - self.additive) 18 | end 19 | 20 | self.additive = 0 21 | self.additives = {} 22 | end 23 | 24 | function Stat:increase(percentage) 25 | table.insert(self.additives, percentage*0.01) 26 | end 27 | 28 | function Stat:decrease(percentage) 29 | table.insert(self.additives, -percentage*0.01) 30 | end 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/13 - Skill Tree/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/13 - Skill Tree/tree.lua: -------------------------------------------------------------------------------- 1 | function treeToPlayer(player) 2 | for _, index in ipairs(bought_node_indexes) do 3 | local stats = tree[index].stats 4 | for i = 1, #stats, 3 do 5 | local attribute, value = stats[i+1], stats[i+2] 6 | player[attribute] = player[attribute] + value 7 | end 8 | end 9 | end 10 | 11 | tree = {} 12 | tree[1] = {x = 0, y = 0, links = {2}} 13 | tree[2] = {x = 48, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {3}} 14 | tree[3] = {x = 96, y = 0, stats = {'6% Increased HP', 'hp_multiplier', 0.06}, links = {4}} 15 | tree[4] = {x = 144, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}} 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/Line.lua: -------------------------------------------------------------------------------- 1 | Line = Object:extend() 2 | 3 | function Line:new(tree, node_1_id, node_2_id) 4 | self.node_1_id, self.node_2_id = node_1_id, node_2_id 5 | self.node_1, self.node_2 = tree[node_1_id], tree[node_2_id] 6 | self.active = false 7 | end 8 | 9 | function Line:update(dt) 10 | if fn.any(bought_node_indexes, self.node_1_id) and fn.any(bought_node_indexes, self.node_2_id) then self.active = true else self.active = false end 11 | end 12 | 13 | function Line:draw() 14 | local r, g, b = unpack(default_color) 15 | if self.active then love.graphics.setColor(r, g, b, 255) 16 | else love.graphics.setColor(r, g, b, 32) end 17 | love.graphics.line(self.node_1.x, self.node_1.y, self.node_2.x, self.node_2.y) 18 | love.graphics.setColor(r, g, b, 255) 19 | end 20 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then 15 | self.value = self.base*(1 + self.additive) 16 | else 17 | self.value = self.base/(1 - self.additive) 18 | end 19 | 20 | self.additive = 0 21 | self.additives = {} 22 | end 23 | 24 | function Stat:increase(percentage) 25 | table.insert(self.additives, percentage*0.01) 26 | end 27 | 28 | function Stat:decrease(percentage) 29 | table.insert(self.additives, -percentage*0.01) 30 | end 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.r = opts.r or random(4, 6) 8 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 9 | end 10 | 11 | function TrailParticle:update(dt) 12 | TrailParticle.super.update(self, dt) 13 | end 14 | 15 | function TrailParticle:draw() 16 | love.graphics.setColor(self.color) 17 | love.graphics.circle('fill', self.x, self.y, self.r) 18 | love.graphics.setColor(255, 255, 255) 19 | end 20 | 21 | function TrailParticle:destroy() 22 | TrailParticle.super.destroy(self) 23 | end 24 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/resources/fonts/Anonymous.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/resources/fonts/Anonymous.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/14 - Console/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/14 - Console/tree.lua: -------------------------------------------------------------------------------- 1 | function treeToPlayer(player) 2 | for _, index in ipairs(bought_node_indexes) do 3 | local stats = tree[index].stats 4 | for i = 1, #stats, 3 do 5 | local attribute, value = stats[i+1], stats[i+2] 6 | player[attribute] = player[attribute] + value 7 | end 8 | end 9 | end 10 | 11 | tree = {} 12 | tree[1] = {x = 0, y = 0, links = {2}} 13 | tree[2] = {x = 48, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {3}} 14 | tree[3] = {x = 96, y = 0, stats = {'6% Increased HP', 'hp_multiplier', 0.06}, links = {4}} 15 | tree[4] = {x = 144, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}} 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/GameObject.lua: -------------------------------------------------------------------------------- 1 | GameObject = Object:extend() 2 | 3 | function GameObject:new(area, x, y, opts) 4 | local opts = opts or {} 5 | if opts then for k, v in pairs(opts) do self[k] = v end end 6 | 7 | self.area = area 8 | self.x, self.y = x, y 9 | self.id = UUID() 10 | self.creation_time = love.timer.getTime() 11 | self.timer = Timer() 12 | self.dead = false 13 | self.depth = 50 14 | end 15 | 16 | function GameObject:update(dt) 17 | if self.timer then self.timer:update(dt) end 18 | if self.collider then self.x, self.y = self.collider:getPosition() end 19 | end 20 | 21 | function GameObject:draw() 22 | 23 | end 24 | 25 | function GameObject:destroy() 26 | self.timer:destroy() 27 | if self.collider then self.collider:destroy() end 28 | self.collider = nil 29 | end 30 | 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | sudo: false 3 | 4 | env: 5 | - LUA="luajit=2.0" 6 | 7 | before_install: 8 | - pip install hererocks 9 | - hererocks lua_install -r^ --$LUA 10 | - export PATH=$PATH:$PWD/lua_install/bin 11 | 12 | install: 13 | - luarocks install luacheck 14 | - luarocks install busted 15 | - luarocks install luacov 16 | - luarocks install luacov-coveralls 17 | - luarocks install middleclass 18 | - wget https://bitbucket.org/bartbes/slither/raw/bbd85db19b19d9d14470b4fa7b73029b6c070fb0/slither.lua 19 | - wget https://raw.githubusercontent.com/vrld/hump/038bc9025f1cb850355f4b073357b087b8122da9/class.lua 20 | 21 | script: 22 | - luacheck --std max+busted bitser.lua spec --globals love 23 | - busted --verbose --coverage 24 | 25 | after_success: 26 | - luacov-coveralls --include bitser -e $TRAVIS_BUILD_DIR/lua_install 27 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/cases/_new.lua: -------------------------------------------------------------------------------- 1 | -- write your own! 2 | -- data to be tested, repetitions, number of tries 3 | return {}, 10000, 3 -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/cases/bigtable.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | 3 | for i = 1, 2000 do 4 | t[i] = 100 5 | end 6 | 7 | return t, 500, 5 -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/cases/cthulhu.lua: -------------------------------------------------------------------------------- 1 | local cthulhu = {{}, {}, {}} 2 | cthulhu.fhtagn = cthulhu 3 | cthulhu[1][cthulhu[2]] = cthulhu[3] 4 | cthulhu[2][cthulhu[1]] = cthulhu[2] 5 | cthulhu[3][cthulhu[3]] = cthulhu 6 | 7 | return cthulhu, 10000, 3 -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/cases/intkeys.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | 3 | for i = 1, 200 do 4 | t[math.random(1000)] = math.random(100) 5 | end 6 | 7 | return t, 30000, 5 -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/cases/shared_table.lua: -------------------------------------------------------------------------------- 1 | local t = {} 2 | local x = {10, 50, 40, 30, 20} 3 | for i = 1, 40 do 4 | t[i] = x 5 | end 6 | return t, 10000, 3 -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/bitser/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.version = "0.10.0" 3 | t.console = true 4 | end -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/classic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.swp 3 | __* 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/draft/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/draft/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/draft/example_linker.lua: -------------------------------------------------------------------------------- 1 | -- load draft 2 | local Draft = require('draft') 3 | local draft = Draft() 4 | 5 | function love.load() 6 | limitUpper = 100 7 | limitLower = 4 8 | numSegments = limitLower 9 | direction = "up" 10 | step = 0.01 11 | end 12 | 13 | function love.update(dt) 14 | if numSegments > limitUpper and direction == "up" then 15 | direction = "down" 16 | elseif numSegments < limitLower and direction == "down" then 17 | direction = "up" 18 | elseif direction == "up" then 19 | numSegments = numSegments + step 20 | else 21 | numSegments = numSegments - step 22 | end 23 | end 24 | 25 | function love.draw() 26 | local v = draft:egg(400, 300, 1500, 1, 1, numSegments, 'line') 27 | draft:linkWeb(v) 28 | end 29 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/in-out-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/in-out-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/inv-interpolators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/inv-interpolators.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-cross.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-mirrorOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-mirrorOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-perpendicular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-perpendicular.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-projectOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-projectOn.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-rotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/libraries/hump/docs/_static/vector-rotated.png -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/.gitignore: -------------------------------------------------------------------------------- 1 | *.bat 2 | tsc* 3 | ldoc* 4 | telescope* 5 | LuaMin* 6 | *.ld 7 | luacov* 8 | *.exe 9 | *.dll 10 | test* -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/.travis/platform.sh: -------------------------------------------------------------------------------- 1 | if [ -z "${PLATFORM:-}" ]; then 2 | PLATFORM=$TRAVIS_OS_NAME; 3 | fi 4 | 5 | if [ "$PLATFORM" == "osx" ]; then 6 | PLATFORM="macosx"; 7 | fi 8 | 9 | if [ -z "$PLATFORM" ]; then 10 | if [ "$(uname)" == "Linux" ]; then 11 | PLATFORM="linux"; 12 | else 13 | PLATFORM="macosx"; 14 | fi; 15 | fi 16 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/.travis/setenv_lua.sh: -------------------------------------------------------------------------------- 1 | export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin 2 | bash .travis/setup_lua.sh 3 | eval `$HOME/.lua/luarocks path` 4 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/rockspec/moses-1.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.4.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.4.0-1.tar.gz", 5 | dir = "Moses-Moses-1.4.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/rockspec/moses-1.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.0-1.tar.gz", 5 | dir = "Moses-Moses-1.5.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/rockspec/moses-1.5.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.5.1-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.5.1-1.tar.gz", 5 | dir = "Moses-Moses-1.5.1-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/libraries/moses/rockspec/moses-1.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "moses" 2 | version = "1.6.0-1" 3 | source = { 4 | url = "https://github.com/Yonaba/Moses/archive/Moses-1.6.0-1.tar.gz", 5 | dir = "Moses-Moses-1.6.0-1" 6 | } 7 | description = { 8 | summary = "Utility-belt library for functional programming in Lua", 9 | detailed = [[ 10 | A utility-belt library for functional programming, which complements the built-in 11 | Lua table library, making easier operations on arrays, lists, collections. 12 | ]], 13 | homepage = "http://yonaba.github.com/Moses/", 14 | license = "MIT " 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | build = { 20 | type = "builtin", 21 | modules = { 22 | ["moses"] = "moses.lua", 23 | ["moses_min"] = "moses_min.lua", 24 | }, 25 | copy_directories = {"doc","spec"} 26 | } -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/AmmoEffect.lua: -------------------------------------------------------------------------------- 1 | AmmoEffect = GameObject:extend() 2 | 3 | function AmmoEffect:new(area, x, y, opts) 4 | AmmoEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w = 1.5*self.w 8 | self.h = self.w 9 | 10 | self.current_color = default_color 11 | self.timer:after(0.1, function() 12 | self.current_color = self.color 13 | self.timer:after(0.15, function() 14 | self.dead = true 15 | end) 16 | end) 17 | end 18 | 19 | function AmmoEffect:update(dt) 20 | AmmoEffect.super.update(self, dt) 21 | end 22 | 23 | function AmmoEffect:draw() 24 | love.graphics.setColor(self.current_color) 25 | draft:rhombus(self.x, self.y, self.w, self.h, 'fill') 26 | love.graphics.setColor(default_color) 27 | end 28 | 29 | function AmmoEffect:destroy() 30 | AmmoEffect.super.destroy(self) 31 | end 32 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/CycleEffect.lua: -------------------------------------------------------------------------------- 1 | CycleEffect = GameObject:extend() 2 | 3 | function CycleEffect:new(area, x, y, opts) 4 | CycleEffect.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | 7 | self.w, self.h = 48, 32 8 | self.y_offset = 0 9 | self.timer:tween(0.13, self, {h = 0, y_offset = 32}, 'in-out-cubic', function() self.dead = true end) 10 | end 11 | 12 | function CycleEffect:update(dt) 13 | CycleEffect.super.update(self, dt) 14 | if self.parent then self.x, self.y = self.parent.x, self.parent.y - self.y_offset end 15 | end 16 | 17 | function CycleEffect:draw() 18 | love.graphics.setColor(default_color) 19 | love.graphics.rectangle('fill', self.x - self.w/2, self.y, self.w, self.h) 20 | love.graphics.setColor(255, 255, 255) 21 | end 22 | 23 | function CycleEffect:destroy() 24 | CycleEffect.super.destroy(self) 25 | end 26 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/Line.lua: -------------------------------------------------------------------------------- 1 | Line = Object:extend() 2 | 3 | function Line:new(tree, node_1_id, node_2_id) 4 | self.node_1_id, self.node_2_id = node_1_id, node_2_id 5 | self.node_1, self.node_2 = tree[node_1_id], tree[node_2_id] 6 | self.active = false 7 | end 8 | 9 | function Line:update(dt) 10 | if fn.any(bought_node_indexes, self.node_1_id) and fn.any(bought_node_indexes, self.node_2_id) then self.active = true else self.active = false end 11 | end 12 | 13 | function Line:draw() 14 | local r, g, b = unpack(default_color) 15 | if self.active then love.graphics.setColor(r, g, b, 255) 16 | else love.graphics.setColor(r, g, b, 32) end 17 | love.graphics.line(self.node_1.x, self.node_1.y, self.node_2.x, self.node_2.y) 18 | love.graphics.setColor(r, g, b, 255) 19 | end 20 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/Stat.lua: -------------------------------------------------------------------------------- 1 | Stat = Object:extend() 2 | 3 | function Stat:new(base) 4 | self.base = base 5 | 6 | self.additive = 0 7 | self.additives = {} 8 | self.value = self.base*(1 + self.additive) 9 | end 10 | 11 | function Stat:update(dt) 12 | for _, additive in ipairs(self.additives) do self.additive = self.additive + additive end 13 | 14 | if self.additive >= 0 then 15 | self.value = self.base*(1 + self.additive) 16 | else 17 | self.value = self.base/(1 - self.additive) 18 | end 19 | 20 | self.additive = 0 21 | self.additives = {} 22 | end 23 | 24 | function Stat:increase(percentage) 25 | table.insert(self.additives, percentage*0.01) 26 | end 27 | 28 | function Stat:decrease(percentage) 29 | table.insert(self.additives, -percentage*0.01) 30 | end 31 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/TargetParticle.lua: -------------------------------------------------------------------------------- 1 | TargetParticle = GameObject:extend() 2 | 3 | function TargetParticle:new(area, x, y, opts) 4 | TargetParticle.super.new(self, area, x, y, opts) 5 | 6 | self.r = opts.r or random(2, 3) 7 | self.timer:tween(opts.d or random(0.1, 0.3), self, {r = 0, x = self.target_x, y = self.target_y}, 'out-cubic', function() self.dead = true end) 8 | end 9 | 10 | function TargetParticle:update(dt) 11 | TargetParticle.super.update(self, dt) 12 | end 13 | 14 | function TargetParticle:draw() 15 | love.graphics.setColor(self.color) 16 | draft:rhombus(self.x, self.y, 2*self.r, 2*self.r, 'fill') 17 | love.graphics.setColor(default_color) 18 | end 19 | 20 | function TargetParticle:destroy() 21 | TargetParticle.super.destroy(self) 22 | end 23 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/objects/TrailParticle.lua: -------------------------------------------------------------------------------- 1 | TrailParticle = GameObject:extend() 2 | 3 | function TrailParticle:new(area, x, y, opts) 4 | TrailParticle.super.new(self, area, x, y, opts) 5 | self.depth = 75 6 | self.graphics_types = {'rgb_shift'} 7 | 8 | self.r = opts.r or random(4, 6) 9 | self.timer:tween(opts.d or random(0.3, 0.5), self, {r = 0}, 'linear', function() self.dead = true end) 10 | end 11 | 12 | function TrailParticle:update(dt) 13 | TrailParticle.super.update(self, dt) 14 | end 15 | 16 | function TrailParticle:draw() 17 | love.graphics.setColor(self.color) 18 | love.graphics.circle('fill', self.x, self.y, self.r) 19 | love.graphics.setColor(255, 255, 255) 20 | end 21 | 22 | function TrailParticle:destroy() 23 | TrailParticle.super.destroy(self) 24 | end 25 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/resources/fonts/Anonymous.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/resources/fonts/Anonymous.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/resources/fonts/m5x7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a327ex/BYTEPATH/51ee3086ae3369a2c80e4e47d4b62d480af4fe89/tutorial/tutorial-code/15 - Final/resources/fonts/m5x7.ttf -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/resources/shaders/rgb_shift.frag: -------------------------------------------------------------------------------- 1 | extern vec2 amount; 2 | vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc) { 3 | return color*vec4(Texel(texture, tc - amount).r, Texel(texture, tc).g, Texel(texture, tc + amount).b, Texel(texture, tc).a); 4 | } 5 | -------------------------------------------------------------------------------- /tutorial/tutorial-code/15 - Final/tree.lua: -------------------------------------------------------------------------------- 1 | function treeToPlayer(player) 2 | for _, index in ipairs(bought_node_indexes) do 3 | local stats = tree[index].stats 4 | for i = 1, #stats, 3 do 5 | local attribute, value = stats[i+1], stats[i+2] 6 | player[attribute] = player[attribute] + value 7 | end 8 | end 9 | end 10 | 11 | tree = {} 12 | tree[1] = {x = 0, y = 0, links = {2}} 13 | tree[2] = {x = 48, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {3}} 14 | tree[3] = {x = 96, y = 0, stats = {'6% Increased HP', 'hp_multiplier', 0.06}, links = {4}} 15 | tree[4] = {x = 144, y = 0, stats = {'4% Increased HP', 'hp_multiplier', 0.04}} 16 | --------------------------------------------------------------------------------