Anyway, aside from playing with the menus, I also adjusted the main game rendering loop. It turns out scheduling a bunch of setTimeout operations and setInterval in javascript isn't that efficient. Who woulda thought? So, I merged the framerate calculation and entity update "thread" into the main render loop. This has had an excellent impact on the mobile device performance (we're now running 30-50 fps on an iPhone 3gs).
On the topic of player positioning, I adjusted the commands so that they include the current cell that the player is in, and if that cell is not visible then the player does not render. This is all client side currently, which I plan on updating so that the topic only broadcasts to the players that are in rooms nearby. I also added a periodic update to player positioning for slower devices (this produces choppy results, but at least the player is close to the right spot more often).
Also, the code base has been updated to run on grails 2.0.0 (whatever the current release candidate is). This has resolved the issues with SLF4J. Also, I updated some of the blender artifacts so they will generate correctly with the render-assets and crop-paths script. My upcoming plans are the following (not in any specific order):
- Exits (transitions to other rooms)
- Paths Enhancements (persistence, fixing circle template, new paths, ...)
- Tile Enhancements (menu navigation, artifact uploads, custom color tile)
- Static Artifacts (placement, persistence, sample artifacts (trees, buildings, ...))
- Custom impassable regions (can replace hex regions)
- Simple Mud Commands (attack, movement, chatting, actions, etc..)
- NPC using the above commands
- Node.JS fork (was suggested at work and would definitely be fun and a good opportunity to bring MongoDB back in)
I'm thinking object placement, artifact uploading, and a protocol (Simple Mud Commands) will at least set me up with an environment to be creative. The latest code is running on http://grails-js-mud.dyndns-remote.com:8080
No comments:
Post a Comment