PDA

View Full Version : Infinite Level Technology (tm)



Gilgamesh
11-09-2008, 09:23 PM
Preface
By popular demand (well, about two people seemed vaguely interested in the concept :) ) I'm going to explain how to make your level seem infinitely long, as showcased in my level Midnight Train. Prepare for a great wall of text.

Required Parts
A) Terrain Piece.
This should be a fairly large object, preferably three layers thick. This object should be shaped in a way to form a continuous rectangle when multiple of them are placed one after the other (think Lego). For my own level I used a diamond shape lying on one of its sides.
Underneath this object, stick a set of wheels going at the desired speed and direction.
Additionally, you need to add a rocket with a strong boost going in the same direction as your wheels, with a Magnetic Key Switch attached.

B) Terrain Generator.
This is simply a small, thin slice of dark matter, preferably placed at floor level. On it should be a Magnetic Key set to match the switch on the Terrain Piece and an emitter set to create the Terrain Piece somewhere nearby (so that the rocket activates from the Magnetic Key Switch).

C) Blank Background.
The background should be set to blank to avoid giving a fixed visual cue, which would break the illusion.

How It Works
1- The Terrain Generator will create a Terrain Piece.
2- The rocket on the Terrain Piece will activate, sending it further along until the rocket stops.
3- The Terrain Generator will create the next piece.
4- The rocket on the next piece will activate, sending it crashing into the first piece and locking them together.

Setting Up
1- Place the Terrain Generator wherever you want the level to "end" and let it generate until you have the desired length of terrain and there are no gaps between any piece.
2- Count the number of pieces and set this number as your "Max Emitted at Once" for your emitter. Additionally, you could also determine the time between when a piece is generated and when it disappears and set this as the "Maximum Lifetime".
3- Place fixed obstacles before the edge of your first and last Terrain Piece (3-layer thick dark matter horrible gas for example).
4- Place and fix your Entrance Gate within the boundaries of your level and save.

End Result
The player will land on the Terrain Piece, which is moving in one direction. As long as they continue to move in the opposite direction, new Terrain Pieces will appear, creating the illusion of endlessly moving in one direction.

Known Limitations
A) Depending on the complexity of the Terrain Piece and the maximum limit of the emitter, this setup will chew up between 40 and 70% of the thermometer. So you should probably save that multi-part 5-screen-high epic boss for another level :rolleyes:

B) You can only choose one direction for the Terrain Pieces, as trying to change the direction of the wheels will not work for several reasons. However, stopping the pieces should be possible, but will be difficult to achieve.

C) Any decorations, obstacles or vehicles you place on the terrain should be generated by emitters or set up in a way to never fall beyond the edges of the level.

D) I have yet to devise a way to generate hills or otherwise add variations to the terrain. So you'll mostly be looking at a long, flat, continuous level.

E) Care should be taken to never let the player see the inner workings, so be careful with those cutscene cameras and camera zones.

Known Bugs
The thermometer does not like emitted objects being saved in a level. Every time you enter Create mode with emitted objects in place, the thermometer will skyrocket to a much higher point than it should be. The only way to fix this is to let your level play out until the thermometer goes back down to its proper level.

Afterwords
Well there you have it. Although the concept seems simple at first glance, getting it all working took some time, and also revealed some rather annoying bugs. I hope people can use this to make some interesting levels though. For myself, I'll try to refine it and make it take up less room. If you want, you can get the terrain piece and generator as prizes on my Midnight Train level. Toodles :hero:

Stuff
11-09-2008, 09:27 PM
what......

Voltiare
11-09-2008, 10:52 PM
That's awesome. I don't care if it's unpractical because of how much space it takes, it's still ingenious if it works.

ConfusedCartman
11-09-2008, 11:27 PM
Awesome concept. I am off to try Midnight Train right now.

lionhart180
11-10-2008, 01:23 AM
This could be apllied to a backgroudn as well, IE make what appears to be a rocket, and when youg et in set this up witha generic backgroudn as the "terrain" Piece.

Then when you have it turn on, make the terrain generate the peices, making the illusion of a background shooting past the rocket.

Then have the rocket, witht eh generator attached to it, lift up and move past a wall to a complete different setting, and when they get out, boom, cool illusion.

IE have them get ina rocket, shoot past terrain, and end up on moon terrain...

Cloud
11-10-2008, 09:31 PM
tl;dr



Just kidding, I actually read the whole thing, and it seems like a very unique and interesting concept. I don't think I could possibly recreate it, but I'm going to go check out your Midnight Train level now to see the effect. Sounds really cool.

Pulov Yuran
11-11-2008, 01:56 AM
That's a pretty clever idea. Cool.

Zorez
11-16-2008, 08:22 PM
Awesome post!! Thank you for the great idea. :)

AtheistSeaOtter
11-20-2008, 11:27 AM
That's pretty good, I'll have to check this out later.

I was thinking of something along the same lines but for a chase scene with sky/background blocks that fell at an angle from an emitter. I'll have to see how you've done it.

Gilgamesh
11-20-2008, 12:37 PM
One of the three levels I'm currently working on is an improvement on this concept. I have found that by making the terrain pieces bigger it significantly lowers the Thermometer consumption. I have also found that making it roll too fast makes the rockets useless as they don't significantly alter the speed of newly emitted pieces.

The current problematic that I'm facing is that I want different terrain pieces to be emitted depending on a "timer" so that the landscape becomes significantly different as the level advances. I also want the whole system to start from a stopped speed and gradually accelerate.

I'm still working out how to go about those two features :)

DaSaintFan
11-20-2008, 05:29 PM
not sure if this works Gilg.. i never tried it, but can you emit into the "thin background plane"?

Set up two emitters, one for the thin background and one for the "fat" back plane?

So if you set up the thin background for say 3 seconds.. and then the fat-back plane for 5, you'll have two objects scrolling through at near similar times? ALthough you'd probably end up with gaps in there..

Gilgamesh
11-20-2008, 05:40 PM
Well, the problem with emitting in the thin layers is that, the frontmost and backmost ones will not catch onto the infinite terrain, so they'll fall down. The only way to have it move along with the level is to have them occupy an additional layer (I did this with the mountains in my Midnight Train level).

DaSaintFan
11-20-2008, 09:29 PM
That's why I put the times on the two emitters as close as they are... I'd think that if you're lucky enough (and you make them large enough) the background one should "fall into" the smaller one in the front?

Stuff
11-20-2008, 09:33 PM
You cant tm something like that! lol

Shanmuir
11-20-2008, 09:48 PM
The current problematic that I'm facing is that I want different terrain pieces to be emitted depending on a "timer" so that the landscape becomes significantly different as the level advances.


Try making different emiters, aktivated from a set of magnetic-switches wich are atached to a block that moves along a path. Place the Magnetic-Keys along the way of it and adjust the switches to trigger individualy. this could be use for alternating terain all the time. like piece 1-2-3-2-1-2-3 and so on, or even make the line longer and place more keys along the way. or even wheels with keys on them, all with different speeds and each time the switches pass, it uses on of the emitters. Random madness :)


I also want the whole system to start from a stopped speed and gradually accelerate.

same technic as above but only one set of switch and key. Set the switch on speed and let the key slowly be pushed/pulled to the switch.

hope that helps. i like your ideas, keep em coming.

LittleBigUniverse
11-20-2008, 09:59 PM
very neat . keep it up

whatisnarwhal
11-21-2008, 06:50 AM
I never would have thought of this... Thank god you're here, right? :)

xbriandeadx
11-24-2008, 12:14 AM
brilliant. i love it. I'm glad you shared that with everyone i may look into this with future levels.

BloodLustKaNiBaL
11-24-2008, 02:11 AM
Great post, that's what I love about LBP. The only limit is what you think...oh and maybe the gauge on the left side grr

UmJammerSully
12-01-2008, 04:01 AM
Whilst pretty clever and gives an awesome effect, there is a minor flaw with the fact that it makes jumping kind of....Dodgy. Not sure how to describe it.

It's not too bad, just a mild annoyance.

Gilgamesh
12-01-2008, 11:39 PM
Whilst pretty clever and gives an awesome effect, there is a minor flaw with the fact that it makes jumping kind of....Dodgy. Not sure how to describe it.

It's not too bad, just a mild annoyance.

I know what you mean. Don't worry though, my next project involves less walking on the terrain... I'll leave it at that for now :p

Also, I think I've found the perfect solution to the problems I was previously stuck with. Since I've now published one of the three levels I was working on, I can concentrate more on this project now. Look for it in Aisle 3 :hero:

lionhart180
12-02-2008, 08:38 PM
This is not really new.

Several unlockable areas in the storyline of lbp use this exact concept

Good example is the fly through electric tunnel level on the collector's layer. It does this exact infinite level thing, but instead of rockets it uses a bunch of rolling wheels underneath that you can see.

Gilgamesh
12-02-2008, 10:23 PM
This is not really new.

Several unlockable areas in the storyline of lbp use this exact concept

Good example is the fly through electric tunnel level on the collector's layer. It does this exact infinite level thing, but instead of rockets it uses a bunch of rolling wheels underneath that you can see.

Indeed, unfortunately I had not made it to that level by that time. I probably would have based myself on their system had I known about it. In their system the wheels are fixed to the level, while in my system the wheels are generated as part of the terrain. Also, the level you mention is incredibly short, while I prefer to go for more length and freedom.

Edit : On second thought, I think I prefer the way mine works for the simple reason that if I want to make a level with infinite terrain, all I have to do is plop in the Terrain Generator object and voila. No need to set up a complex set of wheels throughout the level, just need to hit Play for a handful of minutes and the terrain makes itself :)

Maedhros
12-04-2008, 07:35 AM
This sounds really neat. I've been thinking of doing something very similar to this recently. I haven't gotten a chance to try your level, so I'll go do that :)

chillum007
12-07-2008, 04:53 AM
Very interesting and ingenious way to make an infinite level! I will try your level one of these days.....

DRT99
12-08-2008, 12:54 AM
Need some Emitters to Spawn a neverending wave of Baddies! Buahahaha!

Colby
12-08-2008, 02:56 AM
That sounds cool.

snowflakecat
12-10-2008, 08:43 AM
Edit : On second thought, I think I prefer the way mine works for the simple reason that if I want to make a level with infinite terrain, all I have to do is plop in the Terrain Generator object and voila. No need to set up a complex set of wheels throughout the level, just need to hit Play for a handful of minutes and the terrain makes itself :)

Your way takes up too much thermometer since you're generating rockets and wheels. There's a way to make it like MM's way but even better. It's nice that you've thought about it, though ;-)

Gilgamesh
12-10-2008, 10:43 AM
Your way takes up too much thermometer since you're generating rockets and wheels. There's a way to make it like MM's way but even better. It's nice that you've thought about it, though ;-)

Well, I've worked out the thermometer problem. Easy fix really, I don't know why I didn't think of it before. Just make the terrain pieces wider :)

I've also thought of a way to dynamically adjust the speed of the terrain, which could also mean I no longer need the rockets at all.

I'll be making a new level showcasing my improvements... sometime during the next year at this rate :)

Elbee23
12-10-2008, 11:58 AM
I'll be making a new level showcasing my improvements... sometime during the next year at this rate :)

Wow! That will be in less than one months time! :p

That's a joke, by the way. :o

Pinchanzee
12-12-2008, 07:57 PM
Can't patent something that already exists :)
It was in one of the mini games... where you use the jetpack to avoid the electrified walls...
But pretty cool that you've made a way to do it for your own level :)

Gilgamesh
12-12-2008, 10:54 PM
Can't patent something that already exists :)
It was in one of the mini games... where you use the jetpack to avoid the electrified walls...
But pretty cool that you've made a way to do it for your own level :)

Aww, but I heard that with the state of the U.S. Patent Office, we could practically patent natural phenomena :)

Also (tm) is for trademark, which is different from a patent, it just means it's a phrase I invented and use, and it's only there for fun anyway :p

The Comedian
02-03-2009, 12:06 AM
i stumbeled upon your midnight train level a while back and i immediately knew that the train was on some kind of conveyor belt

obvious give-aways.

1.you will always land perfectly at the finish line.

2.the back ground is very repetitive.

and for the wanting to make the ground change you could have multiple emitters emitting different terrain pieces which are activated by a very slow moving piston attached to the inside of a long track and a small block with a magnetic key on it moving past several magnetic keys that are attached to the emitters. complicated enough? jk:p. it's actually fairly simple when you do it i :)could even send you an object that does that

Vanemiera
02-10-2009, 03:20 PM
I don't know if you believe me but i had the same idea independly.
Here are my expiriences:

In my first level i also used big land segments. Worked fine but cuts of a large bit of the useable area. I used wheels attached to the floor. To stick the pieces together i just adjusted the emitter to give them some initial speed.

Now i'm making a second of this type. A really fast one. I managed to keep the segments somhow small and tall by preferable using the thin layers to cover the ground exept from the floor and ceiling( it's a tunnel so the repetition is not that bad).

So now i got the problem with the termometer. I found out that the engine precalculates how much the emitted object are gonna take to simulate. I circumvent this by making the emit interval very large (70 seconds or so). Now i connected the emitter with a very often aktivated magnetic switch(one shot). SO the system thinks that the emitter only creates one object but in fact there are more.

I also tried to make the speed increase slowly but that doesn't work because the segments somehow forget that they belong to the emitter which has a fixed number of maximum objects emitted at one time. So they stop disappearing and crash the whole row. The only way that works for me is the timed way. So no increasing speed for now...

I hope that i could help in any way.

Wonko the Sane
02-15-2009, 04:49 PM
Hi Gilgamesh,

Your design works really well, except for the thermometer-bit. But I read that you more or less solved that by making the pieces longer. I'm experimenting with it myself (for a future level, you will be credited) and just thought of another improvement (haven't tested it as yet, my TV gave up on me recently - no rhyme intended): you could ditch the rockets by using the speed feature of the emitter. Setting the linear speed of an emitted piece (and aiming it right by using grid) could have the same or even a better effect than a rocket. Even better perhaps, because this speed feature can be set ridiculously high. Oh, and also: the terrain pieces are extremely light. Couldn't you just ditch 2 wheels while your at it? Regards

Gilgamesh
02-16-2009, 01:52 PM
Good comments guys. It should really come in handy for my future levels using this technique. I'm glad people are building on this concept, or figuring it out for themselves. :)

Vanemiera
03-26-2009, 12:19 PM
Oh it seems that zPlayer also builds a level of this kind.

Here is the link:

http://www.lbpcentral.com/forums/showthread.php?t=9196

Fjonan
03-26-2009, 01:02 PM
Mh a pity it takes up so much thermo, about the moving thin layer, think about pushing them? Or ... maybe making a moving one layer think "cart" that has some toothes that catch on the thin layer somehow ... dunno just random thoughts.