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.

FPSC Classic Scripts / Game of Life style enemies

Author
Message
protoborg
17
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: Somewhere in this reality
Posted: 10th Dec 2008 03:28
Does anyone have any idea how to implement the following for enemies:
1. Each cell with one or no neighbors dies.
2. Each cell with four or more neighbors dies.
3. Each cell with two or three neighbors survives.
4. Each cell with three neighbors becomes populated.

This would apply to enemies that are adjacent to the player as well. Each "cell" is a grid square. I have no idea how this would be done. If anyone has any ideas, I would appreciate it.

You know your code sucks when it does what you want before you know what you want.
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 20th Dec 2008 11:55
Could you be more specific?

Free Segment Packs: V1-http://forum.thegamecreators.com/?m=forum_view&t=124552&b=24
V2 - http://forum.thegamecreators.com/?m=forum_view&t=124709&b=24
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Dec 2008 23:54
In order to keep the entities locked in the center of their cell, you would need to activate them individually and have them appear/disappear. This would be very difficult to accomplish in and of itself with the stock engine.

After that, it's a simple matter of scripting each cell entity to properly activate adjacent cell entities when the timer cues.


The one and only,


protoborg
17
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: Somewhere in this reality
Posted: 7th Jan 2009 21:29
Marc, what I am referring to is a game that was created to demonstrate emergent qualities in a game. This means the complex qualities that arise from simple rules. If you Google "the game of life", you will most likely find the game.

You know your code sucks when it does what you want before you know what you want.

Login to post a reply

Server time is: 2024-11-24 18:35:39
Your offset time is: 2024-11-24 18:35:39