Pv3D Landscape

Well, I have finally gotten around to getting the pv3d landscape up and running.  It isn’t much to look at now, but it is a start.  So much to do on this to get it perfect. I used my fractal land scape generation program to create the maps.

Just right click on the program to view the source.

Fractal Landscapes 2

New update:  I added an export tab to the application.  Files can now be saved to a user’s hard drive.  This is a great tutorial on how to did it with the jpeg encoder in as3 and just a dash of php. http://henryjones.us/articles/using-the-as3-jpeg-encoder

The 3d rendered version of these is almost done and I will post shortly.

update: I updated  the fractal landscape program to create shadow and texture maps.
To any who would like source is available. (tho a bit sloppy)

Next to do is:
* render it out in papervision3d
* make the texture map much bigger
* add detail to the texture
* then way more…



Fractal Landscapes

Began work on the the papervison3d landscape. So I had to start with the fractal landscape generation.  Dark is lower elevation and light is higher.  This will be applied to a mesh soon, after the 2d shading and texturing programs are written.

This is all based on the diamond square algorithm, this page has been around since the 90s and explains the concept very well.  I have put in several controls to create the fractals.  Results range from clouds to landscapes to complete chaos.

PV3D & DAE Animation

Character animation in Papervision3D.  I created a low poly, strange, little ogre like character in 3dsmax.  I textured and animated him for use in papervision3D.  He has a total of 4 animations that run the length of about 200 max frames.  To use different animations in papervision3D is a matter of animating from a numbered frame to a numbered frame.  A lot like a gotoAndPlay in flash but a little more complicated. Here is a great tutorial for controlling animation.  I based some of my code off of this.

Below is another character with just one animation cycle.  I have included the hand drawn texture and the final photoshopped version.
I hope to have a few of these guys roaming my 3d landscape when it is complete.

Conquering Latency

In multi-user games latency is probably one of the biggest problems a developer can face.

To offset this, a combination of dead reckoning and cubic splines is generally used.

This flex program demonstrates the use of cubic splines in predicting the movement path of another player with a natural curve. [double click to create a new point, select a point to change it's rotation and render the path -- the 'pull' variable alters the strength of the curve] –sorry, it is a bit buggy.

Dead Reckoning:  is the process of estimating one’s current position based upon a previously determined position, or fix, and advancing that position based upon known or estimated speeds over elapsed time, and course.” (Wikipedia)

This applies to multi user games as a method of predicting (accurately?) where another player actually is.

The diagram shows the basics.  In figure 1  ‘A’ represents the last known position of the player.  ‘B’ represents the new position of the player from a server update.  When we get an update from the server we are sent the positional, rotational and velocity values of ‘B’, unfortunately, this is where ‘B’ was a certain number of milliseconds ago due to latency.  If we were to use this position, the viewer would be seeing a world that took place in the past.  This is where dead reckoning comes in.

We know the angle of B and we know the current velocity, so by simply interpolating the vector over the time lapsed we can arrive at ‘C’.  So our player over a the designated period of lapsed time would simply walk the path from ‘A’ to ‘C’ in figure 2.  This however is not very natural, so we redefine our path using cubic splines to arrive at figure 3.

This of course is not always accurate and that’s where correction algorithms come in.  An example of this is ‘rubber-banding’ in a multi-user game, when a player seems to snap to a new position.  That of course is not the ideal.

There is a lot of pseudo code available online that can be used to create the spline path.  If anyone would like my code, just let me know.

Creating the sandbox

I began creating a small land mass for the multi-user test program.  I started with the trees.  Since papervision is stuck with the painter’s algorithm trees become a bit harder to use.  With a z-buffer you can just stick them anywhere, with the PA you cannot have intersecting polys.  Each tree has a base that will be inserted into the mesh landscape.
All the textures are hand drawn.  Like my characters, I do a UV unwrap, print out the results and draw the texture by hand.  I use photoshop to add the color and I like to run a watercolor filter to smooth out the hand mistakes.

Old projects

I recently dug up some old flash projects. These are all experiments.

Comic

These are some characters I created for several comics I was working on.  I hope to incorporate many of these into my games.

update: some new stuff!