Thanks!
On Thursday, March 29, 2018 at 6:10:56 PM UTC-7, James Reeves wrote:
>
> Often it's better to store the entire game state as one large, immutable
> data structure.
>
> Atoms are usually preferred over refs in most cases.
>
> When you want polymorphism over a map, the most common solution
Gary,
Thanks for the detailed answer.
What you're describing is pretty much exactly what I'm trying to do,
including the game loop you mention. The basic implementation is pretty
simple: a player who can move from room to room, picking up objects,
putting them down, and so forth, and the
Thanks!
On Friday, March 30, 2018 at 11:12:04 AM UTC-7, Karsten Schmidt wrote:
>
> Hi Will,
>
> have a look at this workshop repository, in which we developed a
> simple text adventure framework:
> https://github.com/learn-postspectacular/resonate-workshop-2014
>
> Hth! K.
>
> On 30 March
Spent the weekend pondering all of this, and here's the way I think I want
to do it.
1. The world-state is stored in an atom, and updated much as Gary Johnson
suggests.
2. I define a multi-method, (describe-room [room world-state]), that is
responsible for computing the current description of
Hello Will.
You can simplify it further:
1. Define a multimethod always dispatching by room id.
2. Create a :default implementation. It will be called for non-
fancy rooms.3. Create an implementation for :fancy-room. It will be
preferred over
:default for it.
If you ever have a group of
Thanks! I've glanced at Land of Lisp, actually, some while back. I might
even have a copy.
To be clear, it isn't LISP that's giving me problems. I've been dabbling
with LISP on-and-off since the '80's, and I've read a couple of Paul
Graham's books. I understand code-as-data, and lambdas,
Howdy!
Yeah, I get this; and for most of the rooms it's plenty good enough. It's
the ones that are complicated that concern me. Writing text adventures has
been one of my standard ways of learning new languages, going back to the
mid-80s to a simple text adventure I wrote—in LISP,
hi all, I'm happy to announce Walkable, a new SQL library for Clojure:
queries with Datomic pull syntax and pure Clojure filtering, configuration
driven.
Please check it out, the README covers quite a few example:
https://github.com/walkable-server/walkable
For those who've known about
Excellent. Yeah, I was thinking I was probably going to too much trouble
to get the "nil" value. And the (derive) solution is very nice.
Thanks very much!
On Monday, April 2, 2018 at 11:30:53 AM UTC-7, Mikhail Gusarov wrote:
>
> Hello Will.
>
> You can simplify it further:
>
> 1. Define a
A style question.
I've got a world data object, which I pass into my functions. It looks
like this:
```clojure
(def world
(atom {:flags #{:want-umbrella}
:location :home
:inventory #{...}
:map {:home {...} :patio {...}))
```
My default describe-room method
I've recently come across Kawa Scheme and am very intrigued by it. It's Java
integration is superb like Clojure and it's very fast. Has anyone here used it
to build something?
So far I've only tried it with small toy programs. Things I like about it:
- Starts up very quickly
- Java
Hey folks,
OkLetsPlay is a young startup building LetsBet, a patented social betting
platform that enables real money and cryptocurrency betting on skill-based
video games.
We're looking for an experienced and enthusiastic Clojure developer who will
help pioneer both our distributed back-end
12 matches
Mail list logo