Source: Dungeon League
Been working on converting more of the code to work on a sphere. Managed to get the code to outline edges and identify islands converted. Started porting the start of the drainage basin generation code but haven’t gotten too far yet. Also made some improvements to the viewer. The viewer now renders as points until zoomed in close enough to bother with rendering as polygons. This fixed the frame rates I was getting which were in the 9-14 range, now it ranges from 30 – 100 depending on how much is on the screen. The frame rate is still pretty bad but it is good enough for development purposes and I can focus on the world generation algorithms for now. Planning to continue working on the drainage basin stuff. Here are some shaded samples with the edges outlined. The elevation in these images is just leftover from the continent mask step, it will be replaced in the end by the elevation generated by the drainage basins and rivers.
Outlined Continents:
Source: Stu's Rusty Bucket
I really need to start working on the sound effects for my game. I think this is going to be a whole new kettle of fish as far as issues go for using the same effects on pc/psp/gp2x etc but it should not be too bad. The first plan is to hopefully just use the SDL mixer and my own WAV mixing routines..
I have a nice USB microphone but it really picks up ANY noise in the house so.. going to take me a while to get some nice sounds recorded for spell affects and such.
Source: Dungeon League
Managed to get most of the continent mask generation code ported to work on the surface of a sphere. The general process is the same as what was posted previously for Continent Mask. The differences are that the algorithms must be performed in three dimensions.
The nearest neighbor searching for the Voronoi distance diagram was being generated through a KDTree so no real changes needed to be make this work. The hexes are uniformly spaced so a euclidean distance metric can still be used. Even though a spherical distance calculation would be more accurate it takes longer to compute and the result is the same given the input geometry. The noise algorithms have no issues being calculated in three dimensions instead of two. The part that needed the most changes was the line drawing across the hexes. Drawing lines in a two dimensional array was done using the Bresenham line drawing algorithm. To draw a line across the hexes on a sphere a breadth first search is done where the next hex to process is determined by a choosing the one with the shortest euclidean distance to the target. The same result can be achieved using A* but it takes much longer and is unnecessary in this case because the weight for the edge are all the same.
Continents on a Sphere:
Still need to convert more code to use the graph before I can make the other steps work on a sphere. The next thing to do will be to write the code for subgraph extraction to be able to process pieces of the sphere such as a land mass or body of water independently. The continent masks on the sphere currently do not eliminate inland water which is necessary for the process of drainage basin generation that I am using.
Source: Dungeon League
I have decided to change the direction of my world generation project slightly. I am quite happy with most of the results I have created so far. I would like to expand these to work mapped onto a sphere instead of a plane. There are a few reasons for doing this:
- I prefer the use of hexagons to squares for any game I eventually build on top of it.
- The hexagons are superior for simulation of many things like wind or tectonic plates.
- Haven’t seen many other projects doing it.
- Seems like an interesting challenge.
The first step of this process is to create the base geometry for the world and its cells. I based my algorithms for this off of material collected from this link about Discrete Global Grids. To summarize I started with an Icosahedron and implemented 2 different methods to subdivide it. The next step is to subdivide into a Truncated Icosahedron. From there I can continue to subdivide using either method until I reach the desired resolution.
Subdivision Samples:
The next step is to develop a decent camera control for navigating and zooming on the map. After this is complete I will begin to port my code that I have developed in Java to C++ and use the new world structure. For now I am just coloring faces to denote different information. Eventually I plan to make it more interesting visually but that is a long ways off.
The other change I have made is switching languages from Java to C++. Currently I am using Boost and SFML with it. Some of my reasons for making this change are:
- Make my program more accessible. Many of the results as seen with the Tiled maps are difficult to output to an easy to view format because of the scale of the data. This way I can just post executables and data files that are more suited to viewing my results.
- People won’t need to download a JRE.
- Access to Boost library.
- More flexibility when tweaking for performance.
- I do plenty of Java development at work, this keeps things interesting and sharpens my skills.
Source: Nolithius.com » roguelike
Recently, I have been posting near-daily Dance of Death development updates through @Nolithius, on Twitter. Feel free to follow me to catch a glimpse of how the game progresses from day to day!
Version 0.4 is very close to completion! I have finished all of the major parts of the save/load feature, the last and most complex feature of this release. At this point, what remains is saving the quest and turn information, ensuring the correct dungeon level is always loaded (currently always the first level), and clearing the character’s save data on death.
If all continues to go well, look out for v0.4 by this weekend.
Source: Dungeon League
Over the last couple days I got around to writing an encoder for my world generator to write files for Tiled. This gives a lot more detailed view of what the world looks like compared to the bitmaps i had been using previously. I created a pretty basic tile set which is similar to the one used by dwarf fortress for the overland map. I hope to find/make more attractive tiles at some point.
If you download these two files the .tmx file can be loaded and viewed in Tiled:
Tiled .tmx file
Tile set.
If you don’t have Tiled:
Warning ! Big Image (5.73 MB 16384×16384 Pixels)
Rendered Image
I have also been adding the ability to place special features on the map based on different criteria. Some of these are already in the map above:
- Glaciers : Placed in mountain regions where there is a river source.
- Swamp/Marsh: Placed along rivers in all biomes that have vegetation. Swamps for forest biomes, marshes for grasslands biomes.
- Flood Plain: Placed where rivers empty to the ocean for grasslands and desert biomes.
The next steps are to add more features to make the map more interesting. Some of these features include Plateau, Valley, Oasis, Volcano, Waterfall, Pond, Peak, Dry Lake, Frozen Lake. After I run out of land form features to add I will start working on placing civilizations. Not sure yet if I want to just place them in patterns that are reasonable or evolve them over time to build a history as well.
Source: Stu's Rusty Bucket
I’ve finally got around to smoothing some of the rough edges in the combat engine. We have a somewhat animated spell affects flying across the screen, and special cases which I am going through one by one.
* HOLD (done)
* SLEEP (testing)
* POISON (testing)
* CHARM (testing)
Still have another 4 or 5 flags to code and test (things like turning undead, etc).
Source: Stu's Rusty Bucket
I’m in the middle of refactoring some of the combat code to allow me to target any space on the map not just NPC’s. This will allow you to drop gas clouds on terrain and use space between to funnel enemies down etc and play more advatange with the terrain.
Most of my code tho takes an NPC as a target, so I’ve got to tweak things a bit.
Source: Stu's Rusty Bucket
Things have been pretty busy lately. On the retro front I have a Jiffydos chip coming for the C128 as well as a uIEC/SD for it, which will help lessen the need for ye-olde floppy disks for the C128 and its ability to move the drive out of alignment (all those old drive head banging copy protect schemes and such). Both of these are coming from Jim Brain. Still no word on the Ultimate 1541-II, apparently they are shipping the first 40-50 units very soon, only I know I’m not in that close to the top of the batch :/
Been working a lot on my java client/server roguelike semi-mmo called Deeprun.
And yeah been working somewhat on Fishguts still, you turn over one bug only to find a few more. It is the way of it lately.
June is going to be hectic, Joys birthday, Alexanders birthday, our 5th wedding anniversary. I still need to complete the wooden pendulum clock (5th ann is wood).. so lots of sanding and fitting fiddly parts together but the clock looks pretty awesome (I’m building serpentine).
Source: Dungeon League
GUI isn’t progressing currently as I find it less interesting than other things I could be working on. I finally managed to get the rain shadow calculation time under control it now only takes a couple seconds to calculate instead of a couple minutes. The results seem to be better too. Here is a description the algorithm:
Previously I was examining ocean points and then simulating where the wind would carry the water. In this version I instead start by examining each land point. For each land point I use the wind direction and reverse it and keep following the vectors until I reach a water point. This creates a path from the land point to a source of water. This path is then examined and I find the highest point along it. If that point is higher than a specified cutoff there is mountains in between this land cell and its source of water indicating that it is in the rain shadow. A value is assigned to the land cell so that there is a slight falloff as the distance from the highest point is increased making the rain shadow less intense over longer distances. Some scaling and normalization are then performed as well as adding a little bit of noise to make it more interesting.
Elevation images following by their corresponding rain shadow: