The World Making Challenge

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

Moderators: Flumminator, Zomis

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

Post by Zomis »

Tomi wrote:EDIT: I confirm that it doesn't work. I don't know why, but custom element 19 refuses to dig the player teleporter. Btw I already modified the solution so it doesn't need wind direction. Still working on it (for now).
That's because "Player teleporter" is indestructible. And CEs can't dig indestructible elements (which I really, really, really hope will change...). I don't know if this is possible to solve another way though... thanks for the idea, anyways :)
User avatar
Martijn
Posts: 794
Joined: Sat Jun 19, 2004 10:54 am
Location: the Netherlands (Holland)
Contact:

Post by Martijn »

Tomi wrote:Btw, Martijn, I'm not sure if WMC could serve as a CE tutorial (on bd-fans.com it's under "Tutorials"), for a variety of reasons: 1. The assignments are very advanced. 2. Here people share their solutions. 3. There isn't a "right" solution, some solutions are just better than others. *But* I don't mind if this forum topic is linked from bd-fans.com, or even if you provide downloads of useful techniques/levels to look at (and they can even be in one archive), or compilation of information from this forum topic, or anything else. In fact, it may make more people find and then join WMC. But please 1. don't present it as a tutorial, but as a challenge/contest, 2. do whatever you do in a way that prefers(is this the right word?) sharing of solutions on the forum/RNDFA/somewhere, 3. use a phrase like "check how other people solved the assignments" instead of "check if your solution is right". Thanks.
If anyone other has thoughts on this, you're welcome to discuss, of course.
I've updated the RnD page of my site with these things you've said. Sorry for updating it so late, but now it's there.
Visit my Boulder Dash website at:
http://www.bd-fans.com

Watch my avatar! That orange little thing is Murphy, the Supaplex star!
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Using a "room 1a changes to room 1b when change by page of room1a - page x" will make it possible to have 60 sections per room by using 2 CEs.

Positive side: Rooms can be bigger
Negative side: More than one CE per room will be required

With room teleporting and room variables requiring 2 change pages per CE, 29 or 30 sections per CE is possible,
so the number of sections per CE is 29, which means that to build an 33x33 section (which contains 99x99 level fields), you'll need... oops... 38 CEs... so the number of CEs required per room increases quickly

Code: Select all

sectionsx sectionsy   fields       ces
6              5       18*15        1
8              7       24*21        2
9              9       27*27        3   <--- This is Alan's Zelda size
11             10      33*30        4
15 ces for world making
10 ces for room variable tracking
1 ce for room teleportation
256 ces in total
256-(15+10+1)=256-26=230
Which makes it possible to create: 230 1-ce-rooms or 115 2-ce-rooms or 76 3-ce-rooms or 57 4-ce-rooms
But of course, using some extra techniques, variable room size is probably also possible :)

I haven't made a playable example level for any of these things yet, but I've tested a little and it seems possible :)
Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

Btw Zomis, could you please explain the room variables in bigger detail? I probably understood them once (long time ago), but today the level make no sense to me :-) I know what bitmasks are and that they are used in it to store if individual diamonds where taken.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Do you mean how to use them (the CE technique) or what they're good for? I guess you mean the CE technique, since I guess it's quite oubvious what they're good for... but I'll probably explain what they're good for as well :P

First of all, the level which uses this technique: http://www.zomis.net/rnd/download.php?id=614

The idea of the room variables is to "save" which emeralds in a room which has been taken and which that hasn't been taken. So how to do this in CEs?
If it's possible, we need to use both the CE Score and CE Value. CE Score for storing a variable in the CE, and a CE Value to check whether or not the current CE should be an emerald or empty space.

And then also, if we can check whether or not a CE should be an emerald. We need to save the new value when the emerald has been taken.

So, in short:
1. Get a CE Value for each CE
2. Make a CE Value check, if CE Score has CE Value bit, create emerald
3. Save new CE Score when an emerald has been taken.

So, for the CEs:
When a room is created, the CE "Machine control 2" is created. It changes after 3 frames, triggering a change page for the "Initialization Element" CE. This changes to "Get a ce value", which uses 2 change pages (1+3) to set the correct ce value for the element. And then, change to "CE 55" (I don't know why I haven't given that one a name) when they all have been given a CE Value. (CE Values = 128/64/32/16/8/4/2, 7 different bits)

When a new CE 55 has been created, the "Machine controller" at the bottom of the level changes and creates a CE 56, and at the same time copying the CE 56 value (which is equal to one of the seven bits, the first time it's 128).
The CE 56 element passes above the Machine controller, the CE 56 gets a CE Value (which is equal to the current room's CE Score, which the Machine controller has set to it's CE Score by it's 3rd change page). Then also the CE 56 decreases it's CE Value by the Machine Controller's CE Value (which is equal to the current bit).
These two things (CE 56 gets CE Value and decreases by CE Value of Machine controller) were only CE actions, so no real change has been made yet on the CE 56. This new CE Value is copied back to the Machine Controller's CE Score by the Machine Controller's 2nd change page (which occours by CE 56 page 4, that is - the CE 56 has decided that an emerald should be created).

Now, a little calculation. Imagine the CE Score is 255 (the default value of all the room elements), and the current bit is 128. 255-128=127. So the result is above 0, which means that we can output an emerald at the current position (remember CE 55?). CE 55 changes to an emerald when CE 56 change page 4 occours (a simple delay).
So then this is repeated for all 7 bits (all 7 "get a ce value"-elements)

But then imagine if the CE Score for the room is 170 (binary 10101011), what will happen?
First pass of CE 56 --> Machine Controller's CE Value = 128; Machine Controller's CE Score = 171; 171-128=43 --> Create emerald, process next bit
Second pass of CE 56 --> CE Value = 64; CE Score = 43; 43-64=-21
Ouch, here we encounter a negative CE Value, what happens? CE 56 page 3: Change to empty space when CE Value gets 0. This change page triggers page 2 for CE 55 -> Change current bit position to empty space. And so, the new value is not set back to the Machine controller's CE Score. We'll continue with the next bit.
Third pass/third bit --> CE Value = 32; CE Score = 43; 43-32=11
CE 56 does not trigger page 3, but instead it triggers page 4 (CE Delay 1 frame) --> Create emerald, set Machine Controller's CE Score to new value (=11)
Fourth bit --> CE Value = 16; CE Score = 11; Result = 11-16=-5. Sorry, no emerald here. We'll continue to the next bit.
Fifth bit --> CE Value = 8; CE Score = 11; Result = 3. Aaah, now the CE 56 can be alive for another frame, triggering page 4. So create an emerald!
Sixth bit --> CE Value = 4; CE Score = 3. Result = -1. So close, yet so far away. A value of 0 or below is still 0 or below. So no emerald here.
Seventh bit, final bit --> CE Value = 2; CE Score = 3; Result = 1. Yay! We have another emerald!

So, from this CE Score of 171 (binary 10101011) we've got 4 emeralds at bits 1, 3, 5 and 7 (reading from left to right).

So then, a question:
Why not using 8 bits? There's 8 bits from 0 to 255 after all.
Answer: Using the 8 bit would always return in empty space for the first bit. Since the 8 bit's value is 256, 256-255=-1. Using an 8 bit with the value 1 wouldn't help either. Since 1-1=0. And the ce value "gets 0" when it reaches zero or below. This is the same reason that the CE Score must be an odd number. Using the CE Value of 128 would return in no emeralds at all, since 128 (the bit) - 128 (the score) = 0

So what about storing the new CE Score for the room element when an emerald has been taken? Let's look at the "emerald".. what can we know about it?

1. It's floating
2. It's got to be a CE.
3. Why is it floating? Why isn't it set to "collectible"? Why isn't it snappable? One answer: Because it would be buggy! I tried making it collectible and such, but it didn't work in some situations. And if it had gravity, standing below it and walk upwards would make it drop down below you.
4. So, what does it do really?
It gives you score for it, and decreases gems needed by 1.

For the CE Score change - let's check the Room CEs...
Change page #26 (after the creation of the rooms), decreases CE Score by CE Value of trigger when touching "Decrease CE Score". Decrease CE Score gets created by Machine Controller when player enters the emerald element (which apparently seems to be called "Diamond" in this level), and gets it CE Value by the "Digged emerald" element which is created when the player enters a "Diamond" CE.

So, I hope you understand this now, if you have the strength to read through that post ;)

Let me know if you want me to explain room teleportation as well :D
BrownSky
Posts: 27
Joined: Mon Sep 24, 2018 4:04 am

Re: The World Making Challenge

Post by BrownSky »

Hi, apologies for dredging up old posts from the early noughties.

This discussion looks excellent, there is a lot to learn here.

One problem - all of the links are to zomis.net, and so they do not work.

Is there anyone who downloaded any of the files at the time, and still have them, and could re-upload them to the end of this discussion?

... thus making it useful, instead of some kind of tragic grand "fall of the Roman Empire" type thing :-)

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

Re: The World Making Challenge

Post by Holger »

Unfortunately, the links to "zomis.net" do not contain file names, so even if I might have downloaded them once (which I probably did), I have no idea which files they are related to. :-(
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: The World Making Challenge

Post by filbo »

According to https://web.archive.org/web/20070328223 ... =10&page=3, its title was 'The world 2x2 with things (095.level)', size 45kB -- maybe those details help you find it in your slushpile?
tmp.png
tmp.png (236.78 KiB) Viewed 8506 times
ellipirelli
Posts: 43
Joined: Mon Apr 21, 2014 4:37 am

Re: The World Making Challenge

Post by ellipirelli »

I'll try to upload or send it to Holger
Attachments
The_World_Making_Challenge.zip
(17.59 KiB) Downloaded 218 times
Post Reply