Skip to content
makeusabrew edited this page Sep 21, 2010 · 5 revisions

Random TODOs

If you can turn any of these ramblings into concise and clear issues then please do and make a note of the issue number. Thanks!

Data (in)consistency!

  • data passed about is horribly inconsistent - do we include health? If not, when do we?
  • data types passed to functions are opaque - not clear what the data is expected to contain or why
  • methods of finding entities is confused - need consistent method of find by id, if can't find, err, if can find, update
  • need more clarity over different message contents and why, e.g.
    • just position (x, y, a)
    • AND / OR health
    • AND / OR sessionId
  • need consistent function names e.g. getPosition(), get... (inc health), get... (inc sessionId)
  • client side - should we make a rule that you never get an entity and act directly? e.g. everything is deffered to EntityManager? Problem is as above - opaque - just pass one object with a sessionId and let EM work it out?

socket / network

  • abstract socket stuff behind another class?
    • e.g. JSocket() - automagically takes care of json encoding / decoding
    • abstract sending into distinct methods e.g. instead of .send({type:'MOVE', data:...}) have .move({x: ..., y: ...});
    • above abstraction would allow us to verify integrity of all messages in / out
Clone this wiki locally