Saturday, November 12, 2011
Motion Capture
This week I was able to put together a walk cycle for the model I've been working on. It's no where near perfect but it's a start. Also, while I was animating I decided to look up motion capture on the internet to see if it was something I could do at home. I found a repository of motion capture datasets from Carnegie Mellon and a google code project that converted the data into various formats. I was able to take one of those formats and load it into blender, but the resulting animation / rigging wasn't 100% functional. I might attempt to write a script that repairs these files so that I can use them as a guide when positioning my rigging.
The DAZ Studio tool, which these BVH files were setup to work with, is free until the end of this month. In case anyone wants to view the motion capture datasets.
Wednesday, November 9, 2011
Re-Fingered!
I reworked the fingers on the model, and also took another stab at the hoodie and pants. I also setup the various camera angles so that the blend file can be rendered through the grails scripts. Hopefully I can find sometime this week to animate the walk cycle.
Monday, November 7, 2011
Fingerless
After playing with blender for a little longer, I've decided I'm not skilled enough for fingers. I think I'm going to remove them from my model. Here's an update with experimental clothing. I think I need to make the eyes much bigger.
Sunday, November 6, 2011
Weekend Results
Alright, so I didn't complete re-enabling exits (transitions to other rooms). I got caught up in trying to find a good solution for easy menu / dialog system. I'd really like to be able to design menus / buttons / dialogs completely in HTML (or markup that resembles HTML) and have the framework tie together the core actions. Maybe some sort of markup language for game programming...
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):
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
Saturday, November 5, 2011
Plan
This weekend I'm going to attempt to:
- Fix player positioning
- Re-enable exits (links one room to another room)
Sunday, October 30, 2011
Fun side note
So, I'm finding that in order to create a game I need assets. I'm not that good of an artist, so I'm hoping I can learn how to model things in blender so that I can create re-usable / easily modifiable assets. I've been watch tutorials on http://cgcookie.com/blender/ (fantastic website) and the youtube videos from http://www.davidallenward.com/.
Anyway, I've gone through all of Ward's Johnny blender series, but this is the first time I've tried to follow along with the tutorial. Here are some images produced from the model. If you're interested in the series, here's the link (http://youtu.be/ILdUcZ1mYYE)
The hard lines on the outside and the thin lines on the inside were post-processed by freestyle (http://freestyleintegration.wordpress.com/) pretty awesome tool. I'm hoping that I can use blender assets with freestyle to get a consistent look in whatever game I end up producing.
Demo
Setup a demo of the current code base and assets on http://grails-js-mud.dyndns-remote.com:8080/
The demo requires a username and password, but I've setup a guest endpoint to get around this. Hopefully the server doesn't get hijacked. The previous demo had no security, the tomcat server was run as root (woo I'm a genius), and there was an httpd server with proxy / reverse-proxy and some other dangerous unprotected modules. Anyway, I setup bandwidth restrictions and alarms so at least this time i'll be notified when the system is being abused.
In order to login as a guest, use http://grails-js-mud.dyndns-remote.com:8080/login/guest and provide a username. Chrome is the only browser currently works 100%, though FireFox worked at some point in time so it shouldn't take much effort to get up and running. The demo should also function properly on iPhone 3gs, and iPad 2.
Now instructions.
WASD or Arrow Keys - Moves around tiles with images
Click first red square - Add tiles to the screen
- Click paint to select tile to paint
- Click save to save tiles painted
- Click icon in lower right corner to switch from paint to move screen
Click second red square - Path/Wall drawing (does not persist/save)
That pretty much covers all of the features currently in place.
Saturday, October 29, 2011
Initial Commit
http://code.google.com/p/grails-js-mud/
This project was created as a way for me to explore new technologies while attempting to fulfill my goal to construct a game. Unfortunately, it has not resulted in a game, but more of a collection of proof of concepts. Also, the organization of the code is a disaster. Now that it is public facing it probably should be cleaned up so it doesn't look like a dumpster of code. Anyway here is a review on some of the basics of what exists today.
Player Positioning
This was done using a third party library for STOMP in javascript (http://code.google.com/p/stompj/) and Active MQ which exposes a STOMP/WebSocket transport connector. I went down this road because I have used Active MQ in the past and was very happy with the flexibility it provided down the road (in regards to security / message filtering / routing) and it was also an easy way to setup message broadcasting to multiple subscribers. The player positioning itself is pretty lousy. It sends a direction, position, roomId, and playerId every time the input changes for a single player. If two systems run at different frame rates players end up at different locations for the two systems. The position that is sent will correct this error in positioning when the player changes directions or stops moving. I think I may change this to send absolute position updates instead of using vectors.
See web-app/js/com/unknown/Console.js (use of STOMP)
See web-app/js/com/unknown/GameWindow.js (com.unknown.Entity is the player, inputChanged is a hook for the controller... yeah I know "booo for my code organization / cleanliness / and lack of proper design", remember this was my prototyping spiraling out of control mixed in with a desire to produce something)
Endless World (Technically not endless, but close enough)
This should be in pretty good shape now, essentially each room is rendered as a set of cells and each cell corresponds to a page on the server. When the room loads it requests the contents of each cell from the server using their relative distance from the origin (0,0) of that room. As the player moves in a given direction some cells will no longer be visible, in which case they are re-positioned on the opposite side of the screen and an AJAX call populates the contents of the cell.
See web-app/js/EndlessGrid.js (Logic for managing cells)
See web-app/js/HexGrid.js (A cell described by hex locations)
See web-app/js/init.js (An implementation of the cell loader callback is in there)
See web-app/endlessroom.html (Initial workspace for the proof of concept, not sure if it still works)
Wall/Path Painter
This was the most recent addition. This proof of concept was intended to reduce the effort involved in producing consistent assets for walls / dirt paths and provide logic to easily place them within hex regions. It ended up being a brute force approach to the problem, and the assets aren't 100% but it's entertaining to play with none the less.
See web-app/js/PathBuilding.js
See web-app/js/PathPainter.js
Asset Rendering Scripts
In order for the previous proof of concept to work, assets needed to be marked up with metadata and then processed after they were rendered. The asset rendering scripts will build images from Blender files and Inkscape files and will take different actions depending on the metadata found within those files.
See grails-app/scripts/CropPaths.groovy
See grails-app/scripts/RenderAssets.groovy
See grials-app/scripts/RenderFilmStrip.groovy
See /render.py
See /circle_render.py
Triangle Hit Detection (And therefore Polygon Hit Detection)
Triangles are awesome. Hit detection boils down to the following algorithm. Given a triangle and a point, the point is inside the triangle if and only if the sum of the area of all triangles constructed with the 4 points is equal to the area of the triangle itself. Pretty awesome stuff.
See web-app/js/shapes/Triangle.js
This project was created as a way for me to explore new technologies while attempting to fulfill my goal to construct a game. Unfortunately, it has not resulted in a game, but more of a collection of proof of concepts. Also, the organization of the code is a disaster. Now that it is public facing it probably should be cleaned up so it doesn't look like a dumpster of code. Anyway here is a review on some of the basics of what exists today.
Player Positioning
This was done using a third party library for STOMP in javascript (http://code.google.com/p/stompj/) and Active MQ which exposes a STOMP/WebSocket transport connector. I went down this road because I have used Active MQ in the past and was very happy with the flexibility it provided down the road (in regards to security / message filtering / routing) and it was also an easy way to setup message broadcasting to multiple subscribers. The player positioning itself is pretty lousy. It sends a direction, position, roomId, and playerId every time the input changes for a single player. If two systems run at different frame rates players end up at different locations for the two systems. The position that is sent will correct this error in positioning when the player changes directions or stops moving. I think I may change this to send absolute position updates instead of using vectors.
See web-app/js/com/unknown/Console.js (use of STOMP)
See web-app/js/com/unknown/GameWindow.js (com.unknown.Entity is the player, inputChanged is a hook for the controller... yeah I know "booo for my code organization / cleanliness / and lack of proper design", remember this was my prototyping spiraling out of control mixed in with a desire to produce something)
Endless World (Technically not endless, but close enough)
This should be in pretty good shape now, essentially each room is rendered as a set of cells and each cell corresponds to a page on the server. When the room loads it requests the contents of each cell from the server using their relative distance from the origin (0,0) of that room. As the player moves in a given direction some cells will no longer be visible, in which case they are re-positioned on the opposite side of the screen and an AJAX call populates the contents of the cell.
See web-app/js/EndlessGrid.js (Logic for managing cells)
See web-app/js/HexGrid.js (A cell described by hex locations)
See web-app/js/init.js (An implementation of the cell loader callback is in there)
See web-app/endlessroom.html (Initial workspace for the proof of concept, not sure if it still works)
Wall/Path Painter
This was the most recent addition. This proof of concept was intended to reduce the effort involved in producing consistent assets for walls / dirt paths and provide logic to easily place them within hex regions. It ended up being a brute force approach to the problem, and the assets aren't 100% but it's entertaining to play with none the less.
See web-app/js/PathBuilding.js
See web-app/js/PathPainter.js
Asset Rendering Scripts
In order for the previous proof of concept to work, assets needed to be marked up with metadata and then processed after they were rendered. The asset rendering scripts will build images from Blender files and Inkscape files and will take different actions depending on the metadata found within those files.
See grails-app/scripts/CropPaths.groovy
See grails-app/scripts/RenderAssets.groovy
See grials-app/scripts/RenderFilmStrip.groovy
See /render.py
See /circle_render.py
Triangle Hit Detection (And therefore Polygon Hit Detection)
Triangles are awesome. Hit detection boils down to the following algorithm. Given a triangle and a point, the point is inside the triangle if and only if the sum of the area of all triangles constructed with the 4 points is equal to the area of the triangle itself. Pretty awesome stuff.
See web-app/js/shapes/Triangle.js
Subscribe to:
Posts (Atom)
















