Page 1 of 1

Element passes element

Posted: Tue Sep 30, 2008 10:23 am
by Sascha
I often have the problem that there is an element
that must pass another, but unfortunately that's not
possible. Would it be great if there was a function
like "[] walkable like empty space" so that also
rock etc. can fall / move through it?

greetings, Sascha

Posted: Tue Sep 30, 2008 10:39 am
by Sascha
BTW some features:

- [] supporting initial gravity (!)
- [] walkable like empty space | except for - [] player 1 / 2 / 3 / 4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - [] element [_]

CE-action:
- set permeability = impermeable / walkable / passable / walkable like empty space

Re: Element passes element

Posted: Wed Oct 01, 2008 8:38 pm
by Nathan H.
Sascha wrote:"[] walkable like empty space"
I like this idea. Perhaps also a 'can walk' box similar to the 'can dig' one, so a CE could walk through, say, the preexisting doors (or walls-yipe!).
The other one would then be ideal for making something the already existing enemies (yams and such) could move through.

The tricky part would be deciding what to do graphically if two or more 'empty space' style elements moved onto each other, and similar things caused by the lack of transparency in all but the player. If a rock, for example, fell through a wall, the wall would be completely blotted out for a moment as the rock passes.

But wait--can't the player be seen under some things?

This brings up a completely separate point: What of sets with, say, colored backgrounds? Could the player be made to appear walking 'under' something without the background being black?

ugh... and I really like the idea, too! Where did all this^ come from?!? :shock:

Posted: Thu Oct 02, 2008 2:11 pm
by Holger
This is a good idea, and would certainly be useful for quite some things.

The main problem (when looking at the game engine) with it is that it would need to allow an arbitrary number of elements to co-exist at the same playfield position. For example, if all CEs are set to be "walkable" by other elements, and are also set to "can move", it would be possible to build a level where all CEs move to the same tile in the playfield at a certain point in time.

Therefore, this would require a technique in the game engine to store nearly all existing game elements on the same tile for all tiles in the playfield. Currently, this is only allowed for a very limited number of elements (like the player or the dynamite), and is therefore "hard-coded" in the game engine.

Making such a feature generally available to all elements would require major game engine changes, and therefore won't be available any time soon, I'm afraid.

Posted: Fri Oct 03, 2008 8:22 pm
by Sascha
Making such a feature generally available to all elements would require major game engine changes, and therefore won't be available any time soon, I'm afraid.
That's a pity! But now I dunno how to complete my level. Has anyone an Idea how I could make a custom element climbing a ladder? I want to build the game of Alan ( viewtopic.php?t=1846 ) in rocks'n'diamonds and the enemies that chase the player never pass the ladders!

Posted: Sun Oct 05, 2008 7:55 pm
by Zomis
Sascha wrote:That's a pity! But now I dunno how to complete my level. Has anyone an Idea how I could make a custom element climbing a ladder? I want to build the game of Alan ( viewtopic.php?t=1846 ) in rocks'n'diamonds and the enemies that chase the player never pass the ladders!
Use what has been avalible for quite a while: Element digs <element/group> and changes it to "Element triggering change". This causes an illusion that the element is actually walking on the other element. Maybe it can be tricky to fix graphically, but I believe it is possible. Unfortunately, there's no time for me to have a deeper look into it myself :(

Posted: Sun Oct 05, 2008 8:10 pm
by Sascha
I've got a new idea for levels with elements over elements:
If you had to make a level wherein you'd use the element-over-element option, you could choose a new... "mirror-level" option eg. with that R'n'D displays two playfields simultaneously that interact when playing.

But as Nathan said, there's the problem with graphics! Maybe an option like "always in the foreground/background" or "always opaque" option could help, I think that this is not so hard to program, is it?

Well, Zomis, I think you're right, a simple dig-and-change option would solve the entire problem, but graphically seen it's not perfect. As mentioned in Nathan's post there'd be the black margin of the enemy's tile blotting out the ladder. (Actually I'm wondering why the player does not, or is it because of this exception Holger mentioned (player, dynamite, ...) ?).

Posted: Sun Oct 12, 2008 1:17 am
by Daniel H.
This is because the player is not an element. The player is handled very differently from an element and can be drawn over, under, or "inside" the element in any field square.

Posted: Tue Dec 23, 2008 11:34 pm
by Trevor
Another possible way to get one element (CE A) to "move through" another element (CE B) is to make the CE A dissappear when it hits CE B, causing CE B to make a new CE A on the other side. Also, though I haven't tested this out yet, there might be a trick to make a piece dig through multiple elements and change it back to the same one. Make CE A able to dig a group element containing all the things you want it to "move through". Make CE A change the piece it digs to an "element triggering change" piece. If this works, don't thank me... I've been looking and studying the level creators of every Alan Bond and Jurgen Bonhagen level. :wink: