May 25, 2017, 03:39:24 AM

Author Topic: Khazad - An opensource Dwarf Fortress like game  (Read 16283 times)

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #30 on: April 08, 2015, 10:44:29 PM »
Update:  Progress continues to accelerate, Deuteros has begun work on numerous UI improvements, Feone has the foundations of a world map generator that will produce a world map that is actually the size of the Earth.  Lobstarooo and Philk have been made internal testers and will be doing testing of builds that are more frequent then the public release builds.

Meanwhile I've found a 2D artist who will be doing concept art, textures and UI skin, were still looking for 3D artists for model making.

Finally a Web developer is going to help us set up a simple site for the game, forums, screenshots, Dev-diary that kind of stuff.

Lost gnome

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #31 on: April 12, 2015, 11:14:10 PM »
This project sounds amazing keep up the good work.

RhoOphuichi

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #32 on: June 03, 2015, 10:52:18 AM »
The project definitely sounds amazing!

eccentrus

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #33 on: August 31, 2015, 06:30:27 AM »
wow, the planned depth of game that you're going for interests me already  :D

I'm a final year medical student waiting on his MLE, and I also had programming classes in high school (Visual C and Basic IIRC), so if you need help simulating the health and diseases, as well as death causes as well as healthcare aspects fire me a PM.

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #34 on: October 21, 2015, 08:32:35 PM »
As the fall gardening season is winding down I will likely re-start working on Khazad in the next month or two.

seronis

  • Hero Member
  • *****
  • Posts: 600
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #35 on: October 21, 2015, 11:20:12 PM »
In the meantime,  might be worth playing  "Timber and Stone" for a few hours to get additional UI ideas.  Its another game of this genre that I think handles task selection better than Gnomoria.  Though I like gnomorias priority for jobs far better.  T&S only allows a townie to be assigned one job category instead of allowing as many as you want.  So you have to keep reassigning.

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #36 on: October 22, 2015, 11:45:10 PM »
Thanks for the tip, I've been meaning to try out some of the new crop of games in the genre, I was looking at the Hearthstone blogs last night and was surprised to see what looks like underground tunneling being in the game, guess it's just a must have in any game with a voxel world structure now.  Was kind of disappointed to hear that they said they actually have pathfinding lag with only a handful of pawns on the map and they had to start doing hierarchical searches just to get basic play ability, that sounds like a very poor A* implementation.

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #37 on: December 06, 2015, 05:05:54 PM »
As promised I've developing again, working on the rendering system to get it to support larger map sizes.  I've made the the rendering system swap out terrain meshes as they enter and leave the camera frustum, mesh generation is fast enough to do on the fly so the scene graph is not overwhelmed so I can safely increase map size now without slowing down the game (generating the map still takes longer but only a few seconds).  I'm still working on a better system to render the map when the camera is zoomed out a great deal, this will involve lower detail meshes that get swapped for the normal ones.

I'm now generating 20x20 'cell' maps which are each 16x16 meaning a total map of 320x320 tiles.
« Last Edit: December 06, 2015, 05:10:10 PM by Impaler »

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #38 on: December 08, 2015, 08:24:25 PM »
Discovered two Rendering performance improvements today that promise to boost performance significantly.

First a batch rendering system of the Nifty GUI which knocked it from 35% of rendering time down to 5% and boosted the FPS considerably.

Second a trick called Oblique Near-Plane Clipping (Lengyel’s Frustum), this consists of changing the cameras normally flat near plane to a plane attached to the world geometry.  I can now use this plane to slice the world and provide the cut-away views that your already familiar with.  The benefit is that I no longer need to actually make 1-Z level tall Meshes of the terrain, rather I can make large blocks of terrain and these will render much more efficiently through a modern GPU.  I'm now looking at going to 16x16x16 or even 32x32x32 tile across pieces.

This will also solve (which as partly the original motivation for investigation) a difficulty I've had in properly creating reduced detail meshes of the terrain for zoom-out.  The move to a 3D block will fix this as it was correctly showing steep slopes in a 1 Z high box that was proving impossible.

seronis

  • Hero Member
  • *****
  • Posts: 600
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #39 on: December 09, 2015, 01:47:53 AM »
Kinda interested in the  Near Plane clipping thing.  I havent done much programming involving graphics so I would probably learn a bit.  Might have to try to find time to test compile again soon.

Either way thank you for continueing to work on this.

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #40 on: December 10, 2015, 08:26:20 PM »
Please do give it some compiling and testing (note that you need to get my current working branch 'Rendering 2ndTry" to get my latest work), though I think I'm more interested in game-play programmers and UI programmers to assist at this time as I've gotten a good handle on the rendering system and after I finish my current round of improvements centered around the zoom-out reduced detail meshes I'm going to declare Rendering done until animation support needs to be added (which will require having some actual animation assets to use).

I've just activated a frame-rate cap at 60 FPS and this should free resources to be available for logic, I also added  a more accurate measurement of my simulation speed when it is not attaining the full speed setting.  My old AMD Phenom II X2 555 3.2 GHz (2 core) processor looks to be maxing out at ~200 logical game seconds per real second with 100 dwarves walking constant random paths or a rate of 20,000 'dwarf-seconds' per second.  Better systems with more cores will see even higher performance.  The ultimate goal is 4,000,000 dwarf-seconds per second (200x faster then current) allowing a 1000 population settlement to run at 4000x faster then real time which will corresponds to a full day every ~20 seconds and a year in 2 hours.  Note that you can't actually SEE anything once it's this fast, around 200x it's like watching a swarm of bees so I just turn off the rendering of creatures at the highest speeds.

Multi-threading is future of this genre.
« Last Edit: December 10, 2015, 08:38:11 PM by Impaler »

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #41 on: December 12, 2015, 06:16:46 PM »
By removing a bottle-neck in the iteration of game objects I've raised the performance to ~850x real time, this puts me a factor of 50x from my goal.  Fortunately the bottle-neck is now back in Pathing which has plenty of room for improvement through a number of techniques that are well known.

My motherboard has the ability to unlock two defective cores giving me a quad core, but it's highly unstable (typically crashing within 30 seconds if being maxed out), I did some testing under these conditions and hit ~2500x real time, a factor of just 16x short of the goal (half the speed at 1/10th the population).  I won't be able to play this way but I expect most of you will have functional quad core processors so I'm going to consider this valid for achieving the goal.

admanter

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #42 on: December 14, 2015, 08:35:21 AM »
By removing a bottle-neck in the iteration of game objects I've raised the performance to ~850x real time, this puts me a factor of 50x from my goal.  Fortunately the bottle-neck is now back in Pathing which has plenty of room for improvement through a number of techniques that are well known.

My motherboard has the ability to unlock two defective cores giving me a quad core, but it's highly unstable (typically crashing within 30 seconds if being maxed out), I did some testing under these conditions and hit ~2500x real time, a factor of just 16x short of the goal (half the speed at 1/10th the population).  I won't be able to play this way but I expect most of you will have functional quad core processors so I'm going to consider this valid for achieving the goal.

That is very impressive, Good job!
I've been following your development since you started this thread. Now i'm inspired to come see the work you've accomplished so far.

Impaler

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #43 on: December 14, 2015, 01:51:14 PM »
An attempted improvement to path-finding using a Fibonochi heap was unsuccessful (being slower then the current java PriorityQueue), but this may have been a flaw with the heap library I was using as it used a Key/value pairing rather then the simpler Comparable interface which PriorityQueue supports and this may have caused the slowdown due to huge quantities of Float objects that had to be created as keys and loaded with redundant information. 

The Fibonochi heap is a weird muti-branching tree structure which was apparently developed specifically for path-finding and has a O(1) insertion time but it is not standard to the java library so I may try to find a better implementation of it or even write my own someday.  In any case this was a small and quick diversion from the main rendering focus.

On that front I've enlarged map 'Cells' to 32x32x1 with full rendering and pathing support and will now try to extend them in the Z axis as well which is going to be slightly trickier.

seronis

  • Hero Member
  • *****
  • Posts: 600
    • View Profile
Re: Khazad - An opensource Dwarf Fortress like game
« Reply #44 on: December 15, 2015, 12:00:53 AM »
Why place goals that require a quad core to achieve?   Just leave your system at 2 cores and prioritize making all your speed goals with that limit.   Testing with higher core counts should be purely to test if it somehow increases the frequency of race conditions.