Element passes element

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

Moderators: Zomis, Flumminator

Post Reply
User avatar
Sascha
Posts: 348
Joined: Fri May 12, 2006 6:17 pm
Location: Germany
Contact:

Element passes element

Post by Sascha » Tue Sep 30, 2008 10:23 am

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
Image

User avatar
Sascha
Posts: 348
Joined: Fri May 12, 2006 6:17 pm
Location: Germany
Contact:

Post by Sascha » Tue Sep 30, 2008 10:39 am

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
Image

Nathan H.
Posts: 74
Joined: Mon Sep 10, 2007 8:03 pm
Location: USA

Re: Element passes element

Post by Nathan H. » Wed Oct 01, 2008 8:38 pm

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:

User avatar
Holger
Site Admin
Posts: 3231
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger » Thu Oct 02, 2008 2:11 pm

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.

User avatar
Sascha
Posts: 348
Joined: Fri May 12, 2006 6:17 pm
Location: Germany
Contact:

Post by Sascha » Fri Oct 03, 2008 8:22 pm

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!
Image

Zomis
Posts: 1501
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis » Sun Oct 05, 2008 7:55 pm

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 :(

User avatar
Sascha
Posts: 348
Joined: Fri May 12, 2006 6:17 pm
Location: Germany
Contact:

Post by Sascha » Sun Oct 05, 2008 8:10 pm

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, ...) ?).
Image

Daniel H.
Posts: 535
Joined: Sun Apr 02, 2006 7:13 pm
Location: USA

Post by Daniel H. » Sun Oct 12, 2008 1:17 am

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.

User avatar
Trevor
Posts: 3
Joined: Sun Dec 21, 2008 3:49 am

Post by Trevor » Tue Dec 23, 2008 11:34 pm

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:
I've been playing Rocks 'n' Diamonds since I was just 4 years old!

Post Reply