Relative elements

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

Moderators: Flumminator, Zomis

Post Reply
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Relative elements

Post by Tomi »

Note: The change I suggest is pretty big, so it might wait to other version.

When creating CEs, there are often groups of really similar elements that have very few differences (for example, only change value, or the element it'll change to). Applying those small changes is often very boring and it's also my main reason why I need some sort of CE scripting. It would be very useful to have some mechanism to support such similar elements.

Often, those small changes are in element-boxes (the widgets where you can set some element). I'd like a relative way to set them, like "self+3". I'll use a Ghost from Pacman as an example:
GHOST 1
Element changes to self+1 when player collects power pill
--- (self+1 is always corresponding GHOST X - EDIBLE)
Element changes to self+4 when touched by player
--- (self+4 is always corresponding GHOST X - GOTCHA!)
Element disappears after CBP* of wave done!
Element disappears after CBP of maze blocker (pre-floodfill)
Element changes to self+4 after CBP 2 of "you die collisions"

Now, when you copy this element to GHOST 2 slot, it'll automatically use GHOST 2 - EDIBLE and GHOST 2 - GOTCHA!, thus saving level author from a lot of work.

Gee, this will surely be extremely hard to implement, but pleeease make it, it's sooo useful!!!

* - change by page
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Was this post missed?
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> Was this post missed?

Indeed! :-o

This post was never displayed as new to me, I think. :-o

The idea is very interesting! (Also one of these "die-hard level designer" ideas... ;-) ).

And as far as I can see, maybe this idea is very simple to implement -- you just use these "relative elements" in the editor (and level file), and before the game starts, they are all replaced by their "real" counterparts.

You probably won't need many of them anyway -- I could imagine that "self - 8", "self - 7", ... , "self - 1", "self", "self + 1", "self + 2", ... , "self + 8" would be more than sufficient. (The element "self", which was suggested in another idea, would then be a by-product of this idea.)
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Maybe this could be an "advanced option" that can be enabled only in setup too. (Idea: make "advanced editing" setup page which contains those advanced options and an explanatory text "see also http:/www.artsoft.org/rocksndiamonds/faq.html" or something like that.) (The slash was skipped intentionally, so phpBB won't make a clickable URL from it.)
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> Gee, this will surely be extremely hard to implement, but pleeease make
> it, it's sooo useful!!!

Just added this -- in fact, most time was needed to draw the graphics for these new "reference elements" (what you called "pseudo elements"). They behave just as you intended them to work. I think they could be very useful if you make a few similar objects made of some similar custom elements. Also the "self" reference element (which was already suggested by Alan) works very nicely!

It will all be in 3.2.1, coming soon... :-)

Still have to fix that EMC tape bug, though (but after the Snake Bite debugging session, I had to to something creative and productive, that's why I added these nice new elements today :-) ).
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

BTW, how do they behave if you put them directly in the playfield? (For example, "element triggering change" acts like normal wall.)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

None of those special elements should be placed directly on the map.
Eventually, they should act as just they do now - that is, nothing, just like a wall ;)
Anyway, by the way, have fun!
Francesco
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

I know that they shouldn't, and as such they should lose their special properties, but it wouldn't be good if the game crashed when you put them there, or something like that, so I question it anyway, to be sure Holger doesn't forget about cases like that.
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

Yes, four eyes see more things than two eyes do, in effect.
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 »

Yep, good point. Indeed, these elements should not be placed in the playfield, and if done anyway, they should behave just as "elements without properties", which are default, plain, destructible walls.

Should already work fine that way, and shouldn't cause any bad behaviour in the game engine (unless somebody reports it)... :-)
Post Reply