Hi,

2011/7/29 msappler <michaelsapp...@gmail.com>

> I am also developing a clojure rpg and have open sourced the last
> alpha version:
>
> https://code.google.com/p/clojure-rpg/
>
> ~
>
> Basically I am using an atom for every entity in the game (monster,
> player, projectiles, explosions...) and for every cell in the grid of
> the map.
>

Without too much thinking about it, I would have thought monsters, players,
etc. need to be changed in a same "transaction", so would have by default
implemented them as refs instead of atoms.

Could you elaborate more on the choice of atoms as design decisions ?


>
> There are a lot of functions with many side-effects like deal-damage
> for example:
>
> https://code.google.com/p/clojure-rpg/source/browse/trunk/src/game/components/destructible.clj
>
> ---
>  I use also pure functions for example when applying item boni:
>
> https://code.google.com/p/clojure-rpg/source/browse/trunk/src/game/item/boni.clj
>
> For example an item has 3 boni: movement, +damage, +hp then I update
> the state and apply the three pure functions on the entity.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to