Thursday 30 April 2009

Ubuntu!

I have a new laptop on which, as well as the Vista that it came with, I've installed Linux (specifically Ubuntu 9.04) in a dual-boot configuration.

One of the reasons I've done this is so I can try cross-compiling to Linux via Lazarus. I don't anticipate that it will be a very quick or easy process - at the very mininum, custom 3rd party components will have to be recompiled and ported, but if I can eventually get Kharne into some semblance of cross-compatibility, even if the process of porting is a pain in the arse, than that would be very good indeed.

Wednesday 29 April 2009

New UI


This is the result of the tinkering I've been doing over the last few days. Good old Courier font.

I do have a question though: does displaying the amount of damage that the player or monsters do add any value to the game? Not many roguelikes display this amount of combat detail. Should Kharne?

Tuesday 28 April 2009

1st Anniversary

I've just realised, this blog is one today. A lot has happened during this time, lots of development work on Kharne (but lots more to do). I hope to be around for a few years yet!

Ranged Combat - some thoughts

I originally had planned on releasing the next version of Kharne this week which was going to include fountains, skills and ranged combat. But I've rethinking the ranged combat interface and it is going to need a lot of work, so I think I will just put out an incremental release (0.02b) with fountains, skills and a few bug fixes out this week and reserve ranged combat for the next release after that.

The rethink of the ranged combat interface will bring it much closer to the standard one for roguelikes (with support for mouse-targeting as well). It will also introduce proper ammunition. The ranged combat changes also tie in with a couple of other changes, such as adding mouse-over hints for monsters and items (providing the same information as is displayed in the right-click popup windows).

Since ranged combat is notoriously hard to get right, I'm inviting comments on the following proposed interface. This is something I want to get correct from the off. The amount of code to implement this is not trivial, so I really don't want to have to go back and recode it in the future if I can help it.

You have an inventory slot currently designated as the quivered item(s). This can be either ammunition, or a weapon (e.g. a dagger). If no quivered item is designated, then the first suitable item that is picked up is allocated. Pressing { and } will cycle between any suitable ammunition or weapon in your backpack). You can also select the current quivered item(s) from the inventory screen via the mouse. The current quivered item(s) is displayed on the main screen.


Mouse:


Left-clicking on a monster (in view) will fire the currently selected item at that monster.


Keyboard:


Pressing f will bring up a heads-up display overlaid on the current view with all hostile monsters in view highlighted. If you've previously fired at a monster in view, this one will be pre-selected. Pressing TAB will cycle between visible monsters, or monsters can be selected manually by using the cursor keys. { and } will still work for selecting ammunition at this point. Pressing ENTER will fire the item. Missiles/items that do not hit the target will either fall short or fall long and some of them can be picked up again and reused.

If you've previously fired at a monster, and that monster is alive and in view, then pressing F will fire the currently selected item at that monster again.


The best-case keyboard sequence for firing will be thus be f-[ENTER] then F, F, etc. Best-case mouse sequence is left-click, left-click, left-click...


Thoughts?

Monday 27 April 2009

Progress Report #15

Most Skills other than Magic have now been implemented. The orange numbers in the screenshot below show the progress for each skill to the next level.


One problem I do have is that the very wearing of armour can advance skill in it (and also the defense skill, albeit at a much lower level). I may up implementing something similar to Crawl's XP Pool as not having such a limitation could lead to problems. Alternatively, you could only skill up from wearing armour in the presence of monsters.

I've also made another change, once which is probably a candidate for the most pointless change ever in the history of a roguelike. I've changed the default 'wall' character from ASCII character 249 to a '#', for the simple reason that it looks much more 'roguelike':


And for that decision, you can blame the likes of MageGuild.

Incidentally, speaking of Mage Guild, I get this error message upon trying to load up certain games:







Sunday 26 April 2009

Gameplay Idea#4: Fountains

In the next release of Kharne I hope to include Nethack-style fountains.


Here is an extract from a specification document I wrote a while back on the effects of drinking from fountains:

You can tell if you've drunk from a fountain or not. You cannot tell the type of fountain without drinking from it and suffering any consequences.

10% of fountains are magical. Equal chance of one of the following effects occurring:
  • Increased Hunger; Restores 1d4 * level MP. If MP at max, increase max MP by 1d10.
  • Increased Hunger; Reveals the complete structure of the current level.
  • Increased Hunger; Find a random magical item suitable for class, always superb quality.
  • Increased Hunger; Permanently increases MP regeneration
5% of fountains are blessed. Equal chance of one of the following effects occurring:
  • Reduced hunger; Terrain around blessed fountains is treated as near impassable by monsters
  • Reduced hunger; Heals 1d4 * level HP. If HP at max, increase max HP by 1d10.
  • Reduced hunger; Restores lost abilities and attributes (including lost HP/MP from drinking from cursed fountains).
  • Reduced Hunger; Permanently increases HP regeneration
  • Reduced Hunger; Increases a Random Stat by 1
10% of fountains are cursed. Equal chance of one of the following effects occurring:
  • Increased Hunger; Decreases max HP by Level.
  • Increased Hunger; Curses current melee and ranged weapons
  • Increased Hunger; Permanently decreases HP or MP regeneration
  • Increased Hunger; Summons Hostile Water Elemental
  • Increased Hunger; Decreases 1 random stat by 1.
5% of fountains are tainted. Drinking from these gives a random (although always thematically appropriate) mutation.

70% of fountains have no effect other than to decrease hunger significantly.

Anyone have any other ideas for effects resulting from drinking fountains?

Friday 24 April 2009

Prelude

The name of the new project will simply be 'Prelude'.

I've done some experimenting already with data structures and classes, leaning heavily upon what I've learned so far in coding Kharne. This has proceeded a quicker than first time around for two main reasons: firstly, I'm rewriting code I've already largely written; and C# is proving to be an excellent language for this sort of thing.

As soon as I've figured out how to post code properly to blogger without it messing up the formating, I'll post some codesnippers.

Wednesday 22 April 2009

An announcement.

My day job mainly involves using Delphi but the place where I work is moving to .NET and later this year, I'll will be taking the TS: Microsoft .NET Framework - Application Development Foundation Exam 70-536. As part of the learning process, I've decided to write a cut-down mini version of Kharne in C# (using the .NET 3.5 Framework) applying some of the lessons I'm currently learning in writing the main game. I intend for this mini-Kharne (I need a new name for it!) to be a prelude to the main game and to be something akin in size and complexity to Dweller.

I'm confident this won't affect development of the main game, as I've set myself limited goals and scope:
  • A single dungeon with only a few levels.
  • Only a dozen or so items with perhaps a half-dozen brands at most.
  • A dozen or so different monsters.
  • Only a few skills.
  • Only two classes: Fighter and Mage.
  • No Races and only four main stats: STR, DEX, CON, INT
  • Only a few families of Spells.
  • Traditional ASCII Display using libtcod-net.
  • Simplified Inventory handling.
Effectively, in terms of effort, its a 7DRL spread out over a period of a couple of months. Eventually, I'd like to allow an export option to export characters from this mini-game to the main Kharne.

In terms of Kharne, the next tasks on the horizon (which have been partially implemented already but turned of in 0.02a) is to get skills, potions and scrolls working. When those are done, I'll release a 0.02b.

Monday 20 April 2009

Kharne 0.02a available

As promised, here is v0.02a. To summarise the changes in this maintenance release: Item Anonymity, Stacking.

Fixes in this version:
  • Item Anonymity and Identification has now been implemented (wear/wield an item to identify)
  • Item stacking now works properly.
  • Eating stacked food now only consumes one of the stack.
  • Defense Skill is now listed properly in the Skill Screen.
  • Food is now listed in the inventory in one colour. It remains colourful on the dungeon floor.
  • The font size of the message window has been reduced.
  • Wands are temporarily no longer generated in the dungeons (it makes no sense for them to be there whilst their functionality has not yet been implemented).
  • The Inventory Screen has been redesigned slightly
For now, I'll leave the link to the previous version online, although you should really upgrade to 0.02a. The character files are identical so just copy those over if you wish to use them in this version.

Sunday 19 April 2009

Bug Fixes soon

There will be another release (0.02a) in the next few days, as currently item stacking is horribly broken. I might try and sneak in a few more small fixes as well into the release.

Refactoring

I think I'm getting close to the point where I need to, in order to proceed further in a smooth fashion, apropos Incursion, refactor the existing code base thoroughly. I'm really not happy with at least good 25% of the code currently extant, and it would be nice to rewrite perhaps another 25% or so. Part of the reason for doing this is that I am now bursting with ideas for the game and to implement these would require a heck of lot of work with the current codebase.

These are ideas above and beyond what I've already discussed for the next few versions leading up to v0.10. For example:
  • Nethack-esque fountains.
  • Uniques.
  • Crafting (akin to that found in MMOs).
  • A global Hi-Score table.
  • Extra dungeons, including a special Wraith-style one to allow characters to get around death (albeit at a cost).
  • An iMUSE-esque music and sound effects engine.
  • True Multiplayer Mode.
  • Tile Graphics.
  • Deities.
  • Intelligent Items.
  • Wishes.
  • Dynamic Dungeons.
And many more.

Saturday 18 April 2009

Kharne v0.02 available

Get it here or use the link on the right.

The changes are listed in full below, but to summarise: Persistent Dungeons, Food/Hunger, Shops, Ranged Combat, Wizard Mode.

* Dungeon Levels are now persistent within each Branch - exiting a Branch entirely will generate new levels.
* Food & Hunger have been implemented. Whilst starving, HP and MP do not regenerate naturally.
* Ranged Combat has now been implemented (left click on a monster to fire a projectile at it - for now, ammunition is inifinite).
* The amount of HP and MP that characters gain on level up is now also dependent upon Fighting and Magic Skill levels.
* Added a Wizard Mode (accessible by pressing W)
* Monsters can no longer be generated in the walls of Vaults.
* Monster HP and Damage has been rebalanced.
* The XP required to gain a level has been increased substantially.
* Level Feelings are no longer immediately generated if you have recently navigated more than one set of stairs.
* Reduced the amount of gold that is generated.
* The elapsed game time (in real terms) is now displayed at the top of the Main Game Window. This pauses whenever the Inventory or any other subscreen is shown.
* Character Dumps now display the correct version number.
* Character Dumps now show the elapsed game time (in real terms).
* Digging now updates the visible areas of the dungeon correctly..
* Turns elapsed is now displayed in a more appropriate colour.
* Fixed a few minor grammatical errors in the Combat Text.

Friday 17 April 2009

Progress Report #14

There's been a bit of an interregnum here recently in terms of development and posting (at least compared to the somewhat crazy standards I set in March), which I can now explain the reasons for. I've not done any coding on Kharne for a week or so, because I had the threat of redundancy looming (I'm a Delphi developer by trade at a smallish company which has been affected by the current economic climate). But that's been sorted out now and the threat has been lifted, and valuable lessons have been learned, so I'm looking forward to restarting coding on Kharne and getting v0.02 out soon!

In the long term this means I will focus more development towards C# but for now, Kharne will continue to be written in good old Delphi!

Sunday 12 April 2009

Progress Report #13

v0.02 is not far off now, the big change is, alongside the implementation of ranged combat, is that dungeons are now persistent whilst you're inside a particular branch. Here's the current change log from v0.01e:

* Dungeon Levels are now persistent within each Branch - exiting a Branch entirely will generate new levels.
* Ranged Combat has now been implemented (left click on a monster to fire a projectile at it).
* The amount of HP and MP that characters gain on level up is now also dependent upon Fighting and Magic Skill levels.
* Added a Wizard Mode (accessible by pressing W)
* Monsters can no longer be generated in the walls of Vaults.
* Monster HP and Damage has been rebalanced.
* The XP required to gain a level has been increased substantially.
* Level Feelings are no longer immediately generated if you have recently navigated more than one set of stairs.
* Reduced the amount of gold that is generated.
* The elapsed game time (in real terms) is now displayed at the top of the Main Game Window. This pauses whenever the Inventory or any other subscreen is shown.
* Character Dumps now display the correct version number.
* Character Dumps now show the elapsed game time (in real terms).
* Digging now updates the visible areas of the dungeon correctly..
* Turns elapsed is now displayed in a more appropriate colour.
* Fixed a few minor grammatical errors in the Combat Text.

As I mentioned in a comment over at the Temple of the Roguelike, there is a real feeling of a game starting to shine through (at last).

The Wizard mode window is available by pressing W:

This lists the status of visible monsters, and gives you options for enhancing your character. Note that the 'Get Item' button will summon a random magical item equal to your level to your feet.

Wednesday 8 April 2009

Kharne Alpha 0.01e Available

An interim release. Get it here.

Here are the changes:

* Melee-based Monsters now have basic AI (monsters that reply on Ranged Combat or Magic are still AI-less).
* The UI has been completely redesigned.
* The Monster Display and the Minimap have been incorporated into the main window.
* The inventory, statistics and magic screens have been redesigned.
* The Combat system has now been implemented for Melee Attacks.
* A Death Screen has been added.
* A Character Dump has been added.
* Added a help screen in-game.
* There are now regularly re-stocked shops in The Nexus.
* Gold has been implemented and can be found through the various Dungeons.
* Version info can be displayed in-game.
* Characters are now equipped with class and skill-appropriate (mundane) starting equipment.
* Internal Monster Stats have been rebalanced.
* Some Monster Symbols (mainly types of demons) have been reallocated.
* Added additional lesser vaults, which can now occur occasionally at all levels.
* HP and MP now regenerate slowly. The rate of HP Regeneration is based upon Character Endurance and MP upon Intelligence.
* Resting has now been implemented (to rest for one turn or many, press 0 or 5 on the Keypad with Numlock on).
* The Monster Display now collates like-type monsters together.
* You can no longer access monster details via the Monster Display.
* Spell Details and Descriptions have now been added.
* Monsters can no longer be generated on top of stairs.
* The Character always starts the two lowest-level dungeons (The Keep and the Wilderlands) in a safe vault.
* Monsters are now displayed on the mini-map as red dots.
* The Character can no longer have negative abilities or characteristics.
* The Main Window will no longer be sensitive to key presses when it does not have focus (e.g. when it is minimised or in the background).
* Fixed a bug where you could pick up an infinite number of items.
* Picking up more items than there are Inventory slots free no longer corrupts the Inventory.
* You can now open adjacent doors by pressing 'o'.
* Visible squares are now recalculated properly when opening and closing doors.
* Dropping an item on top of another item no longer causes an error.
* Dropping an item successfully will now close the inventory window.
* Picking up items now takes time.
* Weapons now have Damage Ranges.
* Magic Items that give bonuses to Evasion are no longer as powerful.
* Item Locations are now displayed correctly in tooltips.
* Shields now give a bonus to Deflection and Blocking.
* There are two new brands added: Goblin Slaying and Outsider Slaying.
* The Character's current mana (as opposed to maximum mana) is now used to calculate which spells are available to cast.

Tuesday 7 April 2009

Shop Shop Shop!


The shops will restock every 10,000 turns or so. Any magical items available for sale will always be a few levels beneath the current level of the player.

I haven't decided yet if I will allow selling of goods to shopkeepers. I kinda like the Crawl way of doing things, as the 'band economy can get rather inflationary.

(Yes, I know this was an unexpected feature but it was incredibly easy to implement)

UPDATE: Gold is now implemented as well. The amount of gold you find is directly tied to your Charisma (yes, I know this is probably yet another futile attempt to justify the use of a Charisma Stat in a Roguelike...)



Sunday 5 April 2009

v0.02 soon

v0.02 is not far off. Here is what is left to be implemented before I can release it:
  • Debug ProcessCreatures() to fix the problems mentioned in my previous post.
  • Add Milestones and Interesting Event Notification to the Character Log/Dump.
  • Keep track of play time. (not turns, but rather realtime spent in game)
  • Improve Vault Population Routines to select more appropriate monsters for the Vault based upon the environment the Vault is contained within (for example, not populating a Vault in the Plane of Elemental Fire with Ice Creatures)
  • Creatures generated as part of a vault should be marked as Vault creatures.
Not that much, eh?

AI and Melee Combat

Here is a video showing the first version of the Monster AI and Melee Combat in action. The video shows a Dwarf Warrior (the most melee-centred class) fighting creatures in the first level of the Wilderness and ends with him advancing to Level 2.



The AI routines are still slightly buggy - occasionally the positions that the Dungeon Object holds for the Monsters and the locations that the Monsters think they are at get out of sync. - this could lead to invisible monsters attacking the Player Character. I have no idea yet why that occurs, but it will need to be investigated further. Currently there is a hack in place to zap any monster that gets into this situation, but that's only a temporary fix at best. But having said that, I am pleased with progress on this, even if combat is currently horribly unbalanced (in favour of the Player Character)

Saturday 4 April 2009

Progress Report #12

This is the new Magic UI.

Friday 3 April 2009

Crawl Advice Requested

What would you do in this circumstance?

Or:


........#
......###
......#
......# #########
......# #))/?(|)#
......# #N[)::()#
......# #(?!!?|!#
......# #?/)!))!#
......#########@#####
....................#
###################.#

You can see a guardian naga.


Excerpt of the Character Dump is below. I'm not very happy with the progress of this character, I've been quite unlucky so far in terms of armour and non-weapons, but I'm not convinced that I should take on the Naga just yet. I do have plenty of escape options, and I'm definitely not entering the vault itself, but I do not have Oka's haste ability, and I think that could make a big difference.


Dungeon Crawl Stone Soup version 0.4.5 (crawl-ref) character file.

Bob V the Basher (Mountain Dwarf Fighter) Turns: 13955, Time: 01:32:41

HP 84/84 AC 18 Str 23 Exp: 10/8562 (79), need: 1525
MP 6/6 EV 6 Int 5 God: Okawaru ***
Gold 375 SH 9 Dex 13 Spells: 0 memorised, 9 levels left

Res.Fire : . . . See Invis. : . y - +4,+2 hammer of Turmoil
Res.Cold : . . . Warding : . R - +0 plate mail
Life Prot.: . . . Conserve : . c - +1 dwarf shield
Res.Poison: + Res.Corr. : . (no helmet)
Res.Elec. : . Clarity : . D - +0 cloak
(no gloves)
Sust.Abil.: . Rnd.Telep. : . j - +0 pair of orc boots
Res.Mut. : . Ctrl.Telep.: . (no amulet)
Res.Slow : . Levitation : . w - shiny marble ring {tried}
Saprovore : . . . Ctrl.Flight: . L - iron ring {tried}

@: praying, quite resistant to magic, extremely unstealthy
A: no striking features
a: Might, Renounce Religion


You are on level 3 of the Lair of Beasts.
You worship Okawaru.
Okawaru is greatly pleased with you.
You are full.

You have visited 3 branches of the dungeon, and seen 13 of its levels.

Inventory:

Hand weapons
e - an uncursed great mace
n - an uncursed runed halberd of venom
o - an uncursed sling
r - an uncursed runed dwarven short sword of electrocution
x - an uncursed mace
y - the +4,+2 hammer of Turmoil (weapon)
(You found it on level 4 of the Dungeon)
It inflicts extra damage upon your enemies.
It protects you from poison.
It increases your resistance to enchantments.
It speeds your metabolism.
E - the +4,+0 mace of Abomination
(You bought it in a shop on level 5 of the Dungeon)
In the hands of one skilled in necromantic magic it inflicts extra damage
on living creatures.
It affects your AC (-1).
It affects your dexterity (+2).
It protects you from poison.
It increases your resistance to enchantments.
It enhances your eyesight.
F - an uncursed mace
I - an uncursed glowing orcish hammer
T - a hand crossbow
Missiles
s - 18 poisoned elven needles
t - 5 dwarven darts (quivered)
v - a dart of ice
Armour
c - a +1 dwarven shield (worn)
i - a chain mail
j - a +0 pair of orcish boots (worn)
D - a +0 cloak (worn)
R - a +0 plate mail (worn)
Magical devices
b - a short gold wand
J - a wand of magic darts {zapped: 1}
K - a worn iron wand
P - a wand of flame {zapped: 8}
Q - a wand of slowing {zapped: 1}
Comestibles
d - a bread ration
k - 8 grapes
Scrolls
f - 3 scrolls of detect curse
p - 6 scrolls of remove curse
q - 7 scrolls of teleportation
G - a scroll labeled PUENLO SKOTAM {tried}
M - a scroll of blinking
Jewellery
m - an uncursed ring of wizardry
w - a shiny marble ring (right hand)
L - an iron ring (left hand)
Potions
a - a potion of healing
l - a potion of cure mutation
u - 2 potions of restore abilities
z - a potion of heal wounds
B - 2 sedimented black potions
C - a cyan potion
H - a fizzy red potion
U - a brown potion
Books
A - a paperback book
N - a book of Minor Magic [frost]
O - a book of Minor Magic [flame]
Magical staves
g - a long smoking staff
Miscellaneous
S - a blazing lamp


You have 79 experience left.

Skills:
+ Level 8 Fighting
+ Level 12 Maces & Flails
+ Level 8 Armour
+ Level 9 Shields
+ Level 1 Traps & Doors


You have 9 spell levels left.
You don't know any spells.


Thursday 2 April 2009

Progress Report #11

This is the current change log (from Version 0.01d) for the latest development build sitting on my hard disc:
  • Monsters now have basic melee AI
  • The UI has been completely redesigned, incorporating the Monster Display and the Minimap into the main window. The Inventory, Magic and Stats screens have also been redesigned.
  • The Combat system has now been implemented for Melee Attacks
  • A Death Screen has been added
  • Players are now equipped with class and skill-appropriate starting equipment
  • Internal Monster Stats have been rebalanced
  • Added additional lesser vaults, which can now occur at all levels
  • Visible Monster Display now collates like-type monsters together.
  • You can no longer access monster details via the Visible Monster Display
  • Monsters can no longer be generated on top of stairs.
  • The Player always starts the two lowest-level dungeons (The Keep and the Wilderlands) in a safe vault.
  • Monsters are now displayed on the mini-map as red dots
  • The Player can no longer have negative abilities or characteristics.
  • Magic Items that give bonuses to Evasion are no longer as powerful.
  • The Main Window will no longer be sensitive to keypresses when it does not have focus.
  • Fixed a bug where you could pick up an infinite number of items.
  • Picking up more items than there are inventory slots no longer corrupts the Inventory.
  • Dropping an item on top of another item no longer causes an error.
  • Weapons now have proper Damage Ranges
  • Item Locations are now displayed correctly in tooltips
Compare this to the roadmap for the next Alpha version (probably 0.02, which is planned to be released sometime in May)
  • Major Interface Revamp
  • Finish Monster AI
  • Finish Melee Combat
  • Experience & Level Gaining
  • Death Screens
  • Character Dump
  • Wizard Mode

Wednesday 1 April 2009

The New Inventory

This is the new inventory UI. It is still drag-and-drop, but now when you mouse-over an item, its full details and description (if known) are displayed. Also if you mouse over an item in the backpack, the appropriate slot on the equipped list is highlighted. To drop an item, drag it onto the drop icon on the bottom right (I'm not quite satisfied with this being the only way to drop items as it currently is, so I'll probably implement a 'drop' command).


The Orange Item is an Artifact. Artifacts are the most powerful items in the game. Standard non-magical items are white, minor magical items (if known) are green, more powerful ones are blue and then purple. Unidentified items will always appear in white. Potions have a colour scheme of their own. Cursed items (if known) are red.

Yes, the colour scheme is very World of Warcraft-ey. It works. Why not use it?