All Projects → jonascarpay → Apecs

jonascarpay / Apecs

Licence: other
a fast, type driven, extensible ECS for game development

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Apecs

Gdk For Unity Fps Starter Project
SpatialOS GDK for Unity FPS Starter Project
Stars: ✭ 119 (-59.25%)
Mutual labels:  game-development, entity-component-system
Ecs
Thoughts about entity-component-system
Stars: ✭ 158 (-45.89%)
Mutual labels:  game-development, entity-component-system
Openage
Free (as in freedom) open source clone of the Age of Empires II engine 🚀
Stars: ✭ 10,712 (+3568.49%)
Mutual labels:  game-development, entity-component-system
Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (-66.44%)
Mutual labels:  game-development, entity-component-system
Octopuskit
2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS
Stars: ✭ 246 (-15.75%)
Mutual labels:  game-development, entity-component-system
Entitas 2d Roguelike
Rewrite of the Unity 2D Roguelike example using the Entitas Entity Component System
Stars: ✭ 110 (-62.33%)
Mutual labels:  game-development, entity-component-system
Ape Ecs
Entity-Component-System library for JavaScript.
Stars: ✭ 137 (-53.08%)
Mutual labels:  game-development, entity-component-system
Ecs
A simple and easy to use entity-component-system C++ library
Stars: ✭ 20 (-93.15%)
Mutual labels:  game-development, entity-component-system
Entitas Cpp
Entitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
Stars: ✭ 229 (-21.58%)
Mutual labels:  game-development, entity-component-system
Lumixengine
3D C++ Game Engine - yet another open source game engine
Stars: ✭ 2,604 (+791.78%)
Mutual labels:  game-development, entity-component-system
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-72.26%)
Mutual labels:  game-development, entity-component-system
Shipyard
Entity Component System focused on usability and speed.
Stars: ✭ 247 (-15.41%)
Mutual labels:  game-development, entity-component-system
Endless Runner Entitas Ecs
Runner template for Unity
Stars: ✭ 41 (-85.96%)
Mutual labels:  game-development, entity-component-system
Edyn
Edyn is a real-time physics engine organized as an ECS.
Stars: ✭ 113 (-61.3%)
Mutual labels:  game-development, entity-component-system
Imac Tower Defense
OpenGl 4.4 game made with Entity Component System
Stars: ✭ 28 (-90.41%)
Mutual labels:  game-development, entity-component-system
Flecs
A fast entity component system (ECS) for C & C++
Stars: ✭ 2,201 (+653.77%)
Mutual labels:  game-development, entity-component-system
Svelto.ecs
Svelto ECS C# Lightweight Data Oriented Entity Component System Framework
Stars: ✭ 605 (+107.19%)
Mutual labels:  game-development, entity-component-system
Yage
Simple game engine, written in C++
Stars: ✭ 7 (-97.6%)
Mutual labels:  game-development, entity-component-system
Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (-40.41%)
Mutual labels:  game-development, entity-component-system
Lovetoys
🍌 a full-featured Entity-Component-System framework for making games with lua
Stars: ✭ 252 (-13.7%)
Mutual labels:  game-development, entity-component-system

apecs

apecs is an Entity Component System (ECS) library for game development.

apecs aims to be

  • Fast - Performance is competitive with Rust ECS libraries (see benchmark results below)
  • Safe - Completely hides the dangers of the low-level machinery
  • Concise - Game logic is expressed using a small number of powerful combinators
  • Flexible - Easily add new modules or backends
  • Cool

Benchmarks

Links

Games/articles
Packages

Example

{-# LANGUAGE FlexibleInstances     #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables   #-}
{-# LANGUAGE TemplateHaskell       #-}
{-# LANGUAGE TypeFamilies          #-}

import Apecs
import Linear (V2 (..))

newtype Position = Position (V2 Double) deriving Show
newtype Velocity = Velocity (V2 Double) deriving Show
data Flying = Flying

makeWorldAndComponents "World" [''Position, ''Velocity, ''Flying]

game :: System World ()
game = do
  newEntity (Position 0, Velocity 1)
  newEntity (Position 2, Velocity 1)
  newEntity (Position 1, Velocity 2, Flying)

  -- 1. Add velocity to position
  -- 2. Apply gravity to non-flying entities
  -- 3. Print a list of entities and their positions
  cmap $ \(Position p, Velocity v) -> Position (v+p)
  cmap $ \(Velocity v, _ :: Not Flying) -> Velocity (v - V2 0 1)
  cmapM_ $ \(Position p, Entity e) -> liftIO . print $ (e, p)

main :: IO ()
main = initWorld >>= runSystem game
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].