You need to log in to create posts and topics.

Random Map Generator

I can't make it work... it's strange because I already have Java and Java Run Environment installed... Pakrat and BspSource for example work perfect... What should I do to make it run? :)

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
josepezdj wrote:
I can't make it work... it's strange because I already have Java and Java Run Environment installed... Pakrat and BspSource for example work perfect... What should I do to make it run? :)

Type in your console

Code: Select all
java -jar chambergen.jar > output.txt

What error do you get?

This is cool. I figured it was dead to be honest though, but kept checking in from time to time.

I was able to get it to run just fine with the command you posted. However, I've had the thing running overnight for about 7 hours now--which is fine by me, but I was curious if that was generally the time it takes for this? (It's at 322 out of 360, right now)

A few hours gave me the impression it would be less than five, which is why I am curious. The time it takes doesn't bother me, but I just want to make sure I did not mess up royally somewhere.

Edit: Maybe I should also note that the counter reset a few times. Once at 34 and again at 120. It's at 347 as of this edit.

Netherskate wrote:
I was curious if that was generally the time it takes for this?

Depending on your computer's speed, it might take a day or two.

Netherskate wrote:
the counter reset a few times

If the counter resets, then this means that the AI just had a stroke of genius and improved the test chamber. It this doesn't happen for a long time, the test chamber is considered done. Then there is a short cleanup phase that only takes one or two hours.

If you adjust the source code, you can set different times. But if the time is too low, then the generated test chamber will be stupid.

Thank you for your quick reply.
In advance, I'm sorry for continually eating up your time.

At this point the program has finished generating the text file. I can upload the full test chamber text which would probably be a lot more helpful, but I am still curious. The descriptions of 0-7, (as for what I have put in this post, 0-2) are fine with an exception of 2, which is blank.

Code: Select all
0:[[starting location][portal surface on wall][storage cube dropper]]
1:[[exit location with a door sealed by two cube buttons]]
2:[]

There are the descriptions of the connections, and these are all of them that involve room 2.

Code: Select all
from 2 to 3: a deep hole with a laser field in the middle, which is deactivated when button '1' is pressed
from 2 to 5: fizzler
from 2 to 6: a high cliff that one can jump down but not climb up or throw cubes up

Still working on building it in PTI to get an idea for it before I go into Hammer and do it there, I am not sure what I should assume room 2 is, though.
I would use GraphViz as suggested, but I also have no experience with it as of yet.

On another note, in the first post you have a link to http://www.superiki.de/portal2/solution19Apr2013.html , which actually has kinda-visualish layout on there showing where things should be. Was that made by the program at the time, or otherwise?

I took a peek at the source. Apparently it has a bank of pre-defined path types like "faith plate over water", "high cliff", and "cliff with grating", and different properties are marked down for each one (traversable in one direction, traversable in the other direction, can see from one side to the other, can pass boxes through, etc). The puzzle generator adds nodes together into a puzzle. Interesting stuff.

A future improvement could possibly be dynamically adding the button1, button2, button3 devices like fizzlers and lasers at run-time so the user could adjust how many buttons are in the puzzle. Of course that would increase the run-time a lot, right? Hmm.

I'm running it right now and am planning on running it overnight, it's at 153 right now but I think it will reset soon. I'm also trying to port it over to Processing for a possible chance at a visual display the chamber-in-progress, or a configuration screen, or something, just because I'm bored haha. It's a headache because Processing has no support for enums. I'm managing... so far... barely... You're a better programmer than I am though. It's all so confusing and well-written, unlike my code haha

Edit: I just realized that the program is only using 1 CPU on my computer, if there was a way to increase this to using all the cores maybe it would generate the puzzle faster. I did set the priority of the program to "Realtime" in the Windows task manager also, maybe that will also speed it up.

Image
Netherskate wrote:
On another note, in the first post you have a link to http://www.superiki.de/portal2/solution19Apr2013.html , which actually has kinda-visualish layout on there showing where things should be. Was that made by the program at the time, or otherwise?

The grid layout was generated by an older version of the program. I have discontinued the grid layout to make it possible for the program to generate better test chambers. I do not use any fancy GraphViz commands. For example my graphviz file test.gv just looks as follows:

Code: Select all
digraph  {
   v1 -> v3;
   v1 -> v4;
   v4 -> v2;
   v5 -> v0;
   v3 -> v5;
   v0 -> v6;
   v2 -> v6;
   v5 -> v6;
   v7 -> v0;
   v1 -> v7;
}

GraphViz then draws the layout for your rooms.

Netherskate wrote:
I am not sure what I should assume room 2 is, though.

Room 2 is an empty room without any portalable surfaces. As you stated, is has interesting connectivity behaviour to the other rooms. The fizzler "from 2 to 5" for example should be walkable in both directions. A better description would be "fizzler between 2 and 5".

quaternary wrote:
A future improvement could possibly be dynamically adding the button1, button2, button3 devices like fizzlers and lasers at run-time so the user could adjust how many buttons are in the puzzle.

The number of buttons ranges from 0 to 3 at the moment (plus the two that trigger the exit). In principle it is possible to fix the number of buttons by setting the fitness-value to zero for every chamber that does not have the correct number of buttons. I am not sure why you would want that though. But yes: With the source code you can make the program generate puzzles according to certain specifications.

quaternary wrote:
I just realized that the program is only using 1 CPU on my computer

I was happy to get it run on 1 processor. I didn't have the time to add multiprocessor support. I agree that this would be a very nice feature.

Cyberwurx Web Hosting

Alright, the program finished running and I and assembled a p2c file. The end result was quite simple logically but very fun to play !

My output.txt is here, slightly edited http://pastebin.com/nVJ1RP5n and I uploaded the map onto the workshop here <Deleted map> if anyone else would like to see it. I merged rooms 0 and 5 together to reduce the amount of walking a little bit.

Here is the graph that I created using my WIP graph program - I still need to add arrow drawing to the program :P http://puu.sh/hrA5V.png

I haven't finished my port over to processing yet but it's coming along. Processing has the ability to export to Javascript, which might be kinda interesting, being able to play with the generator's parameters in your web browser. I could also make a visual representation of the graph the program outputs, maybe even a peek on the inside of it. Who knows.

Nice work !

Image

My full text is here, minus the processing stages and whatnot--I originally copied the file and edited that out of the copied one, but then I decided to not be smart and rename the original and then somehow overwrote it. Not a huge deal though. If I managed to get it right in GraphViz, this is the layout, or general layout.

I need all the explanations because I'm terrible.

Code: Select all
from 2 to 3: a deep hole with a laser field in the middle, which is deactivated when button '1' is pressed

This gives me the impression that Room 2 is above Room 3, and you'd be unable to jump down into Room 3 unless you deactivated the laser field.

So for example I'm thinking it'd be vaguely like this...
http://i.imgur.com/rdbP6B0.jpg - Assuming you'd be in Room 3, and be able to look up and see the ceiling of Room 2 but not be able to portal up to it directly from 3.

But with the layout shown by GraphViz and when I try to make it in PTI, Room 2 is connected to Room 5 with a fizzler, and if it's above Room 3 like I think? I'd do like a super ugly long hallway thing, and as for the fizzler I am unsure as to where exactly I would put it, beyond either somewhere in the hallway or have two fizzlers on both ends...

I feel like I may be wrong about the whole thing?

A part of me wanted to do a long staircase part, and/or faith plate(s) up to 2 from 5, but I was not sure. Staircases = long walks, which are not fun.

And I also need clarification on these,

Code: Select all
from 2 to 6: a high cliff that one can jump down but not climb up or throw cubes up
-----
from 6 to 7: a grating on top of a high cliff so that one can only see in one direction
from 7 to 0: a grating on top of a high cliff so that one can only see in one direction

Because these confuse me too.
As for 2 to 6, I'm thinking, you're looking up at a (256 units high) ledge, putting a portal up there since there is a portalable surface, and doing the same at where you're standing and walking into said portal.
From 6 to 7 I have no idea what this would look like?

And then for 7 to 0... maybe I'll have to change the height of Room 0, but the room would have to be pretty tall if we're including how 2 is above 3, and then 2 has a cliff up to 6...
I feel like I should somehow merge some of these rooms, and or just change it entirely or something.

Perhaps I somehow messed up the layout in GraphViz, or otherwise. I sincerely apologize for asking questions that are probably super mega common sense.

Luckyyyy, your generated chamber had 2 buttons :0

Netherskate wrote:
But with the layout shown by GraphViz and when I try to make it in PTI, Room 2 is connected to Room 5 with a fizzler, and if it's above Room 3 like I think? I'd do like a super ugly long hallway thing, and as for the fizzler I am unsure as to where exactly I would put it, beyond either somewhere in the hallway or have two fizzlers on both ends...

Maybe it's just a matter of changing your view, here's what I got when I shuffled around your graph a bit, there's no excessively long lines.
Image

Quote:
A part of me wanted to do a long staircase part, and/or faith plate(s) up to 2 from 5, but I was not sure. Staircases = long walks, which are not fun.

That's what I used in my map. You can see the plate at the top in the thumbnail. My layout required three rooms above each other in a cycle (A above B, B above C, C above A), which is completely impossible to make without a faith plate, world portal, or other "booster" item.

I think faith plates leading to the top of a cliff are "free" in that they're pretty much the same as hallways. Like both of these rooms have the exact same logic behind them.

Image