Engine Requirements - JayhawkZombie/EECS581Project GitHub Wiki
Requirements:
Feature: Level
- The Level can be rendered with a tiled background
- The background can be read from a file, with the following structure:
ID: \<character\>
Path: \<path to texture file\>
(1 or more ID + Path specs)
Layout:
\<character\> \<character\> … \<character\>
…
\<character\> \<character\> … \<character\>
- The in the file is a single character used to map the texture to the layout, for simpler file reading and reduced memory overhead.
- The Background tiles are drawn to a single render texture before the level begins the “play” cycle to reduce runtime overhead for rendering
- The Level contains additional “Layers”, to allow layered scenes
- Each layer is rendered in a specified order, with the highest index in storage rendered last
- The Level contains a collection of Actors that can manipulated, and a single Pawn that represents the Actor the player controls
- The Level loading is done in separate thread(s) to avoid blocking the main thread
- The Level does collision detection for every Actor and Volume and triggers events to occur based on those collisions
Feature: LevelObject
- The LevelObject is a generic object that Level is completely aware of
- Its public and private members can be seen by Level
- It is specialized with:
- Containing a ColliisonBox
- Containing a set of textures used to render it
- The CollisionBox member can be used to script actions when an interaction event is triggered
- It contains Animations
- The animations can be scripted/triggered to begin/stop/pause/speed up/slow down at any time using the CollisionBox or by manually doing so with a method call
Feature: Actor
- The Actor is a generic Engine entity, derived from LevelObject
- It is specialized in:
- Maintaining a velocity and acceleration
- Can interact with other LevelObjects
- The entity accepts and responds to user keyboard input using the intrinsic EventHandler object present
- Actor actions can be scripted using a node-based linear linking system or by triggering a specific event callback using CollisionVolumes
Feature: Animations
- Animations are either sprite-based or spline-based
- For Sprite-based Animations:
- Animations use a sprite sheet, along with a set of IntRects to specify each frame of animations, which are specified in the animation file
- Each frame is equally spaced along the duration timeline, so no single frame will be rendered longer than any other
- Animations can have fade in/out transitions, the duration for which is specified in the animation file
- The animation can loop forever If desired, and stopped/restarted/sped up/slowed down at any time
- The file format is as follows:
[Animation]
[\<key\>=\<value\>]
File=\<FilePath\>
Frames=\<number of frames in the animation\>
Duration=\<Duration for animation\>
Loop=\<true | false\>
TransitionIn= \<true + \<duration\> | false\>
TransitionOut= \<true + \<duration\> | false\>
FrameWidth= \<width, in px, of each frame in the sprite sheet\>
FrameHeight= \<height in px of each frame in the sprite sheet\>
Ex.
File=sampleanimation.png
Frames=20
Duration=2
Loop=true
TransitionIn=true 0.5
TranstionOut=false
FrameWidth=50
FrameHeight=70
- The “Engine::Util” namespace contains methods to be used for parsing this, as it has the same file structure as an ini file