Help with CE automatic generation

All about creating levels and level sets, custom elements and custom artwork.

Moderators: Flumminator, Zomis

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

Help with CE automatic generation

Post by Tomi »

In one of my levelsets, I've encountered a problem when implementing Improved Inventory. To solve it, I need a level that would do the following: (I'll convert it to my concrete needs when I'll see it.)

I have a list of elements numbered 0-40, let's say it's:
0-9 = leter 0-9
10-35 = letter A-Z
36 = green emerald
37 = yellow emerald
38 = red emerald
39 = purple emerald
40 = bd diamond

In the first area of the level, player can enter 10-digit number:




When player presses the red button, the elements which he requested appear in the second area, so for example, if he entered 17-14-13-36-40, the level creates this:






The key is that I must have some list of the elements and I need to locate the element with the number that I need, but I need to do it accurately and as quick as possible. (Maybe something similar was used in Zomis' Advanced Minesweeper to apply level width and height?)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

This sounds like a very interesting technique, when it's finished ;)
I do not think though that you have much use for the size-technique in Advanced Minesweeper, since that only uses some CEs to move and stop at the right position (using a counter) and when it has stopped, it throws out a lot of steel walls in the directions down and left.

However, what you have in mind is definetely possible, and here's an idea how:
First of all, check the first number of the elements that should be checked, depending on the value, a chosen CE is created to check the value of the next number. This 2nd CE checks the number and "tells" some other mechanism to output a specific element (0-40).
This will need at least 6 CEs i guess
1 for checking the first digitnumber with 4 change pages (0-9, 10-19, 20-29, 30-40)
4 for checking the 2nd digitnumber with 10 change pages (1 for each digit)
1 for creating the wanted element
Of course, this is only for checking which element that should be created and creating it, since you have 5 elements that should be created then a couple of CEs must control the main mechanism...
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Hmmm... why didn't I think of that? I wanted to make it with some elements table, and it's so easy this way... much less CEs and much quicker... well thanks Zomis! But I still have to solve many other problems with the inventory... (for example: when you press drop key once, you'll get teleported into the inventory, but when you press it twice or hold it, you'll cast a spell.) Hope I'll finish it later.

Btw, it's uploaded at http://www.zomis.net/rnd/download.php?id=383.
(Great, RNDFA doesn't use frames anymore...)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Tomi wrote:Hmmm... why didn't I think of that? I wanted to make it with some elements table, and it's so easy this way... much less CEs and much quicker... well thanks Zomis! But I still have to solve many other problems with the inventory... (for example: when you press drop key once, you'll get teleported into the inventory, but when you press it twice or hold it, you'll cast a spell.) Hope I'll finish it later.

Btw, it's uploaded at http://www.zomis.net/rnd/download.php?id=383.
(Great, RNDFA doesn't use frames anymore...)
Yeah, indeed this is easier... but more techniques would be interesting... no problem, just happy to help :)
Ah, those inventory problems sounds difficult... but I think it would be possible... for example, if you drop CE then CE changes to empty space, but another CE is triggered by that change and changes to another CE. Then, when you drop the CE again then the new CE reacts and knows that "Aha! This is the 2nd time within 1 second the player has dropped this CE, now let's use a spell instead of the inventory". Unfortunately, this is a little bit time-wastening, but I can't think of a better way right now.

Yeah, RNDFA doesn't use frames anymore... I thought it was about time to get rid of those - for that section on my page anyways :) More changes to the archive will come later. (And some has already come, for example the sortable category list)
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Zomis wrote: Ah, those inventory problems sounds difficult... but I think it would be possible... for example, if you drop CE then CE changes to empty space, but another CE is triggered by that change and changes to another CE. Then, when you drop the CE again then the new CE reacts and knows that "Aha! This is the 2nd time within 1 second the player has dropped this CE, now let's use a spell instead of the inventory". Unfortunately, this is a little bit time-wastening, but I can't think of a better way right now.
I've tried to do it somehow like this, but:
1. some (all?) spells are shootable and must go in the right direction
2. if I open inventory, I need to remember player's position so that when he presses "resume game" button he gets teleported back.
Well, I hope I'll be able to solve that... after all, I need some training for the rest of the problems with the levelset, because it should contain big "game engine". There's still a big chance that
a) I'll need some feature that's not implemented yet,
b) I'll find out that it's too difficult for me,
c) I'll run out of all 256 CEs,
d) I'll run out of 128x128 level, (no kidding!)
or something else... what I'm trying to say is that currently it's too soon to wait for a levelset where I'll use this technique...
Post Reply