GithubHelp home page GithubHelp logo

crystal-bit / hacktoberfest-2020 Goto Github PK

View Code? Open in Web Editor NEW
14.0 10.0 13.0 148.19 MB

Create a videogame collaboratively during Hacktoberfest 2020 by implementing a 2D tower defense game.

Home Page: https://crystal-bit.github.io/hacktoberfest-2020/

License: GNU General Public License v3.0

GDScript 100.00%
hacktoberfest2020 godot-engine tower-defense hacktoberfest

hacktoberfest-2020's Introduction

Tower Defense game - Hacktoberfest 2020

game logo


UPDATE

โš  This repository is now freezed.

If you want to contribute to this Tower Defense game go to the defending-todot fork


ORIGINAL README:

Defending Todot it's an open source tower defense game inspired by Kingdom Rush.

It has been created for people who want to practice game development collaboratively while partecipating to the Hacktoberfest 2020.

Made with the open source Godot Engine v3.2.3.

๐ŸŽฎ Play it now

Discuss with the community

Discord

Join the Discord server

How to appear in the game credits

Before making a pull request, consider adding yourself to the credits.gd script so that you will appear in the game credits!

Project conventions

Lower case letters only for filenames

To avoid issues when multiple contributors are working on the same project across various file systems and operating systems. See more details here.

Node names

Use CamelCase style for node names.
This is the default style used in Godot and, moreover, it's easier to reference node names which don't have dash symbol or whitespaces in their name (see this comment)

Code style

There are no strict requirements on code style, but try to be consistent with the code that you'll find.

Ideally the code should follow the official GDScript style guide.

For the order of variables, signals, functions, please follow this order (simplified from GDQuest's guidelines):

1.  Extends and class_name
2.  """docstring"""

3.  Signals
4.  Node dependencies
5.  Constants
6.  Variables (properties)

7.  Built-in virtual callbacks (eg: \_ready, \_input, \_process, ...)
8.  Signal callbacks (eg: on_button_pressed, on_area_entered, on_body_entered, ...)
9.  Methods

Reference Kingdom Rush gameplay

License

hacktoberfest-2020's People

Contributors

andrea1141 avatar antocorr avatar davcri avatar davtur19 avatar flaviofs avatar gaarco avatar gvirtu avatar iranon avatar m0rp30 avatar masmartyg avatar mruggi avatar rubin0 avatar sop-s avatar vclayton avatar vittorio-del-bianco avatar zstiziano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacktoberfest-2020's Issues

Create Tower scene

After #11, create a Turret scene.

The Turret will be created on StrategicPointMenu tower_selected signal defined in #7.

Requirements:

  • A Sprite node. Ideally the Tower will set the Sprite texture depending on its type (probably sent via the tower_selected signal)

Things to keep in mind (we still need to clearly define the design of the towers):

  • Some tower types may use a Rally point to deploy troops
  • Some tower types may have a range attack

Implementation is open to discuss.

Tower and Enemy resources lose the Texture property on import

Steps to reproduce:

  1. Clone the repo git clone https://github.com/crystal-bit/hacktoberfest-2020.git
  2. Open with Godot (it will import all the assets)
  3. Open a Tower or Enemy resource in the inspector

Expected result:
Tower and Enemy resources load the correct textures as specified in the import files.

Eg: scenes/tower/tower_types/sniper_1.tres should load "res://assets/sprites/tower-defense-top-down/png/tower-defense_tile249.png"

Current behaviour:
Tower and Enemy resources lose the texture references.

image

This is confirmed as well looking at the git status:

image

Note
If, after importing all the assets, you close Godot and reset the repository using git reset --hard and you open again the project, the issue is fixed and the resources are in place.

Define turret and troop types

  1. How many Turrets we want to support?
  2. What kind of Troops will they spawn?
  3. What are the advantages/disadvantages in combat between each Troop vs Enemy? (see #12)
  4. Which stats will the Troops have (hp, attack, range, speed, cost)?

Requirements:

In Kingdom Rush it seems there are 4 types of Turrets that allow to spawn 4 troops.
image

Add a "bodies in range" array in the tower script

I would add an array to preserve all the bodies in the tower's range. It can be useful for adding a tower that can shoot multiple enemies and for resolving many bugs, for example if an enemy is faster than another. Since it is easy to implement, I can do this issue with another one.

Create TowerDescription popup element

A TowerDescription is a popup menu that appears when a slot of StrategicPointMenu is pressed (see #5).

image

Requirements:

  • Create a TowerDescription scene
  • It should show Tower data (Name, Description, Speed, Attack Power)

Future work

We will need to check the spawn position of the TowerDescription popup to make sure that there is enough space to show all of its content. Should we set a max width and height for this element?

Decide game title

This project needs a title!
I would say to wait till we have some gameplay in-place or a game pitch to assign any title (we will change this repository name, probably). However if you have any idea, feel free to propose it.

Localization

For the usability of a game / program the language localization is very important to me

Update gameplay.tscn to support multiple levels

After Level1 is created (#10), we need to update gameplay.tscn to allow for loading multiple levels.

Requirements:

  • create a placeholder node (eg: LevelPlacholder) that will be used to instantiate the correct level based on passed parameters from a LevelSelection scene (we still need to create this, for now you can assume that we are always loading the first level)
  • by default, the placeholder node should show the content of Level1

Hint: you can take a look at how the LevelBase scene is implemented in angry-aliens in the develop branch: https://github.com/crystal-bit/angry-aliens/tree/develop

Add logic to StrategicPointMenu slots

After #5 is done, we need to add slot logic:

  • when a slot is pressed:
    • it should open a TowerDescription popup menu
    • it should change the state of the pressed slot. Graphically it should highlight or change the slot texture.
  • when a slot is pressed and it's highlighted and the user has enough money to buy the tower:
    • it should dispatch a signal (eg: tower_selected).

Improve Level 1 aesthetic

Currently level1 layout is fine, but it can be improved by placing some graphic element in the scene (maybe also slightly animated to simulate a wind effect).

  • Add grass, trees, improve tiles

If you want to create new level tiles, feel free to open a new issue.

The current state of Level1 (at the time of writing) is:
image

Add descriptions to Tower_Resource

Tower_Resource does not have a description property.

  • Add the property and update the existing resources with some description
  • Update strategic-point.gd : _on_slot_activated to use the new description property, so that the popup will be initialized correctly

Remember to take inspiration from what we currently have in the GDD.

@vittorio-del-bianco if you have some ideas for the descriptions feel free to write them here!

Add enemy detection to Tower

Add enemy detection logic to the Tower:

  1. the tower should detect objects (enemies) that are inside the Attack Range
  2. once an enemy enters the Attack Range, the tower should change state to something like ATTACKING and it should save the target enemy in a variable
  3. once the ATTACKING state is started, a timer should be started as well to call a fire method periodically according to the tower's rate of fire

The fire method is optional, we can do it in another issue.

note: Enemies are going to extend the Enemy class which is a KinematicBody2d. I'm working on Enemies in #28. However this can be tested even without the enemy scene itself.

Update Game Design Document with main game flow mechanics

We need to specify in the gdd some main game mechanics such as:

  • What happens when an Enemy reaches the BaseArea/HitArea (HitArea is the name currently used in the Level1 scene)
  • How the player gains money?
  • Where the strategic points can be placed?
  • Which input peripherals should the game support?
  • Should the towers be destroyable by the player? (eg: remove a tower to place another tower type)
  • probably other stuff too...

Create credits scene

I would like to have a credits scene with all the contributors of the project.

Ideally every contributor will add their name to the credits scene when making a Pull Request.

Feel free to propose a layout.

Create sound effects for UI events

We need some audio effects for the UI events.
You can create them or search for assets compatible with the project licensing.

Some suggestions: Kenney has a CC0 UI asset pack here https://www.kenney.nl/assets/ui-audio
Nice online tool to generate chiptune sfx https://jfxr.frozenfractal.com/

On menu.tscn:

  • Button pressed

On map.tscn:

  • Level locked
  • Level selected

On gameplay.tscn:

  • StrategicPoint pressed
  • Slot pressed
  • Tower selected, positive sound (to play when the player has enough money to buy it)
  • Tower selected, negative sound (to play when the player doesn't have enough money to buy it)

Create level 1 scene

Since this will be the first level, use a simple layout. We will create more complex levels afterward.
mockup

Requirements:

  • create Level1 scene
  • create the level graphic (road, grass, trees,...)
    • we already have some assets. If you want to create new level tiles, open a new issue.
  • add a spawn point*
  • create a navigation path for the enemies*
  • create one hitarea* (the area that the player needs to defend)

*Logic for the spawn point, navigation path and the hit area will be implemented in the future.

Future Work

  • add various StrategicPoints
  • at at least a spawn point for enemies
  • add level data for enemy waves
  • add logic for enemy waves

Create StrategicPoint scene

A StrategicPoint is a point where the the player can build a tower. It is detailed in this screenshot taken from Kingdom Rush:

image

Video gameplay here: https://youtu.be/kHcO2NFInuY

Requirements:

  • Create a StrategicPoint scene
  • It should open the StrategicPointMenu on pressing an activation area
  • It should hide the StrategicPointMenu on pressing outside an activation area

Create HP bar for enemies

Create an HP bar for the enemy scene.

Something like:
image

This will be used to show enemy's hp after #71 is implemented.

Update StrategicPoint and complete tower buying flow

Once #32 is done, we need to complete the buy_tower method in strategic-point-menu.gd.

It should:

  • close the StrategicPointMenu
  • remove money from the player
  • disable input (in the future we should implement a logic to show an tower upgrade menu)

Also we need to improve the behaviour of the StrategicPoint:

  • close the StrategicPointMenu by clicking outside of it
  • when the user closes the StrategicPointMenu and they didn't buy the tower, make sure that the tower is removed
    • eg: click on the StrategicPointMenu, click on a Slot to preview the tower, click again on the StrategicPointMenu to hide the menu. Now the tower should not be visible

Stop the credits scene with ESC

Once the game is complete, the credit list will be very long.
I would like to add the functionality to stop it and return to the main menu by pressing ESC.

Guidelines

In general, feel free to discuss anything.
You can comment on already existing issues or open new ones.

Assets

Many issues will require assets that are not available in the repository. In these cases you have 2 options:

  1. ask other contributor to find/create the asset by creating a new issue
    • while you wait for the assets, you can use placeholders and work on the issue (eg: default Godot control nodes, squares, etc)
    • you can ask for help on the Discord server
  2. find/create the assets yourself

Creating new assets

For audio files: use wav or ogg.
Also read these guidelines on the official Godot documentation.

Assigning issues

Leave a comment in the issue that you want to work on, and I'll assign the issue to you.

Wait for dependent issues

To minimize merge conflicts, avoid working on an issue that depends on another one. It's better to wait for the blocking issue to be implemented first.

Define Enemy types

  1. How many Enemies we want to support?
  2. Define stats for each Enemy (hp, speed, range, type)

Requirements:

  • Update the game design document with the new information

Some enemy in Kingdom Rush:

image
image

Update SlotBottomRight to be inactive and set a "locked" image

We now have 3 tower types but we have 4 slots in the strategic point menu scene. I simple solution would be to block the 4th slot (SlotBottomRight) and show an image to tell the player that the slot could be unlocked in the future.

Make sure that input is disabled on the button.

Update SlotButton to show a "Buy" image

We need a more explicit way to show how to buy a tower.
We currently have a white decoration that is not really intuitive. We could use a texture with an icon and/or a "Buy" text.

image

image

In Kigndom Rush is handled in this way:

image

image

Add credits button to the main menu

I implemented the credits scene in #2, now we need to add a button the main menu in order to load the credits scene.

Requirements:

  • Create a new "Credits" button in the main menu
  • Load the credits scene
  • Remember to add yourself to the contributors list in the credits.gd script!
  • Once the credits are finished, make the game return to the main menu

Create StrategicPointMenu scene

A StrategicPointMenu is the menu opened by pressing on a StrategicPoint (see #4).

image

Video gameplay here: https://youtu.be/kHcO2NFInuY

Requirements:

  • Create a StrategicPointMenu scene
  • It should have multiple interactive slots (it's okay to have 4 slots like Kingdom Rush. Currently we still have to decide how many tower types we will support)
    • each slot should show an icon and tower cost

Slot logic will be handled in another issue.

Create level selection scene

You have freedom to experiment different layouts. The basic requirement is to have the possibility to load levels defined in scenes/gameplay/levels/.

The "Start" button on main menu should load this level selection scene.

Future work

  • implement level completed persistence
  • load save file and mark completed levels as done

Reference from Kingdom Rush

image

Video reference: https://youtu.be/kHcO2NFInuY?t=14

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.