Monday, June 9, 2014

Working on an Arena

Here's what SiteLab looks like now.


I did a bunch of work on the way that sites are generated, so now the site designer (aka me) has the ability to define arbitrary layers, and draw on them using java.awt.Graphics2D, and also to apply filters, such as noise*. The site designer can query and filter these layers, and use them in any way to generate the final terrain, and the nice thing is that SiteLab will show you what they look like so you don't have to guess.

So you can see in the picture I've defined 3 layers as part of my ForestArenaSite. On the first layer I draw a circle that represents the base terrain.

The second layer is called "cliffs," and I draw some lines where I want pits to be.

The third layer is called "stone," and it controls the terrain blending between forest floor and stone floor. Here I first draw a radial gradient that is bright in the middle and dim at the edges, and then I filter it, multiplying it with some fairly simple noise.

So then my site script queries the terrain layer and puts all the pieces together into a map object. A nice surprise during the process has been that IntelliJ will actually hot swap my changes to the site algorithm if I press 'make,' so then I refresh in SiteLab and I have pretty good iteration. With that working, my urge to integrate a scripting language has subsided some.

The other piece of work that's visible here is the grid shader**, which draws the grid lines on the floor. Notice that it fades away in the background, and is thicker at the edge of the playable area.

I'm going to (attempt to) leave mission visualization here for a little while, and get some abilities and combat up and running, so's we can have a playtest.


*I'm using the Joise library, which is a java port of the c++ Accidental Noise library.
**Actually just part of the floor shader.

No comments:

Post a Comment