Sunday 19 January 2014

Adventures in Learning Basic Concepts in PhP

Thanks to the tutelage of Jared, I am now able to do things like this:


Needless to say, this qualifies me as a fully-fledged Indie Game Developer.

Saturday 4 January 2014

Development update: Focus on items interface

The Christmas break was a good chance to get a lot done on Asciilands since I spent most of it either sick or injured (and largely immobile). Silver lining or something, right?

The recent developments have had a lot to do with items since items, loot and how these systems are handled are a huge part of modern RPGs...and will be a huge part of Asciilands, too.

Shortly after the last blog-post, shop-keepers were added. They behave much like shop keeper NPCs in any other game; they buy items for about a sixth of what they sell items for. Even though Asciilands deals in multiple currencies, each vendor will most likely only deal in one of these. Currency exchange will be a separate mechanic for a different kind of NPC (not yet done).

As loot becomes more complex and has more interesting affects on the player and the game in general, a more intricate UI is required to make sure the player is fully informed of these intricacies. This is all good until the whole "everything done with text" thing gets in the way of what has become the convention.

Here is an image of a typical weapon selection scenario:


This is a screenshot of the left hand panel where all the item information is handled. Starting from the bottom, the "Item Info" panel shows the information about the current item. The item generates this information automatically by scanning its own stats and behaviours.

Ignoring "Wallet" and "Available", above that we have "Items". This is basically the player's inventory. Items which are equipped have a black triangle indenting their name. This effect replaces the old "Equipped" panel. The Equipped panel was nice but it got annoying when items were shifting up and down on account of being removed from one panel and added to another. Clicks had to be very deliberate and it was hard to "gear up" quickly.

Finally, above the Items panel we have "Details". This is a list of the player's character stats. Unaltered base values are simply displayed to the left whilst stats with gear-based additions have a leading sum showing [base] + [modifier] = [effective]. This should make it easier to identify gear dependency without having to look through too many numbers.

A keen eye would note that the selected sword only adds to "Control" and "Finesse" however the player is also receiving a bonus to "Evasiveness"; this bonus comes from the "Haze Specs" (along with a slightly expanded light radius).

This is how the shop interface looks:


Not much different, really. A shop is basically a storage unit except that when you take something from it, or put something in it, a nominated currency is altered during the transaction. Most of the code used for things like a barrel are used unchanged for the shop.
It also sticks prices on everything so you know what you're doing.

In the screenshot, you can see that the Item Info panel is showing information on an item in the shop's inventory. Item info can look up any item either held by the player or held by an object currently interacting with the player (assuming the player has permission to look e.g., can't look at a living enemy's stuff).

Dealing the with vendor is much the same as dealing with a barrel; left click to look at stuff, right click to swap it between your possession and theirs (but obviously this will be blocked if you lack the funds).

This is particular example, the vendor only deals in "Fent" (credit to Kraig Kirsch for currency name).

Also planned for Vendors is a mechanic that allows different vendors to pay a premium for various item properties (e.g., +20% for item made from Iron or Gold, +30% for "beautiful" items). Some of the code for this currently exists but hasn't made it into game-play yet.

Well that covers the gist of the major changes to Asciilands since the last post. A bunch of time has also be dedicated to developing the development tools but that's not so interesting since most won't be able to use them anyway (a console-command that kills everything in the map is kinda amusing, though).