Skycastle Game Engine

Hello!



Yesterday I released version 0.0.1 of Skycastle.  Skycastle aims to be an advanced multi player RPG system in the long run, but this first release contains only the terrain engine.



The Skycastle terrain engine uses varying level of detail, with more detailed terrain closer to the viewer, and a procedurally generated terrain (using for example Perlin noise). Thanks to this, it is able to support very distant views (the current settings are set to 32 km). 



There are still areas that can be improved, such as reducing terrain ‘popping’ by using geomorphing, and increasing the terrain resolution at medium distances.  The terrain engine also needs support for different types of terrain for different places (e.g. bare rock on steep slopes).



The terrain engine should also be possible to use for other projects than Skycastle, but the public API for it has not been completely stabilized yet.





The project page is at: https://sourceforge.net/projects/skycastle

The 0.0.1 release download contains the necessary jars and a bat file to run the terrain demo.





This image shows a view from the terrain engine.  OpenGL shaders are currently used to mix the textures on the landscape and apply lighting and fog.





Here we can see the structure of the terrain; it consists of a number of concentric squares, with varying grid sizes:









The next steps are to start adding game functionality bit by bit, probably starting with entities on the terrain, and continuing to a first gathering oriented mini-game.



My plan is to try to stick with an one-week iteration from now on, in an agile spirit (fix release dates but not content) - that means you can expect the next Skycastle release on the incoming weekend!  :D 



I’ll add posts to this thread when I make new releases.





– zzorn

Is anyone here NOT working on a terrain engine? :stuck_out_tongue:

I'm not.  :smiley:

That's somewhat of a relief actually… :lol:



I'm at work right now… I'll take a look at this work some time soon though. It looks nice enough in the screenshot…

I think it's the first public effort at shader based splatting, which is pretty nice. (and there's an attempt at shader based geomorphing somewhere in the archives)



Since I can't look at it right now I'll ask one question though… Does it currently have any "streaming" for loading the terrain, or is it all pre-set? (perhaps it has dynamic generation based on perlin/etc. ?)

llama said:

Is anyone here NOT working on a terrain engine? :P


I'm not:)

Ah, not quite splatting then yet…



Intresting to see how some things seem to almost the same as mine (eg. the block based LOD) and some things seem to be different… I could ask a whole lot more questions but I better find the time to take a look at it first. Not that I have any time…

Have you no problems with seams (pixel gaps) between different LOD levels? From the screenshot it looks like you are not fixing border triangles. Lots of complexity goes with managing border triangles, so lets hope you wont need that.  :wink:

The LOD blocks are not stitched together in any way currently, the edges are just positioned at the same location.  Surprisingly enough, there are very few background pixels visible along the cracks - perhaps its graphics card dependant though, with my previous card I remember a lot of background pixels visible through similar seams.  (The jME skybox shows some of these though - there are even two black pixels in the screenshot above.  But I'll probably switch to a sky-dome later).



The solution I was thinking of using for this problem (if people get the pixels visible along crack problem) is to add an additional down-turned edge to the inside of each LOD block 'ring'.  This way any background pixels should be hidden.



Stitching together the LOD blocks with thin triangles seems like it could be too much hassle, as they would have to be updated often.


yeah that's the usual approach, adding a "skirt" to the blocks

Is anyone here NOT working on a terrain engine? Tongue


I'm not.

I'm working on good looking terrain-texturing  :D

Hi again!



Today I released the second version of Skycastle, featuring static objects on the terrain.



The object distribution is calculated by a density function.  The objects are updated as the camera moves, to always show the objects around the camera.

The models of the objects are shared to avoid creating execssive amounts of similar models.



The camera movement speed was also increased, and the resolution mode selection dialog is presented at each run.



I was also trying to improve the terrain updating speed when moving, but it didn't make it to this release (currently it recalculates a LOD block when you move the distance of one grid square, instead of just calculating the newly appeared edge).





Known Bugs:


  • Shaders are not applied to entities at startup, resulting in weird behaviour.  A workaround is to toggle wireframe on and off by pressing 'T' twice.

  • Not all entities become visible immediately, you have to move the camera some distance first

  • Distant boulders appear to float above the ground, this is because the boulders use the accurate ground height to position themselves, while the landscape is calculated at a rougher level at further distances.  A fix for this might be to position objects on the visible gound level instead of the correct ground level..

  • Single pixels along LOD block edges where the background shows through




The release and sources can be downloaded from https://sourceforge.net/projects/skycastle.


Several levels of stone sizes are visible, small stones are only shown close to the camera, while the huge boulders are visible from miles away. :)