Tales of the Rampant Coyote
Adventures in Indie Gaming!


(  RSS Feed! | Games! | Forums! )

Friday, January 23, 2009
 
Frayed Knights - UI, UI, Oh, No, Me Gotta Go...
Many of the suggestions I received for improving the Frayed Knights Pilot involved the UI. This wasn't too surprising.

Some of the changes were easy. Using the arrow keys to move around (in addition to the FPS-style WASD controls), changing the mouse-look system to be more traditional, etc. I haven't added the ability to customize keyboard commands, but that's a given for the final release (someday...).

Using What They Gave Me

In order to get the pilot playable and done on time, I did a lot of the UI work with Torque's default UI system. Torque has a pretty nice UI editor, with a fairly comprehensive set of workhorse UI elements. If you don't mind your game interface looking like standard web forms or an MFC application, it works really well. With a little bit of custom code and some good artwork, it can actually look pretty good. For between-game menus and stuff, it's awesome.

But I needed more. A big reason for creating this "Franken-Engine" of the Torque Game Engine and Torque Game Builder was to take advantage of the 2D capabilities of TGB to make cool, dynamic, polished UI elements. Unfortunately, except for the main screen and the character dialog sequences (which admittedly still need some work), this didn't happen much. Mainly this was due to lack of time. Almost as significant is my own cluelessness with respect to user interfaces.

So now I'm going back with the advantage of hindsight (though I probably need to impose tighter deadlines on myself... again) and trying to exploit the tools I now have available to make things look and function better.

It doesn't help that my programmer art still sucks, but hey - baby steps.

My Engine Sucks! (Warning - Technical)

My focus the last two weeks has been on something I intended to fix two months ago. The inventory. Granted, the inventory management screen isn't the piece I've gotten many complaints on - though several players have requested a more modern drag-and-drop style inventory screen. I personally want more animation, and a more intuitive system.

Unfortunately, one of the challenges I faced was that for some reason, my franken-engine isn't letting object-level mouse events through. There is functionality in TGB (I used version 113 - the last one with some semblance of compatibility with TGE) for objects to handle callbacks when the mouse moves over them or clicks on them, for example. I even tested it out in TGE 1.13 to make sure it works. But for some reason, when mixed with the Torque Game Engine and all the other crap I've got in there, something got lost, and it's not working. I tried a number of permutations for setUseObjectMouseEvents and everything, but no luck.

However, the window would still receive mouse events, so after a couple of days of frustration (and a couple of days where I didn't touch the game at all out of annoyance), I began implementing things "the hard way."

In retrospect, "the hard way" wasn't nearly as hard as I thought they'd be - particularly not after I uncovered some functions that made it easy to determine whether or not the mouse was "inside" an on-screen object. In fact, I think the current system - in the long term - is actually going to be a lot easier to manage, centralizing control over the inventory interface where there are a lot of complex interactions. Score!

This will also act as a template for the other new interfaces. The real problem children, which need help even more than inventory and trading, are combat, spell-casting, and the trap / lock screen. Combat in particular is gonna get a complete overhaul, based on feedback. The core idea will remain the same, but it needs some major TLC.

Inventory Design Follies (Not Nearly So Technical)

Something I'm doing differently with Frayed Knights from most other games is that not every equipped item has a hard-and-fast "slot."

I did get really complicated early in the design and have a whole system that would allow a character to wear, say, a head-scarf, an arming cap, a coif, and a helmet all at the same time (and maybe even a floppy hat on top of the helmet...), but I finally realized that the coolness of being able to do that did not justify the massive confusion and interface difficulties that this would present. Just because you can simulate something in code doesn't mean you should.

(Yes, I'm one of those wusses who shy away from the NetHack interface. How do I freaking DROP an item, again?)

Anyway, one aspect that I wanted to retain - and I think I have - is to have a lot of non-standard items. Goofy items. I always loved the "Hip Waders of Protection" from Hackmaster. Or things like the "Bad-Ass Bandanna" from Munchkin. There's no reason you can't wear both a "Headband of Pebble-Grabbing" and a "Helmet of Smackdown Protection" at the same time.

So some items have specific slots (like a helmet), and other items simply use a generic "accessory" slot. You are limited to the number of accessories you can wear at one time, though this limit can be increased as you level up. Yes, I realize how much of a girl I'm sounding like right now, but that's the way it works. Things like necklaces, rings, earrings, bracers, underwear, tights, nose-rings, armbands, socks, scarves, belts, eye patches, corsets, and other junk are labeled as "accessories." So yes, you can now wear two or three necklaces at a time.

Goals

My goal is to have a really new, improved Frayed Knights ready for show at the April Utah Indie Night event. New interfaces, new combat system, *possibly* a redone AI system, shopkeepers, new quests, new locations and monsters, better sound, etc. I'm still working on the details for that milestone. But I figure it'll help me stay motivated and make the big push over the next three months (our next Utah Indie night is next week - assuming I can make it, as my daughter has an awards ceremony the same night).

Labels: ,



Did you enjoy this post? Feel free to share it: del.icio.us | Digg it | Furl | reddit | Yahoo MyWeb

Comments:
Cool, man. I'd like to see more of the implementation details on the inventory, like how are you tracking and displaying the different "main" items vs. "accessory" items? A slot inventory system is rather mundane (i.e. everyone uses it now) and rigid, but from a user point of view, super easy to deal with. E.g. "There's the helmet slot, showing that my character is wearing a Floppy Hat -5. I just picked up this Plastic Coif -1... drag it over to the helmet slot to equip... voila."

With not only a helmet but additional head "accessories", how would it work...? Maybe when you mouse-over the head slot, additional accessory slots would pop-up, or are they always visible, or am I completely off here...? =)
 
The way it is now (and I'm not guaranteeing it will stay that way) is that "accessory" counts as a slot, and there are initially three of them. They just aren't broken up by what part of the body they are located. Again, just keeping it simple, though it may be weird to be wearing three eye-patches. For now, I just assume the character found a creative way to stack 'em.
 
Interesting stuff. The 'Franken-Engine' seems very nifty. Merging TGE and TGB was something I wanted to work on a while back but just never got around to it. That ship may have sailed, though.

Out of curiosity, what became of the 'Dream Game in a Year' contest? Was it as... uhh, 'rewarding' to win as expected?
 
Well, the latest version of TGE and TGB 113 seem to work okay. It's also merged together with the ArcaneFX codebase and a bit of my own custom code that is probably responsible for much of my woe. That it works at all is something of a miracle.

"Out of curiosity, what became of the 'Dream Game in a Year' contest? Was it as... uhh, 'rewarding' to win as expected?"

Not even close.
 
"...Out of curiosity, what became of the 'Dream Game in a Year' contest? Was it as... uhh, 'rewarding' to win as expected?..."

Meh.
 
For all my gui mouse stuff I had to use the MouseEvent Control, stack stuff and basically make a factory pattern to create the stacked control from script or stack manually and use tight naming conventions to make it all work together. I can only get the buttons to communicate to script entrances and exits.
 
Post a Comment

Links to this post:

Create a Link



<< Home

Powered by Blogger