Showing posts with label angband. Show all posts
Showing posts with label angband. Show all posts

Saturday, 24 December 2011

Friday, 14 October 2011

Something fishy going on

It's not often you see something like this in the Steam patch notes:

  • Dramatic increase in performance for low-level math libraries
I have a hunch that it may be something to do with Ridiculous Fish, a recent (and not so recent) Angband contributor, and a fast maths library he wrote.

Thursday, 17 February 2011

Angband Experimental Fiction

I shared this via Google, but it really is good enough to justify its own post.

"Angband, or His 55 Desires" is an experimental fiction piece by Mike Meginnis.

Wednesday, 17 November 2010

One Life Respect

I've always maintained that roguelikes have a huge amount of goodwill from the wider gaming community.

Nethack was reviewed by Ste Curran in last week's episode of One Life Left - a formerly award winning UK radio show about games - and it manages to get a score of 7 out of 10, despite its age. Unfortunately, due to the postponement of this week's episode, we may never learn what Ste thinks of Angband...

Tuesday, 10 August 2010

Designing a Magic System Redux - Part Two (Status Effects continued)

You should read part one of this article, and are strongly encouraged to read the original Designing a Magic System series of articles if you have not already done so.

There is an asymmetry in the design of status effects in Angband: they differ (sometimes significantly) in implementation between the player and monsters. But I've aspired in Unangband to reduce the asymmetry between the two where possible so I'll begin discussing the impact status effects they have on the player and briefly note into the differences between the player and the monster at the end of the article.

There is also a difference between the original Angband, and Unangband implementation of status effects, where Unangband has more possible states, but compensates by weakening the impact of the original Angband effects. The primary approach I've taken is to make it harder to add additional time to a status effect once the player is already affected by it - to avoid continuous locks. I've also modified the effect where noted below with the intention of making it easier for the player to continue to act when partially impaired without requiring they immediately reach for a reset of the effect.

Blindness was the example I looked at in the first part of this article: a player who is blind has a significant penalty to hit when attacking and cannot read scrolls or cast spells - presumably being unable to read the words from the spell book. In addition, the player stops getting screen updates - so that they are not able to see the current location of enemies or changes in surrounding terrain. My intention in Unangband is to weaken the blindness effect slightly, so that you can cast a spell once, from memory, while you are blind, before forgetting it. This is a shout out to my AD&D 2nd edition roots, as well as a way of allowing the player to sneak around in the dark and still cast spells.

Amnesia in Angband has been changed to a timed effect, based on Unangband's implementation, so that you suffer a penalty to your chance to cast spells. Unangband also prevents you from activating artifacts and other items - it makes you temporarily forget you have identified them - and when blind, will stop you from casting spells at all. (At the moment Unangband stops you from casting at all while merely amnesiac, but I'm changing to closer match Angband in the next version).

Confusion in Angband prevents you from spell casting, as well as causing you to move and shoot in a random direction instead of the intended direction. I weakened this effect in Unangband so that you can cast spells while confused - because the random target selection effect when combined with the ability to hurt yourself with spells makes for an interesting risk vs. reward trade off - and also made confusion only having a percentage chance of taking effect which increases as you become more confused.

Fear prevents you from fighting monsters in melee - you refuse to attack anything that you bump into. This is meant to encourage the player to flee, but it instead merely forces you to switch to missile weapons or spells, which there is no penalty to use even at point blank range. To compensate for this, I'm adding an additional terror effect, which acts as an 'overflow' to fear. Once you become sufficiently afraid, any fear will overflow into the terror status. While you are terrified, you cannot use any ability which requires aiming - including spells, missile or thrown weapons. You are still able to use other abilities, amongst them the various teleport effects you should be considering to escape with.

I've taken advantage of multiple meanings, to provide an alternative overflow from fear: that of petrification. Petrification status prevents you from moving (although you may teleport still), and has no other effect - although most direct petrification attacks are highly damaging as well. It is possible in Unangband to become petrified with fear, in the same way that terror overflows - and the two different types of overflow are exclusive: you'll either become terrified or petrified if you are made highly afraid, not both.

Paralyzation is the most uninteresting status effect: you simply cannot do anything while paralyzed, and so it is incredibly hard to balance and puts the player at the highest risk of getting a lock. Unangband has a second, more interesting variation: stasis - which paralyzes you, but also makes you invulnerable to damage, which is a side effect of time attacks. Stun deserves mention here because it incrementally penalizes you to the point of knocking you out, an identical result as paralyzation, but the initial penalty is very slight. Both paralyzation and stun are less interesting than the status effects I've already mentioned, because you either perfectly resistant or are in incredible danger should you encounter a monster (or worse group of monsters) which inflict this effect, with very little margin in between. To mitigate paralyzation, I use the slow effect as an intermediate step, with you being slowed before you are paralyzed the majority of the time.

Using the above combination of effects, you can chart the impact on the player's abilities as follows:
You might be tempted to add, for example, a Nausea effect to the above chart, which prevents you from using potions. But I'd discourage this: potions are best kept as the get out clause reset for any effect. It is still possible to partially incapacitate yourself through bloating by stuffing yourself with food and drink, for which a potion of Salt Water is a useful antidote.

You'll also notice Daze in the chart, which I haven't provided an explanation for yet. Daze will be new to Unangband in the next release: it prevents the caster from casting spells on himself and is the direct inverse of Terror, but for only spell casting and (perhaps) magical devices. Daze is interesting because it forces you to use spell attacks which are hampered, or my preferred terminology, made more interesting by blindness and confusion. To complement this, both Confusion and Blindness overflow into Daze, and there is no direct way of a player being dazed by an attack.

Of the effects in the above chart, only petrification, fear, blindness and amnesia of themselves totally incapacitate some ability of the player. The remainder only incapacitate in combination, or as a result of another status effect being repeatedly applied to the point where it 'overflows' into a more dangerous status (Terror and Daze cannot be directly applied to the player). The idea here is the player should get some opportunity to use a reset to avoid incapacitation, with a large margin of error before the more dangerous state occurs.

There are in fact 32 status effects which can negatively effect you in Unangband: of those I've not mentioned, the remainder are either debuffs (stat modifiers), change the rules monsters use to track you (aggravation, stench) or damage over time effects (poison, cuts) and so don't need result in the complete incapacitation which causes a lock. There a Soaked effect which prevents you from lighting fires or reloading firearms, and a Berserk effect which allows you to voluntarily give up missile and magic attacks in return for improved melee, healing and immunity to fear but both of these will have minor impact compared to those I've discussed in depth.

There are two exceptions: Sleep and Hallucination.

Sleep is one of those spells from AD&D which I cast into the same problematic category as Magic Missile. It was a 1st level spell which either fails or immediately and completely incapacitates with no in between. Sure, you can increase the level casting requirements and have the victim wake when attacked instead of being able to deliver a coup-de-gras, but the ability to completely disable an opponent and escape means the spell has to be made effectively useless against any opponent you'd want to use it against. Sleep works great in a role playing game which is strong on the capture and interrogate dynamic: not so for computer games.

Angband sidesteps Sleep effects against the player completely in favour of paralyzation, which is less a solution and more a tactic acknowledgment of the scope of the problem. Unangband separates them: and gives the player a cool down before falling asleep, which you can cleverly use to damage yourself to stay awake. Should you keep damaging yourself for the duration of the sleep spell, you'll avoid the effect completely.

Hallucination is a fun trick with ASCII graphics, but has little functional difference, and a lot of overlap with the confusion effect. Unangband already has enough restrictions on spell casting to make it worthwhile having hallucination stop spell use as well. But the Nightmare on Elm St of sleep started to get me thinking about what hallucination should do.

Sorcerers in Unangband don't have the range of options that the other major spell casting classes do. I've tried to remedy this by letting them make magical traps, but this both lessens the utility of actual trap setting, and requires enough horrendous hackery that I'm forced to reconsider. Sorcerers can shape change, and charm, and like druids have a minor in summoning spells, but I've come to realize that status effects should be the sorcerer's forte. But blinding and confusing and dazing monsters leaves two problems for me to wrestle with: firstly ensuring that the time required to get a lock on a monster is approximately the same as killing it, and making clear the victory conditions for doing so.

I will be reusing the surrender code to allow monsters to gracefully give up to the sorcerer: but it is more difficult to decide when this should occur. With hit points, we have a clear definition: when the monster is near death. With status effects, I have to define more clearly how to get a lock.

Take the following chart:

This is the status effects I've described previously, excluding effects that disable all a monster's abilities, with arrows used to indicate where one status effect overflows to another, and where abilities accumulate together to provide a 'higher level' result. I've added one additional overflow: confusion also can also overflow to hallucination - which will be important later.

If a monster is both frightened and petrified, it is considered in a melee attack lock. It cannot provide any kind of melee threat to the player, and if it is only capable of melee, it provides no further threat to the player until it recovers from either effect. Similarly, terror provides a ranged attack lock by itself, where ranged attacks are either shooting or breath weapons, and either amnesia and blindness, or terror and dazed effects provide a spell casting lock. A monster will surrender if it has all its abilities (melee, ranged, spell casting) locked for sufficient time and it has no allies in line of sight which are also not incapacitated. If a monster doesn't have one set of abilities it is is easier to lock.

In this way, aiming for a status lock is a broad attack in that you have to apply multiple different effects to a single monster for it to be defeated, whereas damaging attacks are deep in that once you find the vulnerability, you repeatedly exploit it with the same attack.

Also note that if the monster is immune to a particular status effect it is also harder to get into a lock: for instance monsters which are immune to fear cannot be melee or ranged locked unless it is possible to directly apply petrification or terror. Ideally there should be multiple paths to achieve each lock, so that a monster which is immune to a single type of status lock can still be affected by applying another combination of status effects. I am tempted to make the hallucination effect also prevent ranged attacks - another alternative would be to make confusion plus blindness effectively act as a ranged attack lock, because a blind and confused monster is unlikely to be able to use any ranged attack effectively.

But even if I make hallucination prevent ranged attacks, it still feels like the unwanted step child of status effects. Luckily, I've come up with a fevered dream of a solution that should give Sorcerer's yet another way of attacking monsters with status effects.

What is missing from Unangband is the ability to create illusions - something a Sorcerer class should excel at. There's a number of ways to implement illusions: you can have monsters which disappear when attacked, mirror images of the Sorcerer which disappear when attacked... all in all, a little ineffectual.

But what if you allowed illusions to cause real damage while the target was affected by particular status effects: I'm thinking specifically of while sleeping. That way you could have illusions interact with real monster resistances so that if you tried to burn a monster with illusory fire which is normally immune to that effect, it notices and wakes up, whereas you could damage it while asleep and have it remain asleep if it succumbs to the illusion. The incentive here is for the Sorcerer to attack monsters as they asleep, but have to periodically force them back to sleep as they are awoken by the illusory effects you cast at them. Pure damage could be represented by the Sorcerer's existing mental attack abilities, which would cause double damage to sleeping monsters whereas the various illusory elemental attacks would require the illusionist play by the same rules as regular spell casters.

And in this scheme, the hallucinating status effect would similarly allow you to affect monsters with illusions while they are awake. The advantage to hallucination is the sleep effect has a time delay before the monster succumbs, whereas hallucinations take effect instantly.

This is followed by part three which looks at magic items in more detail.

Saturday, 31 July 2010

More Angband poetry

There was a fine fellow named Keldon [1]
Whose AI for Angband worked seldom
Quite the way you expect
Hid in rooms and forget
That you'd hit them and shot them and shelled them

[1] Apparently Keldon Jones of the Keldon Jones AI fame, may have gone onto bigger and better things...

Sunday, 6 June 2010

Roguelike Studios

I'm not sure how I missed this:



The town level looks awfully familiar as well...

(And Notepad FTW. I did most of my early development work in notepad... but with more carriage returns.)

[Thanks to Temple of the Roguelike].

Monday, 12 April 2010

Roguelike poetry

Given the game is a collection of letters, I would have expected (never)more...

Saturday, 10 April 2010

Request for donations for Angband site hosting

Takkaria is asking for contributions towards hosting the official Angband site:

Server hosting for rephial.org currently costs $38/month, which is a quite a bit of money. We started off on a lower-price plan but we received enough in donations to switch to a higher one for a while, which has made using the bugtracker much more bearable. Now we've run out of funds from the previous drive, so we're looking for more donations to keep things running as they are.

There's no pressure to, but if you would like to contribute to Angband development monetarily then please do at
http://rephial.org/donate. If you want to remain anonymous, that's fine by me, but I like to publish people's names to recognise their contribution.
I'd like a non-Paypal donation method if possible, as I'm unable to access Paypal and have been unable to for years.

Friday, 26 March 2010

Tuesday, 15 December 2009

Find_space

There are several approaches to allocating space for rooms for dungeon generation - Angband and variants use a cell based approach where the dungeon is divided up into 11x11 cells and then cells are marked as being filled when a room is placed which intersects the cell. The most common room size is 33x11 grids, or 3x1 cells, which was chosen because the space available in the Angband main screen was 66x22 grids on the majority of platforms it was ported to. The room sizes ensure that most rooms can be cleanly fit within the display.

A naive approach to placing the rooms is to pick a random top left-hand corner from 0 to dungeon_width - room width in cells, for the x-axis, and 0 to dungeon height - room height, again in cells, for the y axis. This approach is used in Angband and persists for the more sophisticated implementation used in Sangband (and I suspect Oangband and variants) in the find_space routine.

I've discovered several issues with find_space. The first is that space is never freed (cells marked as empty) if the room fails to be placed subsequent to find_space being called - easy enough to fix. But the one I want to talk about here is that the random approach fails significantly often - often enough for room placement to fail even when multiple attempts are made (25 per room in find_space).

My initial attempt to rectify this was to slide the room into an available space 'nearby' by moving it either horizontally or vertically a short distance and checking if it fit again. But this routine just highlighted how expensive multiple iterations within find_space was: making it 5 times more expensive (4 directions to test, plust the initial placement) resulted in a significant slow down in dungeon generation even on my Core Duo notebook.

I realised that there is one fact we know from attempting to place a room and failing that I could exploit: that the location we had tried was full. Sliding 'nearby' was counter-productive because nearby full was probably also full. So I should instead be looking as far away as possible, on the assumption that that would be empty.

The quickest way of doing far away as possible was to try reflection in either the x or y axis and try again. For checking grids near the midpoint, instead of reflecting, the code chooses either edge on that axis; basically a transformation from inner to outer. And to avoid checking the same far away multiple times, the code keeps choosing a random value for the axis that we don't transform - just like the original naive implementation.

To minimise calls to random, we just modulo the loop counter to determine which tactic to use, ensuring that the first time through the loop, as well as frequently enough in later iterations, we keep trying the naive approach.

This approach noticeably improved the success at placing rooms using find_room. It works well even if you don't randomly pick the position of the untransformed axis - because Sangband and Unangband attempt to place rooms from largest to smallest, I ended up with clusters of smaller rooms together, which had collided with a larger room in the originally attempted position, but could be placed near each other in the transformed position. I'm still undecided if I'll keep this artefact - it improves the dungeon aesthetic at a cost of requiring increased iterations to place rooms successfully.

As for moving to another placement method I've seen other coders use, such as binary subdivision, or even simulating playing Tetris, I want to keep compatibility with the original Angband code as much as possible, to keep this portable between variants.

Saturday, 3 October 2009

Iso-Angband is back

Hajo, how we missed you.

I hope the Angband community is more welcoming this time around.

Read more here and here.

Friday, 23 January 2009

Freeband

I attended the gaming mini-conference at Linux.conf.au this year and, as mentioned, presented a 25 minute seminar on a loosely associated stream of ideas around amateur game development and how this relates to roguelikes. I also sat on the game development panel and hopefully contributed some interesting comments: arguing especially for developing games in 2d to avoid the complexities of 3d.

Unfortunately, the gaming mini-conf (and Linux Chix in the same room the previous day) were deemed last on the list for video coverage, and when one camera failed to turn up, we missed out on getting any of the seminars on video. So you've missed out on me publicly betting $10 against Nick of FAAngband fame (who wasn't there, but I deemed a worthy challenger given his comments earlier herein) that there won't be any Angband variants released this year, in front of a slide explaining exactly why this won't be the case. There may be a digital photograph available later, although I've not seen anything on the official site.

Thanks to those people who took the time to talk to me on the day - my apologies for being a little distracted, but I also had a couple of customer visits to do in the afternoon so slipped out for a while.

The most interesting thing to come out of the gaming mini-conf was a presentation by Nic Suzor on the interaction of free software and copyleft with the legal system. Nic is in particular looking for examples of free software that works on home brew systems - ideally in an Australian context - due to the local legal pressure being put on home brew hardware suppliers by the likes of Nintendo. In order to push for legislative change, he needs to be able to show case studies where home brew has enabled software to be developed and released on a platform that would not otherwise have done so.

I spoke with him afterwards briefly, and suggested the recent GPL release of Angband, along with the local development involvement in the Nintendo DS port may be appropriate for him (Nick - drop me a line and I'll pass on his details).

Therein lies a bit of a problem. Angband is, for want of a better word, inspired by the copyrighted works of an English author whose estate, while not particularly litigenous, may not be especially eager to hear that the software derives a small portion of its content from these works. We have achieved a great deal by GPLing Angband, but I suspect that we may be tripping at the last hurdle, or at least ignoring the oncoming bus (to mix metaphors), by including work that could potentially infringe.

While the emphasis is on the word potentially, Nic did stress that a large part of this somewhat grey area of the law is sensible minimisation of risk. I would like to suggest that in this case a sensible minimisation of risk would be to develop an Angband variant that does not infringe on these works, and put that forward as the example Nic needs to help change the law locally. Such a variant, Freeband, would feature original fantasy content that justified the existance of a deep dungeon under a ramshackle township, with a progressive increase in risk towards an ultimate evil in the lowest depths.

The resulting gains would unfortunately be offset by a level of loyalty and fandom that the original material engenders. I think a sufficiently motivated cabal of individuals could overcome these problems, and create an equally mythically inspired world which people can invest their belief.

Volunteers?

Monday, 19 January 2009

A rebalanced list of weapons for Unangband

No wonder everyone in Angband starts out wielding daggers. They are freakishly good.

Values that have been modified are in red (I've also hand modified the table after the fact, so a couple of calculations may be out):

Weapons






Description Dam/AC Wgt Lev Cost Info Average Damage Damage per wgt
Broken Dagger 1d1 0.5 0 1 1 2
Shovel 1d2 6 1 10 1.5 0.25
Gnomish Shovel 1d2 6 10 100 1.5 0.25
Broken Sword 1d2 3 0 2 1.5 0.5
Orcish Pick 1d3 18 15 300 2 0.111111111
Pick 1d3 15 5 50 2 0.133333333
Dwarven Shovel 1d3 12 20 200 2 0.166666667
Dart 1d3 1 0 10 2 2
Dwarven Pick 1d4 20 25 600 2.5 0.125
Whip 1d4 3 1 10 2.5 0.833333333
Dagger 1d4 1.2 0 15 2.5 2.083333333
Main Gauche 1d5 3 3 25 3 1
Javelin 1d6 5 5 36 3.5 0.7
Hatchet 1d6 4 3 30 3.5 0.875
Small Sword 1d6 3.5 5 48 3.5 1
Rapier 1d6 3 5 42 3.5 1.166666667
Spiked Club 1d7 13 1 10 4 0.307692308
Cutlass 1d7 5 5 35 4 0.8
Spear 1d7 7 0 30 4 0.571428571
Short Sword 1d7 4 5 60 4 1
Throwing Axe 2d3 2.5 30 80 4 1.6
Mattock 1d8 25 30 700 4.5 0.18
Awl-Pike 1d8 16 5 35 4.5 0.28125
Harpoon 1d8 6 5 120 4.5 0.75
Sabre 1d8 5 5 50 4.5 0.9
Ball-and-Chain 2d4 15 5 45 5 0.333333333
Quarterstaff 1d9 7.5 5 200 5 0.666666667
Mace 2d4 6 5 65 5 0.833333333
Throwing Hammer 2d4 3 40 125 5 1.666666667
Sacrificial Dagger 2d4 3.6 20 1000 5
1.388888889

Broad Sword 2d5 7.5 10 255 6 0.8
Long Sword 2d5 6.5 10 300 6 0.923076923
Glaive 2d6 19 15 363 7 0.368421053
Lucerne Hammer 3d4 12 5 180 7.5 0.625
Bastard Sword 3d4 9 10 350 7.5 0.833333333
Katana 3d4 6 20 400 7.5 1.25
War Hammer 4d3 9 10 225 8 0.888888889
Two-Handed Spear 2d8 20 10 230 9 0.45
Pike 3d5 16 10 120 9 0.5625
Broad Axe 3d5 12 10 304 9 0.75
Scimitar 3d5 10.5 10 250 9 0.857142857
Lead-Filled Mace 4d4 18 15 502 10 0.555555556
Trident 3d3 14 5 75 10
0.428571429

Scythe 5d3 12.5 15 400 10 0.8
Flail 2d9 12 15 353 10 0.833333333
Two-Handed Mace 4d4 12 15 450 10 0.833333333
Two-Handed Sword 3d6 12 20 775 10.5 0.875
Executioner's Sword 4d5 19.5 20 850 12 0.615384615
Halberd 4d5 19 20 430 12 0.631578947
Morning Star 6d3 15 20 396 12 0.8
Battle Axe 3d8 17 20 334 13.5 0.794117647
Great Axe 4d6 23 25 500 14 0.608695652
Beaked Axe 4d6 18 25 408 14 0.777777778
Two-Handed Flail 3d9 28 25 590 15 0.535714286
Executioner's Axe 4d8 25 25 750 18 0.72
Blade of Chaos 6d5 18 50 4000 18 1
Scythe of Slicing 8d4 25 45 3500 20 0.8
Mace of Disruption 5d8 40 55 8700 22.5 0.5625
Lance 3d8
33 25 460 18 0.818181818

Friday, 9 January 2009

Angband now GPL clean

The significance of this cannot be understated. Angband, which has long been under a non-open source license now has received permission to move to the GPL from every contributor for the code using in the 3.1.0 release. The last permissions required were from Ross Becker, as outlined here.

This now means that any Angband variant built from version 3.1.0 or later can take advantage of code hosting on Source Forge and other code repositories which restricted free but not open software, as well as the significant protection of the Free Software Foundation should the Angband code be unfairly expropriated elsewhere.

Time to open a bottle of champagne. It's been a long time coming.

Friday, 2 January 2009

Angband Variant Relationships

I asked for this on the angband.oook.cz forums earlier, but I figured you, gentle reader, may appreciate it.

It's a simple diagram detailling the approximate relationship between Angband variants from 2004.
For a more up to date list of Angband variants, feel free to consult the list on roguebasin.

Any suggestion on a robust enough source control system to allow the merging of these code bases in a clean fashion is more than welcome.

Tuesday, 9 December 2008

Angband portable update

It looks like First Age Angband on the Nintendo DS is coming along strong: you'll probably want to look at the thread on the angband.oook.cz forums, which includes some good screenshots (and some terrible ones: Nick, what were you thinking?) and then head off to the download page, provided of course you have the right hardware to allow you to play homebrew games.

This comes hot on the heels of the original Rogue being ported to the iPhone. To port Angband to the iPhone will require moving or recreating the Mac port from the Carbon to Cocoa API as pointed out in this thread. Luckily, there is one Cocoa port already available.

The real challenges as Nick McConnell points out are handling the reduced screen size and alternate interface. He's handled most of the issues in FAAngband, which along with the Windows CE port is the best place to get your Angband portable gaming fix at the moment.

Sunday, 16 November 2008

The Saga of Bondas the Ironman

There is not enough roguelike poetry in this world.

(For those unfamiliar with the term, Ironman implies that you don't shop, and only ever descend in the dungeon. Extreme Ironman involves taking the first downwards stair you find at every opportunity.)

Friday, 3 October 2008

MAngband

I didn't realise it, but it looks like MAngband is still going strong. MAngband is an online multi-player version of Angband. The latest release is 1.1.1, and looking at what's new, it looks like the interface and game play has been brought up to Angband 3.0.6 standards.

What are you still doing reading this? Download the client and play. (You might want to read the server rules first, unless you're hosting a server).

(Thanks Arj).

Monday, 21 April 2008

Money where you mouth is

I've only just noticed this, but time has come around again for contributions towards angband.oook.cz's web forum software. I don't particularly care to argue the merits for and against web forum software, but I do support assisting one of the real assets to the Angband community: Pav.

Details on how to make your contribution here.