commit 966aebf046d3b4f8df73b9c1dc95b46082eeda09 Author: lustlion Date: Sun Oct 17 01:06:11 2021 +0200 upload so it isnt lost now diff --git a/assets/characters/bird/bird_flying_anim.gif b/assets/characters/bird/bird_flying_anim.gif new file mode 100644 index 0000000..34d1d2b Binary files /dev/null and b/assets/characters/bird/bird_flying_anim.gif differ diff --git a/assets/characters/bird/bird_flying_anim_strip_3.png b/assets/characters/bird/bird_flying_anim_strip_3.png new file mode 100644 index 0000000..af049b8 Binary files /dev/null and b/assets/characters/bird/bird_flying_anim_strip_3.png differ diff --git a/assets/characters/bird/bird_idle_anim.gif b/assets/characters/bird/bird_idle_anim.gif new file mode 100644 index 0000000..49c03da Binary files /dev/null and b/assets/characters/bird/bird_idle_anim.gif differ diff --git a/assets/characters/bird/bird_idle_anim_strip_8.png b/assets/characters/bird/bird_idle_anim_strip_8.png new file mode 100644 index 0000000..e0b3bc6 Binary files /dev/null and b/assets/characters/bird/bird_idle_anim_strip_8.png differ diff --git a/assets/characters/bird/bird_walk_anim.gif b/assets/characters/bird/bird_walk_anim.gif new file mode 100644 index 0000000..dda1240 Binary files /dev/null and b/assets/characters/bird/bird_walk_anim.gif differ diff --git a/assets/characters/bird/bird_walk_anim_strip_3.png b/assets/characters/bird/bird_walk_anim_strip_3.png new file mode 100644 index 0000000..6258d49 Binary files /dev/null and b/assets/characters/bird/bird_walk_anim_strip_3.png differ diff --git a/assets/characters/bomber goblin/bomber_goblin_attack_anim.gif b/assets/characters/bomber goblin/bomber_goblin_attack_anim.gif new file mode 100644 index 0000000..21372f8 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_attack_anim.gif differ diff --git a/assets/characters/bomber goblin/bomber_goblin_attack_anim_strip_6.png b/assets/characters/bomber goblin/bomber_goblin_attack_anim_strip_6.png new file mode 100644 index 0000000..f02fceb Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_attack_anim_strip_6.png differ diff --git a/assets/characters/bomber goblin/bomber_goblin_death_anim.gif b/assets/characters/bomber goblin/bomber_goblin_death_anim.gif new file mode 100644 index 0000000..dec2326 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_death_anim.gif differ diff --git a/assets/characters/bomber goblin/bomber_goblin_death_anim_strip_6.png b/assets/characters/bomber goblin/bomber_goblin_death_anim_strip_6.png new file mode 100644 index 0000000..f56f157 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_death_anim_strip_6.png differ diff --git a/assets/characters/bomber goblin/bomber_goblin_hit_anim.gif b/assets/characters/bomber goblin/bomber_goblin_hit_anim.gif new file mode 100644 index 0000000..179f914 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_hit_anim.gif differ diff --git a/assets/characters/bomber goblin/bomber_goblin_hit_anim_strip_3.png b/assets/characters/bomber goblin/bomber_goblin_hit_anim_strip_3.png new file mode 100644 index 0000000..c1a8675 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_hit_anim_strip_3.png differ diff --git a/assets/characters/bomber goblin/bomber_goblin_idle_anim.gif b/assets/characters/bomber goblin/bomber_goblin_idle_anim.gif new file mode 100644 index 0000000..1df7d38 Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_idle_anim.gif differ diff --git a/assets/characters/bomber goblin/bomber_goblin_idle_anim_strip_4.png b/assets/characters/bomber goblin/bomber_goblin_idle_anim_strip_4.png new file mode 100644 index 0000000..dbbe99e Binary files /dev/null and b/assets/characters/bomber goblin/bomber_goblin_idle_anim_strip_4.png differ diff --git a/assets/characters/bomber goblin/goblin_bomber_spritesheet.png b/assets/characters/bomber goblin/goblin_bomber_spritesheet.png new file mode 100644 index 0000000..b90d4f5 Binary files /dev/null and b/assets/characters/bomber goblin/goblin_bomber_spritesheet.png differ diff --git a/assets/characters/fly/blue_fly_attack_anim.gif b/assets/characters/fly/blue_fly_attack_anim.gif new file mode 100644 index 0000000..2fd8556 Binary files /dev/null and b/assets/characters/fly/blue_fly_attack_anim.gif differ diff --git a/assets/characters/fly/blue_fly_attack_anim_srip_3.png b/assets/characters/fly/blue_fly_attack_anim_srip_3.png new file mode 100644 index 0000000..3a9cfa2 Binary files /dev/null and b/assets/characters/fly/blue_fly_attack_anim_srip_3.png differ diff --git a/assets/characters/fly/blue_fly_death_anim.gif b/assets/characters/fly/blue_fly_death_anim.gif new file mode 100644 index 0000000..cb5613f Binary files /dev/null and b/assets/characters/fly/blue_fly_death_anim.gif differ diff --git a/assets/characters/fly/blue_fly_death_anim_strip_5.png b/assets/characters/fly/blue_fly_death_anim_strip_5.png new file mode 100644 index 0000000..3fe9975 Binary files /dev/null and b/assets/characters/fly/blue_fly_death_anim_strip_5.png differ diff --git a/assets/characters/fly/blue_fly_hit_anim.gif b/assets/characters/fly/blue_fly_hit_anim.gif new file mode 100644 index 0000000..81ccf9c Binary files /dev/null and b/assets/characters/fly/blue_fly_hit_anim.gif differ diff --git a/assets/characters/fly/blue_fly_hit_anim_strip_3.png b/assets/characters/fly/blue_fly_hit_anim_strip_3.png new file mode 100644 index 0000000..5e9c0c1 Binary files /dev/null and b/assets/characters/fly/blue_fly_hit_anim_strip_3.png differ diff --git a/assets/characters/fly/blue_fly_idle_or_flying_anim.gif b/assets/characters/fly/blue_fly_idle_or_flying_anim.gif new file mode 100644 index 0000000..3ebae67 Binary files /dev/null and b/assets/characters/fly/blue_fly_idle_or_flying_anim.gif differ diff --git a/assets/characters/fly/blue_fly_idle_or_flying_anim_strip_3.png b/assets/characters/fly/blue_fly_idle_or_flying_anim_strip_3.png new file mode 100644 index 0000000..4f60292 Binary files /dev/null and b/assets/characters/fly/blue_fly_idle_or_flying_anim_strip_3.png differ diff --git a/assets/characters/fly/fly_spritesheet.png b/assets/characters/fly/fly_spritesheet.png new file mode 100644 index 0000000..a64fe30 Binary files /dev/null and b/assets/characters/fly/fly_spritesheet.png differ diff --git a/assets/characters/fly/orange_fly_atack_anim.gif b/assets/characters/fly/orange_fly_atack_anim.gif new file mode 100644 index 0000000..b2e17b8 Binary files /dev/null and b/assets/characters/fly/orange_fly_atack_anim.gif differ diff --git a/assets/characters/fly/orange_fly_atack_anim_srip_3.png b/assets/characters/fly/orange_fly_atack_anim_srip_3.png new file mode 100644 index 0000000..38f1e7c Binary files /dev/null and b/assets/characters/fly/orange_fly_atack_anim_srip_3.png differ diff --git a/assets/characters/fly/orange_fly_death_anim.gif b/assets/characters/fly/orange_fly_death_anim.gif new file mode 100644 index 0000000..ad8e083 Binary files /dev/null and b/assets/characters/fly/orange_fly_death_anim.gif differ diff --git a/assets/characters/fly/orange_fly_death_anim_strip_5.png b/assets/characters/fly/orange_fly_death_anim_strip_5.png new file mode 100644 index 0000000..dc754e4 Binary files /dev/null and b/assets/characters/fly/orange_fly_death_anim_strip_5.png differ diff --git a/assets/characters/fly/orange_fly_hit_anim.gif b/assets/characters/fly/orange_fly_hit_anim.gif new file mode 100644 index 0000000..7f15982 Binary files /dev/null and b/assets/characters/fly/orange_fly_hit_anim.gif differ diff --git a/assets/characters/fly/orange_fly_hit_anim_strip_3.png b/assets/characters/fly/orange_fly_hit_anim_strip_3.png new file mode 100644 index 0000000..5ebed2a Binary files /dev/null and b/assets/characters/fly/orange_fly_hit_anim_strip_3.png differ diff --git a/assets/characters/fly/orange_fly_idle_or_flying_anim.gif b/assets/characters/fly/orange_fly_idle_or_flying_anim.gif new file mode 100644 index 0000000..3b17715 Binary files /dev/null and b/assets/characters/fly/orange_fly_idle_or_flying_anim.gif differ diff --git a/assets/characters/fly/orange_fly_idle_or_flying_anim_strip_3.png b/assets/characters/fly/orange_fly_idle_or_flying_anim_strip_3.png new file mode 100644 index 0000000..64f8ce6 Binary files /dev/null and b/assets/characters/fly/orange_fly_idle_or_flying_anim_strip_3.png differ diff --git a/assets/characters/goblin/goblin_attack_anim.gif b/assets/characters/goblin/goblin_attack_anim.gif new file mode 100644 index 0000000..f46f61c Binary files /dev/null and b/assets/characters/goblin/goblin_attack_anim.gif differ diff --git a/assets/characters/goblin/goblin_attack_anim_strip_4.png b/assets/characters/goblin/goblin_attack_anim_strip_4.png new file mode 100644 index 0000000..95d0d33 Binary files /dev/null and b/assets/characters/goblin/goblin_attack_anim_strip_4.png differ diff --git a/assets/characters/goblin/goblin_death_anim.gif b/assets/characters/goblin/goblin_death_anim.gif new file mode 100644 index 0000000..7590b9e Binary files /dev/null and b/assets/characters/goblin/goblin_death_anim.gif differ diff --git a/assets/characters/goblin/goblin_death_anim_strip_6.png b/assets/characters/goblin/goblin_death_anim_strip_6.png new file mode 100644 index 0000000..d9d1e4b Binary files /dev/null and b/assets/characters/goblin/goblin_death_anim_strip_6.png differ diff --git a/assets/characters/goblin/goblin_hit_anim.gif b/assets/characters/goblin/goblin_hit_anim.gif new file mode 100644 index 0000000..d8fdbef Binary files /dev/null and b/assets/characters/goblin/goblin_hit_anim.gif differ diff --git a/assets/characters/goblin/goblin_hit_anim_strip_3.png b/assets/characters/goblin/goblin_hit_anim_strip_3.png new file mode 100644 index 0000000..5e306f3 Binary files /dev/null and b/assets/characters/goblin/goblin_hit_anim_strip_3.png differ diff --git a/assets/characters/goblin/goblin_idle_anim.gif b/assets/characters/goblin/goblin_idle_anim.gif new file mode 100644 index 0000000..082b6bf Binary files /dev/null and b/assets/characters/goblin/goblin_idle_anim.gif differ diff --git a/assets/characters/goblin/goblin_idle_anim_strip_4.png b/assets/characters/goblin/goblin_idle_anim_strip_4.png new file mode 100644 index 0000000..c2a652b Binary files /dev/null and b/assets/characters/goblin/goblin_idle_anim_strip_4.png differ diff --git a/assets/characters/goblin/goblin_run_anim.gif b/assets/characters/goblin/goblin_run_anim.gif new file mode 100644 index 0000000..9426ff0 Binary files /dev/null and b/assets/characters/goblin/goblin_run_anim.gif differ diff --git a/assets/characters/goblin/goblin_run_anim_strip_6.png b/assets/characters/goblin/goblin_run_anim_strip_6.png new file mode 100644 index 0000000..846e748 Binary files /dev/null and b/assets/characters/goblin/goblin_run_anim_strip_6.png differ diff --git a/assets/characters/goblin/goblin_spritesheet.png b/assets/characters/goblin/goblin_spritesheet.png new file mode 100644 index 0000000..4ff997e Binary files /dev/null and b/assets/characters/goblin/goblin_spritesheet.png differ diff --git a/assets/characters/mushroom/mushroom_crushed_anim.gif b/assets/characters/mushroom/mushroom_crushed_anim.gif new file mode 100644 index 0000000..9f39937 Binary files /dev/null and b/assets/characters/mushroom/mushroom_crushed_anim.gif differ diff --git a/assets/characters/mushroom/mushroom_crushed_anim_strip_6.png b/assets/characters/mushroom/mushroom_crushed_anim_strip_6.png new file mode 100644 index 0000000..2402b4b Binary files /dev/null and b/assets/characters/mushroom/mushroom_crushed_anim_strip_6.png differ diff --git a/assets/characters/mushroom/mushroom_death_anim.gif b/assets/characters/mushroom/mushroom_death_anim.gif new file mode 100644 index 0000000..fb5e995 Binary files /dev/null and b/assets/characters/mushroom/mushroom_death_anim.gif differ diff --git a/assets/characters/mushroom/mushroom_death_anim_strip_6.png b/assets/characters/mushroom/mushroom_death_anim_strip_6.png new file mode 100644 index 0000000..1d421fe Binary files /dev/null and b/assets/characters/mushroom/mushroom_death_anim_strip_6.png differ diff --git a/assets/characters/mushroom/mushroom_hit_anim.gif b/assets/characters/mushroom/mushroom_hit_anim.gif new file mode 100644 index 0000000..a2df40c Binary files /dev/null and b/assets/characters/mushroom/mushroom_hit_anim.gif differ diff --git a/assets/characters/mushroom/mushroom_hit_anim_strip_3.png b/assets/characters/mushroom/mushroom_hit_anim_strip_3.png new file mode 100644 index 0000000..2f350bd Binary files /dev/null and b/assets/characters/mushroom/mushroom_hit_anim_strip_3.png differ diff --git a/assets/characters/mushroom/mushroom_spritesheet.png b/assets/characters/mushroom/mushroom_spritesheet.png new file mode 100644 index 0000000..06a104d Binary files /dev/null and b/assets/characters/mushroom/mushroom_spritesheet.png differ diff --git a/assets/characters/mushroom/mushroom_walk_anim.gif b/assets/characters/mushroom/mushroom_walk_anim.gif new file mode 100644 index 0000000..ee9f7e0 Binary files /dev/null and b/assets/characters/mushroom/mushroom_walk_anim.gif differ diff --git a/assets/characters/mushroom/mushroom_walk_anim_strip_8.png b/assets/characters/mushroom/mushroom_walk_anim_strip_8.png new file mode 100644 index 0000000..44751b8 Binary files /dev/null and b/assets/characters/mushroom/mushroom_walk_anim_strip_8.png differ diff --git a/assets/characters/nancy/fall.png b/assets/characters/nancy/fall.png new file mode 100644 index 0000000..d71f208 Binary files /dev/null and b/assets/characters/nancy/fall.png differ diff --git a/assets/characters/nancy/fall1.png b/assets/characters/nancy/fall1.png new file mode 100644 index 0000000..947112d Binary files /dev/null and b/assets/characters/nancy/fall1.png differ diff --git a/assets/characters/nancy/fall2.png b/assets/characters/nancy/fall2.png new file mode 100644 index 0000000..ea5eb7f Binary files /dev/null and b/assets/characters/nancy/fall2.png differ diff --git a/assets/characters/nancy/fall3.png b/assets/characters/nancy/fall3.png new file mode 100644 index 0000000..f4a811c Binary files /dev/null and b/assets/characters/nancy/fall3.png differ diff --git a/assets/characters/nancy/idle.png b/assets/characters/nancy/idle.png new file mode 100644 index 0000000..f773a61 Binary files /dev/null and b/assets/characters/nancy/idle.png differ diff --git a/assets/characters/nancy/idle1.png b/assets/characters/nancy/idle1.png new file mode 100644 index 0000000..d4918c4 Binary files /dev/null and b/assets/characters/nancy/idle1.png differ diff --git a/assets/characters/nancy/idle2.png b/assets/characters/nancy/idle2.png new file mode 100644 index 0000000..d5a7166 Binary files /dev/null and b/assets/characters/nancy/idle2.png differ diff --git a/assets/characters/nancy/idle3.png b/assets/characters/nancy/idle3.png new file mode 100644 index 0000000..e59fb91 Binary files /dev/null and b/assets/characters/nancy/idle3.png differ diff --git a/assets/characters/nancy/idle4.png b/assets/characters/nancy/idle4.png new file mode 100644 index 0000000..ed18ab5 Binary files /dev/null and b/assets/characters/nancy/idle4.png differ diff --git a/assets/characters/nancy/jump.png b/assets/characters/nancy/jump.png new file mode 100644 index 0000000..55d2dbc Binary files /dev/null and b/assets/characters/nancy/jump.png differ diff --git a/assets/characters/nancy/jump1.png b/assets/characters/nancy/jump1.png new file mode 100644 index 0000000..d51cfe7 Binary files /dev/null and b/assets/characters/nancy/jump1.png differ diff --git a/assets/characters/nancy/jump2.png b/assets/characters/nancy/jump2.png new file mode 100644 index 0000000..c41527b Binary files /dev/null and b/assets/characters/nancy/jump2.png differ diff --git a/assets/characters/nancy/jump3.png b/assets/characters/nancy/jump3.png new file mode 100644 index 0000000..2fdffec Binary files /dev/null and b/assets/characters/nancy/jump3.png differ diff --git a/assets/characters/nancy/run.png b/assets/characters/nancy/run.png new file mode 100644 index 0000000..b89115a Binary files /dev/null and b/assets/characters/nancy/run.png differ diff --git a/assets/characters/nancy/run1.png b/assets/characters/nancy/run1.png new file mode 100644 index 0000000..d471a2a Binary files /dev/null and b/assets/characters/nancy/run1.png differ diff --git a/assets/characters/nancy/run2.png b/assets/characters/nancy/run2.png new file mode 100644 index 0000000..c66ebc3 Binary files /dev/null and b/assets/characters/nancy/run2.png differ diff --git a/assets/characters/nancy/run3.png b/assets/characters/nancy/run3.png new file mode 100644 index 0000000..296f6f0 Binary files /dev/null and b/assets/characters/nancy/run3.png differ diff --git a/assets/characters/nancy/run4.png b/assets/characters/nancy/run4.png new file mode 100644 index 0000000..2e4d724 Binary files /dev/null and b/assets/characters/nancy/run4.png differ diff --git a/assets/characters/nancy/run5.png b/assets/characters/nancy/run5.png new file mode 100644 index 0000000..75147e8 Binary files /dev/null and b/assets/characters/nancy/run5.png differ diff --git a/assets/characters/nancy/run6.png b/assets/characters/nancy/run6.png new file mode 100644 index 0000000..fb3a4cb Binary files /dev/null and b/assets/characters/nancy/run6.png differ diff --git a/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim.gif b/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim.gif new file mode 100644 index 0000000..6788c32 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim_strip_4.png b/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim_strip_4.png new file mode 100644 index 0000000..e599631 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_after_jump_dust_anim_strip_4.png differ diff --git a/assets/characters/nancy/unformatted/herochar_attack_anim(new).gif b/assets/characters/nancy/unformatted/herochar_attack_anim(new).gif new file mode 100644 index 0000000..ef5b8c0 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_attack_anim(new).gif differ diff --git a/assets/characters/nancy/unformatted/herochar_attack_anim_strip_4(new).png b/assets/characters/nancy/unformatted/herochar_attack_anim_strip_4(new).png new file mode 100644 index 0000000..97e9029 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_attack_anim_strip_4(new).png differ diff --git a/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim.gif b/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim.gif new file mode 100644 index 0000000..c89c23b Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim_strip_4.png b/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim_strip_4.png new file mode 100644 index 0000000..f13059d Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_before_jump_dust_anim_strip_4.png differ diff --git a/assets/characters/nancy/unformatted/herochar_before_or_after_jump.gif b/assets/characters/nancy/unformatted/herochar_before_or_after_jump.gif new file mode 100644 index 0000000..eff0e27 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_before_or_after_jump.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_before_or_after_jump_srip_2.png b/assets/characters/nancy/unformatted/herochar_before_or_after_jump_srip_2.png new file mode 100644 index 0000000..1146f8b Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_before_or_after_jump_srip_2.png differ diff --git a/assets/characters/nancy/unformatted/herochar_death_anim.gif b/assets/characters/nancy/unformatted/herochar_death_anim.gif new file mode 100644 index 0000000..91239f2 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_death_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_death_anim_strip_8.png b/assets/characters/nancy/unformatted/herochar_death_anim_strip_8.png new file mode 100644 index 0000000..5385e12 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_death_anim_strip_8.png differ diff --git a/assets/characters/nancy/unformatted/herochar_hit_anim.gif b/assets/characters/nancy/unformatted/herochar_hit_anim.gif new file mode 100644 index 0000000..428580e Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_hit_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_hit_anim_strip_3.png b/assets/characters/nancy/unformatted/herochar_hit_anim_strip_3.png new file mode 100644 index 0000000..2ed2484 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_hit_anim_strip_3.png differ diff --git a/assets/characters/nancy/unformatted/herochar_idle_anim.gif b/assets/characters/nancy/unformatted/herochar_idle_anim.gif new file mode 100644 index 0000000..12cf9b6 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_idle_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_double_anim.gif b/assets/characters/nancy/unformatted/herochar_jump_double_anim.gif new file mode 100644 index 0000000..5dd16e3 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_double_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_double_anim_strip_3.png b/assets/characters/nancy/unformatted/herochar_jump_double_anim_strip_3.png new file mode 100644 index 0000000..857e7a5 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_double_anim_strip_3.png differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_down_anim.gif b/assets/characters/nancy/unformatted/herochar_jump_down_anim.gif new file mode 100644 index 0000000..935e44c Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_down_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_down_anim_strip_3.png b/assets/characters/nancy/unformatted/herochar_jump_down_anim_strip_3.png new file mode 100644 index 0000000..d654054 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_down_anim_strip_3.png differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_up_anim.gif b/assets/characters/nancy/unformatted/herochar_jump_up_anim.gif new file mode 100644 index 0000000..e6ddff2 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_up_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_jump_up_anim_strip_3.png b/assets/characters/nancy/unformatted/herochar_jump_up_anim_strip_3.png new file mode 100644 index 0000000..05af352 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_jump_up_anim_strip_3.png differ diff --git a/assets/characters/nancy/unformatted/herochar_pushing_foward_anim.gif b/assets/characters/nancy/unformatted/herochar_pushing_foward_anim.gif new file mode 100644 index 0000000..c9a836e Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_pushing_foward_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_pushing_foward_anim_strip_6.png b/assets/characters/nancy/unformatted/herochar_pushing_foward_anim_strip_6.png new file mode 100644 index 0000000..79a37f9 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_pushing_foward_anim_strip_6.png differ diff --git a/assets/characters/nancy/unformatted/herochar_run_anim.gif b/assets/characters/nancy/unformatted/herochar_run_anim.gif new file mode 100644 index 0000000..db8e0a2 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_run_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_spritesheet(new).png b/assets/characters/nancy/unformatted/herochar_spritesheet(new).png new file mode 100644 index 0000000..54fc0f4 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_spritesheet(new).png differ diff --git a/assets/characters/nancy/unformatted/herochar_sword_attack_anim.gif b/assets/characters/nancy/unformatted/herochar_sword_attack_anim.gif new file mode 100644 index 0000000..cfd98c1 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_sword_attack_anim.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.gif b/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.gif new file mode 100644 index 0000000..9ec0152 Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.gif differ diff --git a/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.png b/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.png new file mode 100644 index 0000000..9dda28b Binary files /dev/null and b/assets/characters/nancy/unformatted/herochar_sword_attack_anim_strip_4.png differ diff --git a/assets/characters/nancy/unformatted/hit_sparkle_anim.gif b/assets/characters/nancy/unformatted/hit_sparkle_anim.gif new file mode 100644 index 0000000..903da21 Binary files /dev/null and b/assets/characters/nancy/unformatted/hit_sparkle_anim.gif differ diff --git a/assets/characters/nancy/unformatted/hit_sparkle_anim_strip_4.png b/assets/characters/nancy/unformatted/hit_sparkle_anim_strip_4.png new file mode 100644 index 0000000..1024fb8 Binary files /dev/null and b/assets/characters/nancy/unformatted/hit_sparkle_anim_strip_4.png differ diff --git a/assets/characters/nancy/unformatted/sword_effect(new).gif b/assets/characters/nancy/unformatted/sword_effect(new).gif new file mode 100644 index 0000000..fa4ff40 Binary files /dev/null and b/assets/characters/nancy/unformatted/sword_effect(new).gif differ diff --git a/assets/characters/nancy/unformatted/sword_effect_strip_4(new).png b/assets/characters/nancy/unformatted/sword_effect_strip_4(new).png new file mode 100644 index 0000000..795f01a Binary files /dev/null and b/assets/characters/nancy/unformatted/sword_effect_strip_4(new).png differ diff --git a/assets/characters/rabbit/rabit_idle_anim.gif b/assets/characters/rabbit/rabit_idle_anim.gif new file mode 100644 index 0000000..5c370df Binary files /dev/null and b/assets/characters/rabbit/rabit_idle_anim.gif differ diff --git a/assets/characters/rabbit/rabit_idle_anim_strip_4.png b/assets/characters/rabbit/rabit_idle_anim_strip_4.png new file mode 100644 index 0000000..80f8c7a Binary files /dev/null and b/assets/characters/rabbit/rabit_idle_anim_strip_4.png differ diff --git a/assets/characters/rabbit/rabit_walk_anim.gif b/assets/characters/rabbit/rabit_walk_anim.gif new file mode 100644 index 0000000..53da2bd Binary files /dev/null and b/assets/characters/rabbit/rabit_walk_anim.gif differ diff --git a/assets/characters/rabbit/rabit_walk_anim_strip_6.png b/assets/characters/rabbit/rabit_walk_anim_strip_6.png new file mode 100644 index 0000000..0a2859f Binary files /dev/null and b/assets/characters/rabbit/rabit_walk_anim_strip_6.png differ diff --git a/assets/characters/ship/left1.png b/assets/characters/ship/left1.png new file mode 100644 index 0000000..ff0d49f Binary files /dev/null and b/assets/characters/ship/left1.png differ diff --git a/assets/characters/ship/left2.png b/assets/characters/ship/left2.png new file mode 100644 index 0000000..e9ebea0 Binary files /dev/null and b/assets/characters/ship/left2.png differ diff --git a/assets/characters/ship/leftmiddle1.png b/assets/characters/ship/leftmiddle1.png new file mode 100644 index 0000000..f98c64a Binary files /dev/null and b/assets/characters/ship/leftmiddle1.png differ diff --git a/assets/characters/ship/leftmiddle2.png b/assets/characters/ship/leftmiddle2.png new file mode 100644 index 0000000..3732158 Binary files /dev/null and b/assets/characters/ship/leftmiddle2.png differ diff --git a/assets/characters/ship/middle1.png b/assets/characters/ship/middle1.png new file mode 100644 index 0000000..86309cd Binary files /dev/null and b/assets/characters/ship/middle1.png differ diff --git a/assets/characters/ship/middle2.png b/assets/characters/ship/middle2.png new file mode 100644 index 0000000..f35efad Binary files /dev/null and b/assets/characters/ship/middle2.png differ diff --git a/assets/characters/ship/right1.png b/assets/characters/ship/right1.png new file mode 100644 index 0000000..984d36d Binary files /dev/null and b/assets/characters/ship/right1.png differ diff --git a/assets/characters/ship/right2.png b/assets/characters/ship/right2.png new file mode 100644 index 0000000..3ecd38c Binary files /dev/null and b/assets/characters/ship/right2.png differ diff --git a/assets/characters/ship/rightmiddle1.png b/assets/characters/ship/rightmiddle1.png new file mode 100644 index 0000000..7967bb4 Binary files /dev/null and b/assets/characters/ship/rightmiddle1.png differ diff --git a/assets/characters/ship/rightmiddle2.png b/assets/characters/ship/rightmiddle2.png new file mode 100644 index 0000000..3721c50 Binary files /dev/null and b/assets/characters/ship/rightmiddle2.png differ diff --git a/assets/characters/slime/slime_death_anim.gif b/assets/characters/slime/slime_death_anim.gif new file mode 100644 index 0000000..e38a642 Binary files /dev/null and b/assets/characters/slime/slime_death_anim.gif differ diff --git a/assets/characters/slime/slime_death_anim_strip_6.png b/assets/characters/slime/slime_death_anim_strip_6.png new file mode 100644 index 0000000..2653067 Binary files /dev/null and b/assets/characters/slime/slime_death_anim_strip_6.png differ diff --git a/assets/characters/slime/slime_hit_anim.gif b/assets/characters/slime/slime_hit_anim.gif new file mode 100644 index 0000000..55571ea Binary files /dev/null and b/assets/characters/slime/slime_hit_anim.gif differ diff --git a/assets/characters/slime/slime_hit_anim_strip_3.png b/assets/characters/slime/slime_hit_anim_strip_3.png new file mode 100644 index 0000000..9a5ccbe Binary files /dev/null and b/assets/characters/slime/slime_hit_anim_strip_3.png differ diff --git a/assets/characters/slime/slime_idle_anim.gif b/assets/characters/slime/slime_idle_anim.gif new file mode 100644 index 0000000..d32693c Binary files /dev/null and b/assets/characters/slime/slime_idle_anim.gif differ diff --git a/assets/characters/slime/slime_idle_anim_strip_5.png b/assets/characters/slime/slime_idle_anim_strip_5.png new file mode 100644 index 0000000..a46f190 Binary files /dev/null and b/assets/characters/slime/slime_idle_anim_strip_5.png differ diff --git a/assets/characters/slime/slime_spritesheet.png b/assets/characters/slime/slime_spritesheet.png new file mode 100644 index 0000000..a9b2119 Binary files /dev/null and b/assets/characters/slime/slime_spritesheet.png differ diff --git a/assets/characters/slime/slime_walk_anim.gif b/assets/characters/slime/slime_walk_anim.gif new file mode 100644 index 0000000..cc8b86d Binary files /dev/null and b/assets/characters/slime/slime_walk_anim.gif differ diff --git a/assets/characters/slime/slime_walk_anim_strip_15.png b/assets/characters/slime/slime_walk_anim_strip_15.png new file mode 100644 index 0000000..2bcdc6c Binary files /dev/null and b/assets/characters/slime/slime_walk_anim_strip_15.png differ diff --git a/assets/characters/worm/worm_death_anim.gif b/assets/characters/worm/worm_death_anim.gif new file mode 100644 index 0000000..da48416 Binary files /dev/null and b/assets/characters/worm/worm_death_anim.gif differ diff --git a/assets/characters/worm/worm_death_anim_strip_6.png b/assets/characters/worm/worm_death_anim_strip_6.png new file mode 100644 index 0000000..c8cf064 Binary files /dev/null and b/assets/characters/worm/worm_death_anim_strip_6.png differ diff --git a/assets/characters/worm/worm_hit_anim.gif b/assets/characters/worm/worm_hit_anim.gif new file mode 100644 index 0000000..19e8672 Binary files /dev/null and b/assets/characters/worm/worm_hit_anim.gif differ diff --git a/assets/characters/worm/worm_hit_anim_strip_3.png b/assets/characters/worm/worm_hit_anim_strip_3.png new file mode 100644 index 0000000..cbd82b1 Binary files /dev/null and b/assets/characters/worm/worm_hit_anim_strip_3.png differ diff --git a/assets/characters/worm/worm_spritesheet.png b/assets/characters/worm/worm_spritesheet.png new file mode 100644 index 0000000..4a9b8d3 Binary files /dev/null and b/assets/characters/worm/worm_spritesheet.png differ diff --git a/assets/characters/worm/worm_walk_anim.gif b/assets/characters/worm/worm_walk_anim.gif new file mode 100644 index 0000000..7213697 Binary files /dev/null and b/assets/characters/worm/worm_walk_anim.gif differ diff --git a/assets/characters/worm/worm_walk_anim_strip_6.png b/assets/characters/worm/worm_walk_anim_strip_6.png new file mode 100644 index 0000000..09d07e6 Binary files /dev/null and b/assets/characters/worm/worm_walk_anim_strip_6.png differ diff --git a/assets/decoration/antidote_potion.png b/assets/decoration/antidote_potion.png new file mode 100644 index 0000000..8519cf9 Binary files /dev/null and b/assets/decoration/antidote_potion.png differ diff --git a/assets/decoration/apple_item.png b/assets/decoration/apple_item.png new file mode 100644 index 0000000..8e927ce Binary files /dev/null and b/assets/decoration/apple_item.png differ diff --git a/assets/decoration/arrow_plate_left.png b/assets/decoration/arrow_plate_left.png new file mode 100644 index 0000000..0efef15 Binary files /dev/null and b/assets/decoration/arrow_plate_left.png differ diff --git a/assets/decoration/arrow_plate_right.png b/assets/decoration/arrow_plate_right.png new file mode 100644 index 0000000..7db90f0 Binary files /dev/null and b/assets/decoration/arrow_plate_right.png differ diff --git a/assets/decoration/bigflowers_props.png b/assets/decoration/bigflowers_props.png new file mode 100644 index 0000000..f599205 Binary files /dev/null and b/assets/decoration/bigflowers_props.png differ diff --git a/assets/decoration/bomb_on_ground_anim.gif b/assets/decoration/bomb_on_ground_anim.gif new file mode 100644 index 0000000..2623271 Binary files /dev/null and b/assets/decoration/bomb_on_ground_anim.gif differ diff --git a/assets/decoration/bomb_on_ground_anim_strip_8.png b/assets/decoration/bomb_on_ground_anim_strip_8.png new file mode 100644 index 0000000..bce6e41 Binary files /dev/null and b/assets/decoration/bomb_on_ground_anim_strip_8.png differ diff --git a/assets/decoration/bomb_thrown_anim.gif b/assets/decoration/bomb_thrown_anim.gif new file mode 100644 index 0000000..fe7c287 Binary files /dev/null and b/assets/decoration/bomb_thrown_anim.gif differ diff --git a/assets/decoration/bomb_thrown_anim_strip_3.png b/assets/decoration/bomb_thrown_anim_strip_3.png new file mode 100644 index 0000000..51db437 Binary files /dev/null and b/assets/decoration/bomb_thrown_anim_strip_3.png differ diff --git a/assets/decoration/buttom.png b/assets/decoration/buttom.png new file mode 100644 index 0000000..cf7a0cd Binary files /dev/null and b/assets/decoration/buttom.png differ diff --git a/assets/decoration/buttom_pressed.png b/assets/decoration/buttom_pressed.png new file mode 100644 index 0000000..6a859e7 Binary files /dev/null and b/assets/decoration/buttom_pressed.png differ diff --git a/assets/decoration/coin_anim.gif b/assets/decoration/coin_anim.gif new file mode 100644 index 0000000..8444025 Binary files /dev/null and b/assets/decoration/coin_anim.gif differ diff --git a/assets/decoration/coin_anim_strip_6.png b/assets/decoration/coin_anim_strip_6.png new file mode 100644 index 0000000..5e2e6e0 Binary files /dev/null and b/assets/decoration/coin_anim_strip_6.png differ diff --git a/assets/decoration/coin_pickup_anim.gif b/assets/decoration/coin_pickup_anim.gif new file mode 100644 index 0000000..8a6ba68 Binary files /dev/null and b/assets/decoration/coin_pickup_anim.gif differ diff --git a/assets/decoration/coin_pickup_anim_strip_6.png b/assets/decoration/coin_pickup_anim_strip_6.png new file mode 100644 index 0000000..a9b986b Binary files /dev/null and b/assets/decoration/coin_pickup_anim_strip_6.png differ diff --git a/assets/decoration/door.png b/assets/decoration/door.png new file mode 100644 index 0000000..6d50c0b Binary files /dev/null and b/assets/decoration/door.png differ diff --git a/assets/decoration/drygrass_props.png b/assets/decoration/drygrass_props.png new file mode 100644 index 0000000..091b144 Binary files /dev/null and b/assets/decoration/drygrass_props.png differ diff --git a/assets/decoration/explosion_anim.gif b/assets/decoration/explosion_anim.gif new file mode 100644 index 0000000..8509771 Binary files /dev/null and b/assets/decoration/explosion_anim.gif differ diff --git a/assets/decoration/explosion_anim_strip_10.png b/assets/decoration/explosion_anim_strip_10.png new file mode 100644 index 0000000..9d556bb Binary files /dev/null and b/assets/decoration/explosion_anim_strip_10.png differ diff --git a/assets/decoration/flowers_props.png b/assets/decoration/flowers_props.png new file mode 100644 index 0000000..13f3251 Binary files /dev/null and b/assets/decoration/flowers_props.png differ diff --git a/assets/decoration/grass_props.png b/assets/decoration/grass_props.png new file mode 100644 index 0000000..f778357 Binary files /dev/null and b/assets/decoration/grass_props.png differ diff --git a/assets/decoration/health_potion.png b/assets/decoration/health_potion.png new file mode 100644 index 0000000..d8416af Binary files /dev/null and b/assets/decoration/health_potion.png differ diff --git a/assets/decoration/lever_turned_left.png b/assets/decoration/lever_turned_left.png new file mode 100644 index 0000000..701d071 Binary files /dev/null and b/assets/decoration/lever_turned_left.png differ diff --git a/assets/decoration/lever_turned_right.png b/assets/decoration/lever_turned_right.png new file mode 100644 index 0000000..5065e4e Binary files /dev/null and b/assets/decoration/lever_turned_right.png differ diff --git a/assets/decoration/loot_box_anim.gif b/assets/decoration/loot_box_anim.gif new file mode 100644 index 0000000..b294eb8 Binary files /dev/null and b/assets/decoration/loot_box_anim.gif differ diff --git a/assets/decoration/loot_box_anim_opening.gif b/assets/decoration/loot_box_anim_opening.gif new file mode 100644 index 0000000..d49f342 Binary files /dev/null and b/assets/decoration/loot_box_anim_opening.gif differ diff --git a/assets/decoration/loot_box_anim_opening_strip_6.png b/assets/decoration/loot_box_anim_opening_strip_6.png new file mode 100644 index 0000000..bcdd108 Binary files /dev/null and b/assets/decoration/loot_box_anim_opening_strip_6.png differ diff --git a/assets/decoration/loot_box_open.png b/assets/decoration/loot_box_open.png new file mode 100644 index 0000000..0f92d1a Binary files /dev/null and b/assets/decoration/loot_box_open.png differ diff --git a/assets/decoration/meat_item.png b/assets/decoration/meat_item.png new file mode 100644 index 0000000..d863442 Binary files /dev/null and b/assets/decoration/meat_item.png differ diff --git a/assets/decoration/orb.png b/assets/decoration/orb.png new file mode 100644 index 0000000..7a92389 Binary files /dev/null and b/assets/decoration/orb.png differ diff --git a/assets/decoration/orb_anim.gif b/assets/decoration/orb_anim.gif new file mode 100644 index 0000000..e421ac8 Binary files /dev/null and b/assets/decoration/orb_anim.gif differ diff --git a/assets/decoration/orb_anim_strip_6.png b/assets/decoration/orb_anim_strip_6.png new file mode 100644 index 0000000..411882d Binary files /dev/null and b/assets/decoration/orb_anim_strip_6.png differ diff --git a/assets/decoration/orb_collected_anim.gif b/assets/decoration/orb_collected_anim.gif new file mode 100644 index 0000000..eeace1a Binary files /dev/null and b/assets/decoration/orb_collected_anim.gif differ diff --git a/assets/decoration/orb_collected_anim_strip_5.png b/assets/decoration/orb_collected_anim_strip_5.png new file mode 100644 index 0000000..525df01 Binary files /dev/null and b/assets/decoration/orb_collected_anim_strip_5.png differ diff --git a/assets/decoration/root_props.png b/assets/decoration/root_props.png new file mode 100644 index 0000000..6e18d2f Binary files /dev/null and b/assets/decoration/root_props.png differ diff --git a/assets/decoration/save_point_anim.gif b/assets/decoration/save_point_anim.gif new file mode 100644 index 0000000..a596f70 Binary files /dev/null and b/assets/decoration/save_point_anim.gif differ diff --git a/assets/decoration/save_point_anim_strip_9.png b/assets/decoration/save_point_anim_strip_9.png new file mode 100644 index 0000000..f15cf42 Binary files /dev/null and b/assets/decoration/save_point_anim_strip_9.png differ diff --git a/assets/decoration/save_point_saving_anim.gif b/assets/decoration/save_point_saving_anim.gif new file mode 100644 index 0000000..998225e Binary files /dev/null and b/assets/decoration/save_point_saving_anim.gif differ diff --git a/assets/decoration/save_point_saving_anim_strip_3.png b/assets/decoration/save_point_saving_anim_strip_3.png new file mode 100644 index 0000000..cb3aa1a Binary files /dev/null and b/assets/decoration/save_point_saving_anim_strip_3.png differ diff --git a/assets/decoration/spikes.png b/assets/decoration/spikes.png new file mode 100644 index 0000000..62644e5 Binary files /dev/null and b/assets/decoration/spikes.png differ diff --git a/assets/decoration/spikes_trap.png b/assets/decoration/spikes_trap.png new file mode 100644 index 0000000..16a97ee Binary files /dev/null and b/assets/decoration/spikes_trap.png differ diff --git a/assets/decoration/spikes_trap_hit_wall_dust_effect.gif b/assets/decoration/spikes_trap_hit_wall_dust_effect.gif new file mode 100644 index 0000000..40d846e Binary files /dev/null and b/assets/decoration/spikes_trap_hit_wall_dust_effect.gif differ diff --git a/assets/decoration/spikes_trap_hit_wall_dust_effect_strip_3.png b/assets/decoration/spikes_trap_hit_wall_dust_effect_strip_3.png new file mode 100644 index 0000000..9e52301 Binary files /dev/null and b/assets/decoration/spikes_trap_hit_wall_dust_effect_strip_3.png differ diff --git a/assets/decoration/stone.png b/assets/decoration/stone.png new file mode 100644 index 0000000..c5d69e5 Binary files /dev/null and b/assets/decoration/stone.png differ diff --git a/assets/decoration/strange_door_closed_anim.gif b/assets/decoration/strange_door_closed_anim.gif new file mode 100644 index 0000000..66c18fb Binary files /dev/null and b/assets/decoration/strange_door_closed_anim.gif differ diff --git a/assets/decoration/strange_door_closed_anim_strip_10.png b/assets/decoration/strange_door_closed_anim_strip_10.png new file mode 100644 index 0000000..d1df09e Binary files /dev/null and b/assets/decoration/strange_door_closed_anim_strip_10.png differ diff --git a/assets/decoration/strange_door_opening_anim.gif b/assets/decoration/strange_door_opening_anim.gif new file mode 100644 index 0000000..29097ab Binary files /dev/null and b/assets/decoration/strange_door_opening_anim.gif differ diff --git a/assets/decoration/strange_door_opening_anim_strip_14.png b/assets/decoration/strange_door_opening_anim_strip_14.png new file mode 100644 index 0000000..50954c3 Binary files /dev/null and b/assets/decoration/strange_door_opening_anim_strip_14.png differ diff --git a/assets/decoration/tiki_torch_props.gif b/assets/decoration/tiki_torch_props.gif new file mode 100644 index 0000000..80a325b Binary files /dev/null and b/assets/decoration/tiki_torch_props.gif differ diff --git a/assets/decoration/tiki_torch_props_strip_12.png b/assets/decoration/tiki_torch_props_strip_12.png new file mode 100644 index 0000000..d92dd13 Binary files /dev/null and b/assets/decoration/tiki_torch_props_strip_12.png differ diff --git a/assets/decoration/trap_spikes_anim.gif b/assets/decoration/trap_spikes_anim.gif new file mode 100644 index 0000000..f250972 Binary files /dev/null and b/assets/decoration/trap_spikes_anim.gif differ diff --git a/assets/decoration/trap_spikes_anim_strip_7.png b/assets/decoration/trap_spikes_anim_strip_7.png new file mode 100644 index 0000000..249ba86 Binary files /dev/null and b/assets/decoration/trap_spikes_anim_strip_7.png differ diff --git a/assets/decoration/trap_suspended_anim.gif b/assets/decoration/trap_suspended_anim.gif new file mode 100644 index 0000000..8c05001 Binary files /dev/null and b/assets/decoration/trap_suspended_anim.gif differ diff --git a/assets/decoration/trap_suspended_anim_strip_18.png b/assets/decoration/trap_suspended_anim_strip_18.png new file mode 100644 index 0000000..b50ae43 Binary files /dev/null and b/assets/decoration/trap_suspended_anim_strip_18.png differ diff --git a/assets/decoration/vase.png b/assets/decoration/vase.png new file mode 100644 index 0000000..c3aed08 Binary files /dev/null and b/assets/decoration/vase.png differ diff --git a/assets/decoration/vase_breaking_anim.gif b/assets/decoration/vase_breaking_anim.gif new file mode 100644 index 0000000..806e308 Binary files /dev/null and b/assets/decoration/vase_breaking_anim.gif differ diff --git a/assets/decoration/vase_breaking_anim_strip_5.png b/assets/decoration/vase_breaking_anim_strip_5.png new file mode 100644 index 0000000..1345da3 Binary files /dev/null and b/assets/decoration/vase_breaking_anim_strip_5.png differ diff --git a/assets/decoration/wood_slab_left.png b/assets/decoration/wood_slab_left.png new file mode 100644 index 0000000..d3a9ba6 Binary files /dev/null and b/assets/decoration/wood_slab_left.png differ diff --git a/assets/decoration/wood_slab_middle.png b/assets/decoration/wood_slab_middle.png new file mode 100644 index 0000000..20a099f Binary files /dev/null and b/assets/decoration/wood_slab_middle.png differ diff --git a/assets/decoration/wood_slab_right.png b/assets/decoration/wood_slab_right.png new file mode 100644 index 0000000..b1ef044 Binary files /dev/null and b/assets/decoration/wood_slab_right.png differ diff --git a/assets/decoration/wooden_plate.png b/assets/decoration/wooden_plate.png new file mode 100644 index 0000000..1754c9e Binary files /dev/null and b/assets/decoration/wooden_plate.png differ diff --git a/assets/happy to sad.gif b/assets/happy to sad.gif new file mode 100644 index 0000000..af70dbd Binary files /dev/null and b/assets/happy to sad.gif differ diff --git a/assets/menu/nancy.png b/assets/menu/nancy.png new file mode 100644 index 0000000..9f6d624 Binary files /dev/null and b/assets/menu/nancy.png differ diff --git a/assets/menu/spaceship.png b/assets/menu/spaceship.png new file mode 100644 index 0000000..acba336 Binary files /dev/null and b/assets/menu/spaceship.png differ diff --git a/assets/objects/loot_box_anim_strip_12.png b/assets/objects/loot_box_anim_strip_12.png new file mode 100644 index 0000000..baea028 Binary files /dev/null and b/assets/objects/loot_box_anim_strip_12.png differ diff --git a/assets/projectiles/energy1.png b/assets/projectiles/energy1.png new file mode 100644 index 0000000..7640de8 Binary files /dev/null and b/assets/projectiles/energy1.png differ diff --git a/assets/projectiles/energy2.png b/assets/projectiles/energy2.png new file mode 100644 index 0000000..a235b77 Binary files /dev/null and b/assets/projectiles/energy2.png differ diff --git a/assets/projectiles/plasma1.png b/assets/projectiles/plasma1.png new file mode 100644 index 0000000..7aafb6d Binary files /dev/null and b/assets/projectiles/plasma1.png differ diff --git a/assets/projectiles/plasma2.png b/assets/projectiles/plasma2.png new file mode 100644 index 0000000..17e5214 Binary files /dev/null and b/assets/projectiles/plasma2.png differ diff --git a/assets/spr_bunni_hat_strip4.png b/assets/spr_bunni_hat_strip4.png new file mode 100644 index 0000000..137fe1a Binary files /dev/null and b/assets/spr_bunni_hat_strip4.png differ diff --git a/assets/spr_witch_full_strip8.png b/assets/spr_witch_full_strip8.png new file mode 100644 index 0000000..0bd900e Binary files /dev/null and b/assets/spr_witch_full_strip8.png differ diff --git a/assets/spr_witch_nohat_strip8.png b/assets/spr_witch_nohat_strip8.png new file mode 100644 index 0000000..b521c14 Binary files /dev/null and b/assets/spr_witch_nohat_strip8.png differ diff --git a/assets/terrain/background.png b/assets/terrain/background.png new file mode 100644 index 0000000..7903666 Binary files /dev/null and b/assets/terrain/background.png differ diff --git a/assets/terrain/bg_0.png b/assets/terrain/bg_0.png new file mode 100644 index 0000000..36250bc Binary files /dev/null and b/assets/terrain/bg_0.png differ diff --git a/assets/terrain/bg_1.png b/assets/terrain/bg_1.png new file mode 100644 index 0000000..ff50f9a Binary files /dev/null and b/assets/terrain/bg_1.png differ diff --git a/assets/terrain/bg_2.png b/assets/terrain/bg_2.png new file mode 100644 index 0000000..1187e6c Binary files /dev/null and b/assets/terrain/bg_2.png differ diff --git a/assets/terrain/fg_0.png b/assets/terrain/fg_0.png new file mode 100644 index 0000000..b21d7d1 Binary files /dev/null and b/assets/terrain/fg_0.png differ diff --git a/assets/terrain/fg_1.png b/assets/terrain/fg_1.png new file mode 100644 index 0000000..acf2ec2 Binary files /dev/null and b/assets/terrain/fg_1.png differ diff --git a/assets/terrain/flag_myrheon.aseprite b/assets/terrain/flag_myrheon.aseprite new file mode 100644 index 0000000..cd7bc76 Binary files /dev/null and b/assets/terrain/flag_myrheon.aseprite differ diff --git a/assets/terrain/lava_bottom.png b/assets/terrain/lava_bottom.png new file mode 100644 index 0000000..e5355ce Binary files /dev/null and b/assets/terrain/lava_bottom.png differ diff --git a/assets/terrain/lava_fall.png b/assets/terrain/lava_fall.png new file mode 100644 index 0000000..af2ac5a Binary files /dev/null and b/assets/terrain/lava_fall.png differ diff --git a/assets/terrain/lava_top.png b/assets/terrain/lava_top.png new file mode 100644 index 0000000..b6ed263 Binary files /dev/null and b/assets/terrain/lava_top.png differ diff --git a/assets/terrain/myrheon_flag_1.png b/assets/terrain/myrheon_flag_1.png new file mode 100644 index 0000000..d302081 Binary files /dev/null and b/assets/terrain/myrheon_flag_1.png differ diff --git a/assets/terrain/myrheon_flag_2.png b/assets/terrain/myrheon_flag_2.png new file mode 100644 index 0000000..ce3a58d Binary files /dev/null and b/assets/terrain/myrheon_flag_2.png differ diff --git a/assets/terrain/ta_lava_fall_end.png b/assets/terrain/ta_lava_fall_end.png new file mode 100644 index 0000000..bfa1200 Binary files /dev/null and b/assets/terrain/ta_lava_fall_end.png differ diff --git a/assets/terrain/tileset.png b/assets/terrain/tileset.png new file mode 100644 index 0000000..014f5b1 Binary files /dev/null and b/assets/terrain/tileset.png differ diff --git a/assets/terrain/tileset2.png b/assets/terrain/tileset2.png new file mode 100644 index 0000000..0dc2aa1 Binary files /dev/null and b/assets/terrain/tileset2.png differ diff --git a/assets/terrain/waterfall_anim.gif b/assets/terrain/waterfall_anim.gif new file mode 100644 index 0000000..a7724fe Binary files /dev/null and b/assets/terrain/waterfall_anim.gif differ diff --git a/assets/terrain/waterfall_anim_strip_4.png b/assets/terrain/waterfall_anim_strip_4.png new file mode 100644 index 0000000..871d47e Binary files /dev/null and b/assets/terrain/waterfall_anim_strip_4.png differ diff --git a/assets/terrain/waterfall_bottom_anim.gif b/assets/terrain/waterfall_bottom_anim.gif new file mode 100644 index 0000000..8237dc5 Binary files /dev/null and b/assets/terrain/waterfall_bottom_anim.gif differ diff --git a/assets/terrain/waterfall_bottom_anim_strip_4.png b/assets/terrain/waterfall_bottom_anim_strip_4.png new file mode 100644 index 0000000..8ac0191 Binary files /dev/null and b/assets/terrain/waterfall_bottom_anim_strip_4.png differ diff --git a/assets/ui/coins_hud.png b/assets/ui/coins_hud.png new file mode 100644 index 0000000..f6200e1 Binary files /dev/null and b/assets/ui/coins_hud.png differ diff --git a/assets/ui/fonts.png b/assets/ui/fonts.png new file mode 100644 index 0000000..fa002b8 Binary files /dev/null and b/assets/ui/fonts.png differ diff --git a/assets/ui/health_hud_left.png b/assets/ui/health_hud_left.png new file mode 100644 index 0000000..17e41c0 Binary files /dev/null and b/assets/ui/health_hud_left.png differ diff --git a/assets/ui/health_hud_middle.png b/assets/ui/health_hud_middle.png new file mode 100644 index 0000000..4f42b2d Binary files /dev/null and b/assets/ui/health_hud_middle.png differ diff --git a/assets/ui/health_hud_right.png b/assets/ui/health_hud_right.png new file mode 100644 index 0000000..ffd38d5 Binary files /dev/null and b/assets/ui/health_hud_right.png differ diff --git a/assets/ui/health_menu_hud.png b/assets/ui/health_menu_hud.png new file mode 100644 index 0000000..ece8a17 Binary files /dev/null and b/assets/ui/health_menu_hud.png differ diff --git a/assets/ui/hearts_hud.png b/assets/ui/hearts_hud.png new file mode 100644 index 0000000..af5c0a8 Binary files /dev/null and b/assets/ui/hearts_hud.png differ diff --git a/assets/ui/lifes_icon.png b/assets/ui/lifes_icon.png new file mode 100644 index 0000000..720c008 Binary files /dev/null and b/assets/ui/lifes_icon.png differ diff --git a/assets/ui/lost_hearts_anim.gif b/assets/ui/lost_hearts_anim.gif new file mode 100644 index 0000000..40190f4 Binary files /dev/null and b/assets/ui/lost_hearts_anim.gif differ diff --git a/assets/ui/lost_hearts_anim_strip_5.png b/assets/ui/lost_hearts_anim_strip_5.png new file mode 100644 index 0000000..657f3bd Binary files /dev/null and b/assets/ui/lost_hearts_anim_strip_5.png differ diff --git a/assets/ui/no_hearts_hud.png b/assets/ui/no_hearts_hud.png new file mode 100644 index 0000000..73b9012 Binary files /dev/null and b/assets/ui/no_hearts_hud.png differ diff --git a/assets/ui/orbs_hud.png b/assets/ui/orbs_hud.png new file mode 100644 index 0000000..89d1fdd Binary files /dev/null and b/assets/ui/orbs_hud.png differ diff --git a/assets/ui/select_icon_anim.gif b/assets/ui/select_icon_anim.gif new file mode 100644 index 0000000..c48cce1 Binary files /dev/null and b/assets/ui/select_icon_anim.gif differ diff --git a/assets/ui/select_icon_anim_strip_5.png b/assets/ui/select_icon_anim_strip_5.png new file mode 100644 index 0000000..49ecb94 Binary files /dev/null and b/assets/ui/select_icon_anim_strip_5.png differ diff --git a/conf.lua b/conf.lua new file mode 100644 index 0000000..b93a1c7 --- /dev/null +++ b/conf.lua @@ -0,0 +1,7 @@ +function love.conf(lore) + lore.title = "Metroidvania" + lore.version = "11.3" + lore.window.width = 800 + lore.window.height = 600 + lore.window.resizable = true +end diff --git a/data/levels/2.json b/data/levels/2.json new file mode 100644 index 0000000..65e5c9e --- /dev/null +++ b/data/levels/2.json @@ -0,0 +1 @@ +[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[202,202,202,202,202,202,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,202,0,202,202,202,202,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,106,106,106,106,106,106,106,106,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,119,119,119,119,119,119,119,130,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,119,119,119,119,119,119,119,119,130,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,119,119,119,119,119,119,119,119,119,130,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,119,119,119,119,119,119,119,119,119,119,130,106,106,106,106,106,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] \ No newline at end of file diff --git a/data/levels/3.json b/data/levels/3.json new file mode 100644 index 0000000..ddff12a --- /dev/null +++ b/data/levels/3.json @@ -0,0 +1 @@ +[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,183,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,153,0,0,188,189,189,189,189,190,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,157,0,0,201,229,229,229,187,203,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,157,0,0,0,229,226,226,229,0,0,0],[186,186,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,157,0,0,0,229,226,226,229,0,0,0],[186,186,0,186,186,183,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,183,202,202,202,202,208,183,185,185,185,185,185,185,185,185,185,185,185,185,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,157,0,0,0,229,226,226,229,0,0,0],[186,186,0,186,186,183,0,0,0,0,0,196,0,0,0,0,0,196,0,0,0,0,0,196,0,0,0,0,0,196,0,0,0,0,204,183,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,222,157,0,0,0,229,226,226,229,0,0,0],[186,186,0,186,186,183,0,0,0,0,0,199,0,0,0,0,0,198,0,0,0,0,0,199,0,0,0,0,0,198,0,0,0,0,204,183,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,308,309,0,0,0,0,0,0,0,0,0,0,10,223,222,157,157,0,0,0,229,226,226,229,0,0,0],[186,186,0,0,0,0,0,0,0,0,0,198,0,0,0,0,0,199,0,0,0,0,0,198,0,0,0,0,0,199,0,0,0,0,204,183,186,186,186,186,186,186,186,186,186,186,186,186,183,0,0,0,0,310,0,0,0,0,0,0,0,0,0,10,157,223,104,0,157,157,0,0,0,229,226,226,229,0,0,0],[186,186,186,186,186,183,0,0,0,0,0,198,0,0,0,0,0,198,0,0,0,0,0,199,0,0,0,0,0,199,0,0,0,0,204,183,186,186,186,186,186,186,186,186,186,186,186,186,183,5,0,0,0,310,0,0,0,0,0,0,0,10,222,157,104,0,0,0,157,157,0,0,0,229,226,226,229,0,0,0],[186,186,186,186,186,183,0,0,0,0,0,197,0,0,0,0,0,197,0,0,0,0,0,197,0,0,0,0,0,197,0,0,0,0,217,183,186,186,186,186,186,186,186,186,186,186,186,186,183,18,8,9,0,311,0,0,0,0,0,10,222,222,104,0,0,0,0,0,157,157,0,0,0,229,226,226,229,0,0,0],[186,186,186,186,186,183,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,183,186,186,186,186,186,186,186,186,186,186,186,186,183,15,21,22,2,2,2,2,2,2,157,157,157,2,2,2,2,2,2,2,157,157,2,2,2,229,226,226,229,2,2,2],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15],[186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,183,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,229,226,226,229,15,15,15]] \ No newline at end of file diff --git a/data/levels/ewae.json b/data/levels/ewae.json new file mode 100644 index 0000000..1612df3 --- /dev/null +++ b/data/levels/ewae.json @@ -0,0 +1 @@ +[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,162,163,163,163,164,0,0,0,0,0,0,0,0,0],[154,155,0,0,0,0,144,145,145,146,176,176,176,144,145,145,146,0,0,0,0,152,153],[175,182,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,169,177],[0,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,0],[0,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,0],[0,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,0],[0,181,0,162,164,0,0,0,0,0,0,0,0,0,0,0,0,0,162,164,0,178,0],[0,0,0,175,177,0,0,0,0,0,0,0,0,0,0,0,0,0,175,177,0,0,0],[0,0,0,0,0,0,144,145,145,145,145,145,145,145,145,145,146,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] \ No newline at end of file diff --git a/data/levels/level1.json b/data/levels/level1.json new file mode 100644 index 0000000..638683e --- /dev/null +++ b/data/levels/level1.json @@ -0,0 +1 @@ +[[119,119,119,0,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119],[119,119,119,0,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119],[119,119,119,0,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119],[132,132,132,0,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132],[0,110,110,110,110,0,290,0,110,111,111,111,0,111,110,110,112,112,110,0,290,0,0,110,110,110,0,0,110,0,112,290,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0],[0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,290,0,0,0,162,163,163,163,163,163,163,163,163,163,163,164,0,152,153,290,193,194],[0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,290,0,0,0,175,176,176,176,176,176,176,176,176,176,176,177,0,169,166,106,206,207],[0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,162,300,163,163,163,164,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,179,119,219,207],[0,0,0,0,0,162,300,163,164,0,0,0,0,0,0,0,0,0,0,175,301,176,176,176,177,0,0,0,0,0,0,290,0,0,0,308,309,0,0,0,0,0,242,0,0,152,153,0,178,179,119,219,207],[0,0,0,0,0,175,301,176,177,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,290,0,0,0,310,0,257,258,259,0,0,255,0,0,165,166,106,106,121,119,219,207],[0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,290,0,0,0,310,0,270,271,272,0,267,268,269,0,165,179,119,119,119,119,219,207],[0,0,0,0,188,189,302,190,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,290,244,245,0,311,0,283,0,285,0,280,281,282,0,178,179,119,119,119,119,219,207],[0,0,0,0,201,202,303,203,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,0,0,0,0,114,115,106,106,106,158,106,106,161,160,106,157,106,158,160,106,157,106,106,121,119,119,119,119,219,207],[0,0,0,0,0,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,290,0,0,114,115,106,106,127,119,119,119,119,119,119,160,119,119,119,119,157,159,119,119,119,119,119,119,119,119,119,119,219,207],[106,106,106,106,304,305,291,287,287,306,307,109,0,0,0,0,0,0,0,114,307,106,106,127,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,219,207],[119,119,119,119,119,130,106,106,106,127,129,130,116,117,0,114,115,106,106,127,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,219,207],[157,157,157,157,157,157,157,157,157,157,157,157,157,157,176,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157],[119,119,119,119,119,119,119,157,119,157,119,119,119,120,0,118,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,158,119,160,119,119,119,120,0,118,119,119,119,119,119,119,119,119,119,119,119,119,119,184,119,185,119,119,119,183,67,67,119,119,119,119,119,184,184,183,186,186,183,184,186,183,183],[119,119,119,119,119,119,119,160,119,159,119,119,135,133,0,118,119,119,119,119,119,119,119,119,119,119,119,135,132,183,119,186,119,119,119,186,67,67,119,119,119,119,119,186,0,0,0,0,0,0,0,0,0],[119,119,119,119,119,119,119,159,119,158,119,119,120,0,0,131,134,119,119,119,119,119,119,119,135,132,132,133,0,186,119,183,119,119,119,185,67,67,119,119,119,119,119,186,0,0,0,0,0,0,0,0,0],[119,119,119,119,119,119,119,160,119,160,119,119,120,0,0,0,118,119,119,119,119,119,135,132,133,0,0,0,0,185,119,185,119,119,119,184,67,67,67,119,119,119,119,184,0,0,191,192,0,0,0,0,0],[119,119,119,119,119,119,119,158,119,157,119,135,133,0,0,0,131,134,119,119,119,119,120,0,112,0,0,0,0,184,186,184,183,185,184,186,184,186,184,185,184,186,184,185,202,202,208,185,185,184,185,186,184],[119,119,119,119,119,119,119,159,119,158,119,120,0,0,0,0,0,118,119,119,132,119,120,0,0,0,0,0,0,0,0,196,0,0,0,196,0,290,0,196,0,0,0,196,0,0,204,183,119,119,119,119,119],[160,159,157,160,157,160,158,157,159,158,159,157,0,0,0,0,0,159,157,159,0,158,159,0,0,0,0,0,0,0,0,199,0,0,0,199,0,290,0,198,0,0,0,199,0,0,204,186,119,119,119,119,119],[119,119,119,119,119,119,119,120,112,170,0,0,0,0,0,0,0,0,0,170,0,0,0,0,0,0,0,0,0,0,0,197,0,0,0,197,189,302,189,197,0,0,0,197,0,0,204,185,119,119,119,119,119],[119,119,119,119,119,119,119,130,109,171,0,0,0,0,0,0,0,0,0,172,0,0,0,174,0,0,0,114,115,186,185,183,184,184,184,184,202,303,202,185,184,186,184,184,184,186,185,184,119,119,119,119,119],[119,119,119,119,119,119,119,119,130,106,109,162,163,163,163,163,163,164,0,171,115,159,0,171,0,114,157,127,119,185,119,183,119,119,119,186,0,290,0,183,119,119,119,185,119,119,119,119,119,119,119,119,119],[160,158,159,160,159,159,158,159,157,158,160,157,176,176,176,176,176,160,157,158,159,159,160,158,157,127,119,119,119,185,119,184,119,119,119,184,287,291,287,184,119,119,119,184,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,160,119,158,119,130,109,0,0,0,0,118,119,119,119,119,119,119,119,119,119,119,119,184,119,183,119,119,119,186,288,288,288,185,119,119,119,186,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,160,119,157,119,119,130,116,117,125,126,118,119,119,119,119,119,119,119,119,119,119,119,186,119,185,119,119,119,184,289,289,289,184,119,119,119,186,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,159,119,158,119,119,119,119,130,106,106,121,119,119,119,119,119,119,119,119,119,119,119,183,119,184,119,119,119,185,289,289,289,183,119,119,119,185,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,158,119,158,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,186,119,186,119,119,119,184,289,289,289,184,119,119,119,183,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,157,119,157,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,184,119,183,67,67,119,184,289,289,289,186,119,119,119,185,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,160,119,158,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,186,119,183,119,119,119,184,289,289,289,183,119,119,119,185,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,158,119,159,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,183,119,186,119,119,119,183,289,289,289,186,119,119,119,186,119,119,119,119,119,119,119,119,119],[119,119,119,119,119,119,119,157,119,160,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,185,119,183,119,119,119,185,289,289,289,185,119,119,119,185,119,119,119,119,119,119,119,119,119],[209,209,209,209,209,209,209,159,119,158,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,186,119,186,119,119,119,183,289,289,289,184,119,119,119,185,119,119,119,119,119,119,119,119,119]] \ No newline at end of file diff --git a/data/levels/tileset.json b/data/levels/tileset.json new file mode 100644 index 0000000..73f03a4 --- /dev/null +++ b/data/levels/tileset.json @@ -0,0 +1 @@ +[[107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105],[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118],[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,192,118],[122,167,182,1,2,3,4,5,6,7,8,9,10,11,12,13,208,205,121],[119,180,168,14,15,16,17,18,19,20,21,22,23,24,25,26,204,218,119],[119,180,168,27,28,29,30,31,32,33,34,35,36,37,38,39,204,218,119],[119,180,168,40,41,42,43,44,45,46,47,48,49,50,51,52,204,218,119],[119,180,168,53,54,55,56,57,58,59,60,61,62,63,64,65,204,218,119],[119,180,182,66,67,68,69,70,71,72,73,74,75,76,77,78,208,218,119],[119,180,168,79,80,81,82,83,84,85,86,87,88,89,90,91,204,218,119],[119,180,168,92,93,94,95,96,97,98,99,100,101,102,103,104,204,218,119],[119,180,168,105,106,107,108,109,110,111,112,113,114,115,116,117,204,218,119],[119,180,182,118,119,120,121,122,123,124,125,126,127,128,129,130,208,218,119],[119,180,168,131,132,133,134,135,136,137,138,139,140,141,142,143,204,218,119],[119,180,168,144,145,146,147,148,149,150,151,152,153,154,155,156,204,218,119],[119,180,168,157,158,159,160,161,162,163,164,165,166,167,168,169,204,218,119],[119,180,182,170,171,172,173,174,175,176,177,178,179,180,181,182,208,218,119],[119,180,168,183,184,185,186,187,188,189,190,191,192,193,194,195,204,218,119],[119,180,168,196,197,198,199,200,201,202,203,204,205,206,207,208,204,218,119],[119,180,168,209,210,211,212,213,214,215,216,217,218,219,220,221,204,218,119],[119,180,182,222,223,224,225,226,227,228,229,230,231,232,233,234,208,218,119],[119,180,168,235,236,237,238,239,240,241,242,243,244,245,246,247,204,218,119],[119,180,168,248,249,250,251,252,253,254,255,256,257,258,259,260,204,218,119],[119,180,168,261,262,263,264,265,266,267,268,269,270,271,272,273,204,218,119],[119,180,182,274,275,276,277,278,279,280,281,282,283,284,285,286,208,218,119],[119,180,168,287,288,289,290,291,292,293,294,295,296,297,298,299,204,218,119],[119,180,168,300,301,302,303,304,305,306,307,308,309,310,311,312,204,218,119],[119,120,181,0,0,0,0,0,0,0,0,0,0,0,0,0,217,118,119],[119,122,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,121,119],[119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119]] \ No newline at end of file diff --git a/data/scripts.lua b/data/scripts.lua new file mode 100644 index 0000000..2e32271 --- /dev/null +++ b/data/scripts.lua @@ -0,0 +1,17 @@ +-- enums +require "data/scripts/enums" + +-- support functions +require "data/scripts/math" +require "data/scripts/in_out" +json = require "data/scripts/json" +-- classes +require "data/scripts/entity" +require "data/scripts/collision" +require "data/scripts/level" +-- data +require "data/scripts/camera" +require "data/scripts/objects" +-- UI functions +require "data/scripts/debug" +require "data/scripts/pause" diff --git a/data/scripts/camera.lua b/data/scripts/camera.lua new file mode 100644 index 0000000..ce1fcb2 --- /dev/null +++ b/data/scripts/camera.lua @@ -0,0 +1,21 @@ +Camera = { + pos = {x = 0, y = 0}, + width = 0, + height = 0 +} + +function Camera:CenterAt(x,y,cx,cy) + self.pos.x = x-self.width/2 + self.pos.y = y-self.height/2 + if not (cx == nil or cy == nil) then + if self.pos.x < 0 then self.pos.x = 0 end + if self.pos.x > cx then self.pos.x = cx end + if self.pos.y < 0 then self.pos.y = 0 end + if self.pos.y > cy then self.pos.y = cy end + end +end + +function Camera:ScreenAt(x,y,width,height) + self.pos.x = math.floor(x/width)*width + self.pos.y = math.floor(y/height)*height +end diff --git a/data/scripts/collision.lua b/data/scripts/collision.lua new file mode 100644 index 0000000..1e8b9c2 --- /dev/null +++ b/data/scripts/collision.lua @@ -0,0 +1,76 @@ +Collision = {} +--[[ + Collision + + [bool] isDisabled + > if true used for collision + + [bool] isActive + > if true, this collision is active (on collision, duh) + + [bool] isColliding + > if true, this collision is colliding + + [2d pos] from - x, y + > top right corner of collision box + + [2d pos] to - x, y + > bottom left corner of collision box + + [int] width + > width of collision box + + [int] height + > height of collision box +--]] + +-- can also be called with only ox and oy, where they become the width and height instead +function Collision:new(ox,oy,tx,ty) + local o = {isColliding = false, isDisabled = false, isActive = false} + + if tx ~= nil and ty ~= nil then + o.from = {x = ox, y = oy} + o.to = {x = tx, y = ty} + + o.width = o.to.x - o.from.x + o.height = o.to.y - o.from.y + else + o.width = ox + o.height = oy + + o.from = {x = 0, y = 0} + o.to = {x = 0, y = 0} + end + + setmetatable(o, self) + self.__index = self + + return o +end + +function Collision:CenterAt(x, y) + self.from.x = x-self.width/2 + self.from.y = y-self.height/2 + self.to.x = x+self.width/2 + self.to.y = y+self.height/2 +end + +function Collision:PlaceAt(x, y) + self.from.x = x or self.from.x + self.from.y = y or self.from.y + self.to.x = self.from.x + self.width + self.to.y = self.from.x + self.height +end + +function Collision:Draw(color) + if self.isColliding == true then + love.graphics.setColor(0,1,0,0.5) + elseif self.isActive == 1 then + love.graphics.setColor(0,1,1,0.5) + elseif color == 1 then + love.graphics.setColor(1,0,0,0.5) + elseif color == 2 then + love.graphics.setColor(0,1,1,0.5) + end + love.graphics.rectangle("fill",self.from.x-Camera.pos.x, self.from.y-Camera.pos.y, self.width, self.height) +end diff --git a/data/scripts/debug.lua b/data/scripts/debug.lua new file mode 100644 index 0000000..0ef8723 --- /dev/null +++ b/data/scripts/debug.lua @@ -0,0 +1,27 @@ +function DebugUI() +love.graphics.print("time: "..fps_total..", fps: "..fps_draw..", frametime: "..math.floor(current_dt* 1000).."ms", 10*textScale, 0*textScale, 0, textScale) + + love.graphics.setColor(1,1,1) + -- lots of variables + love.graphics.print("[main_player]",10*textScale,40*textScale, 0, textScale) + love.graphics.print("position: {"..main_player.pos.x..", "..main_player.pos.y.."}",10*textScale,60*textScale, 0, textScale) + love.graphics.print("velocity: {"..main_player.vel.x..", "..main_player.vel.y.."}",10*textScale,80*textScale, 0, textScale) + love.graphics.print("scale: {"..main_player.scale.x..", "..main_player.scale.y.."}",10*textScale,100*textScale, 0, textScale) + love.graphics.print("sprite: "..tostring(main_player.sprite)..", anim_speed: "..main_player.anim_speed,10*textScale,120*textScale, 0, textScale) + love.graphics.print("booleans: \"isOnGround\": "..tostring(main_player.isOnGround),10*textScale,140*textScale, 0, textScale) + + love.graphics.print("[Camera]",10*textScale,160*textScale, 0, textScale) + love.graphics.print("position: {"..Camera.pos.x..", "..Camera.pos.y.."}",10*textScale,180*textScale, 0, textScale) + love.graphics.print("size: {"..Camera.width..", "..Camera.height.."}",10*textScale,200*textScale, 0, textScale) + + love.graphics.print(textScale,10*textScale,240*textScale, 0, textScale) + love.graphics.print("Level: "..levelNum.." / "..#levelList.." \""..currLevel.."\"",10*textScale,260*textScale, 0, textScale) + + -- player isOnGroundCheck + love.graphics.setColor(1,0,0) + love.graphics.points(-Camera.pos.x + main_player.pos.x, -Camera.pos.y + main_player.pos.y) +end + +function DebugColisions() + objects.DrawCollisions() +end diff --git a/data/scripts/entities/player.lua b/data/scripts/entities/player.lua new file mode 100644 index 0000000..ae66135 --- /dev/null +++ b/data/scripts/entities/player.lua @@ -0,0 +1,205 @@ + player = entity:newEntity(x,y) + +function InitPlayer(id) + player.health = 3 + player.coins = 0 + + -- physics + player.vel = { + x = 0, + y = 0 + } + -- constants + player.acc = 90 + player.friction = 20 + player.gravity = 9.81 + player.climbHeight = 3 + player.jumpForce = 5 + player.maxSpeed = 600 + player.jumpMaxSpeed = 9.5 + player.zeroSpeed = 0.001 + -- bools + player.isJumping = false + player.isOnGround = false + player.isOnLadder = false + player.canJump = true + player.canFall = true + player.canFriction = true + + -- sprite + player.offset = {x = -8, y = -16} +end + +function player:DoInput() + -- PLATFORMER INPUT + if self.isOnGround then + -- apply friction + + -- horizontal input (slide~~) + if love.keyboard.isDown('a',"left") then + self.vel.x = self.vel.x - self.acc*current_dt + end + if love.keyboard.isDown('d',"right") then + self.vel.x = self.vel.x + self.acc*current_dt + end + if self.canJump then + -- vertical input (jump!) + if love.keyboard.isDown("up", "w") and self.isJumping ~= true then + self.vel.y = self.vel.y - self.jumpForce + self.isOnGround = false + self.isJumping = true + end + end + end + + -- fall if down input on platforms + if not isThereCollisionAt( + self.pos.x, + self.pos.y + self.vel.y + ) and not isThereLadderAt( + self.pos.x, + self.pos.y + self.vel.y + ) and isTherePlatformAt( + self.pos.x, + self.pos.y + self.vel.y + ) and love.keyboard.isDown("down", "s") + then + self.pos.y = self.pos.y + tileProperties.height/3 + self.isOnGround = false + end +end + +function player:HandleAnimation() + + -- flip sprite to look in the direction is moving + if self.vel.x ~= 0 then self.flip.x = math.sign(self.vel.x) end + + -- animation manager + if self.isOnLadder then + self:LoadAnimation(animation.nancy.jump) + elseif not self.isOnGround and self.isJumping and self.vel.y > 1.25 then + self:LoadAnimation(animation.nancy.fall) + elseif not self.isOnGround and self.vel.y < 0 then + self:LoadAnimation(animation.nancy.jump) + elseif self.vel.x ~= 0 then + self:LoadAnimation(animation.nancy.run) + else + self:LoadAnimation(animation.nancy.idle) + end + + -- special case: idle animation gets slower by time + if self.anim_path == animation.nancy.idle.path then + if self.anim_speed < 0.5 then self.anim_speed = self.anim_speed + 0.001 end + end +end + +function player:DoPhysics() + -- reset physics resolution + self.canFall = true + self.canJump = true + self.canFriction = true + -- reset flags + self.isOnGround = false + self.isOnLadder = false + -- truncate to max & min values + if math.abs(self.vel.x) > self.maxSpeed then + self.vel.x = self.maxSpeed * math.sign(self.vel.x) + end + if math.abs(self.vel.y) > self.maxSpeed then + self.vel.y = self.maxSpeed * math.sign(self.vel.y) + end + if math.abs(self.vel.x) < self.zeroSpeed then + self.vel.x = 0 + end + if math.abs(self.vel.y) < self.zeroSpeed then + self.vel.y = 0 + end + + -- if on air, say so! + if self.vel.y > 5 then + self.isJumping = true + end + + -- if its on ground, then say so. + if self.vel.y > 0 then + if isThereAnyCollisionAt( + self.pos.x, + self.pos.y + self.vel.y + ) then + self.isOnGround = true + self.isJumping = false + end + end + -- horizontal collisions + if isThereAnyCollisionAt(self.pos.x + self.vel.x, self.pos.y) then + -- checks for ladders + if isThereLadderAt(self.pos.x + self.vel.x, self.pos.y) + and self.vel.x ~= 0 + and not isThereLadderAt(self.pos.x, self.pos.y) + then + self.vel.y = 0 + self.vel.x = 0 + + self.pos.y = self.pos.y - 4*game.scale * current_dt + + self.canFall = false + self.canJump = false + self.canFriction = false + + self.isOnLadder = true + self.isOnGround = true + end + + -- checks for slopes + for i = 1, self.climbHeight do + if not isThereCollisionAt(self.pos.x + self.vel.x, self.pos.y - i * game.scale) + and self.isOnGround then + + self.pos.x = self.pos.x + self.vel.x + self.pos.y = self.pos.y - i * game.scale + + self.canFriction = false + break + end + end + + -- hey, you arent permanently stopped while collisioning, just lose a bit of force! + if self.canFriction then + self.vel.x = self.vel.x * (1 - math.min(current_dt * self.friction/15, 1)) + end + else + self.pos.x = self.pos.x + self.vel.x + end + + -- vertical collision + if self.vel.y > 0 + and isThereAnyCollisionAt(self.pos.x, self.pos.y + self.vel.y) then + self.isOnGround = true + self.isJumping = false + self.vel.y = 0 + else + self.pos.y = self.pos.y + self.vel.y + end + + -- drop. + if self.canFall then + self.vel.y = self.vel.y + 2*self.gravity * current_dt + end + + -- friction hard in ground, soft in air + if self.isOnGround then + self.vel.x = self.vel.x * (1 - math.min(current_dt * self.friction, 1)) + else + self.vel.x = self.vel.x * (1 - math.min(current_dt * self.friction/20, 1)) + end +end + + +function player:newPlayer(x,y) + local o = entity:newEntity(x,y) + + setmetatable(o, self) + self.__index = self + + return o +end diff --git a/data/scripts/entity.lua b/data/scripts/entity.lua new file mode 100644 index 0000000..5a7eef5 --- /dev/null +++ b/data/scripts/entity.lua @@ -0,0 +1,65 @@ +entity = {class = "entity", anim_subframe = 0, anim_frame = 0, anim_imgs = {}, offset = {x = 0, y = 0}, scale = {x = 1, y = 1}, flip = { x = 1, y = 1}} + +function entity:newEntity(x,y) + o = {} + o.pos = {x = x, y = y} + + setmetatable(o, self) + self.__index = self + return o +end + +function entity:Move(target, speed) -- target = {tx int, ty int} / speed = int + +end + +function entity:Draw() + if self.sprite ~= nil then + love.graphics.draw( + self.sprite, + self.pos.x - Camera.pos.x + self.offset.x * game.scale * self.scale.x * self.flip.x, + self.pos.y - Camera.pos.y + self.offset.y * game.scale * self.scale.y * self.flip.y, + 0, + game.scale * self.scale.x * self.flip.x, + game.scale * self.scale.y * self.flip.y + ) + end +end + +function entity:Animate() + if game_paused ~= true then + -- try to animate + self.anim_subframe = self.anim_subframe + current_dt + + if self.anim_subframe >= self.anim_speed then + self.anim_frame = self.anim_frame + 1 + self.anim_subframe = self.anim_subframe - self.anim_speed + end + + -- cycle + if self.anim_frame >= self.anim_frames+1 then + self.anim_frame = self.anim_frame - self.anim_frames + end + + -- change + self.sprite = self.anim_imgs[self.anim_frame] + end +end + +function entity:LoadAnimation(anim,frames,speed) + if self.anim_path ~= anim and self.anim_path ~= anim.path then + if frames ~= nil and speed ~= nil then + self.anim_path = anim or nil + self.anim_frames = frames or 4 + self.anim_speed = speed or frames + else + self.anim_path = anim.path + self.anim_frames = anim.frames + self.anim_speed = anim.speed + end + + self.anim_imgs = anim.imgs + end +end + +require "data/scripts/entities/player" diff --git a/data/scripts/enums.lua b/data/scripts/enums.lua new file mode 100644 index 0000000..e7966d1 --- /dev/null +++ b/data/scripts/enums.lua @@ -0,0 +1,61 @@ +image = { + background = love.graphics.newImage("assets/terrain/background.png"), + cartridge = { + nancy = love.graphics.newImage("assets/menu/nancy.png") + } +} +-- animations +animation = { + nancy = { + idle = { + path = "assets/characters/nancy/idle", + frames = 4, + speed = 1/8, + imgs = {} + }, + run = { + path = "assets/characters/nancy/run", + frames = 6, + speed = 1/8, + imgs = {} + }, + fall = { + path = "assets/characters/nancy/fall", + frames = 3, + speed = 1/8, + imgs = {} + }, + jump = { + path = "assets/characters/nancy/jump", + frames = 3, + speed = 1/8, + imgs = {} + } + } +} + +for _, object in pairs(animation) do + for _, anim in pairs(object) do + for i = 1, anim.frames do + table.insert(anim.imgs,love.graphics.newImage(anim.path..tostring(i)..".png")) + end + end +end + +levelProperties = { + pos = { + x = 0, + y = 0 + }, + offset = { + x = 0, + y = 0 + } +} + +tileProperties = { + width = 16, + height = 16, + scale = game.scale, + tileset = love.graphics.newImage("assets/terrain/tileset.png") +} diff --git a/data/scripts/in_out.lua b/data/scripts/in_out.lua new file mode 100644 index 0000000..914782e --- /dev/null +++ b/data/scripts/in_out.lua @@ -0,0 +1,14 @@ +function doOutput(table) + local file = io.open("map.json", "w") + io.output(file) + io.write(json.encode(table)) + io.close(file) +end + +function getInput(filename) + local file = io.open(filename, "r") + io.input(file) + local content = io.read() + io.close(file) + return content +end diff --git a/data/scripts/json.lua b/data/scripts/json.lua new file mode 100644 index 0000000..711ef78 --- /dev/null +++ b/data/scripts/json.lua @@ -0,0 +1,388 @@ +-- +-- json.lua +-- +-- Copyright (c) 2020 rxi +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of +-- this software and associated documentation files (the "Software"), to deal in +-- the Software without restriction, including without limitation the rights to +-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. +-- + +local json = { _version = "0.1.2" } + +------------------------------------------------------------------------------- +-- Encode +------------------------------------------------------------------------------- + +local encode + +local escape_char_map = { + [ "\\" ] = "\\", + [ "\"" ] = "\"", + [ "\b" ] = "b", + [ "\f" ] = "f", + [ "\n" ] = "n", + [ "\r" ] = "r", + [ "\t" ] = "t", +} + +local escape_char_map_inv = { [ "/" ] = "/" } +for k, v in pairs(escape_char_map) do + escape_char_map_inv[v] = k +end + + +local function escape_char(c) + return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) +end + + +local function encode_nil(val) + return "null" +end + + +local function encode_table(val, stack) + local res = {} + stack = stack or {} + + -- Circular reference? + if stack[val] then error("circular reference") end + + stack[val] = true + + if rawget(val, 1) ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= "number" then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then + error("invalid table: sparse array") + end + -- Encode + for i, v in ipairs(val) do + table.insert(res, encode(v, stack)) + end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" + + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= "string" then + error("invalid table: mixed or invalid key types") + end + table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end +end + + +local function encode_string(val) + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' +end + + +local function encode_number(val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) +end + + +local type_func_map = { + [ "nil" ] = encode_nil, + [ "table" ] = encode_table, + [ "string" ] = encode_string, + [ "number" ] = encode_number, + [ "boolean" ] = tostring, +} + + +encode = function(val, stack) + local t = type(val) + local f = type_func_map[t] + if f then + return f(val, stack) + end + error("unexpected type '" .. t .. "'") +end + + +function json.encode(val) + return ( encode(val) ) +end + + +------------------------------------------------------------------------------- +-- Decode +------------------------------------------------------------------------------- + +local parse + +local function create_set(...) + local res = {} + for i = 1, select("#", ...) do + res[ select(i, ...) ] = true + end + return res +end + +local space_chars = create_set(" ", "\t", "\r", "\n") +local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") +local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") +local literals = create_set("true", "false", "null") + +local literal_map = { + [ "true" ] = true, + [ "false" ] = false, + [ "null" ] = nil, +} + + +local function next_char(str, idx, set, negate) + for i = idx, #str do + if set[str:sub(i, i)] ~= negate then + return i + end + end + return #str + 1 +end + + +local function decode_error(str, idx, msg) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error( string.format("%s at line %d col %d", msg, line_count, col_count) ) +end + + +local function codepoint_to_utf8(n) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = math.floor + if n <= 0x7f then + return string.char(n) + elseif n <= 0x7ff then + return string.char(f(n / 64) + 192, n % 64 + 128) + elseif n <= 0xffff then + return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, + f(n % 4096 / 64) + 128, n % 64 + 128) + end + error( string.format("invalid unicode codepoint '%x'", n) ) +end + + +local function parse_unicode_escape(s) + local n1 = tonumber( s:sub(1, 4), 16 ) + local n2 = tonumber( s:sub(7, 10), 16 ) + -- Surrogate pair? + if n2 then + return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end +end + + +local function parse_string(str, i) + local res = "" + local j = i + 1 + local k = j + + while j <= #str do + local x = str:byte(j) + + if x < 32 then + decode_error(str, j, "control character in string") + + elseif x == 92 then -- `\`: Escape + res = res .. str:sub(k, j - 1) + j = j + 1 + local c = str:sub(j, j) + if c == "u" then + local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) + or str:match("^%x%x%x%x", j + 1) + or decode_error(str, j - 1, "invalid unicode escape in string") + res = res .. parse_unicode_escape(hex) + j = j + #hex + else + if not escape_chars[c] then + decode_error(str, j - 1, "invalid escape char '" .. c .. "' in string") + end + res = res .. escape_char_map_inv[c] + end + k = j + 1 + + elseif x == 34 then -- `"`: End of string + res = res .. str:sub(k, j - 1) + return res, j + 1 + end + + j = j + 1 + end + + decode_error(str, i, "expected closing quote for string") +end + + +local function parse_number(str, i) + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then + decode_error(str, i, "invalid number '" .. s .. "'") + end + return n, x +end + + +local function parse_literal(str, i) + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x +end + + +local function parse_array(str, i) + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then break end + if chr ~= "," then decode_error(str, i, "expected ']' or ','") end + end + return res, i +end + + +local function parse_object(str, i) + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then break end + if chr ~= "," then decode_error(str, i, "expected '}' or ','") end + end + return res, i +end + + +local char_func_map = { + [ '"' ] = parse_string, + [ "0" ] = parse_number, + [ "1" ] = parse_number, + [ "2" ] = parse_number, + [ "3" ] = parse_number, + [ "4" ] = parse_number, + [ "5" ] = parse_number, + [ "6" ] = parse_number, + [ "7" ] = parse_number, + [ "8" ] = parse_number, + [ "9" ] = parse_number, + [ "-" ] = parse_number, + [ "t" ] = parse_literal, + [ "f" ] = parse_literal, + [ "n" ] = parse_literal, + [ "[" ] = parse_array, + [ "{" ] = parse_object, +} + + +parse = function(str, idx) + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then + return f(str, idx) + end + decode_error(str, idx, "unexpected character '" .. chr .. "'") +end + + +function json.decode(str) + if type(str) ~= "string" then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then + decode_error(str, idx, "trailing garbage") + end + return res +end + + +return json diff --git a/data/scripts/level.lua b/data/scripts/level.lua new file mode 100644 index 0000000..57abb8a --- /dev/null +++ b/data/scripts/level.lua @@ -0,0 +1,493 @@ +function LoadTiles() + LevelInfo = {} + Tiles = dofile("Mothback/data/tiles.lua") + --[[ + on level format: + + id = tile identifier + depth = order in the render + force = rendering other tile instead of the one in this position + overlay = render another tile id + overlay_depth = foreground/background overlay depth + type = collision type + + ]] + LevelTiles = json.decode(getInput("Mothback/data/levels/"..currLevel..".json")) + LevelInfo.Width = GetLevelWidth() + LevelInfo.Height = #LevelTiles * tileProperties.height + IndexLevelTiles() + LoadTileObjects() +end + +function GetLevelWidth() + local width = 0 + for i = 1, #LevelTiles do + if width < #LevelTiles[i] then width = #LevelTiles[i] end + end + return width * tileProperties.width +end + +function IndexLevelTiles() + TileIndex = {} + + -- number of tiles in tileset! + local width = tileProperties.tileset:getPixelWidth()/tileProperties.width + local height = tileProperties.tileset:getPixelHeight()/tileProperties.height + for i = 0, height do + for j = 0, width do + TileIndex[i*width+j+1] = love.graphics.newQuad( + j*tileProperties.width, + i*tileProperties.height, + tileProperties.width, + tileProperties.height, + tileProperties.tileset:getDimensions() + ) + end + end + + + for _, properties in pairs(Tiles) do + if properties.animation ~= nil then + properties.tileset = love.graphics.newImage("assets/terrain/"..properties.animation..".png") + properties.imgs = {} + properties.current_image = 1 + properties.current_subimage = 1 + + local tileset = properties.tileset + local width = tileset:getPixelWidth()/tileProperties.width + local height = tileset:getPixelHeight()/tileProperties.height + local image_count = 0 + + for i = 0, height-1 do + for j = 0, width-1 do + local quad = + love.graphics.newQuad( + j*tileProperties.width, + i*tileProperties.height, + tileProperties.width, + tileProperties.height, + tileset:getDimensions() + ) + image_count = image_count + 1 + + table.insert(properties.imgs,quad) + + end + end + properties.image_count = image_count + end + end +end + +function TilesDisplayFront() + for i = 1, #LevelTiles do + for j = 1, #LevelTiles[i] do + if LevelTiles[i][j] ~= 0 then + + local depth = getTileDepth(LevelTiles[i][j]) + DrawTile( + LevelTiles[i][j], + tileProperties.scale * j * tileProperties.width + tileProperties.scale * (levelProperties.offset.x - tileProperties.width) - Camera.pos.x, + tileProperties.scale * i * tileProperties.height + tileProperties.scale * (levelProperties.offset.y - tileProperties.height) - Camera.pos.y, + "foreground" + ) + + end + end + end +end + +function TilesDisplayBack() + for i = 1, #LevelTiles do + for j = 1, #LevelTiles[i] do + if LevelTiles[i][j] ~= 0 then + + local depth = getTileDepth(LevelTiles[i][j]) + DrawTile( + LevelTiles[i][j], + tileProperties.scale * j * tileProperties.width + tileProperties.scale * (levelProperties.offset.x - tileProperties.width) - Camera.pos.x, + tileProperties.scale * i * tileProperties.height + tileProperties.scale * (levelProperties.offset.y - tileProperties.height) - Camera.pos.y, + "background" + ) + + end + end + end +end + + +function getTileType(tile_id) + for _, properties in ipairs(Tiles) do + if properties.id == tile_id then + return properties.type + end + end +end + +function getTileDepth(tile_id) + for _, properties in ipairs(Tiles) do + if properties.id == tile_id then + return properties.depth + end + end +end + +function GridDisplay() + for i = 1, #LevelTiles do + for j = 1, #LevelTiles[i] do + love.graphics.rectangle( + "line", + tileProperties.scale * j * tileProperties.width + tileProperties.scale * (levelProperties.offset.x - tileProperties.width) - Camera.pos.x, + tileProperties.scale * i * tileProperties.height + tileProperties.scale * (levelProperties.offset.y - tileProperties.height) - Camera.pos.y, + tileProperties.scale * tileProperties.width, + tileProperties.scale * tileProperties.height + ) + end + end +end + +function LoadTileObjects() + objects.collisions = {} + objects.platforms = {} + objects.ladders = {} + + for i = 1, #LevelTiles do + for j = 1, #LevelTiles[i] do + if LevelTiles[i][j] ~= 0 then + + local type = getTileType(LevelTiles[i][j]) + + local base_x = tileProperties.scale * j * tileProperties.width + tileProperties.scale * (levelProperties.offset.x - tileProperties.height) + local base_y = tileProperties.scale * i * tileProperties.height + tileProperties.scale * (levelProperties.offset.y - tileProperties.height) + + if type == "whole" then + local col = Collision:new( + base_x, + base_y, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "half" then + + local col = Collision:new( + base_x, + base_y + tileProperties.height/2 * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "platform" then + local plat = Collision:new( + base_x, + base_y + tileProperties.scale * 2, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/4 * tileProperties.scale + tileProperties.scale * 2 + ) + table.insert(objects.platforms,plat) + + elseif type == "ramp2_bot_left_whole" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x, + base_y + k * tileProperties.scale - tileProperties.scale, + base_x + k * 2 * tileProperties.scale, + base_y + k * tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + -- fill lower half + local col = Collision:new( + base_x, + base_y + tileProperties.height/2 * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "ramp2_bot_left_half" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x, + base_y + tileProperties.height/2 * tileProperties.scale + k * tileProperties.scale - tileProperties.scale, + base_x + k * 2 * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale + k * tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + + elseif type == "ramp2_top_left_whole" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x, + base_y + tileProperties.height/2 * tileProperties.scale - tileProperties.scale + k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale - (k-1) * 2 * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale - tileProperties.scale + k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + -- fill higher half + local col = Collision:new( + base_x, + base_y, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "ramp2_top_left_half" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x, + base_y - tileProperties.scale + k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale - (k-1) * 2 * tileProperties.scale, + base_y - tileProperties.scale + k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + + elseif type == "ramp2_bot_right_whole" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x + (k-8) * -2 * tileProperties.scale, + base_y - tileProperties.scale + k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y - tileProperties.scale + k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + -- fill lower half + local col = Collision:new( + base_x, + base_y + tileProperties.height/2 * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "ramp2_bot_right_half" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x + (k-8) * -2 * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale - tileProperties.scale + k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale - tileProperties.scale + k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + + elseif type == "ramp2_top_right_half" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x + (k-8) * -2 * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale - k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale - k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + + elseif type == "ramp2_top_right_whole" then + for k = 1, 8 do + -- do ramp owo + local slope = Collision:new( + base_x + (k-8) * -2 * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale + tileProperties.height/2 * tileProperties.scale - k * tileProperties.scale, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale + tileProperties.height/2 * tileProperties.scale - k * tileProperties.scale + tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + -- fill higher half + local col = Collision:new( + base_x, + base_y, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/2 * tileProperties.scale + ) + table.insert(objects.collisions,col) + + elseif type == "ramp1_bot_left" then + + for k = 1, 16 do + -- do ramp owo + local slope = Collision:new( + base_x, + base_y + k * tileProperties.scale - tileProperties.scale, + base_x + k * tileProperties.scale, + base_y + k * tileProperties.scale + ) + table.insert(objects.collisions,slope) + + end + + elseif type == "ladder_right" then + + local ladder = Collision:new( + base_x + (tileProperties.width-4)* tileProperties.scale, + base_y, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.ladders,ladder) + + elseif type == "ladder_platform_right" then + + local ladder = Collision:new( + base_x + (tileProperties.width-4)* tileProperties.scale, + base_y + tileProperties.scale * 2, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.ladders,ladder) + + local plat = Collision:new( + base_x, + base_y + tileProperties.scale * 2, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/4 * tileProperties.scale + tileProperties.scale * 2 + ) + table.insert(objects.platforms,plat) + + elseif type == "ladder_left" then + + + local ladder = Collision:new( + base_x, + base_y, + base_x + tileProperties.scale * 4, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.ladders,ladder) + + elseif type == "ladder_platform_left" then + + + local ladder = Collision:new( + base_x, + base_y + tileProperties.scale * 2, + base_x + tileProperties.scale * 4, + base_y + tileProperties.height * tileProperties.scale + ) + table.insert(objects.ladders,ladder) + + local plat = Collision:new( + base_x, + base_y + tileProperties.scale * 2, + base_x + tileProperties.width * tileProperties.scale, + base_y + tileProperties.height/4 * tileProperties.scale + tileProperties.scale * 2 + ) + table.insert(objects.platforms,plat) + + end + end + end + end +end + +function AnimateTiles() + for _, properties in pairs(Tiles) do + if properties.animation ~= nil then + -- calculate subimage + properties.current_subimage = properties.current_subimage + current_dt + -- cycle image + if properties.current_subimage >= properties.delay then + properties.current_subimage = properties.current_subimage - properties.delay + properties.current_image = properties.current_image + 1 + end + + if properties.current_image > properties.image_count then + properties.current_image = properties.current_image - properties.image_count + end + end + end +end + +function DrawTile(tile_id,x,y,depth) + for _, properties in pairs(Tiles) do + if tile_id == properties.id then + if properties.animation ~= nil then + if properties.imgs[properties.current_image] ~= nil + and properties.depth == depth + then love.graphics.draw( + properties.tileset, + properties.imgs[properties.current_image], + x, + y, + 0, + tileProperties.scale, + tileProperties.scale + ) end + elseif properties.depth == depth then + if properties.force ~= nil then + love.graphics.draw( + tileProperties.tileset, + TileIndex[properties.force], + x, + y, + 0, + tileProperties.scale, + tileProperties.scale + ) + else + love.graphics.draw( + tileProperties.tileset, + TileIndex[properties.id], + x, + y, + 0, + tileProperties.scale, + tileProperties.scale + ) + end + end + + if properties.overlay ~= nil then + if properties.overlay_depth == depth or properties.overlay_depth == nil and properties.depth == depth then + if properties.overlay_animated then + for _, overlay_properties in pairs(Tiles) do + if overlay_properties.id == properties.overlay then + love.graphics.draw( + overlay_properties.tileset, + overlay_properties.imgs[overlay_properties.current_image], + x, + y, + 0, + tileProperties.scale, + tileProperties.scale + ) + end + end + else + love.graphics.draw( + tileProperties.tileset, + TileIndex[properties.overlay], + x, + y, + 0, + tileProperties.scale, + tileProperties.scale + ) + end + end + end + end + end +end diff --git a/data/scripts/math.lua b/data/scripts/math.lua new file mode 100644 index 0000000..5501086 --- /dev/null +++ b/data/scripts/math.lua @@ -0,0 +1,9 @@ +function math.sign(x) + if x<0 then + return -1 + elseif x>0 then + return 1 + else + return 0 + end +end \ No newline at end of file diff --git a/data/scripts/objects.lua b/data/scripts/objects.lua new file mode 100644 index 0000000..b3f7286 --- /dev/null +++ b/data/scripts/objects.lua @@ -0,0 +1,106 @@ +objects = { + entities = {}, + + collisions = {}, + platforms = {}, + ladders = {} +} + + +-- level functions +function objects.DrawCollisions() + for _, col in pairs(objects.collisions) do + col:Draw(1) + end + + for _, plat in pairs(objects.platforms) do + if plat.disable == true then plat:Draw(2) end + if plat.disable == false then plat:Draw(1) end + end + + for _, ladder in pairs(objects.ladders) do + ladder:Draw(2) + end +end + +-- returns true if theres a collision at that point. also marks collisioned tile as collision true +function isThereCollisionAt(x,y) + local result = false + for _, col in pairs(objects.collisions) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y then + result = true + col.collision = true + end + end + return result +end + +function isTherePlatformAt(x,y) + local result = false + for _, col in pairs(objects.platforms) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y and col.disable ~= true then + result = true + col.collision = true + end + end + return result +end + +function isThereLadderAt(x,y) + local result = false + for _, col in pairs(objects.ladders) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y and col.disable ~= true then + result = true + col.collision = true + end + end + return result +end + +function isThereAnyCollisionAt(x,y) + local result = false + if not result then + for _, col in pairs(objects.collisions) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y then + result = true + col.collision = true + end + end + end + if not result then + for _, col in pairs(objects.ladders) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y and col.disable ~= true then + result = true + col.collision = true + end + end + end + if not result then + for _, col in pairs(objects.platforms) do + if x >= col.from.x and x <= col.to.x and y >= col.from.y and y <= col.to.y and col.disable ~= true then + result = true + col.collision = true + end + end + end + return result +end +-- flags +function SetCollisionFlags(player) + for _, col in pairs(objects.collisions) do + col.collision = false + end + + for _, plat in pairs(objects.platforms) do + plat.collision = false + if player.pos.y < plat.from.y then + plat.disable = false + else + plat.disable = true + end + end + + for _, ladder in pairs(objects.ladders) do + ladder.collision = false + end +end diff --git a/data/scripts/pause.lua b/data/scripts/pause.lua new file mode 100644 index 0000000..9d34cd6 --- /dev/null +++ b/data/scripts/pause.lua @@ -0,0 +1,60 @@ +function PauseUI() + --Parameters + local pauseWidth = 640 + local pauseHeight = 480 + local pauseX = (game.width/2)-(pauseWidth/2) + local pauseY = (game.height/2)-(pauseHeight/2) + local mouse_x, mouse_y = love.mouse.getPosition() + + --Base items + love.graphics.setColor(0,0,0,0.3) + love.graphics.rectangle("fill", 0, 0, game.width, game.height) + love.graphics.setColor(1,1,1,1) + love.graphics.rectangle("fill", pauseX, pauseY, pauseWidth, pauseHeight) + --Close buttom + love.graphics.setColor(1,0,0,1) + love.graphics.rectangle("fill", pauseX+pauseWidth-40, pauseY+10, 30, 30) + if love.mouse.isDown(1) then + if mouse_x >= pauseX+pauseWidth-40 + and mouse_y >= pauseY+10 + and mouse_x <= pauseX+pauseWidth-10 + and mouse_y <= pauseY+40 then + do_pause = false + end + end + if pausepage == 1 then + --Game list button + love.graphics.setColor(0.5,0.5,0.5,1) + love.graphics.rectangle("fill", pauseX+(pauseWidth/2)-150, pauseY+100, 300, 40) + love.graphics.setColor(0,0.5,0.5,1) + love.graphics.printf("GAMES", pauseX+(pauseWidth/2), pauseY+100, 150, "left",0,3) + if love.mouse.isDown(1) then + if mouse_x >= pauseX+(pauseWidth/2)-150 + and mouse_y >= pauseY+100 + and mouse_x <= pauseX+(pauseWidth/2)+150 + and mouse_y <= pauseY+140 then + pausepage = 2 + end + end + elseif pausepage == 2 then + --Back button + love.graphics.setColor(0.5,0.5,0.5,1) + love.graphics.rectangle("fill", pauseX+10, pauseY+10, 30, 30) + love.graphics.setColor(0,0,0,1) + love.graphics.printf("<", pauseX+10, pauseY+10, 30, "left", 0, 2) + if love.mouse.isDown(1) then + if mouse_x >= pauseX+10 + and mouse_y >= pauseY+10 + and mouse_x <= pauseX+40 + and mouse_y <= pauseY+40 then + pausepage = 1 + end + end + love.graphics.setColor(1,1,1,1) + for i=1,2 do + for j=1,3 do + love.graphics.draw(image.cartridge.nancy, j*110, i*85, 0, 100/image.cartridge.nancy:getPixelWidth(), 80/image.cartridge.nancy:getPixelHeight()) + end + end + end +end diff --git a/data/tiles.lua b/data/tiles.lua new file mode 100644 index 0000000..add3076 --- /dev/null +++ b/data/tiles.lua @@ -0,0 +1,1180 @@ +return { + { + id = 1, + type = "whole", + depth = "foreground" + }, + { + id = 2, + type = "whole", + depth = "foreground" + }, + { + id = 3, + type = "whole", + depth = "foreground" + }, + { + id = 14, + type = "whole", + depth = "foreground" + }, + { + id = 15, + type = "whole", + depth = "foreground" + }, + { + id = 16, + type = "whole", + depth = "foreground" + }, + { + id = 17, + type = "whole", + depth = "foreground" + }, + { + id = 18, + type = "whole", + depth = "foreground" + }, + { + id = 19, + type = "whole", + depth = "foreground" + }, + { + id = 20, + type = "whole", + depth = "foreground" + }, + { + id = 21, + type = "whole", + depth = "foreground" + }, + { + id = 22, + type = "whole", + depth = "foreground" + }, + { + id = 23, + type = "whole", + depth = "foreground" + }, + { + id = 24, + type = "whole", + depth = "foreground" + }, + { + id = 25, + type = "whole", + depth = "foreground" + }, + { + id = 26, + type = "whole", + depth = "foreground" + }, + { + id = 27, + type = "whole", + depth = "foreground" + }, + { + id = 28, + type = "whole", + depth = "foreground" + }, + { + id = 29, + type = "whole", + depth = "foreground" + }, + { + id = 30, + type = "whole", + depth = "foreground" + }, + { + id = 31, + type = "whole", + depth = "foreground" + }, + { + id = 32, + type = "whole", + depth = "foreground" + }, + { + id = 33, + type = "whole", + depth = "foreground" + }, + { + id = 34, + type = "whole", + depth = "foreground" + }, + { + id = 35, + type = "whole", + depth = "foreground" + }, + { + id = 36, + type = "whole", + depth = "foreground" + }, + { + id = 37, + type = "whole", + depth = "foreground" + }, + { + id = 38, + type = "whole", + depth = "foreground" + }, + { + id = 39, + type = "whole", + depth = "foreground" + }, + { + id = 40, + type = "whole", + depth = "foreground" + }, + { + id = 41, + type = "whole", + depth = "foreground" + }, + { + id = 42, + type = "whole", + depth = "foreground" + }, + { + id = 53, + type = "whole", + depth = "foreground" + }, + { + id = 54, + type = "whole", + depth = "foreground" + }, + { + id = 55, + type = "whole", + depth = "foreground" + }, + { + id = 62, + type = "whole", + depth = "foreground" + }, + { + id = 63, + type = "whole", + depth = "foreground" + }, + { + id = 64, + type = "whole", + depth = "foreground" + }, + { + id = 65, + type = "whole", + depth = "foreground" + }, + { + id = 66, + type = "whole", + depth = "foreground" + }, + { + id = 67, + type = "whole", + depth = "foreground" + }, + { + id = 68, + type = "whole", + depth = "foreground" + }, + { + id = 69, + type = "whole", + depth = "foreground" + }, + { + id = 70, + type = "whole", + depth = "foreground" + }, + { + id = 71, + type = "whole", + depth = "foreground" + }, + { + id = 72, + type = "whole", + depth = "foreground" + }, + { + id = 73, + type = "whole", + depth = "foreground" + }, + { + id = 74, + type = "whole", + depth = "foreground" + }, + { + id = 75, + type = "whole", + depth = "foreground" + }, + { + id = 76, + type = "whole", + depth = "foreground" + }, + { + id = 77, + type = "whole", + depth = "foreground" + }, + { + id = 78, + type = "whole", + depth = "foreground" + }, + { + id = 79, + type = "whole", + depth = "foreground" + }, + { + id = 80, + type = "whole", + depth = "foreground" + }, + { + id = 81, + type = "whole", + depth = "foreground" + }, + { + id = 82, + type = "whole", + depth = "foreground" + }, + { + id = 83, + type = "whole", + depth = "foreground" + }, + { + id = 84, + type = "whole", + depth = "foreground" + }, + { + id = 85, + type = "whole", + depth = "foreground" + }, + { + id = 86, + type = "whole", + depth = "foreground" + }, + { + id = 87, + type = "whole", + depth = "foreground" + }, + { + id = 88, + type = "whole", + depth = "foreground" + }, + { + id = 89, + type = "whole", + depth = "foreground" + }, + { + id = 90, + type = "whole", + depth = "foreground" + }, + { + id = 91, + type = "whole", + depth = "foreground" + }, + { + id = 92, + type = "whole", + depth = "foreground" + }, + { + id = 93, + type = "whole", + depth = "foreground" + }, + { + id = 94, + type = "whole", + depth = "foreground" + }, + { + id = 104, + type = "whole", + depth = "foreground" + }, + { + id = 105, + type = "whole", + depth = "foreground" + }, + { + id = 106, + type = "whole", + depth = "foreground" + }, + { + id = 107, + type = "whole", + depth = "foreground" + }, + { + id = 108, + type = "ramp1_bot_right", + depth = "foreground" + }, + { + id = 109, + type = "ramp1_bot_left", + depth = "foreground" + }, + { + id = 110, + type = "air", + depth = "foreground" + }, + { + id = 111, + type = "air", + depth = "foreground" + }, + { + id = 112, + type = "air", + depth = "foreground" + }, + { + id = 113, + type = "air", + depth = "background" + }, + { + id = 114, + type = "ramp2_bot_right_half", + depth = "foreground" + }, + { + id = 115, + type = "ramp2_bot_right_whole", + depth = "foreground" + }, + { + id = 116, + type = "ramp2_bot_left_whole", + depth = "foreground" + }, + { + id = 117, + type = "ramp2_bot_left_half", + depth = "foreground" + }, + { + id = 118, + type = "whole", + depth = "foreground" + }, + { + id = 119, + type = "whole", + depth = "foreground" + }, + { + id = 120, + type = "whole", + depth = "foreground" + }, + { + id = 121, + type = "whole", + depth = "foreground" + }, + { + id = 122, + type = "whole", + depth = "foreground" + }, + { + id = 123, + type = "air", + depth = "foreground" + }, + { + id = 124, + type = "air", + depth = "foreground" + }, + { + id = 125, + type = "air", + depth = "foreground" + }, + { + id = 126, + type = "air", + depth = "background" + }, + { + id = 127, + type = "whole", + depth = "foreground" + }, + { + id = 128, + type = "whole", + depth = "foreground" + }, + { + id = 129, + type = "whole", + depth = "foreground" + }, + { + id = 130, + type = "whole", + depth = "foreground" + }, + { + id = 131, + type = "whole", + depth = "foreground" + }, + { + id = 132, + type = "whole", + depth = "foreground" + }, + { + id = 133, + type = "whole", + depth = "foreground" + }, + { + id = 134, + type = "whole", + depth = "foreground" + }, + { + id = 135, + type = "whole", + depth = "foreground" + }, + { + id = 138, + type = "air", + depth = "foreground" + }, + { + id = 144, + type = "whole", + depth = "foreground" + }, + { + id = 145, + type = "whole", + depth = "foreground" + }, + { + id = 146, + type = "whole", + depth = "foreground" + }, + { + id = 152, + type = "air", + depth = "background" + }, + { + id = 153, + type = "air", + depth = "background" + }, + { + id = 154, + type = "air", + depth = "background" + }, + { + id = 155, + type = "air", + depth = "background" + }, + { + id = 156, + type = "air", + depth = "background" + }, + { + id = 157, + type = "whole", + depth = "foreground" + }, + { + id = 158, + type = "whole", + depth = "foreground" + }, + { + id = 159, + type = "whole", + depth = "foreground" + }, + { + id = 160, + type = "whole", + depth = "foreground" + }, + { + id = 161, + type = "whole", + depth = "foreground" + }, + { + id = 162, + type = "air", + depth = "background" + }, + { + id = 163, + type = "air", + depth = "background" + }, + { + id = 164, + type = "air", + depth = "background" + }, + { + id = 165, + type = "ladder_right", + depth = "background" + }, + { + id = 166, + type = "whole", + depth = "foreground" + }, + { + id = 167, + type = "whole", + depth = "foreground" + }, + { + id = 168, + type = "ladder_left", + depth = "background" + }, + { + id = 169, + depth = "background", + force = 165, + overlay = 176, + overlay_depth = "foreground", + type = "ladder_platform_right" + }, + { + id = 170, + type = "air", + depth = "foreground" + }, + { + id = 171, + type = "air", + depth = "foreground" + }, + { + id = 172, + type = "air", + depth = "foreground" + }, + { + id = 173, + type = "air", + depth = "foreground" + }, + { + id = 174, + type = "air", + depth = "foreground" + }, + { + id = 175, + type = "platform", + depth = "foreground" + }, + { + id = 176, + type = "platform", + depth = "foreground" + }, + { + id = 177, + type = "platform", + depth = "foreground" + }, + { + id = 178, + type = "ladder_right", + depth = "background" + }, + { + id = 179, + type = "whole", + depth = "foreground" + }, + { + id = 180, + type = "whole", + depth = "foreground" + }, + { + id = 181, + type = "ladder_left", + depth = "background" + }, + { + id = 182, + depth = "background", + force = 168, + overlay = 176, + overlay_depth = "foreground", + type = "ladder_platform_left" + }, + { + id = 183, + type = "whole", + depth = "foreground" + }, + { + id = 184, + type = "whole", + depth = "foreground" + }, + { + id = 185, + type = "whole", + depth = "foreground" + }, + { + id = 186, + type = "whole", + depth = "foreground" + }, + { + id = 187, + type = "whole", + depth = "foreground" + }, + { + id = 188, + type = "air", + depth = "background" + }, + { + id = 189, + type = "air", + depth = "background" + }, + { + id = 190, + type = "air", + depth = "background" + }, + { + id = 191, + type = "air", + depth = "background" + }, + { + id = 192, + type = "air", + depth = "background" + }, + { + id = 193, + type = "air", + depth = "background" + }, + { + id = 194, + type = "air", + depth = "background" + }, + { + id = 195, + type = "air", + depth = "background" + }, + { + id = 196, + type = "air", + depth = "foreground" + }, + { + id = 197, + type = "air", + depth = "foreground" + }, + { + id = 198, + type = "air", + depth = "foreground" + }, + { + id = 199, + type = "air", + depth = "foreground" + }, + { + id = 200, + type = "air", + depth = "foreground" + }, + { + id = 201, + type = "platform", + depth = "foreground" + }, + { + id = 202, + type = "platform", + depth = "foreground" + }, + { + id = 203, + type = "platform", + depth = "foreground" + }, + { + id = 204, + type = "ladder_right", + depth = "background" + }, + { + id = 205, + type = "whole", + depth = "foreground" + }, + { + id = 206, + type = "whole", + depth = "foreground" + }, + { + id = 207, + type = "ladder_left", + depth = "background" + }, + { + id = 208, + depth = "background", + force = 204, + overlay = 202, + overlay_depth = "foreground", + type = "ladder_platform_right" + }, + { + id = 217, + type = "ladder_right", + depth = "background" + }, + { + id = 218, + type = "whole", + depth = "foreground" + }, + { + id = 219, + type = "whole", + depth = "foreground" + }, + { + id = 220, + type = "ladder_left", + depth = "background" + }, + { + id = 221, + depth = "background", + force = 207, + overlay = 202, + overlay_depth = "foreground", + type = "ladder_platform_left" + }, + { + id = 235, + type = "air", + depth = "background" + }, + { + id = 236, + type = "air", + depth = "background" + }, + { + id = 237, + type = "air", + depth = "background" + }, + { + id = 238, + type = "air", + depth = "foreground" + }, + { + id = 239, + type = "air", + depth = "foreground" + }, + { + id = 241, + type = "air", + depth = "background" + }, + { + id = 242, + type = "air", + depth = "background" + }, + { + id = 243, + type = "air", + depth = "background" + }, + { + id = 244, + type = "air", + depth = "foreground" + }, + { + id = 245, + type = "air", + depth = "foreground" + }, + { + id = 248, + type = "air", + depth = "background" + }, + { + id = 249, + type = "air", + depth = "background" + }, + { + id = 250, + type = "air", + depth = "background" + }, + { + id = 251, + type = "air", + depth = "background" + }, + { + id = 252, + type = "half", + depth = "foreground" + }, + { + id = 253, + type = "air", + depth = "foreground" + }, + { + id = 254, + type = "air", + depth = "background" + }, + { + id = 255, + type = "air", + depth = "background" + }, + { + id = 256, + type = "air", + depth = "background" + }, + { + id = 257, + type = "air", + depth = "background" + }, + { + id = 258, + type = "half", + depth = "foreground" + }, + { + id = 259, + type = "air", + depth = "foreground" + }, + { + id = 261, + type = "air", + depth = "background" + }, + { + id = 262, + type = "air", + depth = "background" + }, + { + id = 263, + type = "air", + depth = "background" + }, + { + id = 264, + type = "air", + depth = "background" + }, + { + id = 266, + type = "air", + depth = "foreground" + }, + { + id = 267, + type = "air", + depth = "background" + }, + { + id = 268, + type = "air", + depth = "background" + }, + { + id = 269, + type = "air", + depth = "background" + }, + { + id = 270, + type = "air", + depth = "background" + }, + { + id = 272, + type = "air", + depth = "foreground" + }, + { + id = 274, + type = "air", + depth = "background" + }, + { + id = 275, + type = "air", + depth = "background" + }, + { + id = 276, + type = "air", + depth = "background" + }, + { + id = 277, + type = "air", + depth = "background" + }, + { + id = 279, + type = "air", + depth = "foreground" + }, + { + id = 280, + type = "air", + depth = "background" + }, + { + id = 281, + type = "air", + depth = "background" + }, + { + id = 282, + type = "air", + depth = "background" + }, + { + id = 283, + type = "air", + depth = "background" + }, + { + id = 285, + type = "air", + depth = "foreground" + }, + { + id = 287, + type = "air", + depth = "foreground", + animation = "lava_top", + delay = 0.125 + }, + { + id = 288, + type = "air", + depth = "foreground", + animation = "lava_bottom", + delay = 0.125 + }, + { + id = 289, + type = "air", + depth = "foreground" + }, + { + id = 290, + type = "air", + depth = "background", + animation = "lava_fall", + delay = 0.125 + }, + { + id = 291, + type = "air", + depth = "background", + overlay = 287, + overlay_depth = "foreground", + overlay_animated = true, + animation = "lava_fall", + delay = 0.125 + }, + { + id = 300, + type = "air", + depth = "background", + overlay = 163, + animation = "lava_fall", + delay = 0.125 + }, + { + id = 301, + type = "platform", + depth = "background", + overlay = 176, + animation = "lava_fall", + delay = 0.125 + }, + { + id = 302, + type = "air", + depth = "background", + overlay = 189, + animation = "lava_fall", + delay = 0.125 + }, + { + id = 303, + type = "platform", + depth = "background", + overlay = 202, + animation = "lava_fall", + delay = 0.125 + }, + { + id = 304, + type = "ramp2_bot_left_whole", + depth = "foreground", + overlay = 116, + overlay_depth = "foreground", + animation = "lava_top", + delay = 0.125 + }, + { + id = 305, + type = "ramp2_bot_left_half", + depth = "foreground", + overlay = 117, + animation = "lava_top", + delay = 0.125 + }, + { + id = 306, + type = "ramp2_bot_right_half", + depth = "foreground", + overlay = 114, + overlay_depth = "foreground", + animation = "lava_top", + delay = 0.125 + }, + { + id = 307, + type = "ramp2_bot_right_whole", + depth = "foreground", + overlay = 115, + animation = "lava_top", + delay = 0.125 + }, + { + id = 308, + type = "air", + depth = "foreground", + animation = "myrheon_flag_1", + delay = 0.0625 + }, + { + id = 309, + type = "air", + depth = "foreground", + animation = "myrheon_flag_2", + delay = 0.0625 + }, + { + id = 310, + type = "air", + depth = "foreground" + }, + { + id = 311, + type = "air", + depth = "foreground" + } +} diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..cb5dfa9 --- /dev/null +++ b/main.lua @@ -0,0 +1,125 @@ +function love.load() + do_pause = false + debug = false + debug_collision = false + textScale = 1 + fps_count = 0 + fps_second = 0 + fps_draw = 0 + fps_total = 0 + love.graphics.setColor(1,1,1) + love.keyboard.setKeyRepeat(true) + love.graphics.setDefaultFilter("nearest") -- good pixel + game = { + scale = 2.5, + width = love.graphics.getWidth(), + height = love.graphics.getHeight(), + paused = false + } + require "data/scripts" + Camera.width = game.width + Camera.height = game.height + levelList = {"level1","level2","level3","tileset"} + levelNum = 1 + currLevel = levelList[levelNum] + LoadTiles() + InitPlayer() + main_player = player:newPlayer(0,0) + main_player.sprite = love.graphics.newImage("assets/characters/nancy/idle1.png") + main_player:LoadAnimation(animation.nancy.idle) +end + +function love.update(dt) + -- fps counter + if fps_second >= 1 then + fps_second = fps_second - 1 + fps_draw = fps_count + fps_count = 0 + fps_total = fps_total + 1 + end + fps_second = fps_second + dt + fps_count = fps_count + 1 + current_dt = dt + + -- saveproof to game resize + game.width = love.graphics.getWidth() + game.height = love.graphics.getHeight() + + -- GAME STEP + if not do_pause then + SetCollisionFlags(main_player) + main_player:DoInput() + main_player:DoPhysics() + main_player:HandleAnimation() + main_player:Animate() + AnimateTiles() + Camera:CenterAt(main_player.pos.x, main_player.pos.y,LevelInfo.Width,LevelInfo.Height) + --camera:ScreenAt(main_player.pos.x, main_player.pos.y,game.width,game.height) + end +end + +function love.keypressed(key) + + if key == "escape" then + if do_pause then + do_pause = false + else + pausepage = 1 + do_pause = true + end + end + + if key == "f1" then + if debug then + debug = false + debug_collision = true + elseif debug_collision then + debug_collision = false + else + debug = true + end + end + + if key == "f2" then + main_player.pos.x, main_player.pos.y = 0,-0.1 + end + + if key == "f3" then + LoadLevel() + end + + if key == "f5" then + levelNum = levelNum + 1 + if levelNum > #levelList then levelNum = levelNum - #levelList end + currLevel = levelList[levelNum] + LoadTiles() + main_player.pos.x, main_player.pos.y = 0,-0.1 + end +end + +function love.draw() + TilesDisplayBack() + main_player:Draw() + TilesDisplayFront() + + -- Save color + local pcr, pcg, pcb, pca = love.graphics.getColor() + -- Scale control + if game.height > game.width then + textScale = game.height/480 + else + textScale = game.width/640 + end + + --debug + if debug then DebugUI() end + if debug_collision then DebugColisions() end + + -- reset color + love.graphics.setColor(pcr,pcg,pcb,pca) + + + local pcr, pcg, pcb, pca = love.graphics.getColor() + if do_pause then PauseUI() end + love.graphics.setColor(pcr,pcg,pcb,pca) +end