Skip to content

fferrere/cl-entity-system

Repository files navigation

cl-entity-system

cl-entity-system is a Common Lisp library that implements the architectural pattern Entity-Component-System.

Platform

Only tested under LINUX with SBCL and Quicklisp.

Set-up

You'll need to install :

  • [Steel Bank Common Lisp][2]
  • [the Quicklisp package tool][3]

Clone the repository to your local-projects quicklisp directory.

cd ~/quicklisp/local-projects
git clone https://github.com/flotfacetieux/cl-entity-system

Load using Quicklisp : (ql:quickload :cl-entity-system).

Exemple of use

(defparameter *em* (make-instance 'entity-manager))

(defclass move (component)
  ((speed :accessor move-speed
          :initarg :speed)
   (action :accessor move-action
          :initarg :action)))

(defclass move-system (system) ())

(defmethod update ((system move-system) entity-manager)
  (dolist (component (find-components entity-manager 'move))
      (funcall (move-action component) entity-manager (move-speed component)))	

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published