The Mischief Haskell ECS Game Engine

kqr1 pts0 comments

Mischief.ECSmischief-ecsSource<br>Contents<br>Index

Safe HaskellNoneLanguageGHC2024Mischief.ECS

Contents<br>LLM Disclaimer<br>What is Mischief?<br>Learn You an ECS for Great Mischief!

Description<br>This library contains the ECS used by the Mischief Game Engine.

Synopsismodule Mischief.ECS.App<br>module Mischief.ECS.App.Plugins<br>module Mischief.ECS.App.Schedules<br>module Mischief.ECS.App.SystemConfig<br>module Mischief.ECS.App.Systems<br>module Mischief.ECS.Archetypes<br>module Mischief.ECS.Archetypes.Graph<br>class Collectable v storage wherecollect :: v -> storage

class Semigroup s => EraseIntoStorage v s whereerase :: v -> s

module Mischief.ECS.Components<br>module Mischief.ECS.Components.Bundle<br>module Mischief.ECS.Components.BundleTypes<br>module Mischief.ECS.Components.Common<br>module Mischief.ECS.Components.Required<br>module Mischief.ECS.Components.Runnable<br>module Mischief.ECS.Components.Spawn<br>module Mischief.ECS.Entities<br>module Mischief.ECS.Events<br>module Mischief.ECS.Hooks<br>module Mischief.ECS.Log<br>module Mischief.ECS.Mappable<br>class Typeable m => Message (m :: k)<br>module Mischief.ECS.Prelude<br>module Mischief.ECS.Relationships<br>module Mischief.ECS.Relationships.ChildOf<br>module Mischief.ECS.Relationships.Graph<br>module Mischief.ECS.Relationships.Order<br>module Mischief.ECS.Relationships.Tree<br>module Mischief.ECS.Tables<br>module Mischief.ECS.Time<br>module Mischief.ECS.Utils<br>module Mischief.ECS.World<br>module Mischief.ECS.World.Change<br>module Mischief.ECS.World.Defer<br>module Mischief.ECS.World.Insert<br>module Mischief.ECS.World.Modify<br>module Mischief.ECS.World.Par<br>module Mischief.ECS.World.Prefs<br>module Mischief.ECS.Resources<br>module Mischief.ECS.World.Query<br>module Mischief.ECS.World.Query.Queryable<br>module Mischief.ECS.World.Query.QueryFilter<br>module Mischief.ECS.World.Query.Markers<br>module Mischief.ECS.EventDef<br>module Mischief.ECS.World.Query.TH<br>module Mischief.ECS.World.Remove<br>module Mischief.ECS.World.Spawn<br>module Mischief.ECS.World.Utils<br>data TestTest = TestTest

LLM Disclaimer<br>No LLM / AI was used in making Mischief. Now and forever.

What is Mischief?<br>Mischief has various meanings. It can be a group of rats. Or it can refer to being naughty and playful.<br>This Mischief, however, is an open-source ECS Game Engine! In other words...<br>Mischief :: Entity -> Component c => System ()<br>Mischief takes great inspiration from Bevy and Flecs, and<br>was written in 100% Haskell, taking advantage of its great ergonomics and strong type system.<br>It is a refreshing spin on the functional and data-driven paradigms.<br>Package<br>This package contains only mischief-ecs, the ECS at the core of Mischief. Other packages, such as mischief-input, mischief-assets,<br>mischief-render are planned, but haven't yet been developed to the same level as the ECS itself.<br>Design Goals<br>These are the main design goals of Mischief:<br>Ergonomic and Accessible . Mischief's main purpose is to provide a very clean, intuitive, inherently opinionated, high-level API. This is the main way we differentiate ourselves from other ECS's.<br>Learning to use Mischief should be a painless and intuitive process.<br>Functional and Data Driven . We strive to find a balance between functional programming and data-driven design. These are two concepts that don't<br>interact very often, but that both stand at the core of Msichief.<br>Modular . Mischief is meant to be modular, allowing you to plug packages in and out, whether they are made by us or a third party.<br>Highlights<br>Here are some highlights of Mischief:<br>Highly Dynamic . Want to disable a system? Despawn it!<br>Fancy Queries . Complete with transitive queries and filters.<br>Quasi-Queries . Scripting language for writing queries.<br>Rich Systems . Monadic Systems? Yes please.<br>Book . Mischief has its very own book! See below.<br>Relationships . Bob Likes Charlie.<br>Events .<br>And much much more..<br>Performance<br>Performance-wise, Mischief still has a long way to go; there are many easy performance gains that we have just been too busy to implement, as we've<br>been mostly focusing on ergonomics, modularity, and ease-of-use.<br>This is a pretty strong Archetype ECS however, and it is possible to bring it to about the same asymptotic performance as Bevy or Flecs, although<br>there will probably always be a layer of indirection (or 20) that makes it a bit slower, due to the high-level, boxed, nature of Haskell.

Learn You an ECS for Great Mischief!<br>In order to learn how to use Mischief, you can read through the official book:<br>Startup Guide<br>Coding a Dungeon Game<br>App and Plugins<br>Components<br>Relationships<br>Queries<br>Systems<br>Events and Messages

module Mischief.ECS.App

module Mischief.ECS.App.Plugins

module Mischief.ECS.App.Schedules

module Mischief.ECS.App.SystemConfig

module Mischief.ECS.App.Systems

module Mischief.ECS.Archetypes

module Mischief.ECS.Archetypes.Graph

class Collectable v storage where Source #<br>Methods<br>collect :: v -> storage Source #

Instances<br>Instances details EraseIntoStorage v storage => Collectable v storage Source # Instance detailsDefined in Mischief.ECS.Collectable<br>Methods<br>collect :: v -> storage...

mischief module world components storage relationships

Related Articles