Fun Stuff · Graphics · Silverlight · Uncategorized

Cellular Automata

Cellular Automata


http://paul.ennemoser.com/files/CellularAutomata.zip


A cellular automata consists of a grid of cells, with each cell having a number of states. The cells of the simple automata, that I’ve implemented in Silverlight, can have one of two states: On (Black) or Off (White).

Each row in the grid represents one generation (in this automata).
The state of a row depends on the state of the previous row, and so on.

A simple rule is used to generate the state of each cell of a row:
For each entry in the row we take the (N – 1th, Nth, N + 1th) cell triple
in the previous row.

Now we take this triple and use a lookup table to get the state of the entry.
Here are the lookup tables for two of the most famous patterns:

Rule 30 cellular automaton lookup table:

current pattern 111 110 101 100 011 010 001 000
new state for center cell 0 0 0 1 1 1 1 0

 

Rule 110 cellular automaton lookup table:

current pattern 111 110 101 100 011 010 001 000
new state for center cell 0 1 1 0 1 1 1 0

See the Wikipedia entry for more information.

Games · Silverlight

InvTetris – Inverse-Space Two-Player Tetris

Around one week ago I felt like working on a game that I could -actually- finish in a reasonable time-frame. This is the result:


InvTetris is a two-player Tetris game in which you play in your opponents’ space.

You can play the game here:
— Removed Link, you can play Two Way Box instead! —

I hope you’ll have some fun playing it~ (:

*** Controls ***
White:
Move Left       – A
Move Right    – D
Drop              – S
Turn Left       – C
Turn Right     – V

Black:
Move Left     – Left
Move Right   – Right
Push             – Up
Turn Left      – O
Turn Right    – P

To-Do:
1. Custom controls are going to be the implemented in the beta version of InvTetris, sorry for now!
2. Moving blocks after placing them is implemented, but still needs some tweaking before it can go live.

Credits:
I’d like to thank squidi for the original idea; visit his great website http://www.squidi.net/three/index.php
to read his game-ideas. NegSpace Puzzle