Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Modular Extended Strafer Controller

An asset by AceSpectre
The page banner background of a mountain and forest
Modular Extended Strafer Controller hero image

Quick Information

0 ratings
Modular Extended Strafer Controller icon image
AceSpectre
Modular Extended Strafer Controller

Modular first person controller based on Quake's movement systemIncludes a system for creating controllers using modular states made out of resourcesThis modular system was built using Kabariya's strafer controller (https://github.com/Kabariya/strafer) as a base. Three features have been added to their controller:- Sliding- Maintaining the current direction when jumping (and not pressing any keys)- Limiting the player's control over the controller in the airDocumentation is included using docstrings, more information at: https://github.com/AceSpectre/Extended-Strafer-Controller

Supported Engine Version
4.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
8 months ago
Git URL
Issue URL

ExtendedStraferController

Modular first person controller based on Quake's movement system

Setup

  1. Install the asset using the Godot Asset Library
  2. Update the input maps used in the scripts or change your project input maps to match the following image: README Input map used in project while developing the asset

Features

Modular States

States are stored as resources and are not dependent on each other. This means they can be interchanged without concern for breaking the controller.

Storing states as resources allows them to be changed dynamically witin the inspector. They can export variables consisting of their settings and can be saved and reused.

The state machine works using an array of BaseMovementState. The starting state is specified using an index.

State change requests can be made to the controller using the change_state() function, passing in a new instance of the type of state to change to. If the state does exist, this function returns the state instance within the array of states, otherwise it returns null.

Transitions are defined as static functions within these states, for example the transition to the air state from the ground state is written within the ground state as static func to_air(). Defining state transitions statically allows transitions to be shared between states. For example, jumping in both the ground state and sliding state would have the same transition to the air state.

This system allows the controller to pass on handling of certain features (e.g: processing the current velocity or headbobbing) to the current state without needing to know the type of the current state. The interface for the modular system is defined within BaseController3D.gd and BaseMovementState.gd

Extended Strafer Controller

This modular system was built using Kabariya's strafer controller as a base. Three features have been added

  • Sliding
  • Maintaining the current direction when jumping (and not pressing any keys)
  • Limiting the player's control over the controller in the air

Modular first person controller based on Quake's movement system

Includes a system for creating controllers using modular states made out of resources

This modular system was built using Kabariya's strafer controller (https://github.com/Kabariya/strafer) as a base. Three features have been added to their controller:
- Sliding
- Maintaining the current direction when jumping (and not pressing any keys)
- Limiting the player's control over the controller in the air

Documentation is included using docstrings, more information at: https://github.com/AceSpectre/Extended-Strafer-Controller

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Modular Extended Strafer Controller icon image
AceSpectre
Modular Extended Strafer Controller

Modular first person controller based on Quake's movement systemIncludes a system for creating controllers using modular states made out of resourcesThis modular system was built using Kabariya's strafer controller (https://github.com/Kabariya/strafer) as a base. Three features have been added to their controller:- Sliding- Maintaining the current direction when jumping (and not pressing any keys)- Limiting the player's control over the controller in the airDocumentation is included using docstrings, more information at: https://github.com/AceSpectre/Extended-Strafer-Controller

Supported Engine Version
4.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
8 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers