polar-engine / hs-polar

Polar Game Engine is a modern, safe game engine written in Haskell.
http://polarengine.org
Apache License 2.0
6 stars 1 forks source link

Implement renderer message queue and unique IDs #20

Closed ori-sky closed 8 years ago

ori-sky commented 8 years ago

This patch first adds a new module Polar.Unique that can generate unique IDs for any type with an instance of Enum. This is based around engine storage and the initial ID is set as toEnum 0 of the type in question. succ is used to increment the ID.

Additionally, this patch implements a basic message queue for the renderer, built on top of engine storage with a TChan channel as the actual queue.

This issue partially addresses #13.