Friday, 31 July 2009

Preview: Multiple Items on the same tile!


I'm in the middle of implementing multiple items to share the same time, via the wonders of the linked list technology*. This is one of the items that was originally scheduled for v0.03a, but will obviously make it in the next released version. From now on, I want to adhere strictly to the roadmap, as there are several features that I've been delaying the implementation of for too long.

* Its not quite a full implementation, as the Get command currently picks up the top item from the stack of items currently on the tile. To get multiple items, you have to 'get' multiple times.

10 comments:

Jotaf said...

Hm, how are you going to display multiple items? Are you going to break the "one character per tile" rule? Or will you just leave it at one item, and keep the player guessing? :)

Nice pic Dealz, spammers are getting sophisticated these days :P

Dave said...

Heh.

For the time being, only the topmost item will have its ASCII char displayed, but the mouseover hint will display all the items present.

John said...

Ah, the linked list. So fine a data structure, so powerful!

Your continuing process on Kharne makes me feel like an utter chump for not working on GIZ at all. Not that I'm going to proceed to do so as a result of said emotional state..

Jotaf said...

Meh, everybody's a procrastinator sometimes. Except for those ultra-genius monkeys who escaped from a genetics lab. Dave, I still think a hint that there's more than one item there would be a nice touch :) I haven't seen that in any RLs so far. But there isn't exactly an obvious solution...

Dave said...

hmmmm....well, since its not true ascii and I'm graphically blitting ascii to the surface, there is plenty of possibility for extra representation of items.

The exact question is how, though...

Off the top of my head, you could blit symbols onto the surface for every item (for example, a blue [ on top of a yellow =). Yes, it would turn into a mess rather quickly if there were more than a few items present, but it would certainly make it obvious that there's more than one item there...

r3def1nescz04 said...

This game continues to be THE roguelike to keep an eye on! keep it up!

Jotaf said...

Yeah, maybe you could print the other items at a color half blended with the background (take the mean of RGB values) so only the top item is fully bright.

Or maybe you could not care :)

Concerning critical hits, there's still the chance you'll get one-shotted by two or more enemies. Actually this is very likely.

I just thought of something: you could allow negative HP and only check for death at the end of the turn (when everyone has taken their shot). If the player is dead, set a flag, "near death", and restore HP to 1, thus saving him. This doesn't work when "near death" is set. Also the flag is restored whenever the player is healed. Happy? :)

(this is way easier than accumulating damage over a turn and using it to check if total damage is an insta-kill, etc)

Mario Donick said...

Why don't you just display a message "There are several items here"? Is there really a need for sophisticated visualization?

Mario Donick said...

Ah, sorry, I see you do it already on the screenshot. I think this is totally sufficient ... well, I actually read messages; perhaps others don't *g*

Dave said...

I like Gerry Quinn's idea of using a small superscript '+'