-
Notifications
You must be signed in to change notification settings - Fork 0
GameFramework
The game Framework is a set of foundation components scripts and classes that provide basic structure and functions to a game. It is a core library aimed to help the dev of a game for its paticular needs.
Hide as much as possible low-level details of the game engine. Help solve tricky problems in game dev (entity movement, user/ai input, etc.) Reduce boilerplate code.
Here is a list of general concepts in the game framework
Entities represent any game object in a game world. Ranging from Characters to triggers to logical units. They are made up of components.
Characteristics:
- Entity in a game level
- Uniquely identified with an Id
- Not a precise object (not an instance of class Entity in memory)
- Supports network replication for multiplayer games
- Can be constructed from prefab, custom designed definitions.
- can be destroyed (destory(entityId) ) or spawned ( spawn(entityId) )
- Reusable functionality that can be added to an Entity
- Example: Engine Components: - TransformComponent: Adds a position to an entity - PhysicsComponent: Adds physics collisions (Colliders and physics body) - Sprite Component : Adds a sprite to visually represent the entity GameFramework Components: - HealthComponent : Health Points - DirectionComponent: Direction the entity is facing - ScriptComponent: Adds a series of script to give reusable entity specific behaviours. - Mostly used for behaviours and input control
Represents events that can happen during the game.
- CollisionEvent: collision between two entities
- InputEvents: An Input has been triggered.
- Special Kind of entity behaving as an agent in the world altering the state of the world.
- Handles movement and input
- can usually walk
-
A brain that lets the entity behave
-
PlayerController: Brain controlled by a human player
-
AIController: Brain controlled by AI behaviours
-
is A component attached to a single entity at a time.
- Interface for players to agents
- Handles user Input (click, keyboard, gamepad)