Friday, February 29, 2008

Minor things to fix

So minor things to fix up

* Seriously need to redraw my river. shallow water, sea tiles. They are definitely too much of a “placeholder” tile.
* Redraw my teleport gate tile
* Cave tiles need reworking
* Cleaned up Character creation menu (yeah that nasty red box)

I’ve also started work on a naming your character screen, which I was kind of against doing, since this means I need to write some kind of popup text entry widget which always suck on handhelds, and no, it wont have some kind of predictive input or T9 system, after all, its only going to be used to enter your characters name.  Right now I have a list of say 20 names and it randomly picks one for you when you start a new game.

Need to finish the oracle / pub shop code (relatively minor piece of work)

Even tho the item list is preset, now different towns have different markup prices across the board (basically a small percentage increase or decrease) over the preset price. This only affects the buy price, the resell price is based on the preset price, this stops people from buying things cheap in one town and selling them in another town that has a higher markup. The sell price will always be the same in every town but the buy price will fluctuate from town to town, but it wont change each time you enter (its not random). I certainly don’t need to model an entire economy with price vs goods fluctuations.

The only problem I am aware of right now is selling an item back to a shop that it doesn’t sell.. Example being, a backwater town might only sell some basic weaponry, and you come along and sell it and the Sword of Fargoal +2 that you brought two towns over.. They’ll pay you for it no problem, and then you go back into the buy option and its not there.... I could attach a list to the shop { item id, qty }… suddenly I don’t like the fact that when you come back 6 months of game time later the same item is in the inventory… wtf, does nobody in this village realise how kickbutt the Sword of Fargoal +2 is that they didn’t buy it already?? argh. Now I’m expecting too much of a simple game mechanic but I feel if you start to do something, you need to do it right and track all this kind of thing..

OK so I’m back where I started, you sell the Sword of Fargoal +2 to the shop.. and voila, its gone (just think, hey some other dude came and bought it right now or the shopkeeper wants it for himself!)…

Its unrealistic for shops to

A) Sell every item in the game of type X (weapon, armour)
B) Doesn’t sell every item in the game, but that list never changes
C) Doesn’t sell back the things you sold it
D) Doesn’t track the resale price like it tracks the original sell price
E) Not take VISA

I need to think on this some more.. It really bugs me what I sell doesn’t appear in the sale list smile

Posted by Stu on 02/29 at 08:51 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Wednesday, February 27, 2008

Fishguts Screenshots

Lots of work in progress pics behind the jump… (Different versions eg: pc/psp/gp2x/gp32 had different title screens. Here you can see the GP2X title screen)

PC = Fishguts Title Screen
GP2X = Marakesh (yes the spelling is correct here, its not Marrakesh)
GP32 = Zanzibar
PSP = Morocco
Pandora = Kampala

Right now the GP32 is defuct tho…

image
image
image
image
image
image
image
image
image
image
image
image

Posted by Stu on 02/27 at 10:21 PM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (1) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Thursday, February 21, 2008

Again with the small steps

Again, taking small steps I flushed out another castle map with surrounds. This map is kinda odd compared to the other maps as its a much larger map, previously I had made my indoor maps 96x96.. but this one I modeled some surrounds with it and its a 160x128 or 160x160.. Prior to this it was a map of green unfilled squares whose script contained nothing but an enter and exit events.

Maps Left to Draw
* 4 towns I think, need to check my notes.

Once thats done its down to populating them with the NPC’s and dialogue and tieing up all the plot points.

Still to do
There are still things that need to be worked on before I can no longer avoid working on the combat engine.

* Sailing / Riding (flying eagles of questron ii??)
* Lockpicking
* Stealing chests
* Mountain Climbing

But none of them are really code intensive.

Posted by Stu on 02/21 at 10:02 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Tuesday, February 19, 2008

Compressing Text in Fishguts

A comment on Adams blog for his CRPG design on text (here, made me realize I didn’t expound on my own text handling features.

I think Adam is spot on with saying “I’ve realized a CRPG is defined by the quality and amount of the dialogue” and I agree.

There is only so much you can communicate with graphics that a simple paragraph can replace.

One of my early articles explained that I had dropped lowercase letters from my font to make things more readable on a small handheld screen.

That was only part of the reason I dropped lowercase.

There are several factors involved

- Small screen, bigger fonts are easier to read
- Need a lot of dialogue for NPC’s to build atmosphere.
- Less textual variation is easier to pack (read upper vs mixed case)

Because we are dealing with text, we have already narrowed down what we will be compression. Plain old ASCII. No funky foreign characters or accents, etc. Everything fits in a predefined range of known values.

In Fishguts, game text is compressed on two levels.

1. There is the on-disk compression to save storage size.
2. There is the in memory compression of the text. Further compressed by the fact that every string is only ever represented once, no matter how many times it is referenced or used in the script

For example;

map_castle_lexington.lua : Text encoded into 4027 bytes from 6020 (66%)
map_castle_lexington.luac : lz encoded in (26,889) out (14,262) (53%)

The text only inside the script is compacted to 66% of its original size saving 1993 bytes. These are compacted inside the script so the script can run and will only decompact a string as it is used on the fly.

Secondly, the file is compressed to 53% of its original size on disk saving 12,627 bytes (This is modified + compiled lua bytecode)

The bigger win is really having the script only decode text as its needed and storing multiple copies of each string only once. This script alone saves 2k of ram nearly for just that.

This is achieved by using 5bit ascii with a two level dictionary.

ABCDEFGHIJKLMNOPQRSTUVWXYZ .,_
=0123456789-+?%~$!();:"'#/*&@|

5 bits allows you to encode 32 characters.

The last two characters in the lookup are used to switch between differences or mark the end of a string.

Most text that NPC’s spout will wholly consist of the first level of the dictionary (A-Z .,_).

Everything is packed and shuffled into 5 bits. This lets you pack 3 characters into two bytes with 1 bit left to spare. With the dictionary control code I can swap between my normal and my special dictionary and print whatever was needed. Were I to include a lowercase dictionary, things would get a bit unwieldy.

I’m debating right now to see if I should move to using the same method Magnetic Scrolls used for their text, in that I could huffman encode the strings, and each script could use a common dictionary. The problem with that is including scripts from one and other would screw up the dynamic dictionary. Having a static dictionary across the entire app might not compress as well.

(The above paragraph in uppercase, encoded into 239 bytes from 378 (63%), saving 139 bytes).

Decoding is fast and doesn’t require an output buffer bigger than the original string.

This is a really simple dictionary based compression. Ive used other similar systems in the past. A more common variation on this dictionary method is one that takes the most common 16 letters, and pairs them with the next most common 16 letters. This lets you pack two letters into one. (This is what was used in Eye of the Beholder and other Westwood games).

The first part of the dictionary is

" etainosrlhcdupm" (note the space at the start)

and the substrings are

(noted the embedded spaces)
"tasio wb",
" rnsdalm",
"h ieoras",
"nrtlc sy",
"nstcloer",
" dtgesio",
"nr ufmsw",
" tep.ica",
"e oiadur",
" laeiyod",
"eia otru",
"etoakhlr",
" eiu,.oa",
"nsrctlai",
"leoiratp",
"eaoip bm"

By using the top bit as a marker, the next 4 bits are the primary index, then the next 3 bits are the secondary index. If the top bit is not set, just output the 7 bits of non-encoded character.

This can be good or bad, depending on your dictionaries (The above is fairly optimal for a primary index) but like all dictionary routines you never achieve super compression.

Moving away from dictionaries gets you into tree’s (Splay / Huffman / Shannon-Fano) or LZ77/78 derived schemes that require extra overhead to decompress, build tree’s and tables and other baggage.

With ram limitations and speed concerns, I’ll be sticking to my dictionary encoding.

Posted by Stu on 02/19 at 11:03 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (3) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Monday, February 18, 2008

Ongoing development

Ongoing development was pretty good today.

- Teleport gates around the map work.
- Added a few more maps
- Cleaned up a couple of other maps.
- Drew a couple of (similar) icons
- Added some more design info into my wiki notes (what towns have what kind of shops, etc, what teleport goes where at when)

Posted by Stu on 02/18 at 09:32 PM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Friday, February 15, 2008

Getting back on the development track

So, now cnc 0.4 is out of the box its time to get back on the Fishguts horse!

Where I left off.. mmh lets see ‘git log’… ok.

We have our party on screen and arranged (all sharing the same icon).

I need to do;

- arrange the opposing team based on the direciton of where the attack originated from
    * party attacked monsters, set both teams facing.
    * monsters attacked party. party may not be facing monsters.
- Calculate who goes first
- Divvy up spoils
- Magic
- etc etc etc

Ive also switched my repository from bazaar to git (and am also in the process of moving my hosting).

Here I’ll call this list “Things I’ll probably dabble with while doing combat code”

Simple Stuff
* Get my teleports working
* Draw up basic town maps for all towns on map
* Code skeleton scripts for all towns on the map (basically enter/exit events)

Harder Stuff
* Start populating towns with NPC’s and dialogue from my logbook.
* Horses, overland speed away from monsters (probably do something like I did in cnc)
* Ships

Super hard Stuff
* Balancing (hooray for Spreadsheets).
* Play Testing

Posted by Stu on 02/15 at 10:07 AM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Wednesday, February 13, 2008

Cracks and Crevices Release 0.4

OK, I’ve sat on the release long enough. I’m sure some basic bug will pop up but what the hey.

For downloads, go here

Changelog

0.4 20080209

* *BIG* Rewrote mainloop code (fixed some subtle round bugs).
* Rounds now work properly for all NPC’s and the PC
* Timers work correctly
* Rewrote attribute code
* Gold drops on floor now
* Monsters die correctly!
* Initial quest time shortened to make it more attainable.
* Messages are now counted and displayed as Msg (x) if repeated to stop cluttering the display.
* Remove character dump when starting a new game
* Dont save character dump when saving game
* Stopped monsters and drops from appearing in the message window (doh!)
* Stopped saving from doing an explicit call to exit instead of falling through the game loop like quit does, which revealed some mem leaks that were plugged.
* Gold drops were dropping underneath the player not monster!
* Spells in spellbooks
* Start spell when buying first spellbook
* Attack/Target Cycling/Cast Spell commands
* Implemented 99% of the spell attributes
* Casting spells now works! (no whizzbang animation. it just works)
* auto pickup working
* Pickup key words
* Fixed : When selling item, unequip it automatically
* Added circular fov for easy games
* Bumpbed facing fov for medium + hard games
* Added leveling up
* Added ctrl-c as break all from program
* Added ESC as means to close out most all dialogues
* Made some defaults sane (no mixing cursor + keypad)

Posted by Stu on 02/13 at 10:05 PM Permalink to this post.
Filed Under : ComputersDevelopmentCracks and CrevicesReleases
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

CnC test

I’ve been fortunate enough to have Ido ‘I’ve got a sixpack of abs’ Y do some testing on CnC… He turned up a few nice things for me to fix and some suggestions.

When you play it and test it so much you get blinded by some simple things.

Thanks Ido for the suggestions and making it a better behaved game.

This means we are nearer to a release (plus I want to release before I start adding things to the 0.5 release).

So definitely sometime this week it will see the light of release.

Posted by Stu on 02/13 at 09:29 AM Permalink to this post.
Filed Under : ComputersDevelopmentCracks and Crevices
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Monday, February 04, 2008

Gates of Delirium update

I need to do an update to my Gates of Delirium saga on armchair arcade… I admit to being a bit lazy lately (ok, much has been happening in life) on the gaming front.. even tho its the only game I am playing right now smile if “playing” is the operative word.

Lets see if I can grind down and get another key and blog it for the ArmchairArcade,…

Posted by Stu on 02/04 at 09:43 PM Permalink to this post.
Filed Under : ComputersComputer Gaming
Commented on by (2) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

jEdit Snob

I just realised I have become a jEdit snob like there are emacs snobs and vi snobs!

sigh.

I think the last time I was like this I was a ‘TSE Pro’ snob (Semware Editor, aka QEdit..

Man, QEdit/TSE Pro used to rock my world in the days of DOS.

I even have my .jedit settings directory in git

Posted by Stu on 02/04 at 12:38 PM Permalink to this post.
Filed Under : ComputersDevelopment
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Sunday, February 03, 2008

Magic Works

Ok, I managed to implement my magic attribute code on spell casting.

This is only the first cut, so there is no animation or anything. You target, you cast. the spell takes affect on the target.

Whats not working yet? damage done to multiple targets etc. and spells that affect the maps (ie: gas cloud) or onees like charm.

So still left to get working

- Scribing scrolls to a spellbook
- Dungeon affect spells (gas cloud, sleeping cloud etc)
- allegiance (charm, hate, beserk)

Posted by Stu on 02/03 at 11:54 AM Permalink to this post.
Filed Under : ComputersDevelopmentCracks and Crevices
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Friday, February 01, 2008

Gillette Tech Square vs Triangular

In a post on shavemyace.com I was very adamant that the geometry of the heads in the Tech series didnt change, but its well know the base plate had two variations, so I decided to take some pics.

(Largs pics after the jump)

The baseplate on the right with the square guard slots is from a British Tech, no date code, the triangular slots is from a 1939 USA Tech
You can see the triangular slots are smaller and come close to the safety bar,
image

Top of my hand, British Tech, bottom USA 1939 Tech.
A blade installed in the USA tech mostly covers any gap that you can see.
image

I dont know if you could count one as more aggressive than the other, shave wise.

Posted by Stu on 02/01 at 01:52 PM Permalink to this post.
Filed Under : LifePersonal
Commented on by (0) people. Read or Post Comments Here
Linked To by (0) blogs. Get a Trackbacks link here

Page 1 of 1 pages