1. Read an interview.
2. Played a game.
3. Picked up a magazine.
Friday, 6 July 2007
Thursday, 5 July 2007
Rebranding
Much as reading a scroll of Elemental Branding can result in a weapon with an Acid brand, my growing familiarity with the blogspot interface and spotty hosting at berlios.de has resulted in me moving the main page for Unangband from unangband.berlios.de to unangband.blogspot.com. The perceptive of you will notice that the old unangband.berlios.de link is very out of date, information wise, and the web design (borrowed from Andrew Sidwell, the new Angband maintainer) having no more complexity than can be offered by blogspot.com, along with less managability and functionality. I'll be putting in a redirect, as soon as I can find the cron job that every 6 hours overwrites the homepage with an old copy.
As far as I am concerned, I still haven't found a web page editting tool with as much power or flexibility as most of the web-based blog software options (I initially hosted a blog on editthispage.com which seems to have disappeared into the mists of time, but even that was better than anything I could find at the time).
I also took the time to redesign and rebrand this blog as Ascii Dreams. Hopefully that name isn't used elsewhere. This blog will continue in its current shape and form, but release announcements for Unangband will be moved to the Unangband blog, which is just a click away on the right hand side.
The theme I chose simply because its stretchy, and a little bit more colourful than the simple theme. I'd much rather have something with white on black and with the sidebar on the left hand side, but I've got better things to do than try and throw one together.
Posted by
Andrew Doull
at
07:45
0
comments
The Temple of Roguelike
This is how you do a comprehensive coverage of roguelikes. Thanks Slash.
Posted by
Andrew Doull
at
01:04
0
comments
Labels: links, roguelikes
Wilderness generation using Voronoi diagrams
Reposted from an old post on rec.games.roguelike.development.
I'm starting to think about re-doing wilderness generation for Unangband, a variant I've developed from Angband. I've spent considerable amounts of time developing a complex, dynamic terrain system, and whilst this is fun in the dungeon, I think for the player to fully appreciate it, I'm going to have to include a more complex wilderness than Unangband currently features.
Unangband currently has a fixed graph-based wilderness travel. Each wilderness location is the same size as a dungeon, which contains one or more terrain types generated by a drunken walk type algorithm, over a background terrain, and may feature dungeon rooms connected by trails, which are guaranteed to be traversable. To travel between wilderness areas, you press '<' on the surface level, and can travel to a number of 'adjacent' locations, which increases as you defeat the boss monster (Angband unique) featured at the bottom of the dungeons. At some points, the graph is one way - you can't travel back to the original location once you get there. Some wilderness locations act as towns, one-screen sized locations containing a variety of shops.
Dungeons under a wilderness location are distinguished by the types of locations, terrain types on the level generated by the same drunken walk algorithm as surface terrain, the background terrain through which corridors are tunnelled, and boss monster at the bottom of the dungeon, which is always fixed.
Unangband's current terrain system has received praise for being focused and simple. You don't spend forever wandering around a wilderness level - just until you find a set of stairs down. The wilderness levels are just dungeons with open space instead of walls around the terrain (they are still surrounded by permanent walls at the edges).
Unfortunately, the wilderness graph is not particularly easy to understand. Players complain that wilderness locations appear and disappear randomly as they move (a consequence of the implementation of the graph). In particular, its hard to make it clear that some graph locations are 'one-way'. Its also hard to make clear that some locations have no dungeon, just a surface boss monster, who, for play-balance reasons, only appears at night.
I've looked at a number of wilderness implementations, and have focused on Zangband's in particular (at least the new wilderness implementation). The terrain in Zangband's wilderness system, for want of a better word, is beautiful, and something I aspire to. However, the Zangband terrain generation system suffers from a number of serious problems, in particular, that the algorithms used are overly complicated, there is not enough incentive to travel between wilderness locations (I know the Zangband development team are improving this) and that the difficulty level is too high for starting out characters and exploitable for higher level characters.
Recently, I ran across an indirect reference to Voronoi diagrams in this newsgroup, and realised that this will provide the solution to my issues with the Zangband wilderness. I'll run through what I intend to do with them, and raise some questions that hopefully someone here can point me in the direction of.
The new Unangband wilderness will be divided up into regions, by randomly generating sufficient spoints on a large wilderness map (4096 x 4096) and using a Voronoi diagram to divide the space into the regions (each map grid will be associated with the region of the nearest point generated). Take the Delauney triangulation of the points and select a vertex (region point) and give it a difficulty 0. Give its neighbours a difficulty 1, and so on, 'flood-filling'
the graph until all vertexs are assigned difficulties. Then normalise these difficulties against the desired difficulty range of the whole wilderness.
The region data structure can then be expanded as per the following pseudo-structure:
region
point (x,y)
int difficulty_level
text region_name
dungeon_type dungeon
race_type monster
terrain_type terrain
etc.
To select a terrain type can be done using a variety of methods. I quite like the Zangband 'three-space' terrain parameters, law (which corresponds to difficulty_level above), population and altitude. Its possible to generate this fractally by picking one or more random low and high points on the Delauney triangulation, and interpolating between then (perhaps using a fractal
algorithm, and/or weighting the differences based on the distance between region points). You could pick points in a manner that guarantees that all possible terrain is available on each map, that Zangband cannot do currently. Its also more efficient than the Zangband method, because once you've generated this one, you can store the selected terrain type, and throw away the generation parameters.
Once you have the terrain type for the region, the actual terrain in each map grid can be determine a number of ways. I suspect I'll have the following:
1. Open regions, with randomly / fractally placed point terrain. These should be selected so that terrain types that are likely to be adjacent have some terrain types in common, so terrain transitions across between two terrains without creating a hard edge.
2. Building regions - as open regions above, but a rectangular feature is placed within the bounds of the region.
3. Field-type regions (as in farmers' fields), which are filled with passable terrain but have an impassable edge, with a gate/bridge placed at a random location on the edge. If two field regions are next to each other, the region with the lower difficulty level does not place the edge.
2. Hill-type regions, where the height is calculated as the distance from the point to the edge of the region, and the slope of the height change determines the terrain (flat, slope, or wall).
5. Mountain / lake-type regions, which are filled up with an impassable terrain up to an hard / fractal distance from the edge.
6. Completely impassable regions. I will use the Delauney triangulation graph to ensure every passable node is accessible.
It should be possible to 'merge' adjacent regions of the same type, so that any regions that share a common edge type / centre type do not generate edge terrain when next to each other.
Because I will be storing regions, it should be easier to replace region types, in the event, for instance, I want to have a huge building in on a magma island surrounded by lava that takes up multiple regions space.
Of course, I'm going to need some fairly good programming to get the above done, but I can see how to proceed.
Firstly, can someone point me in the direction of a fast integer based look-up algorithm to determine which region a map-grid is in? Ideally, I need a data-structure that supports searching the minimum number of points. Ideally in C.
I also need a fast algorithm to draw the terrain on a subset of the whole map. Obviously, I don't want to have every map-grid in memory. I'm thinking of adopting Zangband's in memory representation of 16x16 grid patches, that can be generated quickly when scrolling into the map area, and destroyed as a player moves away. Alternately, I'll have to have a large scrolling window looking down on the total map and generate larger areas as the player moves. So I need a fast drawing algorithm for each of the above terrain types, that doesn't create gaps. So some kind of rasterisation algorithm for a 2 dimensional Voronoi diagram please, and a good suggestion as what memory management technique to adopted (patches / scrolling window / etc.) Also, ideally in C.
Finally, any suggested strategies for generating and representing in memory the Delauney triangulation. This is only required for the initial region generation - however, I may also use it to determine difficulties for overland quests (by finding the highest difficulty of the regions required to cross to travel to the quest location).
Posted by
Andrew Doull
at
00:28
3
comments
Labels: articles, game-design, procedural generation, unangband
Fighting boredom - scouring the web
Just been looking at a few (google-cache) blogs talking about Unangband. There's not that many. Feel free to link to me if you want a mention.
Nothing more to see.
Posted by
Andrew Doull
at
00:21
0
comments
Thursday, 21 June 2007
Mac OS/X wip5b binaries
You can download an OS/X pre-compiled executable from http://prdownload.berlios.de/unangba...-wip5b-osx.dmg
Btw: I have to thank Pete Mack for the excellent work done on the OS/X platform code, for both Unangband and Angband. I've recently acquired a Macbook Pro which I do most of my day to day coding on, and his work was invaluable for allowing this. I'll investigate setting up a cross-compiler platform, when I have time.
Posted by
Andrew Doull
at
07:37
0
comments
Wednesday, 20 June 2007
Unangband 0.6.2 work in progress 5b has been released.
Hi,
Unangband 0.6.2 work in progress 5b has been released. This release is hot on the heels of the previous due to a nasty corruption bug caused by entering stores in the dungeon (Thanks to Matthias Rudolf for reporting this).
You can download the source from http://prdownload.berlios.de/unangband/unangband-062-wip5b-src.zip
You can download a windows pre-compiled executable from
http://prdownload.berlios.de/unangband/unangband-062-wip5b-win.zip
Please report bugs to
http://developer.berlios.de/bugs/?group_id=331
Changes follow:
- Diseases no longer prevent healing (again), except where the disease drains health.
- Added change shape spells.
- Added summoning spells of various kinds that allow you to summon monsters to fight on your side.
You earn experience from their kills. At the moment, you cannot give monsters any orders, and must
maintain the enemies you wish them to attack in line of sight or sensed via telepathy or various
monster sensing (Detect spells don't qualify). A number of intended improvements are outstanding
but feedback is welcome (Requested by jevansau1).
- Added charm monster spells of various kinds.
- Player traps created by spells now earns the player experience points, and has a limited number of
charges (based on level). Other terrain created by the player times out relatively quickly.
- Added schools of magic. A school determines your starting spellbook (currently only for mages
and mage type casters), and which of your class spellbooks are stocked in town shops. There are
currently 7 schools of magic, each with their own 4 basic books, and related higher level books.
Note that a few spells are not currently implemented, and some higher level books are currently
empty of spells. Priest schools will also be developed, possibly to reflect the different Middle
Earth deities, plus a paladin school.
- Commit patch from Andrew Sidwell that improves main-win.c startup.
- Fix problem with disease messages whilst curing them (Reported by Matthias Rudolf).
- Fix 'incorrect' shopkeeper races (Reported by Mikolaj).
- Make size correspond closer to Angband hit die (including removal of con bonus from hit die calculation). Con bonus now applied as per Angband.
- Remove unused hit die display during style selection (Reported by Mikolaj).
- Ensure that zero or less blows, shots or throws prevents melee, throwing or firing a weapon (Reported by Matthias Rudolf).
- Prevent arc and starburst spell effects from hurting the player (Reported by Matthias Rudolf).
- Fix bug where shape change with multiple items worn and a full inventory could result in items being lost (Reported by Matthias Rudolf).
- Fix bug where study items would incorrectly combine (Reported by Matthias Rudolf).
- Prevent starting location being in dangerous terrain in town (Reported by Pete Mac).
- Fix connecting stairs in bottom of tower (Reported by Matthias Rudolf).
- Be paranoid about placing shops in the dungeon (Reported by Matthias Rudolf).
- Prevent impassable piles of rubble being generated as lakes in the dungeon.
- Fix bug with uncursed items listed as being 'unbreakable' (Reported by Matthias Rudolf).
- Ensure that 'dungeon stores' bug doesn't corrupt memory, and hack a save file fix for those affected. Note that this
doesn't solve the original bug, and will cause some stores to be reset (Reported by Matthias Rudolf).
- Fixed alchemy bugs and improve messages (Mikolaj).
Posted by
Andrew Doull
at
08:53
0
comments
Thursday, 14 June 2007
Welcome to the Paleo-Future
Ah. RPG design websites. Browsing this one, lead me to this great website. Now all we need is a paleo-futuristic version of Steamband.
Posted by
Andrew Doull
at
23:47
0
comments
Labels: game-design, links
Wednesday, 13 June 2007
Getting Unangband/Angband from SVN and Compiling on Windows
If the above sentence scared you, I definitely want you to read on.
I'll translate: 'This is how you get the latest, up to the minute version of Unangband (or Angband) made easy for Windows users.'
At the moment, you rely on the benevolence of strangers compiling and releasing a Windows version of Unangband every so often. However, you don't get to see the many improvements that are made at the time they happen, and have to wait for this period release and download process. What is good about these projects, however, is that there is a publicly accessible version of the program. You can get this program straight from the source, as it were, so you can see the latest and greatest improvements as they happen. And its not that difficult. Honest.
A word of warning: the steps I'm outlining pretty much demand you have a broadband connection of some kind, because you'll be downloading over 100 MB of files and installing them on your computer.
1. Download a Java Runtime environment from this link. You probably have one on Windows already, so you may not need to do this step. Choose the Windows Online Installation, and don't forget to check the box next to it to say you've read the licensing agreement. The installer is straightforward. Don't forget to allow this application out through your firewall software, if you're running any.
2. Download Eclipse for C/C++ developers from this link. Expand the zip file to your C: drive, in C:\Eclipse. Right-click drag Eclipse.exe to your desktop and choose Create shortcut. That'll give you a nice way of starting Eclipse, since the people who packaged this program didn't give you one. Then double-click on the shortcut to run Eclipse. Launch Eclipse and click OK to accept the default workspace (place where you save things). You'll want to click on the rightmost of the coloured balls (they clearly wanted documentation people to have to write that) and the actual workspace will appear.
4. Download the minimal Gnu Windows environment minGW from this link, whilst saying this phrase 6 times quickly. Whoever comes up with these names? The installer will run and prompt you to install lots of additional stuff. Because its an online installer, you need to allow the installer out through your firewall software, if you're running any. Accept the defaults, pretty much everywhere, but when it comes to the list of things to install, you'll also need to check MinGW Make, which is where a lot of smarts are. You can ignore all the g++, g77 etc stuff on that page.
5. Follow these instructions. You want to add the directory C:\mingw\bin to your existing system path.
6. Run Eclipse off the short cut you made earlier (You've already done this once, when you installed Subclipse). Re-open the workspace. Right-click on the left hand panel and choose New > Other...
7. Click on the triangle next to SVN and choose Projects from SVN. Click Next.
8. Select Create a new suppository location. I mean repository. Location. Click Next.
9. Next to the URL, you'll want to type either:
http://angband.rogueforge.net/svn/trunk
or
http://cvs.berlios.de/svnroot/repos/unangband
depending on whether you want Angband or Unangband. Then fill in the Custom Label field with either Unangband or Angband. Click Next, and breath a sigh of relief that the idiots who made this form didn't tell you that you were holding the mouse in the wrong part of the screen as well as all the pop-ups telling you that you hadn't finished typing.
10. Select trunk (some random number), and click Finish.
11. In the Check out Ass dialog, click Yes. I mean, in the Check out As dialog, click Finish.
12. In the Select a wizard project, you want to select Standard Make C Project. Click Next. I have to breath slowly when I say phrases like this, in case I inadvertently cast a spell from Harry Potter. Or worse, sound like I'm trying to cast one.
13. In the Project Name field, type either Angband, Unangband or Mildred. Click Finish.
14. Eclipse will miraculously starting downloading the Angband or Unangband SVN repository for you. Note that this is the first time the computer has done any work on your behalf. Up until here, you have been labouring on its behalf.
15. We're almost done.
16. Wait until the computer is done downloading however. Click the triangle next to Angband, Unangband or Mildred.
17. Right-click on the src directory, and choose Make Targets > Build...
18. Click Add.
19. Target name is default. As in, actually type in the word default. Make target is default. Again, type in the word default. Uncheck the use default under build command, and type in the box mingw32-make -f makefile.cyg.
20. Just to be clear. There are no spaces between mingw32 and the minus sign, and make, and there is a space before and after the minus f. It might be easier if you just copy the above.
21. Click Create.
22. Select the default build target, and click Build. You'll see lots of gibberish in the console window that people who should know better get wildly excited over. However, at the end of it, you'll have an angband.exe sitting in C:\workspace\angband\trunk\angband\src or something similar (or unangband or mildred).
23. Don't double-click on it. Instead curse the incompatibilities between windows and Unix, and copy the angband.exe file up one level, so it sits in the folder that holds the src folder. You'll be doing this particular activity a lot.
24. Double-click on angband.exe.
25. You're done.
Now to keep up to date with any more recent changes, all you have to do is run Eclipse right-click on the Angband / Unangband / Mildred project, choose Team > Update, then repeat steps 17, then 22, 23 and 24, in that order (and nothing in between).
Thursday, 7 June 2007
Credit where credit is due
As a developer of an Angband variant, I love the wider Angband community, because I get almost all of the ideas I get from discussion about features and misfeatures from Angband or other variants.
For instance, Nick in this post makes a suggestion about bookless mages (Don't read further down the thread or you'll spoil it). Its not a new idea: I've already thought about implementing psychics, which in quick email note to myself read:
Psychics
---------
Do not have books; but give up 1 item slot for every 10 powers learnt:abilities Id; Ego; Superego; Telekinesis; Pyrokinesis; Cyrokinesis;Object Reading; Ectoplasm; etc.
and then there's the idea I have allowing Shamans to tattoo runes on themselves: taking up valuable equipment slots in return for extra cool powers (Combinations of runes in Unangband give access to spells exponentially based on the number of runes carried).
But when I was reading it, something just clicked. Have a look at this article in the section titled Shadow stalker.
I've suggested an idea in the original thread that is a compromise between forcing players to be able to read books in lit areas, and allowing Shadowstalker type characters to cast spells in the dark. Its an elegant solution, and I can already see the code required to do this in Unangband in my head.
That's one of the other advantages of having your own variant. You get to implement all your cool suggestions. Hopefully this idea won't fall on deaf ears elsewhere...
Posted by
Andrew Doull
at
23:25
3
comments
Labels: development updates, game-design, unangband
Monday, 4 June 2007
Unangband 0.6.2-wip5a has been released
Hi,
Unangband 0.6.2 work in progress 5a has been released. This is a work in progress release so please save regularly.
You can download the source code from http://download.berlios.de/unangband/unangband-062-wip5a-src.zip
Edit: The Windows executable is now downloadable.
You can download a windows executable from
http://download.berlios.de/unangband/unangband-062-wip5a-win.zip
For those of you compiling direct from the CVS, please note that I will be transitioning from CVS to SVN shortly. I am also somewhat 'ahead' of this release in CVS at the moment.
Please report any bugs to http://developer.berlios.de/bugs/?group_id=331
Changes follow:
- Added some low level priest spells and defined some pre-requisites for basic priest
spells.
- Dungeon generation has been comprehensively revised and improved for correctness.
- You now dodge towards any monster you are attacking, which means ranged attacks can hit
them instead, and that you can charge in the opposite direction the following turn.
- Blocking now last two turns.
- Added alchemical formulas. These allow potion specialists to inscribe a formula on a
potion, scroll or lite object to modify how the object explodes. e.g. =1l causes any
explosion to lite up the area it affects. =3r makes potion have radius 3. =2d makes potion
do double damage. There are currently 15 different letters for you to discover, which can
be combined. e.g. =3r2d.
- Added a comprehensive set of death messages for various types of self-inflicted and
unusual deaths.
- You can now damage yourself with bolt and (more importantly) ball spells.
- Thrown potions now explode with a fake 'nothing' effect if they have no effect
(Suggested by Mikolaj).
- Updated to allow radius 2 monster lites, improved glowing terrain and dropping a lit light to
allow it to lite up the surroundings.
- No ice-themed dungeons at shallow depth (Reported by Pete Mac). In general, dungeon
features should be chosen a little more appropriately regards for depth.
- Food descriptions improved (Reported by Pete Mac).
- Dungeon connectivity should be greatly improved (Reported by Pete Mac and others).
- Made staffs brandable (Requested by jevansau1).
- Further work on allowing doors and walls to display different orientations in isometric mode.
- You can now examine more items in shops. This now allows you to browse spellbooks
(Requested by pebepe).
- Fix bug causing guardian uniques to be accompanied by out of depth monsters (Reported
by Matthias Rudolf).
- Fix major bug with level_flags.
- Adjust recommended classes to minimise very negative stats.
- Improvements to allow player to be accidentally crushed by closing a sliding wall on themselves.
- Fix a number of infinite loops and crashes in dungeon generation.
- Fix strange messages for monster name display in various circumstances (Reported by
redelmansidi).
- Fixed problems with monster escorts and monster summoning picking invalid monsters or
too tough monsters (Reported by matthiasrudolf).
- Fixed objects lost in stairs created by quests (Fix by Mikolaj).
- Fixed exploit where player created traps would allow additional items to be created (Reported
by matthiasrudolf).
- Fixed bugs around room walls not being lit correctly (Reported by Mikolaj).
- Fixed bug using repeat command and wands of wonder (Reported by matthiasrudolf).
Andrew
Posted by
Andrew Doull
at
18:41
0
comments
Friendly monster AI
Just implemented an effective friendly monster AI in about 2 hours - much easier than anticipated. I just need to allow the player to order his minions around, and have them not disturb the player whilst moving.
Its testament to Leon Marrick's 4GAI code, as well as the future proofing I did previously to the monster spell code.
Unfortunately, I now have to balance the player summoning unlimited monsters, as well.
For those of you waiting on the next Unangband release, a bug on the Berlios site is preventing me from releasing. Consequently, I've gone on to implement lots of extra features instead, including the AI code I've just mentioned.
Posted by
Andrew Doull
at
08:58
0
comments
Labels: unangband