Week 9: Rohan


  • timer
  • AI


  • we now have a timer. when time runs out, game over is prompted. Time is kept track of on the server, and send updates to the client whenever the timer tick changes. Priscilla made it look pretty. One of the challenges involved was getting the number to display on the screen (lol, HTML)
  • Fixed this realllllly peculiar error with movement. Our mechanism for client events and sending and receiving of client events had changed greatly over the last few weeks and movement was never really fixed as a result. Movement felt extremely janky (one of our biggest feedbacks when doing a test run with a larger group on monday night). I found this strange bug where if multiple keys were pressed (let’s say G H J K L in that order), then if 1 key was let go, the client would not only remove that key as being pressed but any key that was pressed after it as well (so in our example if J was let go of, then K and L would also appear to have been let go of as well). 3-4 hours of tracing happened to be a one line chage to a pop() call.
  • spent time getting nametags to show up. Now every player running around has a floating name above him/her. This was my first dive into graphics, suffice to say a headache has been created at the end of it (but it was also a cool experience). A player can also edit their display name in the pretty options menu. This is still on a separate branch though because there is this bug where when in the options menu, any key that’s pressed is picked up by the action listeners listening for the keydown/keyups rather than allowing to type into a configuration thing. so must disable keypresses when options menu is enabled (probably do this later tonight). (And you can see other players’ nametags floating above them while they’re in the game as well)
  • did some optimizations after running some tests monday night with larger groups of people that revealed that our server would be falling over (glad we tested this before the demo) over the strain of too many critters, and too many vacuums being turned on at once. as a result we reduced server-> 60 iterations/sec to 30 iterations/sec. Yixin did some optimizations on detecting vacuum intersection (so it’s slightly better than n^2 operation in terms of players and critters).
  • and maybe some other little things here and there.


  • better AI. decided it was not needed, we didn’t add Food as originally planned. The random circles of movement by the critters happens to work out well

Next stuff to do

  • finish floating nametag after disabling keypresses in options menu
  • i want to do a chat thing as well, which I don’t think will take too long, so still am planning to do that. hit enter, and type words, press enter, and while typing words you will see messages said earlier by players

Our game is almost presentable. A lot of stuff has begun to come together in the last week or two which is good to see. the big red flag for me still is the fact that we haven’t been able to integrate a single one of our animations into the game. Something about 3DSmax not making the kinds of DAE files that THREE.js expects :'( but I have faith that our team will resolve this and everything will work out well