Skip to content

progklb/fantasy-hordes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fantasy Hordes

Image

A fantasy themed, horde fighting, hack and slash game.

This project is a work-in-progress and will grow and evolve dynamically. All documented aspects are subject to change. See the Notion board here

Project Structure

The following folder hierarchy convention is to be used for sub-projects within this repo:

+-- Assets
|   +-- _PROJECT              // Contains project-specific assets
|   +-- Submodules            // Contains all included submodules
|   +-- [Third-party asset]   // Various third-party assets

Accreditation

Systems

Image

Player

The Assets/_PROJECT/Content/Characters/Prefabs/Player prefab is a proxy object that holds generic character components. At runtime, the PlayerCharacter component spawns a full character prefab.

There are a number of visible gizmos here, as shown in the screenshot above:

  • The outermost gizmo is the player's audio source.
  • The second-outer most gizmo is the player's navigation mesh agent.
  • The third is the player's trigger collider, used for detecting contact with objects in the world (e.g. intersecting with the mesh the player is standing on/in, in order to determine the footstep audio type. Note that this is offset slightly downward, as to intersect with the floor).
  • The inner-most collider is a rigidbody collider for affecting objects when colliding with them (e.g. pushing a chair out of the way when running into it).

Mixamo has been used for charater animations. All animations are contained in the Assets/Mixamo folder, and this tutorial was used to set up the character animations with the Synty Studios characters contained in Assets/PolygonFantasyCharacters/Prefabs. Note that these animation contain animation events for triggering audio/effects.

Player movement is handled by Unity's navigation mesh system. When the player clicks on the map, a raycast is generated by the InputManager to determine the point on the map that has been clicked. The InputManager then raises an event containing this position, and the PlayerCharacter listens for this and feeds the position to the NavigationAgent to begin navigation.

Input manager -> should handle WASD input and forward move commands. And we need a float "listen for input" so that we can turn on/off input when in menus.

Audio

AudioControllers are used to manage audio, and AudioSetters allow us to assign AudioBanks to the controller to play based on specific context.

Character footsteps

For footstep sounds, characters raise an animation event at the correct time in their animation loop. This notifies the Character to play their footstep sound via the character's AudioController. The correct sound type is actively assigned/updated in the AudioController based on the surface type that the character is running on - this is handled by AudioSetterss in the scene.

When implementing/changing character animations, remember to update the animation events for audio!

Input

InputManager is the manager of the input system. It governs our common assets (such as input visualisation), whether or not we are currently listening for input, and manages and updates active InputControllers. We can implement specific InputController-derived classes (e.g. example, keyboard input, mouse input, controller input...).

About

A fantasy themed, horde fighting, hack and slash game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published