Skip to content

A 2D pure, functional tile based Game Engine with forces, collisions and scriptable configs for AI, tilesets, levels, etc.

License

Notifications You must be signed in to change notification settings

syallop/Game-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell 2d SDL Game Engine

This is an attempt at defining a pure, functional Haskell based SDL game engine with 2D tiles, forces, collision detection and scriptable config files for defining AI, Entities, tilesets, levels and UI functionality.

'GameEngine/Game.hs' shows an example game.

Directory Structure

Filepath Contains
GameEngine.AI.Agent An agent is a thing with some internal state that is passed observations which update its state and decide some action to perform.
GameEngine.AI.Client Clients are things that can be updated by an action upon them, or observed for their current state.
GameEngine.AI.Live A Live thing is a Client and an Agent combined such that it can be updated with an input.
GameEngine.AI.Reproducing A Live thing which may create more of itself by explicitly creating a list of more of similarly typed Live objects when updated.
GameEngine.ConfigReader Read a game config file.
GameEngine.ConfigReader.Arg Arguments in the game config file are one of several enumerated types.
GameEngine.ConfigReader.ArgFmt Require an argument of the format specified in the similarly nested 'Arg' module.
GameEngine.ConfigReader.Config Read and decide game configuration.
GameEngine.ConfigReader.Modifier Word modifiers found in config files.
GameEngine.ConfigReader.Option Config options are words and args.
GameEngine.ConfigReader.Parser Parse config files.
GameEngine.Stage A stage holds a collection of objects, backgrounds, etc.
GameEngine.Thing Things have a tile and several physical properties.
GameEngine.Tile A 2D tile.
GameEngine.TileGrid A 2D grid of instances of a tileset defines a tilegrid.
GameEngine.TileSet A mapping of names to tiles.
GameEngine.UI/Text Textual UI elements.
GameEngine.Background A Background is a Tilegrid plus a possible background texture.
GameEngine.Camera A Camera has positions and dimensions and may track a subject.
GameEngine.Collect Collectable things.
GameEngine.Counter A Counter keeps a number between a counted range.
GameEngine.Force Forces affect velocities.
GameEngine.Game An example game using the GameEngine.
GameEngine.HitBox A Rectange that may be collided with.
GameEngine.Rectangle A rectangular shape.

About

A 2D pure, functional tile based Game Engine with forces, collisions and scriptable configs for AI, tilesets, levels, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published