"Everything" token

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

"Everything" token

Post by Alan »

Like the "self" token idea I had but this one refers to.....everything! ;-)

This would be very handy for the likes of snap:- do something if player
snaps "everything", if you're making a custom control (like a weapon
cycle) and don't want to have to use a lot of group elements to check for
every snap type.

Would also work with other things to, like:- if player collects "everything"
then explode. Anything that is collectable will trigger this change page.

This would save lots of CEs and GEs.
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: "Everything" token

Post by RAP »

Alan wrote:Would also work with other things to, like:- if player collects "everything"
then explode. Anything that is collectable will trigger this change page.
Like when you collect every emeralds in the playfield and then something
triggers like a CE... Great idea, that would save alot of time,

Also, I had some ideas...

- place the number of emeralds that you wanted any/1st/2nd/3rd/4th player
to collect and something triggers it...

-- other option, when you collect the how many "collectable elements (like
dynamaite)" and put in the player, any, 1, 2, 3, 4, etc.

If I don't know what I'm talking about, talk to me... 8)
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

Like when you collect every emeralds in the playfield and then something
triggers like a CE... Great idea, that would save alot of time,
You might of worded it wrong here, change "every" to "any" and you got it! It would trigger if you collected any emerald, dynamite or anything collectable.

The snap idea isn't the first time I've needed this "everything" CE. Say I wanted to change the colour of Rockford to green if I snapped space....If I was standing next to a wall it wouldn't work, so I'd have to add that wall to a GE and test using that. To be extra sure it worked all the time I'd have to add every possible element in the level to that GE...... hence the "everything" token.
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Yeah, I know what you mean! Should be fairly easy to add! I'll do it together with the "self" and the "CE+1", "CE+2", ... pseudo (reference) elements!

Very good idea! :)
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> Like the "self" token idea I had but this one refers to.....everything!

I'm just playing around with this stuff (to relax from my Snake Bite debugging session, which definitely was worth the time -- it's one of the greatest sets ever for R'n'D!).

I came across the following question: Should "any element" really mean *any* element, including empty space? Or should this element match everything but empty space?

I'm not sure about this at the moment... Especially "touching <special_any_element>" could then result to something unexpected (as the player "touches" empty space very often.

Any idea how to do this best?
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

I suppose you should omit the empty_space (makes sense now I think about it). We could always use the "anything" and an empty_space in a GE, it still saves lots of CE\GEs

But then again....

You could have a few of these tokens.... walls,movers,collectables,CEs are the main ones.
User avatar
Sascha
Posts: 348
Joined: Fri May 12, 2006 6:17 pm
Location: Germany
Contact:

Post by Sascha »

Do you mean an "everything element" that refers each element in RnD, Alan?
Or what about more than one "everything element":
"Everything collectible element"
"Everything diggable element"
"Everything destroyable element"
"Everything passable/enerable element"
...

:?: :!:

A good idea!
Image
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

Do you mean an "everything element" that refers each element in RnD, Alan? Or what about more than one "everything element":
Yes, both really........maybe we could have one token for everything and a few others of sub groups.
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

"Everything" is not right name. (See Ryan's post above.) I think "anything" would be much better.

Omit empty_space, but *write it in the FAQ*. Not writing about this omission somewhere could end in confusing behavior. ("Why is it called anything if it isn't really anything?!" etc.)

BTW: as I see it, this behaves like a group element that contains everything. (Yes, it contains everything, but I still think "anything" is a better name.) Well, group elements can be used in two ways: a) when you check if an element is in it (e.g. "player collects GE") and b) when you choose an element from the GE (e.g. "element changes to GE", GE placed in playfield). So, when using "anything" in case b, what should the choice type be? Random, loop, linear or pingpong? (IMHO I vote for "random".)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

I agree with both, the name change and the mention about omitting "empty_space".

Anyway, "empty space" is "nothing", it doesn't fall under the "anything" category ;)

"I'm going to the pub, do you want something?"
"Well, bring me anything you want."
"Here I am. Here's your glass of air :D"
Anyway, by the way, have fun!
Francesco
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

(IMHO I vote for "random".)
I never really thought about placing them in a map, more like an internal CE thing, but I think random would work best to.
Anyway, "empty space" is "nothing", it doesn't fall under the "anything" category
Funny you should say that as I've had a few ideas about empty space, not being nothing (kind of a Zenith statement I know)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

Well, I didn't mean that "empty space" is nothing in RnD, of course it's an useful element to refer to in CE programming.
It was more like a philosophical issue ;)
Anyway, by the way, have fun!
Francesco
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> BTW: as I see it, this behaves like a group element that contains everything.

Yep, right. It's now called "any_element" and (currently) also contains the "empty_space" element (so it's *really* every/any element). Why? Well, as far as I can see it, it will mostly be used in conjunction with CE conditions like "player digs/snaps/collects/etc.", so there's no problem to also contain empty_space in it. Let's see where this may make trouble... (In any case, it seems to me that it's better here to start with a "pure" variant of this reference/pseudo element rather than with something that is limited/crippled to something less due to vague assumptions, therefore being confusing for the uninitiated user... ;-) )

The same goes for ideas like "every diggable/collectible/etc. element" (although such special elements could be useful for the "CE can dig" thing)... But maybe such things could be useful in some cases, so it's not entirely abandoned. :-)

> Well, group elements can be used in two ways:

I have only implemented (a) for now, as I really see no good use for (b) -- this would then *really* create one out of *any* possible elements, which is surely never what you want. (Or am I wrong?)

> Anyway, "empty space" is "nothing", it doesn't fall under the "anything"
> category

Good point... "any element" could indeed be intuitively understood as "any element, but not *no* element (== space)". (In fact, the R'n'D game engine works exactly like that in some cases, treating empty_space as being some sort of "special" element.) Therefore, your example was not bad:

> "I'm going to the pub, do you want something?"
> "Well, bring me anything you want."
> "Here I am. Here's your glass of air Very Happy"

I had to laugh out loud as I more or less thought exactly the same after the first of the two lines...! ;-)
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Alan wrote:I never really thought about placing them in a map, more like an internal CE thing, but I think random would work best to.
Yes, I can't think of any use of placing it in a map, but if the level creator decides to, it's wise to have *some* behavior ready (even if it is showing a dialog box "you can't put this in the playfield !"). If the game assumed it won't be placed in a map, and someone would do so anyway, playing the level could result in strange unexpected behavior and/or some sort of crash.
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> If the game assumed it won't be placed in a map, and someone would do
> so anyway, playing the level could result in strange unexpected behavior
> and/or some sort of crash.

You're principally right, of course. ;-)

Although it does not make sense to put it into the playfield, it is technically possible, yes. Therefore, it should not hurt to do so, and I don't expect any problems. If you should find anything that really should not happen in this case, please report it! All these elements should more or less behave just like ordinary walls...
Post Reply