10 ms·
Show HN: Multi-player Competitive Conway's Game of Life
- samuellevy 12y agoI made this as an experiment. It's an idea that I've been toying with for a long time, but I only just got around to building it.
- jsherer 12y agoCan you give a little background on the technologies you used?
- barryhunter 12y agoThere is a 'Technology' link in the footer. Really nice implementation btw.
- aidos 12y agoThat was fun. I just discovered that I know nothing about good patterns for survival in Game of Life.
- emotionalcode 12y agohttp://en.wikipedia.org/wiki/Gun_%28cellular_automaton%29 http://en.wikipedia.org/wiki/Gun_%28cellular_automaton%29
- 3rd3 12y agohttps://en.wikipedia.org/wiki/Spacefiller https://en.wikipedia.org/wiki/Spacefiller
- aidos 12y agoHow good are those?! Led me on to some of the other breeders https://en.wikipedia.org/wiki/Breeder_(cellular_automaton) https://en.wikipedia.org/wiki/Breeder_(cellular_automaton)
- 3rd3 12y agoNot sure how good they are in practice. I just experimented a little bit with it ( https://i.imgur.com/pLyKKpg.png https://i.imgur.com/pLyKKpg.png ) and there seem to be a pattern that destroys the uniform line pattern in certain directions (in the lower part), however, with most obstacles it left a lot of stuff behind (the upper part in the picture). The initial pattern is not very simple though: https://i.imgur.com/PfVjVOt.png https://i.imgur.com/PfVjVOt.png
- rsivapr 12y agoPretty cool! I did something similar when I was learning javascript. I built GoL for a three-state system. Here's the bl.ocks.org link : http://goo.gl/H0Wqxo http://goo.gl/H0Wqxo
- eclipsor 12y agoTon of questions, I've been working on a small game (+engine) myself and it has been magnitudes more difficult than I imagined. Do you have any blog posts about the process of making this? I see the technology link, but I'd like to hear a little more about the architecture. Something along the lines of a post mortem maybe. * What sparked this idea? * Was your initial set of features more simple or more complex? * Any features you had to give up on? * Any unexpected features you were able to add after you were forced to rearchitect it? (Ok, I may be painting my own experiences on you with this question.) * How long did it take?
- samuellevy 12y agoLet's see... I haven't written a post mortem yet, partly because I'm still building it, and partly because I hadn't seen it under heavy load (although I woke to emails from linode screaming at me about high CPU usage) * The idea is one that I've been toying with for years. I've made other experiments that got some notice here a few years ago, too. * There are some extra features that I still want to add at some point ('formations' for pre-building shapes, as an example. The database table is there, but no functionality.) * Nothing given up on entirely yet. * The only rearchitecting that happened was replacing the board UI with a canvas implementation. The initial version used a table and was painfully slow. From past experience I knew that wouldn't cut it, but it was an easy starting point. * the initial commit was... October 2nd, but I didn't start working on it till a week later. All in all, I've just grabbed time between other (paying) projects.
- zaphar 12y agoConway's Game of Life is my goto "learn a new language" project. It covers most of a languages surface. data structures, conditionals, loops, stdlib. And the rules are just complex enough to get a sense of how the language works.
- Igglyboo 12y agoHah I thought I was alone in that regard. I usually write two versions of it once I start learning a language. I'll write my first iteration with minimal exposure to the language then try and come back later and make it more idiomatic after I've spent some more time with the language. I've done this with Go, JavaScript, Python, and C so far. Most of my iteration 1's start off with a Java flavor, my second iteration in python was pretty impressive with regards to how many fewer lines I had to use compared to the non-idiomatic version.
- zaphar 12y agoI typically refactor the first version to a more idiomatic form. So I guess technically do two versions as well. I really should have saved them all somewhere. It would make an interesting repository of sample programs. My first one was in gw-basic :-)
- hanoz 12y agoSnap! I've been doing the very same since Turbo Pascal back in the 80s. I'm recently trying to get to grips with Android, hence I present: https://play.google.com/store/apps/details?id=com.singlemost.lifewallpaper https://play.google.com/store/apps/details?id=com.singlemost..., if I may be so bold. It's had precisely zero downloads since its publication a week ago, which has itself been a lesson. Hopefully I'm not too out of order running it past some cellular automata enthusiasts on this thread.
- zaphar 12y agoInstalled. Looks cool.
- arikrak 12y agoCool idea. Maybe make it easier to get started, it's a bit unclear initially what to do. Also, maybe have a mini version where you just place 20-30 armies instead of 100.
- cpfohl 12y agoDo you detect stable states to declare a draw? They can take many generations to develop and reveal themselves...
- cpfohl 12y agoTeach me to not read to the end. There's a fixed number of generations, it looks like.
- lockes5hadow 12y agoYou mean solve the halting problem? That would be impressive.
- cpfohl 12y agono, I mean detecting a cycle. If you ever find a state that has already been visited you can know for certain it's "stuck"
- eevilspock 12y agoNot meant as a criticism, but a thought: It's a bit ironic that for a thing meant to demonstrate the concept of emergence, players are designing states rather than rules conducive to emergence. For example, imagine a game where flocks of boids[1] did battle, but instead of setting their initial position, you programmed the rules of behavior that governed each boid identically. The fixed rules of the system are such that the more "cooperative" the behavior, the greater the chance of success. Individual boids aren't allowed to have any memory (i.e. stateless), so AI solutions are precluded. [1] http://www.red3d.com/cwr/boids/ http://www.red3d.com/cwr/boids/
- phreeza 12y agoThere have been many games written in that direction (including one by yours truly: [0]) I actually think this turning things on their head is refreshing! [0] http://phonons.wordpress.com/2010/06/01/cells-a-massively-multi-agent-python-programming-game/ http://phonons.wordpress.com/2010/06/01/cells-a-massively-mu...
- adwf 12y agoReally cool. Spent ages building a glider gun and then pointed it in the wrong direction... I think there are probably a few too many civilians in there as well, messed up any cool formations I had far too early for them to be effective.
- phreeza 12y agoI also built one, the very first glider collided with some civilians and the 'shrapnel' took out my gun as well. Would be neat to be able to save patterns.
- hanoz 12y agoGood work, excellent fun! I don't know if it's just me but I'm finding Firefox has the "I'm ready for battle" button disabled on first load of the challenge page.
- drewblaisdell 12y agoVery cool. I made a multiplayer version of Conway's Game of Life a few months ago, and it is fascinating to see how much our versions differ. I dig how you are using "war" as not just a metaphor, but a game concept.
- lytedev 12y agoThis is too fun. Unfortunately, seems that an excellent and simple strategy to win is to just place entire columns full of life, particularly on the front and back ends (with whatever subdivisions you can afford also).
- whitten 12y agoThis is an impressive bit of coding, especially since it displays the battles in real-time.
- jonahrd 12y agoI created the Max space filler. too bad it's very volatile inside http://gameoflifetotalwar.com/challenge/pwtOc http://gameoflifetotalwar.com/challenge/pwtOc
- mod 12y agoI had a lot of fun with this, until now: My challenge has been accepted, but my challenger will not place his armies, and so I'm effectively unable to play. Perhaps he's placing a really, really elaborate pattern. Edit: He placed about 30 minutes after accepting. I could still see this being a problem, and so this is a type of bug report.
- samuellevy 12y agoYeah, it's a problem with no great solution. That's one reason why I allowed registered users to make multiple armies.
- lockes5hadow 12y agoIt would be really useful if you could save patterns to copy paste them into the battlefield. Some of the more complex patterns are really really hard to paint on a high resolution screen.
- samuellevy 12y agoIt's definitely planned (I have a 'formations' table ready to go), I just haven't spent the time to build it yet.
- rev_bird 12y agoThis looks like a more organized version of http://lifecompetes.com http://lifecompetes.com, which is itself a LOT of fun.