Home    LBP Showcase / Reviews / Recommendations    Level Showcase    Cool Levels
#1

Life [An Experiment in LittleBigCellularAutomata]

Archive: 25 posts


I present to you a working Game of Life machine in LittleBigPlanet 2.

In case you aren't aware of John Conway's Game of Life, it is a simulation of a grid of cells with very simple rules which allow for infinitely complex behaviour.

The rules are as follows:

1) If a "dead" cell is surrounded by exactly 3 live cells, it comes to life.
2) If a "live" cell has fewer than 2 or greater than 3 neighbours it dies.

The logic for these rules is contained within a single microchip on each cell and, theoretically the grid could be as large as you wanted and still work. Unfortunately I could only manage 12 x 12 without a significant decrease in game performance, despite only taking up about 20-25% of the thermometer; if I get enough interest I may upload a less "showy" version that is much larger to allow for more intricate patterns, it'll work but it won't be very smooth.

The controls are as follows:

Left Analog Stick: Moves the Cursor
X: Creates a Cell
Triangle: Deletes a Cell
R1 + X or Triangle: Creates/Deletes All Cells on the Board
Circle: Turns the Simulation On or Off
L1: Adjusts the Simulation Speed
Square: Exits the Level

This level was largely a learning exercise to teach myself the new logic tools and also an experiment in level design. Far more effort went into the appearance than the logic; the cell logic was done in a weekend, the actual level itself took me nearly a month!

Please have a go and let me know what you think, any and all feedback is welcome!

(Tip: Try creating one of the "Glider" shapes that are etched into the frame!)
http://lbp.me/v/xyv2zw
2011-02-17 22:36:00

Author:
Unknown User


Added to my queue! I love to see other peoples takes on this.

Did you do wireless logic between cells, or wired? Right now I have a theory that wired will be able to run much faster than wireless, however the game crashes if I try to hook up large blocks. So I'm going to try a hybrid wired/wireless and see how that fares in comparison. (Though I'll keep wireless logic for the clock signal and set/reset of cells.)
2011-02-18 03:19:00

Author:
Tygers
Posts: 114


Very cool idea! And a great presentation.2011-02-18 03:37:00

Author:
lochnar
Posts: 59


@ Tygers

It's entirely wireless. Each cell is it's own separate entity with a tag that is either on or off, and the logic to count the neighbouring cells. I decided very early on that I'd likely pull all of my hair out before I managed to wire every cell into every other cell so I had to make it wireless where possible!

I've added your version to my queue, will take a look tomorrow. (Seems you beat me to it, I knew I shouldn't have fiddled with the decor so much! )

@lochnar

Thank you! Appreciate the feedback! Adding your level to my queue also!
2011-02-18 04:34:00

Author:
Unknown User


Regarding the grid-smallness and performance: How many tag sensors does each cell have? You might improve performance and possibly increase the number of cells you could have if you reduce the number of tag sensors.

It seems like you would only need 3 tag sensors for the actual game logic plus one for the update clock and one or two for setting the cell as alive or dead with the cursor: just use a large enough radius to only include the eight neighbors (tag sensors exclude tags inside their own microchip) and have one set to detect 2, one for 3, and one for 4. (NOT 2), OR-gate that with 4, and that signal tells you if the cell should die. The 3 AND (NOT 4) tells you that the cell should be set to alive (don't even need to AND that with whether it is dead).

(tag sensors set to detect N tags will activate when N or greater are in range)

Also are you sure that the slowdown when you have a large number of cells isn't create mode only? In one of my levels, I get pretty ridiculous slowdown in create mode even though in play mode and preview mode it runs full speed.
2011-02-18 04:55:00

Author:
phort
Posts: 74


phort, when I tried doing wireless, I saw slowness in play mode. Mine wasn't so clever though, I was still stuck on the wired way of doing it. So I had 2 tags and 4 sensors in each chip. It was REALLY slow in create mode, but even in play mode it was slow; note that only the logic was running slow, it wasn't overall sluggish like in create mode. My sackboy moved around smoothly enough.

GHudston, that presentation is slick! That blows my dinky little thing out of the water in a heartbeat. And don't feel bad, I wasn't the first either, there were at least 3 before me published, plus one from LBP1.
2011-02-18 05:04:00

Author:
Tygers
Posts: 114


It's definitely quicker in play than in create, even my 12 x 12 grid has a fairly poor frame rate in create mode which I imagine is due to having to render all of the logic. That being said, the main reason that I didn't make a larger grid was because the game dramatically dropped the resolution of my stickers so that you could no longer read the instructions; I'm not sure why this happened but I could only make it go away by reducing the grid size. After I had a working Life grid, my focus became making the level pretty as practice in preparation for doing something "proper"; as I say, the whole Game of Life thing was just to teach myself to use the logic to begin with, then I became enamoured with the idea of building a physical, clockwork Game of Life machine.

My cells were incredibly clunky to begin with; I had a series of sensors angled precisely at each of the 8 neighbouring cells, which fed into a counter that powered one of two sequencers (set to "positional"), one when the cell was alive and one when the cell was dead. Each sequencer had a battery or batteries positioned so that they would activate a toggle when the counter was at a set number.

It was messy, thermo hungry and complicated as hell. But hey, it was a learning exercise and I was making it up as I went along!

My current cells still have 8 sensors (I don't know why but I didn't think to just use a handful and take "4" as meaning "4 or more" and so on. Bit of a face palm moment, there!) but each one is set to count from 1 to 8 respectively (along with a battery to represent 0) and these are run through a selector so that only the highest signal is used. From there it's just a case of running it through to a toggle to determine if the cell is alive or dead, having a method for switching the cell on and off manually and, in the case of my version, having the cell slide in and out (which, for reasons I cannot fathom, will only work if the in/out movers are placed on their own microchip within the cell's chip. If you don't do that, the cells just refuse to move.)

I may test out a more minimal version and see if I can't make a version with a larger grid and fewer bells and whistles. But I do love my bells and whistles!

Thanks for the kind words, Tygers. It's the sort of thing that makes me more likely to go through with a bigger project.
2011-02-18 06:23:00

Author:
Unknown User


Just played your level and it was a lot of fun, first of all the presentation.
The menu system and the background were amazingly well made and greatly contributed to the level.
The game itself is very original and different than anything I've seen so far.
Overall, I like the concept and the execution, and I'm glad to see original things like that liven up the LBP2 experience.
Great Job.

Please check out my level: SIMON! (https://lbpcentral.lbp-hub.com/index.php?t=49736-Simon!)
2011-02-18 07:12:00

Author:
saarraz1
Posts: 86


My cells were incredibly clunky to begin with; I had a series of sensors angled precisely at each of the 8 neighbouring cells, which fed into a counter that powered one of two sequencers (set to "positional"), one when the cell was alive and one when the cell was dead. Each sequencer had a battery or batteries positioned so that they would activate a toggle when the counter was at a set number.

It was messy, thermo hungry and complicated as hell. But hey, it was a learning exercise and I was making it up as I went along!


My first attempt was all wired up, each cell wired to it's 8 neighbors, with a series of bastardized half and full adders to count the number of neighbors. (Bastardized since they only needed to count 1, 2, 3, many, I cut out some of the logic that would be needed for proper adding.) It was fast (That's the one you see on my level) but hell on the thermo. Wiring was a pain but I had a trick to make it easier, taking advantage of the fact that dropping a chip over another chip merges the wiring.

My second attempt I switched to analog logic. It was similar to yours, except each cell was only wired to its four cardinal neighbors. The top and bottom neighbors would sum their left and right neighbors and pass on the sum, to save 4 additions and 4 inputs to each cell. This at this point was still wired. It was a pain, and LBP2 would crash if I tried to wired up anything over 8x16.

So then I switched to the same logic, but wireless. Oh, my first discovery of the joy of wireless! It took me all of 15 minutes to modify the cell, add a grid mover to select cells and set/clear them, and copy enough to make a glider gun. And it ran slow.

Just now I tried the facepalm version (Yeah I didn't think of it either, and it's so simple!) and that one was even friendlier on the thermo, there is still some slight slowdown of LBP2, but it's not bad at all. Again I'm running a glider gun (1/2 thermo to get that large a grid) and it's doing a glider every 3 seconds. Since the glider gun is a period of 30, and my input should be 15hz, that means it's only running at around 60% speed.

The sticker problem I noticed too; though eventually they showed up.

Anyway, all that babbling aside... The way I see it anyone can do logic if they put their mind to it. Logic either does what it should or it doesn't, and you keep poking it until it does. But coming up with a creative idea, and having good execution, that takes more skill because there is no easy objective measure of if it is good or not. Compare your Life level to pretty much any other out there, yours is hands down the best executed. They all do the same thing in the end, so to stand out in that is quite a feat.
2011-02-18 07:40:00

Author:
Tygers
Posts: 114


Sorry I was so brief earlier. I could think of nothing else to say, I mean, you nailed it. Anyway, I didn't want you to think I was giving lame feedback on purpose. Just liked it as is and have no suggestions on making it better.2011-02-18 07:46:00

Author:
lochnar
Posts: 59


My first attempt was all wired up, each cell wired to it's 8 neighbors, with a series of bastardized half and full adders to count the number of neighbors. (Bastardized since they only needed to count 1, 2, 3, many, I cut out some of the logic that would be needed for proper adding.) It was fast (That's the one you see on my level) but hell on the thermo. Wiring was a pain but I had a trick to make it easier, taking advantage of the fact that dropping a chip over another chip merges the wiring.

My second attempt I switched to analog logic. It was similar to yours, except each cell was only wired to its four cardinal neighbors. The top and bottom neighbors would sum their left and right neighbors and pass on the sum, to save 4 additions and 4 inputs to each cell. This at this point was still wired. It was a pain, and LBP2 would crash if I tried to wired up anything over 8x16.

So then I switched to the same logic, but wireless. Oh, my first discovery of the joy of wireless! It took me all of 15 minutes to modify the cell, add a grid mover to select cells and set/clear them, and copy enough to make a glider gun. And it ran slow.

Just now I tried the facepalm version (Yeah I didn't think of it either, and it's so simple!) and that one was even friendlier on the thermo, there is still some slight slowdown of LBP2, but it's not bad at all. Again I'm running a glider gun (1/2 thermo to get that large a grid) and it's doing a glider every 3 seconds. Since the glider gun is a period of 30, and my input should be 15hz, that means it's only running at around 60% speed.

The sticker problem I noticed too; though eventually they showed up.

Anyway, all that babbling aside... The way I see it anyone can do logic if they put their mind to it. Logic either does what it should or it doesn't, and you keep poking it until it does. But coming up with a creative idea, and having good execution, that takes more skill because there is no easy objective measure of if it is good or not. Compare your Life level to pretty much any other out there, yours is hands down the best executed. They all do the same thing in the end, so to stand out in that is quite a feat.
I wouldn't have even tried wired to begin with, this concept is perfect for wireless logic.
Off the top of my head i would have each block have 2 tags on a microchip to indicate if it's alive or dead, and 8 tag sensors each set to one of the 8 directions.
Also wireless logic allows you to create globla effects with amazing ease. Just get a tag sensor on each with a wide enough radius then activate the corresponding tag on the outside of the field and all blocks would immidiately recognize it and act accordingly.
Doing this wired is pretty much suicide
2011-02-18 07:47:00

Author:
saarraz1
Posts: 86


I wouldn't have even tried wired to begin with, this concept is perfect for wireless logic.
Off the top of my head i would have each block have 2 tags on a microchip to indicate if it's alive or dead, and 8 tag sensors each set to one of the 8 directions.
Also wireless logic allows you to create globla effects with amazing ease. Just get a tag sensor on each with a wide enough radius then activate the corresponding tag on the outside of the field and all blocks would immidiately recognize it and act accordingly.
Doing this wired is pretty much suicide

Wired really isn't as bad as you think. When done the way I was doing it, it really didn't take much effort to wire it up. Wireless is great for so many things. But when you get so many wireless signals sharing a tag, it potentially has to spend a LOT of time resolving what's in range of what.

However, I seriously doubt many more reasonable levels (As opposed to more "tech demo" stuff) will run into that problem with wireless stuff.
2011-02-18 09:57:00

Author:
Tygers
Posts: 114


awesome i tried to make this myself using emiters. But i failed miserably. Using in and out movement would of solved my problems. If only i had come up with that....2011-02-18 10:06:00

Author:
Unknown User


This is excellent!! The presentation and controls were perfect and you're probably right uploading a smaller grid if it runs more smoothly than a larger one cos a bad frame rate can ruin enjoyment of a level. I really don't have any feedback apart from include an instructions screen for the rules for the cells living/dying. Love the gliders too as they walk themselved to the edge and into their little contained square! Again great level and a heart and yay! from me (psnRabbodirect). Could you give me feedback on mine?? https://lbpcentral.lbp-hub.com/index.php?t=47113-The-Little-Big-Taxi-Company&highlight=taxi+company Thanks2011-02-18 14:54:00

Author:
Dangerlove
Posts: 88


Argh! I had just written up a reply and my browser crashed...

Thank you all so much for the kind words, I have added a bunch of your levels to my queue and will go about trying them out later today. I really, really appreciate all the feedback; uploading this level was a surprisingly big milestone for me and I'm thrilled to see that it's gone over so well.

@Tygers

It's fun just fiddling about with logic, isn't it? When I was designing the logic for the cells, I did it on a sort of "workstation". I knew that I wanted to treat each cell as it's own machine and so I had it set up one a 3 by 3 grid with the cell in the middle and 8 "dummy" cells on the outside which I could activate or deactivate manually but which had no other logic of their own. The benefit to this method was that after I felt that I was done tweaking the cell, I could copy it and stamp out a grid; then test it immediately. This had the added benefit of giving me that moment when everything suddenly came together and it worked. I cannot accurately put into words what it feels like when that happens after working on something for an entire afternoon, although I suspect you know what I mean!

@saarraz1

Thank you! I really appreciate the feedback and will check out SIMON later on today!

@lochnar

Not to worry, I really appreciate you coming back to tell me even though it wasn't necessary. I was thrilled that you posted at all!

@monkeynutz

I had considered doing this with emitters at first, I thought that it might be cool to actually have organic "cells" as a theme but then the clockwork "Life Machine" came to me and I abandoned the idea. I'm sure that it's possible, you would just need to set up the emitter to emit an object when the cell is switched on and then have that object contain a tag sensor hooked up to a destroyer to kill the object when the cell is switched off. You could also do it with lights or Neon/Holo cells, the in/out movement is actually a lot more trouble than it's worth!

@dangerlove

Again, thank you! I'm thinking about setting up a small instructional cutscene at the start just to practice making cutscenes, I'd like to figure out a way to make a menu first, though, so that you don't always have to see it. I'll check out The Little Big Taxi Company later today, it's on my queue!
2011-02-18 16:24:00

Author:
Unknown User


Update: The level no longer breaks when you enter it with more than one player. Previously they would fall through the floor (as there was no floor... ) and drag the camera away from the board, revealing the background and killing the player in his controllinator. Not good!

I'm considering ways to allow up to four players to have a cursor each which I may do as a test to see how well my grid control system works with multiple players. I don't think I'll have too many issues, but I'd like to make the hologram squares light up in the player's colour which will probably take a bit of figuring out.

Thanks for all the plays/feedback so far, it's really made my week!
2011-02-22 20:18:00

Author:
Unknown User


Wow. Absolutely love the presentation here. Wireless, eh? I had considered that for my own version but reckoned that wired would be easier on the thermo... Y'know; I'd just about sickened myself of this project, but now I might just go back for another go, even if just to see if I can get a bigger grid running.2011-02-23 01:20:00

Author:
Unknown User


Yeah. I wasn't really thinking of thermo use to begin with; I was mainly thinking of avoiding the hassle of wiring it all together and making it flexible enough to go as big as the game engine would allow. My version is still fairly clunky, even though I was convinced that I had streamlined it (I have 8 tag sensors per cell instead of the small handful that I actually need) but, even so, it is still fairly easy on the thermo at the size it is now. I'm sure that I could make a larger grid with my cell design, but it starts to lag significantly once you go much higher than 12 x 12, even if the thermo is still below 50%. I'd likely change the "display" back to simple lights for a bigger grid to cut down on the performance hit, but it's worth experimenting with.

I haven't had a chance to look at your version (work is crazy right now) but I will as soon as I have the time!
2011-02-24 01:09:00

Author:
Unknown User


Wow. Absolutely love the presentation here. Wireless, eh? I had considered that for my own version but reckoned that wired would be easier on the thermo... Y'know; I'd just about sickened myself of this project, but now I might just go back for another go, even if just to see if I can get a bigger grid running.

I think wireless has a bigger impact on the simulation speed than it does on the thermo. I was able to get a significantly large grid with wireless (Large enough for a glider gun and two gliders) using the trick of counting nearby tags, but it was running at about half speed (Clocked based on how many seconds it took to generate a glider, which was over 3 seconds; it should have been a second and a half since the glider gun is 30 generations). I have tricks to make wiring up cells easier, but it's still a pain and LBP crashes when started getting close to 16x16. I was going to try doing a hybrid wired/wireless method with 8x12 squares wired together and wirelessly talking to each other, but got sick of the project by then. (8x12 so I could combine 6 for 16x36 and make a glider gun.)
2011-02-24 02:30:00

Author:
Tygers
Posts: 114


It does seem that we are at the limit of what the game engine is capable of, which is a shame. Interesting idea making wired "modules" that communicate wirelessly; that sounds like it could work nicely. It also sounds like a nightmare to put together, if you ever actually attempt it then good luck. I had originally attempted to wire each cell into a series of giant "OR" gates so that the gears in the background would turn when the cells moved forward a step, but ONLY when a cell changed on the board. Needless to say that there were so many cables on screen that it quickly became unworkable. I doubt I have the patience to attempt wiring each cell to each of it's 8 neighbours with that kind of slow down.

I fear that I may just have to be content with my level being pretty.
2011-02-24 10:01:00

Author:
Unknown User


I still think your level rocks for the aesthetics. If I were to re-publish, I'd probably steal borrow your idea of a layer mover for cells (Possibly with an illumination changing bit on the end, but not as stark as black/white, just to hilight the on cells) because it "feels" more like the LBP way. But it still wouldn't look as cool.

I use shortcuts to wire cells together (And with the pre-addition in one direction, it's only wired to 4 neighbors.) It makes it go surprisingly quick, but the edges still involve some wiring by hand to interface to the wireless. One tip for "So many cables on screen" - set the option to hide cables when the chips are closed.
2011-02-25 00:52:00

Author:
Tygers
Posts: 114


Ooh! The Game of Life!

Really nice showcase!

I love the presentation, and the logic runs perfectly. Wasn't aware of this device until I found this level, so thank you for educating me!

I was going to suggest a cutscene in the beginning to show how the device works in a visual way, but I see you're already considering this, so, hey ho!
2011-02-25 06:42:00

Author:
rialrees
Posts: 1015


Q' ing up for later, I remember these from school. To f4f, https://lbpcentral.lbp-hub.com/index.php?t=49352-Sacknight-Fetch-Quest-of-the-King-(Funny-Medieval-Platformer)2011-02-25 15:40:00

Author:
Hoplyte
Posts: 100


Played through it. The system ran flawlessly, the presentation was nice, and having the instructions on the side was helpful. Two things:
1)Maybe put in an option to turn off background sound, in case someone wants to run it for a while. Didn't but me, just a thought.
2)What method did you use for moving the selection box? Was it activation based on location and button presses?

To check out my level, https://lbpcentral.lbp-hub.com/index.php?t=49352-Sacknight-Fetch-Quest-of-the-King-(Funny-Medieval-Platformer)
2011-02-27 06:49:00

Author:
Hoplyte
Posts: 100


Cool simulation concept that I wasn't aware of before, and very nice presentation, as others have said. I particularly liked the "create all" animation and the speed changer.

Some suggestions...not sure how doable these are, especially since it sounds like you're already pushing the PS3 pretty hard here.

-- D-pad control for moving the cursor would be nice. I always prefer d-pad for grid-based UIs like this.

-- It would be awesome if you could reset to the previous set somehow so that you could run it again, or tweak it a little bit and run it again. I'm sure this is **** near impossible, but I found myself wishing I could do it.

-- Definitely need some explanation about the game for people not going to it from this thread. Tutorial would be great - I would also add a nice level description. I also didn't realize you had to actually start/stop it at first (again quick tutorial would help).
2011-02-28 00:05:00

Author:
Roo5676
Posts: 62


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.