Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Cellular Automata Program

Author
Message
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 8th Mar 2009 15:43 Edited at: 8th Mar 2009 15:44
...In 3D!

This is the product of 3 hours of DarkBASIC Pro last night, so I haven't done much testing, , but it seems to run smoothly for me, at least.

The program runs like a normal Cellular automata program-- You have a grid that you click on to toggle cells, and these cells either die or create new cells depending on some simple rules. Right now I tried to make it work like John Conway's Game of Life, but that didn't turn out correctly for some reason so the rules are a little weird, but they work.

Controls:

Enter - Clear the grid of cells
Spacebar - Toggle Pause/Unpaused
Arrowkeys - Move the camera
+ (Number Pad) - Zoom In
- (Number Pad) - Zoom Out

Some Screenshots:

http://img10.imageshack.us/img10/6872/screeniex.png
http://img26.imageshack.us/img26/6294/screen2nff.png

And the Executable is attatched

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75

Attachments

Login to view attachments
zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 8th Mar 2009 19:29 Edited at: 8th Mar 2009 19:42
I did one of these a couple of days ago, with ascii graphics.
Downloading...

[edit] Well it's a nice start! Now, this is what you should improve:
1. Since this is in 3d, you more or less have to add free-space movement of some sort.
2. You had to press space very quick or it would toggle between pause and unpause rapidly, it would be nice if you could fix this.

And last, but not least:
3. Your rules are indeed wrong! Are you sure you're updating all cells at once?

The Lightweight spaceship pattern didn't behave as it should.
http://en.wikipedia.org/wiki/Conways_Game_of_Life#Examples_of_patterns

This quote from the same article may give you a hint:
Quote: "Typically two arrays are used, one to hold the current generation and one in which to calculate its successor."


n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 9th Mar 2009 00:55 Edited at: 9th Mar 2009 01:01
Fixed all of that. I wrote one of the for-loops wrong, apparently.

Okay, I added some new stuff:

- 3D camera control method
- 2D camera control method

- You can now set your own game of life rules at startup
- Added a way to view the in-game rules (Backspace toggles)

Controls:

W - Move Camera Up (Used for 2D method)
S - Move Camera Down (Used for 2D method)
A - Move Camera Left (Used for 2D method)
D - Move Camera Right (Used for 2D method)

R - Move Camera forward (Used for 2D method; acts as zoom in)
F - Move Camera Back (Used for 2D method; acts as zoom out)

Q - Turn Camera Left
E - Turn Camera Right
Up/Down Arrow keys - Pitch Camera
Right/Left Arrow Keys - Roll Camera
Enter - Clear Grid
Spacekey - Toggle Simulation Pause
BackSpace - Show/Hide rules
C - Reset camera position

Screenshots:

Create your own rules or use Default (Conway's)
http://img10.imageshack.us/img10/3705/v1screen1.png

Small Exploder according to my own rules:

http://img22.imageshack.us/img22/2483/v1screen2.png
http://img17.imageshack.us/img17/3797/v1screen3.png
http://img13.imageshack.us/img13/3636/v1screen4.png

View Rules
http://img8.imageshack.us/img8/8405/v1screen5.png

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75

Attachments

Login to view attachments
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Mar 2009 04:21
so is this like minesweeper lol im confused
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 9th Mar 2009 04:52
No, it's a Cellular Automaton program.

It uses some basic rules in a simplified universe to simulate how systems develop.

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Mar 2009 15:53
sorry lol the image fooled me hahaha I've never herd of that I'll check out the wiki

Login to post a reply

Server time is: 2024-11-24 09:50:28
Your offset time is: 2024-11-24 09:50:28