Dear Clojurians,

I'm currently wrapping my head around core.async and it seems really great 
to process events from various souces.
However, I don't currently see how I could use it for my use case.

I want to make a kind of multiplayer action game with "combos" moves for
sequences of input events (i.e. down, down+forward, forward, punch )
with :
- timeout on each step of the would-be combo
- combo chaining (i.e. a combo move can be followed by other specific 
combos only available after it)
- combo breakers (events for outside -i.e. other player(s)- can 
interrupt/reset the sequence

My current understanding would drive me to make matcher channel for each
combo :
- with a buffer of the size of the max combo length
- reading from :
  - the player input stream
  - a control stream for combo breaker
- using a timeout channel

The input stream would be broadcast to all the combos matcher, and the 
select loop would alt! on all of them.
However, this would :
- perform greedy match of the shortest subsequence (I'd want the opposite : 
matching the longuest combo)
- not handle combo chaining

Should I really go back to a hand-written state machine ?

I'm looking forward to any insights.

Best Regards,

B.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to