Giter VIP home page Giter VIP logo

beach-escape's Introduction

Godot Game Template

For Godot 4.2

This template has a main menu, pause menu, and credits scene. It supports basic accessibility features like input rebinding, sound, and video controls.

Example on itch.io

Main Menu
Key Rebinding
Key Rebinding

Use Case

Setup menus and accessibility features in about 15 minutes.

The core components can support a larger project, but the template was originally built to support smaller projects and game jams.

Features

App (Base)

The App/ folder holds the core components of the menus application.

  • Main Menu
  • Options Menus
  • Pause Menu
  • Credits
  • Loading Screen
  • Persistent Settings
  • Simple Config Interface
  • Keyboard/Mouse Support
  • Gamepad Support
  • Centralized UI Sound Control

Extras

The Extras/ folder holds components that extend the core application.

  • Example Game Scene
  • Opening Scene
  • Success & Failure Scenes
  • End Credits
  • Level Advancement
  • Logging Scripts
  • Additional Inherited Scenes from App/:
    • OptionsMenu.tscn
    • MasterOptionsMenu.tscn
    • MainMenu.tscn
    • PauseMenu.tscn
    • InitApp.tscn

How it Works

  • InitApp.tscn is the project's main scene. It loads all the configuration settings from the config file (if it exists) into game and sets the loading screen. It then loads the next scene (Opening.tscn or MainMenu.tscn).
  • Opening.tscn is a simple scene for fading in/out a few images at the start of the game. It then loads the next scene (MainMenu.tscn).
  • MainMenu.tscn is where a player can start the game, change settings, watch credits, or quit. It can link to the path of a game scene to play, and the packed scene of an options menu to use.
  • SceneLoader.gd is an autoload script. It can load scenes in the background or with a loading screen (LoadingScreen.tscn by default).
  • Credits.tscn reads from ATTRIBUTION.md to automatically generate the content for it's scrolling text label.
  • The UISoundController node automatically attaches sounds to buttons, tab bars, sliders, and line edits in the scene. UISoundControllerAutoload.tscn can be enabled in the project autoloads to apply settings project-wide.
  • InGameMenuController.gd controls opening and closing a menu and pausing the game in the background.
  • The PauseMenuController node loads the PauseMenu.tscn (using InGameMenuController.gd) when triggering ui-cancel.
  • GameUI.tscn is a demo game scene that displays recognized action inputs, and features the PauseMenuController node, the LevelLoader node to advance through levels, and InGameMenuController.gd to show SuccessScene.tscn or FailureScene.tscn.

Usage

App vs. Extras

App/ contains the core features of the package. On first use, it's recommended to keep the Extras/ folder, and make changes there. Features can be added and removed as needed.

To start minimally, use just the App/ folder, and safely remove the Extras/ folder by following the minimal instructions.

Compare features to decide which approach is best for your project.

Minimal

If you just want to use just the projects minimum App/ folder:

  1. Go to Project > Project Settings… > General > Application > Run.
  2. Update Main Scene to res://App/Scenes/InitApp/InitApp.tscn.
  3. Go to Project > Project Settings… > Autoload.
  4. Remove autoloads that start with the path res://Extras/....
    1. ProjectUiSoundController
    2. ProjectLevelLoader
    3. RuntimeLogger
  5. Close the window.
  6. Delete the Extras/ folder.
  7. Reload the project.

The remaining instructions will apply the same for either folder you decide to use.

Extra Minimal

The pause menu feature can be removed if not used. From the App/ folder, delete PauseMenu/*, PauseMenuController.gd, and InGameMenuController.gd.

Lastly, this README.md and the Media/ directory can both be removed.

New Project

These instructions assume starting with the entire contents of the project folder.

  1. Update the project’s name.

    1. Go to Project > Project Settings… > General > Application > Config.
    2. Update Name to "Game Name".
    3. Close the window.
    4. Open MainMenu.tscn.
    5. Select the Title node.
    6. Update the Text to "Game Name".
    7. Save the scene.
  2. Point the main menu to the game scene.

    1. Open MainMenu.tscn.
    2. Select the MainMenu node.
    3. Update Game Scene Path to the path of “Game Name” game scene.
    4. Save the scene.
  3. Update the project’s inputs.

    1. Go to Project > Project Settings… > Input Map.
    2. Update the input actions and keybindings for “Game Name”.
    3. Close the window.
    4. Open InputOptionsMenu.tscn.
    5. Select the Controls node.
    6. Update the Action Name Map to show readable names for “Game Name” input actions.
    7. Update the Add Button Texture and Remove Button Texture with textures.
    8. Save the scene.
  4. Add sound effects to the UI.

    1. By scene.

      1. Open MainMenu.tscn and PauseMenu.tscn.
      2. Select the UISoundController node.
      3. Add audio streams to the various UI node events.
      4. Save the scenes.
    2. Project-wide, with Extras/.

      1. Open UISoundControllerAutoload.tscn.
      2. Select the UISoundController node.
      3. Add audio streams to the various UI node events.
      4. Save the scene.
      5. Go to Project > Project Settings… > Autoload.
      6. Enable UISoundControllerAutoload.
      7. Close the window.
  5. Update the game credits / attribution.

    1. Copy ATTRIBUTION_example.md over ATTRIBUTION.md.

    2. Update ATTRIBUTION.md with “Game Name” credits, following the example.

    3. Reload Credits.tscn scene to apply changes from ATTRIBUTION.md.

    4. Include the attribution in exports.

      1. Go to Project > Export.
      2. Select one of “Game Name” presets (or set them up).
      3. Select the Resources tab.
      4. Update Filters to export non-resource file/folders to include ATTRIBUTION.md.
      5. Close the window.

Existing Project

For an existing project, just copy over the App/ folder (optionally the Extras/ folder, as well).

  1. Update the project’s main scene.

    1. Go to Project > Project Settings… > General > Application > Run.
    2. Update Main Scene to res://…/InitApp.tscn.
    3. Close the window.
  2. Update the project’s autoloads.

    1. Go to Project > Project Settings… > Autoload.
    2. Add res://App/Scripts/SceneLoader.gd.
    3. Optionally enable res://Extras/Scripts/RuntimeLogger.gd.
    4. Close the window.
  3. Update the project’s name.

    1. Open MainMenu.tscn.
    2. Select the Title node.
    3. Update the Text to Game Name.
    4. Save the scene.
  4. Point the main menu to the game scene.

    1. Open MainMenu.tscn.
    2. Select the MainMenu node.
    3. Update Game Scene Path to the path of “Game Name” game scene.
    4. Save the scene.
  5. Update the project’s inputs.

    1. Open InputOptionsMenu.tscn.
    2. Select the Controls node.
    3. Update the Action Name Map to show readable names for “Game Name” input actions.
    4. Update the Add Button Texture and Remove Button Texture with textures.
    5. Save the scene.
  6. Add sound effects to the UI.

    1. By scene.

      1. Open MainMenu.tscn and PauseMenu.tscn.
      2. Select the UISoundController node.
      3. Add audio streams to the various UI node events.
      4. Save the scenes.
    2. Project-wide, with Extras/.

      1. Open UISoundControllerAutoload.tscn.
      2. Select the UISoundController node.
      3. Add audio streams to the various UI node events.
      4. Save the scene.
      5. Go to Project > Project Settings… > Autoload.
      6. Enable UISoundControllerAutoload.
      7. Close the window.
  7. Update the game credits / attribution.

    1. Copy ATTRIBUTION_example.md over ATTRIBUTION.md.

    2. Update ATTRIBUTION.md with “Game Name” credits, following the example.

    3. Reload Credits.tscn scene to apply changes from ATTRIBUTION.md.

    4. Include the attribution in exports.

      1. Go to Project > Export.
      2. Select one of “Game Name” presets (or set them up).
      3. Select the Resources tab.
      4. Update Filters to export non-resource file/folders to include ATTRIBUTION.md.
      5. Close the window.

Links

Attribution
License

beach-escape's People

Contributors

plexsoup avatar haydoggo avatar diarmuidtherat avatar ronnocj avatar

Watchers

 avatar

beach-escape's Issues

Fix Mudfish behavior

The mudfish, when it moves into a pit space, should stop for 1 tick, the pit animation should play, but the mudfish should come back up. In other words, the mudfish removes pits from play.

Additionally, the mudfish should die instantly when it runs into a rock (and this should likely be reflected in its flavor text).

Sand Projectile Hit Gets Cut Off

It only happens sometimes, I previewed the sounds to make sure they exported correctly, but when I ran the ExampleScene it sounded like about 1/3 of the time the sound gets cut off after the projectile hits. Not a super urgent issue because especially after the music gets added it won't be too noticeable.

Fish going out of bounds

If a fish with a path that moves diagonally is selected, they will move out of bounds if placed in certain locations (the top for the seahorse, and the bottom for the crab respectively), or if a tower/rock changes their pathing such that they move there. This could be a legitimate strategy for some levels, however in its current state it looks more like a bug than anything else. An easy solution to this is to give the background a subtle tile texture, or making it so the area outside of the play area are effectively "rocks".

Fix the Pelican

Pelican should:

  1. damage a fish that is inside it, every tick
  2. be damaged by the fish that is inside it, every tick
  3. target fish that enter the area around it, not just directly in front of it
  4. only try to eat a fish if it is not currently trying to eat a fish

add discoverable, captive fish in a bucket or tide pool

Add a bucket or tide-pool prop/obstacle which might hold new fish the player can discover.
Maybe make the reward schedule intermittent, so players don't know if they'll get a fish or not. This might foster exploring different lanes. re #19

sharks get hung up on rocks

Sharks don't die when impeded by rocks, but they can't affect the rocks either. This causes the game to effectively hang with the player unable to finish a level.

Damage and Health Values for Units and Towers

Gray fish: 50 hp, 5 damage, 2 ticks to dry
Boot fish: 75 hp, 10 damage, 3 ticks to dry
Gold fish: 50 hp, 5 damage, 2 ticks to dry
Crab: 100 hp, 15 damage, 4 ticks to dry
Mudfish: 80 hp, 15 damage, does not dry, dies on contact with rocks
Seahorse: 50 hp, 25 damage, 3 ticks to dry
Sea urchin: 110 hp, 10 damage, 5 ticks to dry
Pufferfish: 150 hp, 10 damage, 6 ticks to dry
Octopus: 70 hp, 0 damage, 4 ticks to dry
Squid: 60 hp, 20 damage, 3 ticks to dry
Sea slug: 1 hp, 999 damage, 1 tick to dry
Shark: infinite hp, 40 damage, does not dry

Tack shooter: 75 hp, 15 damage
Sand cannon: 45 hp, 25 damage
Seagull: 40 hp, 40 damage
Hook: 15 damage per tick
Pelican: 80 hp, 15 damage per tick inside its mouth, releases after 4 ticks or dead (takes damage each tick from fish inside it)
AoE hand slap (?): 50 damage, does not die (?)

reward alternate strategies to prevent a single conga line

With static defences, there's a clear dominant strategy: send all units down one cleared lane.
All players will do this because they like to win, but they'll feel unsatisfied because it seems cheap.

Find rewards for using multiple lanes or disincentivize the single conga line strategy.

add puddles

If moisture is a mechanic, players might need a way to restore wetness.
Puddles could be a beneficial type of objstacle/tower.

fix shadow on fish hook and sand ball

Apply the new (expanded) sprites to the fish hook and sand ball, so there's some empty space in the texture around the actual unit. That will fix the auto-generated shadow.

(And check any other towers or objects for busted shadows (blur cutoff) while we're at it.

some moisture damage won't be obvious to player

image

In some situations, like when seahorses and crabs hit obstructions, they take moisture damage. If that happens to kill a unit, it's not obvious to the player what caused that death. Happens most often when sending units along the top or bottom border. The player wouldn't realize that strategy is extra dangerous.

Fix the Tack Shooter

  1. it continues shooting after its target has died
  2. the hitbox it shoots remains active until a fish passes through them, which is why "1" is even a problem; the tack shooter can stack as many hitboxes around itself as it continues shooting, often instakilling the next fish that gets close.

mudfish can escape detection at finish line?

A player can get a mudfish to the end, but it isn't counted.. perhaps it's disabling its collision shapes or monitoring.

We need to make the finish zone bigger, so the mudfish can't escape it, or come up with some alternate method of detecting finishing fishes.

remove the drop shadow on the shark?

The shark fin looks a bit weird with a shadow all around it, like it's not making contact with the ground.

Consider removing the drop shadow for that piece, or creating a new art asset.

end of level isn't triggering

Something happened during changing the spawn queue over to a deployment area: the level doesn't end anymore. Check the signal on the finish zone and the listeners.

Spawned units were moved into current_level/UnitContainer instead of Lanes. That's likely the source of the problem.

add a restart level button to the esc pause menu

Sometimes levels won't end. Maybe a shark is pressed up against a rock, or whatever.
Other times, the player isn't happy with a strategy they've deployed, so they'd like to retry the level.

Add a restart level button to the pause menu.

Implement all audio SFX

  • spawning any fish
  • pelican swallowing and releasing fish
  • sand cannon spitting projectiles
  • tack thrower throwing flags
  • fish caught on fishing hook
  • fishing line reeling in
  • new glass bottle breaking
  • pit trap catching a fish and closing
  • seagull flying / perching
  • grass rustling when a fish passes through
  • fish entering the finish line
  • Win
  • Lose

For procreate minigame:

  • fish pair matched and travelling offscreen to procreate
  • new fish discovered when player clicks on rocks
  • fish hooked on fishing line (repurposed from main game scene)
  • ambient bubbles

In procedural levels, at level start, no buttons appear to have focus.

When the player starts a procedural level, they can spawn fish without selecting a button, which is appropriate. However, no button appears to be highlighted, so it's hard for the player to tell what they're spawning.

Make sure a button gets a focus highlight during procedural levels.

Fix the Urchin

Urchin is supposed to be able to hit the tiles around it, not just in front of it.

Towers don't stop shooting

after the refactor so towers shoot on ticks, it seems like they're never deactivating, because they just keep shooting even after all the player units are gone.

Modify Seagull movement and attack Behaviour

Seagull was created as a realtime path follower.
We decided to use turn-based movement instead of realtime.

Modify seagull to take discrete steps.
Come up with a method which allows level editors to easily add seagull paths to the tile map.

Sand Cannon blocks unit placement

When a sand cannon is placed at the edge of the deployment zone, users can't place fish beside it. But it wouldn't be clear to them why that's the case. So it seems like a bug.

image

New Units

Need more Units

  • Seahorse
  • Mudfish
  • Shark
  • Pufferfish
  • Octopus
  • Sea slug
  • Gold fish

Create win and lose screens

Bob the Seagull King: my idea was a text display and then just a bunch of sprites (of whatever team won) fall across the screen

some levels don't end

I played the procedural levels and got stuck on the third or fourth level. I had no units left to send, and lots across the finish line, but the game didn't end.

Find the source of the bug and/or add a "nothing happening" timer as a workaround hack.

Levels should always end.

New Towers and Obstacles

  • Pelican: Large bird that sits in one place. Any fish that gets within 1 (2?) tile of it is immediately taken into its beak (but only one at a time), and each tick, the Pelican will deal some damage to the fish. If the fish deals enough damage, the Pelican will spit the fish out on the other side, but if the fish dies first, the Pelican consumes it.

  • Squid: Blasts ink at nearby fish, slowing them down.

  • Fish Hook: If a fish walks through a tile with a fish hook on it, they will take damage per tick until they die or make it out.

  • Seagrass: Any fish that walks through a tile with seagrass on it will be slowed while inside it (take an extra tick to move out of it).

fix the drop-shadows

units have a drop shadow component which auto-generates a shadow based on their sprite. Unfortunately, if the unit's sprite pixels go right up to the border, the shadow doesn't look right, because it's cut off at the edges. Reimport all the unit sprites at 256x256, with some empty space around the perimeter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.