Archived from groups: rec.games.roguelike.development (More info?)
In some roguelikes items are intelligent. If you 'e'quip a weapon, it
appears in your weapon slot. If you 'e'quip boots, they appear on your
feet. And so on. Thanks to this, using the inventory screen does not
feel like you were dressing a paper doll.
In some roguelikes you decide what goes where. Doing obvious things
like putting on sandals takes at least two key presses, instead of
one. You gain two things: first, you feel like Rambo in the famous
equipping sequence (it was in Rambo, wasn't it?). Second, you can
equip a silver ring as a weapon to harm an enemy that is immune to
things other than silver - which is only an example of other cool,
unexpected features that might be possible with such a UI.
My game approached the magical point of no return, where I have to
choose one of these. Any thoughts?
regards,
Filip
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
Do both! Pressing 'e' equips the item in the "obvious" slot, pressing
'E' or '^e' or ':e' or whatever allows you to choose. If you make a
consistent modifier key or keypress, you can allow all your actions that
have an obvious answer and several non-obvious answers to do this.
Walking into a closed door opens it, modified walking makes you attack
it instead (or something else, or allows you to choose). Just make sure
to document it.
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
>
> regards,
> Filip
Intelligent. It is a bad UI practice to ask a multiple choice question to a
user only to tell him after that 90% of the possible answers aren't
possible in fact. Unless you plan to create a meta UI game of course.
If you really want the special features of the out of place equip, you can
always provide a second equip command that does the "stupid slots" way.
Like e for "normal equip" and E for "stupid equip"
Archived from groups: rec.games.roguelike.development (More info?)
On 2005-04-22, Filip Dreger <fdreger@amiga.pl> wrote:
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
Just have an equip command for wearable items for which the slot is
obvious and a wield command for things on your hand. You can try to use
just about anything as a weapon, but it always goes in your hand. I
don't think it's worth the trouble to allow the player to try to put
anything in the armor slots instead of just those types of armor that
are made for that slot.
This is actually pretty much how Nethack does things, except that
Nethack has the annoying and very largely superfluous additional p)ut
command for equipping jewelry.
--
Risto Saarelma
Archived from groups: rec.games.roguelike.development (More info?)
I like the idea to do both, where pressing "e" will put your sandals on
your feet, but pressing ALT-e (alt as in alternative, makes sense) asks
you where you want to equip it. The player then has the chance to come
up with a great idea, like equipping his silver-buckled-sandles in his
hand to wack the werewolf with. But of course, you if the player tries
to equip the sandles on, say, his head, you could simply reply with
"That is impossible".
It is rewarding for the player to think of a thing to do that isn't
obviously possible, like equiping the sandles in the hand. If you
explicitly give him/her the choice to equip it in his hand, then it's
not quite as rewarding.
Let the player try to do whatever the player wants, and just say no if
it's obviously impossible. More coding, but roguelike games are great
because of the huge amount of freedome players have in the game. Final
Fantasy doesn't have squat on NetHack!
Archived from groups: rec.games.roguelike.development (More info?)
Dnia Fri, 22 Apr 2005 18:19:00 +0200,
Filip Dreger napisal(a):
> In some roguelikes you decide what goes where. such a UI.
<snip>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
I have established the idea of how I'm going to do it.
I want to separate the items and their kinds (physical objects,
with attributes light weight, size, material, looks, position, etc.),
and the 'usages', being in fact things you can do with the items, and
having things like AC bonus, damage bonus, magical effect, etc.
The usages further separated from equipment slots, which are simply flags
telling whether your upper arm is already occupied.
Now, you don't really use/equip items. You equip usages. The usages
require certain slots to be free in order to be equipped.
You can only have one usage of given kind -- something like usage slots.
But since an item can have multiple usages, you can equip one ad the same
item into many usage slots -- for example, you could have your dirk
equipped as a weapon (equip it's `weapon' usage into weapon usage slot),
and at the same time as a tin opener (equip it's 'open tin' usage into
tin opener slot).
The items itself are offcourse also moved when you equip their usages --
yopu have basically your 'eqipment' inventory and your 'treasure bag'
inventory. You can put something into your equipment inventory even when
you don't have any of it's usages equipped -- it just indicates you've got
it strapped somewhere on you, or maybe put into pocket.
It's important, since you can drop your treasure bag in case of emergency,
and you don't want to drop all the healing potions with it.
Now, usages have offcourse various 'kinds', and there are also some
'generic' usages (most hard and heavy items would have 'improvised mace'
usage which allows to equip them as a weapon).
You don't have all your usage slots and item usages displayed all the
time, offcourse.
Most items have their 'default' usage, which gets called with 'u'se
command. You can get full list of usages with 'U'se command.
Only the usage slots that have a usage are displayed. When you cannot
equip a useage bvecause of not having proper equipment slots free, you get
a message telling you exactly which usages are in the way.
There might be also an alternative interface, where you have all your
usage slots listed (in order of importance, I guess), and when you select
a usage slot, you have all usages of all items you have that fit into that
slot displayed. This might be more useful.
Offcourse, there should be lots of 'convenience' usages, like 'default
healing item' and 'default magic wand'.
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on
your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
I think you should go with the first option. Leave the
wear-your-smoky-ring-on-your-left-leg stuff to Nethackers.
A.
Archived from groups: rec.games.roguelike.development (More info?)
Antoine wrote:
> Filip Dreger wrote:
>
>>In some roguelikes items are intelligent. If you 'e'quip a weapon, it
>>appears in your weapon slot. If you 'e'quip boots, they appear on your
>>feet. And so on. Thanks to this, using the inventory screen does not
>>feel like you were dressing a paper doll.
>>
>>In some roguelikes you decide what goes where. Doing obvious things
>>like putting on sandals takes at least two key presses, instead of
>>one. You gain two things: first, you feel like Rambo in the famous
>>equipping sequence (it was in Rambo, wasn't it?). Second, you can
>>equip a silver ring as a weapon to harm an enemy that is immune to
>>things other than silver - which is only an example of other cool,
>>unexpected features that might be possible with such a UI.
>>
>>My game approached the magical point of no return, where I have to
>>choose one of these. Any thoughts?
>
> I think you should go with the first option. Leave the
> wear-your-smoky-ring-on-your-left-leg stuff to Nethackers.
M2C Only do it for 'w'ield weapons (any item).
--
WhoIs Neo*?TwistedOne?Kydaimon?Twisted?Bogey?Booger?Zargon?PaulD
http://web.archive.org/web/2003062 [...] mrant.html
- haha: 2 ignored: 27 wrong: 20 troll: 47 SAD: 19 ontopic: 6 -
- SNR = 3h + o / 1 + .5i + w + 5t + 1S = C / 15F = 0.08 was 0.02 -
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on
your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
There are several approaches to equipping:
1) Verb Based
This is what Nethack uses. 'w' signals you will put something in your
hands. 'W' signals that you want to wear something. You thus have no
extra keypresses to wield your robe in your hands.
2) Slot Based
This is what ADOM uses, IIRC. You look at your character sheet and
select a slot, like the Right Hand. You then get a list of items you
can put in your Right Hand. (This can be thought of as the same as
verb based, except with one verb per slot...)
3) Noun Based
This seems to be what you are starting with. One selects an item and
Equips it, and the right thing happens.
POWDER is entirely noun based so uses this approach. However, this
doesn't stop you from equipping silver rings in your right hand.
You go to the Inventory Screen and select an item. You then choose
"Equip". The cursor moves to the "right" slot for that action and you
can hit [A] to do the expect thing. You can also, however, move the
cursor to another slot to do something unusual.
I don't know what you mean by "point of no return".
The real difficulty of allowing "Wield Anything" is making sure
wielding a Plate Mail doesn't give you massive AC, etc. (It did for
quite a while in POWDER :> )
The other difficulty is if you have overlay graphics - you need to
reposition the overlays to allow arbitrary equipping. I finally got
around to that in 065 in POWDER when I allowed anything to be equipped
in the left hand as well as the right.
--
Jeff Lait
(POWDER: http://www.zincland.com/powder)
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
>
Hmmm. In my game, an item can be wielded, worn, or carried.
Weilded means - in your hands. Period.
Lots of items have special properties when "worn", which
means different things for different items - sandals go on
feet, pants go on legs, scabbard goes on belt, backpack
goes on over armor(if any) and under cloak (if any) and
so on.
And a very few items have special properties when "carried".
In game logic 'carried' means anywhere on your person -- weilded,
worn, stored in sheaths/scabbards, in backpacks, hanging from
the belt, and so on. But in UI terms, a 'carried' item is
one you have with you but which is neither 'weilded' nor
'worn'.
So, if you want to 'weild' your sandals in your hands, you can.
or you can 'wear' them which will put them on your feet, or
'carry' them by stashing them in your backpack or bag. There
doesn't seem to be much need for finer control than that. I
guess I *could* try to support equipping them in nonstandard
slots (wear them as shin guards?) But given the ability to
equip them three different ways (weild, wear, or carry) I
think I've covered everything my game needs.
Bear
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> Dnia Fri, 22 Apr 2005 18:19:00 +0200,
> Filip Dreger napisal(a):
>
> > In some roguelikes you decide what goes where. such a UI.
> <snip>
> > My game approached the magical point of no return, where I have to
> > choose one of these. Any thoughts?
>
> I have established the idea of how I'm going to do it.
>
> I want to separate the items and their kinds (physical objects,
> with attributes light weight, size, material, looks, position, etc.),
> and the 'usages', being in fact things you can do with the items, and
> having things like AC bonus, damage bonus, magical effect, etc.
> The usages further separated from equipment slots, which are simply
flags
> telling whether your upper arm is already occupied.
>
Maybe flags aren't such a good idea? If you have alot of usages as
flags and most items only use then as a subset then maybe there's a
better way. I'm not sure what language your using, but if it can
refrence data structures you might consider giving each item a list or
array of properties. If your using c or c++ then you could just
refrence a list of structs. An example would be.
struct Property
{
const char * nameOfProperty;
const char * decriptionOfProperty;
int propertyIdentifier; // probably an enum
void propertyUsage(); // youcould script this depending on the
property
};
If you have a bunch of these then you'll have all the information for
all of the properties an item might have but only those properties that
it has. Voila, no more switch statements, just search the list for the
proper PropertyID and execute it's script. If you don't have scripting
this could be a good reason to put it in, or you could make a function
pointer (If your language of choice allows it).
> Now, you don't really use/equip items. You equip usages. The usages
> require certain slots to be free in order to be equipped.
>
> You can only have one usage of given kind -- something like usage
slots.
> But since an item can have multiple usages, you can equip one ad the
same
> item into many usage slots -- for example, you could have your dirk
> equipped as a weapon (equip it's `weapon' usage into weapon usage
slot),
> and at the same time as a tin opener (equip it's 'open tin' usage
into
> tin opener slot).
>
I think your over analyzing here. Maybe you should take a step back and
consider creating a basic inventory with only one item in mind. Then
after you have that simple scenario working add another item of a
different sort and adapt as necessary. I know what it's like to start
analyzing and try to figure every nuance. Waterfall thinking can be
exciting but hard to recover from if something dosen't go right.
Believe me I know, I've been through a total of 15 rewrites, because of
this. Just something to consider.
> The items itself are offcourse also moved when you equip their usages
--
> yopu have basically your 'eqipment' inventory and your 'treasure bag'
> inventory. You can put something into your equipment inventory even
when
> you don't have any of it's usages equipped -- it just indicates
you've got
> it strapped somewhere on you, or maybe put into pocket.
I think this could be a boolean flag, An item could be equipped or not.
Sounds like a good candidate to me. Then you don't have the overhead of
managing two lists.
>
> It's important, since you can drop your treasure bag in case of
emergency,
> and you don't want to drop all the healing potions with it.
>
> Now, usages have offcourse various 'kinds', and there are also some
> 'generic' usages (most hard and heavy items would have 'improvised
mace'
> usage which allows to equip them as a weapon).
>
> You don't have all your usage slots and item usages displayed all the
> time, offcourse.
>
> Most items have their 'default' usage, which gets called with 'u'se
> command. You can get full list of usages with 'U'se command.
>
> Only the usage slots that have a usage are displayed. When you cannot
> equip a useage bvecause of not having proper equipment slots free,
you get
> a message telling you exactly which usages are in the way.
>
> There might be also an alternative interface, where you have all your
> usage slots listed (in order of importance, I guess), and when you
select
> a usage slot, you have all usages of all items you have that fit into
that
> slot displayed. This might be more useful.
>
> Offcourse, there should be lots of 'convenience' usages, like
'default
> healing item' and 'default magic wand'.
>
> --
> Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
> `The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
> Dopieralski
..vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
"Filip Dreger" <fdreger@amiga.pl> wrote:
>In some roguelikes items are intelligent. If you 'e'quip a weapon, it
>appears in your weapon slot. If you 'e'quip boots, they appear on your
>feet. And so on. Thanks to this, using the inventory screen does not
>feel like you were dressing a paper doll.
>
>In some roguelikes you decide what goes where. Doing obvious things
>like putting on sandals takes at least two key presses, instead of
>one. You gain two things: first, you feel like Rambo in the famous
>equipping sequence (it was in Rambo, wasn't it?). Second, you can
>equip a silver ring as a weapon to harm an enemy that is immune to
>things other than silver - which is only an example of other cool,
>unexpected features that might be possible with such a UI.
>
>My game approached the magical point of no return, where I have to
>choose one of these. Any thoughts?
So what website has the definitive set of links to roguelikes?
I'd think you could wear a silver ring normally and then use unarmed
combat to kick a silver prone enemy's ass.
Archived from groups: rec.games.roguelike.development (More info?)
On 22 Apr 2005 10:50:49 -0700, "jeremyo" <junk@jeremyo.com> wrote:
>I like the idea to do both, where pressing "e" will put your sandals on
>your feet, but pressing ALT-e (alt as in alternative, makes sense) asks
>you where you want to equip it. The player then has the chance to come
>up with a great idea, like equipping his silver-buckled-sandles in his
>hand to wack the werewolf with. But of course, you if the player tries
>to equip the sandles on, say, his head, you could simply reply with
>"That is impossible".
But it isn't. It just looks very silly and gives you a penalty to
reactions, except that it gives you a bonus to a "village idiot"
disguise and makes you acceptable in the Village of Shoes-on-Head.
R. Dan Henry
danhenry@inreach.com
Idiot boy, when are you going to post something useful?
Or better yet, get a job and stop being a welfare bum?
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger wrote:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot.
> <snip>
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one.
> <snip>
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
My roguelike uses a slot system that accomplishes both. The inventory
interface allows you to filter items, as in ADOM, by type. So when the
player chooses to equip a weapon, the inventory is brought up with the
"show only weapons" filter on. However, if the player wishes, they can
then set the filter to "show all items" and attempt to equip any item.
Of course, if an item can't be equipped in a certain slot, nothing will
happen and a message will be sent relating this.
The initial filter serves only as a suggestion, which is somewhat
logical, I suppose. If you were (realistically) looking for something
to wield, you'd likely sort through all of your knives or guns or
magical rods of wounding first. If you could't find something
appropriate there, you'd possibly look deeper and try out that frying
pan as a weapon.
Archived from groups: rec.games.roguelike.development (More info?)
Dnia 22 Apr 2005 20:28:42 -0700,
Brent Ritchie napisal(a):
> The Sheep wrote:
>> Dnia Fri, 22 Apr 2005 18:19:00 +0200,
>> Filip Dreger napisal(a):
>
>> I want to separate the items and their kinds (physical objects,
>> with attributes light weight, size, material, looks, position, etc.),
>> and the 'usages', being in fact things you can do with the items, and
>> having things like AC bonus, damage bonus, magical effect, etc.
>> The usages further separated from equipment slots, which are simply
> flags
>> telling whether your upper arm is already occupied.
> Maybe flags aren't such a good idea? If you have alot of usages as
> flags and most items only use then as a subset then maybe there's a
> better way. I'm not sure what language your using, but if it can
> refrence data structures you might consider giving each item a list or
> array of properties. If your using c or c++ then you could just
> refrence a list of structs. An example would be.
Yes, Iprobably expressed it wrong.
Uasages are kept on a list in the item kind struct. Every item kind has
it's own list of usages.
Flags are for equipment slots, they tell whether you can wear one more
t-shirt or don your armor.
> If you have a bunch of these then you'll have all the information for
> all of the properties an item might have but only those properties that
> it has. Voila, no more switch statements, just search the list for the
> proper PropertyID and execute it's script. If you don't have scripting
> this could be a good reason to put it in, or you could make a function
> pointer (If your language of choice allows it).
I don't want to go scripting every single property.
Instead, there are several basic usage kinds (weapon, armor, magic item,
etc.) that have their attributes (damage bonus, AC bonus, magic effect).
What's the difference between switch statement and an array of function
pointer anyways?
> I think your over analyzing here. Maybe you should take a step back and
> consider creating a basic inventory with only one item in mind.
Done already.
> Then
> after you have that simple scenario working add another item of a
> different sort and adapt as necessary.
Done.
> I know what it's like to start
> analyzing and try to figure every nuance. Waterfall thinking can be
> exciting but hard to recover from if something dosen't go right.
Well, it's pretty clear. You start with only one usage per item -- it's
the same as with normal items, only you have a part of it's description
separated in another struct.
Then you change it into a list, and done -- mostly UI changes.
> Believe me I know, I've been through a total of 15 rewrites, because of
> this. Just something to consider.
Don't tell me about rewrites. To get to this idea with usages took me
several rewrites of item system.
>> The items itself are offcourse also moved when you equip their usages
> --
>> yopu have basically your 'eqipment' inventory and your 'treasure bag'
>> inventory. You can put something into your equipment inventory even
> when
>> you don't have any of it's usages equipped -- it just indicates
> you've got
>> it strapped somewhere on you, or maybe put into pocket.
> I think this could be a boolean flag, An item could be equipped or not.
> Sounds like a good candidate to me.
It's nor really that inportant how you mark thje items that are equipped.
> Then you don't have the overhead of
> managing two lists.
What overhead?
You mean those several bytes of additional memory? I can put everything
into constant size arrays, since there's a limit on the size of both
lists.
Or maybe you mean the CPU time needed to traverse the list?
But with two lists I only traverse the one that's needed -- it takes less
time.
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
R. Dan Henry wrote:
> On 22 Apr 2005 10:50:49 -0700, "jeremyo" <junk@jeremyo.com> wrote:
>
>
>>I like the idea to do both, where pressing "e" will put your sandals on
>>your feet, but pressing ALT-e (alt as in alternative, makes sense) asks
>>you where you want to equip it. The player then has the chance to come
>>up with a great idea, like equipping his silver-buckled-sandles in his
>>hand to wack the werewolf with. But of course, you if the player tries
>>to equip the sandles on, say, his head, you could simply reply with
>>"That is impossible".
>
> But it isn't. It just looks very silly and gives you a penalty to
> reactions, except that it gives you a bonus to a "village idiot"
> disguise and makes you acceptable in the Village of Shoes-on-Head.
That's perfectly on-topic and innocuous.
> Idiot boy, when are you going to post something useful?
> Or better yet, get a job and stop being a welfare bum?
That's off-topic flamebaiting. You realize that if you insist on tacking
a personal attack on the end of every post, people won't be able to
avoid the flamebaiting by simply killfiling a few threads; instead they
will killfile *you*.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> What's the difference between switch statement and an array of function
> pointer anyways?
None, if your compiler has a decent optimizer.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
>> Idiot boy, when are you going to post something useful?
>> Or better yet, get a job and stop being a welfare bum?
>That's off-topic flamebaiting. You realize that if you insist on
tacking
>a personal attack on the end of every post, people won't be able to
>avoid the flamebaiting by simply killfiling a few threads; instead
they
>will killfile *you*.
That is just a comment in the signature line, so the post is still
on-topic.
An advice Neo; try not to react to every comment made about you like
this. If you dont want to keep received "flamebaiting" comments, ignore
them and concentrate in roguelike development ideas. If you just can't
do it, get out of your computer for one day and come back with a
refreshed attitude.
--
Slash
>--
>http://www.gnu.org/philosophy/Âright-to-read.html
>Palladium? Trusted Computing? DRM? Microsoft? Sauron.
>"One ring to rule them all, one ring to find them
> One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
SZDev - Slash wrote:
> An advice Neo; try not to react to every comment made about you like
> this.
Excuse me? And let the bastard win? Yeah, right. This way he is forced
to choose between disrupting the group and minding his own goddam
business and shutting up about me. So far, he chooses to disrupt the
group and every thread he posts to.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Filip Dreger <fdreger@amiga.pl>
wrote on Fri, 22 Apr 2005 18:19:00 +0200:
> In some roguelikes items are intelligent. If you 'e'quip a weapon, it
> appears in your weapon slot. If you 'e'quip boots, they appear on your
> feet. And so on. Thanks to this, using the inventory screen does not
> feel like you were dressing a paper doll.
> In some roguelikes you decide what goes where. Doing obvious things
> like putting on sandals takes at least two key presses, instead of
> one. You gain two things: first, you feel like Rambo in the famous
> equipping sequence (it was in Rambo, wasn't it?). Second, you can
> equip a silver ring as a weapon to harm an enemy that is immune to
> things other than silver - which is only an example of other cool,
> unexpected features that might be possible with such a UI.
> My game approached the magical point of no return, where I have to
> choose one of these. Any thoughts?
I just use an equippable bit-mask to determine which areas an item can
be equipped on. Right now I use a special-case rule to prevent using a
two-handed weapon with something in your left hand, but if I needed to
generalize that rule, it would be just as easy to have a bit-mask that
lists areas that conflict with the item.
If a silver ring helps you fight werewolves, there's no need to make
it be a "weapon" (which really just means right hand[0]). It's still
equipped as a ring, but you get the melee benefit from it if it's
equipped as your right-hand ring, you have no weapon, and you aren't
wearing gloves.
[0] Yes, there are left-handed people, as well, but by definition
they're all monsters: they're sinister.
--
<a href="http://kuoi.asui.uidaho.edu/~kamikaze/"> Mark Hughes </a>
"Gibson and I dueled among blazing stacks of books for a while. [...] The
streets were crowded with his black-suited minions and I had to turn into a
swarm of locusts and fly back to Seattle." -Neal Stephenson, /. interview
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> Dnia 22 Apr 2005 20:28:42 -0700,
> Brent Ritchie napisal(a):
>
> > The Sheep wrote:
> >> Dnia Fri, 22 Apr 2005 18:19:00 +0200,
> >> Filip Dreger napisal(a):
>
> >
> >> I want to separate the items and their kinds (physical objects,
> >> with attributes light weight, size, material, looks, position,
etc.),
> >> and the 'usages', being in fact things you can do with the items,
and
> >> having things like AC bonus, damage bonus, magical effect, etc.
> >> The usages further separated from equipment slots, which are
simply
> > flags
> >> telling whether your upper arm is already occupied.
>
>
> > Maybe flags aren't such a good idea? If you have alot of usages as
> > flags and most items only use then as a subset then maybe there's a
> > better way. I'm not sure what language your using, but if it can
> > refrence data structures you might consider giving each item a list
or
> > array of properties. If your using c or c++ then you could just
> > refrence a list of structs. An example would be.
>
> Yes, Iprobably expressed it wrong.
>
> Uasages are kept on a list in the item kind struct. Every item kind
has
> it's own list of usages.
>
> Flags are for equipment slots, they tell whether you can wear one
more
> t-shirt or don your armor.
>
> > If you have a bunch of these then you'll have all the information
for
> > all of the properties an item might have but only those properties
that
> > it has. Voila, no more switch statements, just search the list for
the
> > proper PropertyID and execute it's script. If you don't have
scripting
> > this could be a good reason to put it in, or you could make a
function
> > pointer (If your language of choice allows it).
>
> I don't want to go scripting every single property.
> Instead, there are several basic usage kinds (weapon, armor, magic
item,
> etc.) that have their attributes (damage bonus, AC bonus, magic
effect).
> What's the difference between switch statement and an array of
function
> pointer anyways?
Probably no difference in speed, but I you use switch statements for
more then a couple of things. It can turn to spaghetti prety quick, and
if you use function pointers you only have to iterate (or traverse, the
list with a sort). Iteration gets rid of switch statements, and is more
readable and compact(read 'Maintainable'), because loops tend to take
up fewer lines of code then switch statements.
>
> > I think your over analyzing here. Maybe you should take a step back
and
> > consider creating a basic inventory with only one item in mind.
>
> Done already.
>
> > Then
> > after you have that simple scenario working add another item of a
> > different sort and adapt as necessary.
>
> Done.
>
Glad to hear, I made these mistakes a few times.
> > I know what it's like to start
> > analyzing and try to figure every nuance. Waterfall thinking can be
> > exciting but hard to recover from if something dosen't go right.
>
> Well, it's pretty clear. You start with only one usage per item --
it's
> the same as with normal items, only you have a part of it's
description
> separated in another struct.
> Then you change it into a list, and done -- mostly UI changes.
>
> > Believe me I know, I've been through a total of 15 rewrites,
because of
> > this. Just something to consider.
>
> Don't tell me about rewrites. To get to this idea with usages took me
> several rewrites of item system.
>
> >> The items itself are offcourse also moved when you equip their
usages
> > --
> >> yopu have basically your 'eqipment' inventory and your 'treasure
bag'
> >> inventory. You can put something into your equipment inventory
even
> > when
> >> you don't have any of it's usages equipped -- it just indicates
> > you've got
> >> it strapped somewhere on you, or maybe put into pocket.
>
> > I think this could be a boolean flag, An item could be equipped or
not.
> > Sounds like a good candidate to me.
>
> It's nor really that inportant how you mark thje items that are
equipped.
>
> > Then you don't have the overhead of
> > managing two lists.
>
> What overhead?
> You mean those several bytes of additional memory? I can put
everything
> into constant size arrays, since there's a limit on the size of both
> lists.
>
> Or maybe you mean the CPU time needed to traverse the list?
> But with two lists I only traverse the one that's needed -- it takes
less
> time.
Maintnence overhead mostly, more code = more maintnence = more bugs(or
features if you prefer).
But having two lists _CAN_ be a dramatic overhead. First there is the
condition code, then the traversal. These would have to be performed
seperatly. for each item. Whereas, if you have one list, you eliminate
the conditional, if you use a flag you can traverse the list once and
change everything that needs to be changed. (If you log your changes in
the inventory screen, or something similar.) Plus less code
.
>
> --
> Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
> `The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
> Dopieralski
..vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Brent Ritchie
Archived from groups: rec.games.roguelike.development (More info?)
Brent Ritchie wrote:
> .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
What?
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Dnia 23 Apr 2005 17:07:58 -0700,
Brent Ritchie napisal(a):
> The Sheep wrote:
>> Dnia 22 Apr 2005 20:28:42 -0700,
>> Brent Ritchie napisal(a):
>> > The Sheep wrote:
>> >> Dnia Fri, 22 Apr 2005 18:19:00 +0200,
>> >> Filip Dreger napisal(a):
>> > Then you don't have the overhead of
>> > managing two lists.
>> What overhead?
>> You mean those several bytes of additional memory? I can put
> everything
>> into constant size arrays, since there's a limit on the size of both
>> lists.
>> Or maybe you mean the CPU time needed to traverse the list?
>> But with two lists I only traverse the one that's needed -- it takes
> less
>> time.
> Maintnence overhead mostly, more code = more maintnence = more bugs(or
> features if you prefer).
Somehow I can't see how it's less code to have one big list and switch
statements inside the loop, than having multiple short lists and switch
outside of the loops.
> But having two lists _CAN_ be a dramatic overhead. First there is the
> condition code, then the traversal. These would have to be performed
> seperatly. for each item.
Somehow I can't understand it.
List traversal code is written once, put into a procedure, debugged.
Then I can call it with different lists to traverse and different code to
be performed on every item on the list.
Since some decission have been made outside of the loop, I can make that
code short and simple.
I don't do it for every list with items -- I only do it with the list
I need. The division into equipment and treasure bag is because those
items are treted different game-wise -- that's why it have sense.
When the player character triggers a rust trap, I only try to corrode his
equipment. When the player wants to browse his treasure, I only display
his treasure bag's contents.
I can hardly imagine having to check all items from all the lists -- but
even then I put the code that repeats into a separate function and call it
multiple times.
> Whereas, if you have one list, you eliminate
> the conditional, if you use a flag you can traverse the list once and
> change everything that needs to be changed. (If you log your changes in
> the inventory screen, or something similar.) Plus less code
.
No, you don't eliminate the conditional. You just put it inside, where
it's harder to debug and maintain. IMHO offcourse.
I prefer to have everything in small, nicely separated pieces.
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
"Filip Dreger" <fdreger@amiga.pl> wrote in
news
4b8dr$qfe$1@nemesis.news.tpi.pl:
> In some roguelikes items are intelligent. If you 'e'quip a
> weapon, it appears in your weapon slot. If you 'e'quip boots,
> they appear on your feet. And so on. Thanks to this, using the
> inventory screen does not feel like you were dressing a paper
> doll.
>
> In some roguelikes you decide what goes where. Doing obvious
> things like putting on sandals takes at least two key presses,
> instead of one. You gain two things: first, you feel like Rambo
> in the famous equipping sequence (it was in Rambo, wasn't it?).
> Second, you can equip a silver ring as a weapon to harm an enemy
> that is immune to things other than silver - which is only an
> example of other cool, unexpected features that might be
> possible with such a UI.
>
> My game approached the magical point of no return, where I have
> to choose one of these. Any thoughts?
>
Mouse with intelligent it can't be equiped here.
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One <twisted0n3@gmail.invalid> wrote:
> None, if your compiler has a decent optimizer.
You compiler can design, write, code, profile, get help on newsgroups
and from others, redesign, rewrite, and recode?
--
Jim Strathmeyer
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One <twisted0n3@gmail.invalid> wrote:
> What?
I wasn't talking to you.
--
Jim Strathmeyer
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One <twisted0n3@gmail.invalid> wrote:
> Excuse me? And let the bastard win? Yeah, right. This way he is forced
> to choose between disrupting the group and minding his own goddam
> business and shutting up about me. So far, he chooses to disrupt the
> group and every thread he posts to.
I have never felt that Dan has disrupted the group. In fact, I consider
him the most helpful and constructive person here.
You, on the other hand... Do you black out when you post? And then wake
up the next day in a cold sweat, having no idea what you've done? Or do
you just totally not get human interaction?
--
Jim Strathmeyer
Archived from groups: rec.games.roguelike.development (More info?)
Jim Strathmeyer wrote:
> Twisted One <twisted0n3@gmail.invalid> wrote:
>
>>None, if your compiler has a decent optimizer.
>
> You compiler can design, write, code, profile, get help on newsgroups
> and from others, redesign, rewrite, and recode?
Huh?
The original discussion was about the difference between a switch
statement and an array of function pointers (in C). Any decent
optimizing compiler is likely to turn a switch statement (at least with
an enum or sequential integers as cases) into an array of pointers used
as a jump table. Similar to an array of function pointers. An actual
array of function pointers can be turned (by smart enough compilers and
if the functions are in the same compilation unit) into a jump table
with the functions inlined, under certain circumstances, which makes
them exactly the same.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Jim Strathmeyer wrote:
> Twisted One <twisted0n3@gmail.invalid> wrote:
>
>>What?
>
> I wasn't talking to you.
What?
You aren't quoting enough context here. What was I quoting when I wrote
"What?"?
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Jim Strathmeyer wrote:
> Twisted One <twisted0n3@gmail.invalid> wrote:
>
>>Excuse me? And let the bastard win? Yeah, right. This way he is forced
>>to choose between disrupting the group and minding his own goddam
>>business and shutting up about me. So far, he chooses to disrupt the
>>group and every thread he posts to.
>
> I have never felt that Dan has disrupted the group. In fact, I consider
> him the most helpful and constructive person here.
Even though he's been tacking a bit of irrelevant flamebait at the end
of nearly every post here for several days? You are clearly quite mad.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One <twisted0n3@gmail.invalid> wrote:
> Even though he's been tacking a bit of irrelevant flamebait at the end
> of nearly every post here for several days? You are clearly quite mad.
Yes, even though.
Clearly.
--
Jim Strathmeyer
Archived from groups: rec.games.roguelike.development (More info?)
Quoting Jim Strathmeyer <strathWHATEVERIGETENOUGHSPAMANYWAYS@ipass.net>:
>Twisted One <twisted0n3@gmail.invalid> wrote:
>>Even though he's been tacking a bit of irrelevant flamebait at the end
>>of nearly every post here for several days? You are clearly quite mad.
>Yes, even though.
Indeed, once we've all killfiled Paul, this will have no effect on anyone
who matters.
--
David Damerell <damerell@chiark.greenend.org.uk> Distortion Field!
Today is Potmos, May.
Archived from groups: rec.games.roguelike.development (More info?)
Jim Strathmeyer wrote:
<clip>
Please stop making fun of the handicapped. If you don't
kick the crutches out from under cripples in person, don't
bait mental defectives on the newsgroup.
Bear
Archived from groups: rec.games.roguelike.development (More info?)
David Damerell wrote:
> Quoting Jim Strathmeyer <strathWHATEVERIGETENOUGHSPAMANYWAYS@ipass.net>:
>
>>Twisted One <twisted0n3@gmail.invalid> wrote:
>>
>>>Even though he's been tacking a bit of irrelevant flamebait at the end
>>>of nearly every post here for several days? You are clearly quite mad.
>>
>>Yes, even though.
>
> Indeed, once we've all killfiled Paul, this will have no effect on anyone
> who matters.
Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi or
someone else who is using a 'nym. Paul Arthur has behaved relatively
reasonably, the recent potshot in the "job advice for neo" thread
notwithstanding. He certainly hasn't earned a place in anyone's killfile
yet with just a handful of mild wisecracks.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Ray Dillinger wrote:
[insult deleted]
You, sir, are quite the hypocrite. Insulting me by accusing me of being
a mental case, while simultaneously telling other people to quit flaming
and flamebaiting. Really.
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One <twisted0n3@gmail.invalid> wrote:
> Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi or
> someone else who is using a 'nym. Paul Arthur has behaved relatively
> reasonably, the recent potshot in the "job advice for neo" thread
> notwithstanding. He certainly hasn't earned a place in anyone's
> killfile yet with just a handful of mild wisecracks.
And who is this Neo everyone keeps talking about? Wasn't he that guy?
From that movie? With the computers?
--
Jim Strathmeyer
Archived from groups: rec.games.roguelike.development (More info?)
Twisted One wrote:
> Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi or
> someone else who is using a 'nym.
Nah, as far as my Intelligence Agency tells me ABCGi is an "Adam"-named
being ;-)
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"The name of GenRogue, has become a warning against excessively
complex design." -- RGRD FAQ
Archived from groups: rec.games.roguelike.development (More info?)
Dnia Tue, 26 Apr 2005 16:31:13 +0200,
Kornel Kisielewicz napisal(a):
> Twisted One wrote:
>> Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi or
>> someone else who is using a 'nym.
> Nah, as far as my Intelligence Agency tells me ABCGi is an "Adam"-named
> being ;-)
Waaaah. Now I regret posting my name openly.
Nobody is going to investigate on me, and it seems like so much fun
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> Dnia Tue, 26 Apr 2005 16:31:13 +0200,
> Kornel Kisielewicz napisal(a):
>
>> Twisted One wrote:
>>> Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi
>>> or someone else who is using a 'nym.
>
>> Nah, as far as my Intelligence Agency tells me ABCGi is an
>> "Adam"-named being ;-)
>
> Waaaah. Now I regret posting my name openly.
> Nobody is going to investigate on me, and it seems like so much fun
Don't worry, you were investigated too ;-). I made contact with a person who
knows you personaly ;-)
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"Well, the philosophy of the World of Shadows is based on most of the
degenerate, immoral and foremost amoral philosophical beliefs of our
world exagarated to the maximum." --Anubis
Archived from groups: rec.games.roguelike.development (More info?)
Dnia Tue, 26 Apr 2005 16:44:22 +0200,
Kornel Kisielewicz napisal(a):
> The Sheep wrote:
>> Dnia Tue, 26 Apr 2005 16:31:13 +0200,
>> Kornel Kisielewicz napisal(a):
>>> Twisted One wrote:
>>>> Killfiled who? The only Paul here is Paul Arthur, unless it's ABCGi
>>>> or someone else who is using a 'nym.
>>> Nah, as far as my Intelligence Agency tells me ABCGi is an
>>> "Adam"-named being ;-)
>> Waaaah. Now I regret posting my name openly.
>> Nobody is going to investigate on me, and it seems like so much fun
> Don't worry, you were investigated too ;-). I made contact with a person who
> knows you personaly ;-)
That doesn't count
Heh, reminds me how last year I met GSN -- he had some lectures here and
he needed his login in our net.
I was shocked -- I thought he'd be much
older.
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
>> Don't worry, you were investigated too ;-). I made contact with a
>> person who knows you personaly ;-)
>
> That doesn't count
>
> Heh, reminds me how last year I met GSN -- he had some lectures here
> and he needed his login in our net.
I was shocked -- I thought
> he'd be much older.
Yeah ;-). And I was shocked when 2 years ago the guy I was traveling for a
year with the bus home from my university turned out to be Piotr Wolny the
creator of Legends of Valdor ;-).
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"Invalid thought detected. Close all mental processes and
restart body."
Archived from groups: rec.games.roguelike.development (More info?)
Dnia Tue, 26 Apr 2005 16:57:35 +0200,
Kornel Kisielewicz napisal(a):
> The Sheep wrote:
>> Heh, reminds me how last year I met GSN -- he had some lectures here
>> and he needed his login in our net.
I was shocked -- I thought
>> he'd be much older.
> Yeah ;-). And I was shocked when 2 years ago the guy I was traveling for a
> year with the bus home from my university turned out to be Piotr Wolny the
> creator of Legends of Valdor ;-).
You know, there's a theory saying that there are only about 200 real
people on this planet -- the rest is only for decoration.
That's why you keep meeting the same people all the time, even in most
bizzare places.
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
In article <426925f3$0$8481$636a15ce@news.free.fr>,
Christophe Cavalaria <chris.cavalaria@free.fr> wrote:
>Filip Dreger wrote:
[...]
>> My game approached the magical point of no return, where I have to
>> choose one of these. Any thoughts?
>Intelligent. It is a bad UI practice to ask a multiple choice question to a
>user only to tell him after that 90% of the possible answers aren't
>possible in fact.
[...]
>If you really want the special features of the out of place equip, you can
>always provide a second equip command that does the "stupid slots" way.
>Like e for "normal equip" and E for "stupid equip"
While I generally agree with this, I think that the real correct
answer is to do whatever is easiest to code, then go back and fix it
later once you've got a working game. It's a lot easier to add a
feature to a working program than to a non-working program.
--Chris
--
Chris Reuter http://www.blit.ca
"Feel free, as long as you only quote it in long trotskyite diatribes about
the evils of objectivism."
--Charlie Stross, granting permission to be quoted in a .sig
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> You know, there's a theory saying that there are only about 200 real
> people on this planet -- the rest is only for decoration.
>
> That's why you keep meeting the same people all the time, even in most
> bizzare places.
What is it then -- all a simulation run by future superbeings? Greg Egan
type stuff? The Matrix? That movie the thirteenth floor? Something like
that?
--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
Archived from groups: rec.games.roguelike.development (More info?)
The Sheep wrote:
> Dnia Tue, 26 Apr 2005 16:57:35 +0200,
> Kornel Kisielewicz napisal(a):
>
>> The Sheep wrote:
>
>>> Heh, reminds me how last year I met GSN -- he had some lectures here
>>> and he needed his login in our net.
I was shocked -- I thought
>>> he'd be much older.
>
>> Yeah ;-). And I was shocked when 2 years ago the guy I was traveling
>> for a year with the bus home from my university turned out to be
>> Piotr Wolny the creator of Legends of Valdor ;-).
>
> You know, there's a theory saying that there are only about 200 real
> people on this planet -- the rest is only for decoration.
>
> That's why you keep meeting the same people all the time, even in most
> bizzare places.
Sometimes I'm inclined to believe that...
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"From what I've read, a lot of people believe that GenRogue
exists and will be released some day" -- Arxenia Xentrophore
Archived from groups: rec.games.roguelike.development (More info?)
Chris Reuter wrote:
> In article <bMidnW58Yauj7PffRVn-pQ@rogers.com>,
> Twisted One <twisted0n3@gmail.invalid> wrote:
>
>>The Sheep wrote:
>>
>>>What's the difference between switch statement and an array of function
>>>pointer anyways?
>>
>>None, if your compiler has a decent optimizer.
>
>
> It's not that simple. If your case constants are relatively close
> together, then yeah, an optimizer can turn that into one or more jump
> tables. If not, it ends up being equivalent to a bunch of "if"
> statements.
>
> How well the optimizer can make that transition depends on its ability
> to see patterns in the constants. Seeing patterns, I should add, is
> not something computers are generally good at. If you just switch on
> increasing integers (e.g. all the elements of an enum), the compiled
> switch code is about as fast as an array of function pointers, but if
> it's more complicated than that, switching speed could be O(n) where n
> is the number of cases.
Um. Order log(n), please. There's no excuse for slower than that. If
you can't make a jump table out of it, you can at least make a binary
tree, so O(log(n)) is an upperbound.
Even when constants are far apart and randomly ordered, you can usually
do better than log(n) by building a hash table of them.
> (A few experiments with work's compiler seems to show that it gives up
> on cleverness if the cases are anything more than simple increasing
> numbers. I haven't done much in-depth investigation into that yet,
> though. Other compilers may do better, but there are limits to how
> well they can figure this stuff out.)
It may be that it doesn't switch to a binary-tree or hash table until
there are more than N cases in the switch statement. It may also
be that the people who wrote it were just plain lazy. Damn, but
laziness is too common in compilers these days. Now I need to
check on gcc, and maybe submit a patch for binary trees on switch
statements when -O3 or higher, and hash tables on switch statements
when -O4 or higher (since it may take a few tries to construct the
table...).
> But that's a lot less important than the maintenance issues. Really,
> how often do you put a switch statement in a speed-critical part of
> the code?
:-) How often in OO programming do you call a polymorphic method?
That's about how often in DD programming you have a switch in a
speed-critical part of the code.
Bear
Archived from groups: rec.games.roguelike.development (More info?)
Dnia Thu, 28 Apr 2005 12:30:53 -0400,
Chris Reuter napisal(a):
> Ask me how Smalltalk does flow control. I dare you.
It's not directed to me, but I'm curious.
How?
--
Radomir @**@_ Bee! .**._ .**._ .**._ .**._ zZ
`The Sheep' ('') 3 (..) 3 (..) 3 (..) 3 (--) 3
Dopieralski .vvVvVVVVVvVVVvVVVvVvVVvVvvVvVVVVVVvvVVvvVvvvvVVvVVvv.v.
Archived from groups: rec.games.roguelike.development (More info?)
On 2005-04-24 19:39:06, Raghar <notfor@mail.com> wrote:
> "Filip Dreger" wrote in
> news
4b8dr$qfe$1@nemesis.news.tpi.pl:
>
> > In some roguelikes items are intelligent. If you 'e'quip a
> > weapon, it appears in your weapon slot. If you 'e'quip boots,
> > they appear on your feet. And so on. Thanks to this, using the
> > inventory screen does not feel like you were dressing a paper
> > doll.
> >
> > In some roguelikes you decide what goes where. Doing obvious
> > things like putting on sandals takes at least two key presses,
> > instead of one. You gain two things: first, you feel like Rambo
> > in the famous equipping sequence (it was in Rambo, wasn't it?).
> > Second, you can equip a silver ring as a weapon to harm an enemy
> > that is immune to things other than silver - which is only an
> > example of other cool, unexpected features that might be
> > possible with such a UI.
> >
> > My game approached the magical point of no return, where I have
> > to choose one of these. Any thoughts?
> >
> Mouse with intelligent it can't be equiped here.
>
Mouse with single-click to equip or unequip it. Why bother with a separate list
of equipment and inventory if you're using a mouse for UI...
--
Unangband L:C E+ T- R- P+ D-- G+(+) F:Sangband RL-- RLA-- W:F Q++
AI+(++) GFX++ SFX++ RN+++(+) PO++ Hp+++ Re--(+) S++ C- O* KG--
Archived from groups: rec.games.roguelike.development (More info?)
In article <slrnd7cvs2.mar.sheep@atos.wmid.amu.edu.pl>,
The Sheep <sheep@sheep.prv.pl> wrote:
>Dnia Mon, 2 May 2005 14:09:40 -0400,
> Chris Reuter napisal(a):
>
>> In article <slrnd72dau.3s5.sheep@atos.wmid.amu.edu.pl>,
>> The Sheep <sheep@sheep.prv.pl> wrote:
>>>Dnia Thu, 28 Apr 2005 12:30:53 -0400,
>>> Chris Reuter napisal(a):
>
>
>>>> Ask me how Smalltalk does flow control. I dare you.
>
>>>It's not directed to me, but I'm curious.
>>>How?
>
>> Long answer: Well, you asked. Now you have to read it.
>
>I'm very glad I asked. It's very interesting. And elegant.
>
>Somehow, reminds me of how TCL does it.
>
>Maybe because both ways are only possible when you can pass actual code
>as parameters?
>
>> In Smalltalk, everything[1] is done by sending "messages" to objects.
>> Sending a message is, for the purposes of this discussion, the same
>> thing as calling a method (aka "member function" ) so I'm going to
>> pretend they're the same thing, but I'll probably keep calling them
>> messages out of habit so I figured I'd warn you now.
>
>That's how OOP was defined in the first place, isn't it?
Depends on the language. Python doesn't (AFAIK) have a concept of a
message but has about the same level of flexibility. C++, on the
other hand, is far more restrictive. Java seems to be somewhere in
between, although I could be wrong.
Messages make a lot more sense if you look at Smalltalk-72, the
original version of the language. (Smalltalk underwent two different
major revamps. The version everyone uses now is actually
Smalltalk-80.)
In Smalltalk-72, the message was whatever text was to the right of the
object and the object would actually parse the message and do what it
wanted with it. This made for a really, really powerful language but
no two Smalltalk programs looked like they were written in the same
language.
Between then and 1980, they fixed that problem by limiting what
messages could be. Along the way, messages sort of turned into method
calls and most OO languages don't really have the concept at all.
In modern Smalltalk, messages mean:
1) Calling a method will work, regardless of its implementation or
the object's inheritance structure, so long as there's a method with
the expected name there.
2) If there's no method corresponding to the message, you can
catch that and add other behaviour.
For example, in QFP, I implement creature stats by making the stats
objects, then catching message sends that follow a particular naming
pattern and doing the right thing.
So when I do something like:
aMonster atStatStrength: 42
there is no method named "atStatStrength:". Instead, it calls
"doesNotUnderstand:", which gets the method name, sees the "atStat"
part, extracts the "Strength" part from the message name, pulls the
Strength object from its hash of stats and stores the argument (42)
there.
3) You can piece together message sends programmatically. For
example, you might create a string and send it as a message to an
object.
Now, I know you can do all of this in Python, and I'm pretty sure
Perl lets you do it as well and neither of those languages have a
concept of "message", so I'm inclined to believe that these days,
messages are more of a convention than anything else.
>> This is true even if the method that created the block has already
>> returned. Is that cool or what?!
>
>It's weird. How about when you destroy the method? (it's an object too,
>isnt it?)
Everything's garbage collected so you don't actually destroy methods,
you just remove them from the class. If a block context hangs around,
it keeps the method alive.
The same is true of method contexts (i.e. the data structure that
holds the local variables of a particular method call--in C, it's a
stack frame). If a method does something like this:
SomeGlobal := [a + b thingee].
the block will live on after the method call that created it returns
but the block will keep the method context alive since, after all, a
and b are local variables. You can then continue to evaluate the
block however often you want.
Also, blocks can contain returns. This:
SomeGlobal := [^a].
SomeGlobal value.
will cause the current method to return but the block that did the
return will still exist because a global keeps it alive. And if you
try to evaluate the block again, you'll get a runtime error because
you can't return more than once.
>Thank you very much for your time to write all this. I could probably find
>it in some SmallTalk tutorial, but I didn't expect it'd be so fun.
Yeah, Smalltalk is way fun. Join ussssssss. Join usssssss.
--Chris
--
Chris Reuter http://www.blit.ca
"Please stop putting my life in perspective. It's very annoying."
--Pearls Before Swine, 2004/7/23
There are 1047 identified and unidentified users. To see the list of identified users, Click here.
You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

