Interactive symbol game
For the past couple of weeks I have been scribbling down designs for what I think could be a very interesting game design. Do you remember playing that odd cell game that was just a grid that had cells that would turn on or off based on whether certain combinations of it's neighbors were on or off? Well, if you do, the concept of my idea is along the same lines. Here's how I see it working from what I have jotted down so far You start off with a certain ammount of objects called base symbols. Now, you can mix any two symbols of your choice. But, each of the individual base symbols contain a script created by the user. When the user mixes symbols, a new (single) symbol is created that behaves as a logical composition of it's two parent symbols. The scripts will include such functions as moving by a certain ammount, grouping two symbols with specified properties, making a sound, changing the symbol color or even shape, and of course logical loop and conditional functions. The basic framework of the game works on levels (not particularly in the sense of levels in Super Mario World). The levels are defined by how many times a particular symbol has been fused, starting with the base symbols as the first level and any 2 fused base symbols as the second level etc. The reason I'm posting this is that I really have no idea how feasible this project would be, nor am I too sure as the outcome of high level symbols. I'm also curious of how the behaviors of the symbols could be merged effectively (I have put much thought into this, such as creating my own intermediary math code that could be used to effectively fuse behaviors, or just using a heirarchy of conditions based off of individual symbols - not too much into the latter idea though) Anyways, any thoughts or critiques of this idea would be greatly appreciated :) [Edited by - Ouoertheo on March 23, 2006 6:25:06 PM]
The best way to have the symbols combine is to use a genetic algorithm (GA).
In a GA the properties of your symbol will be represented as a 1 dimentional array (or linked list, string, or other similar data structure). When two sysmbols combine you randomly (or with a preset algorithm) mix the arrays of the two symbols together (there are many methods to do this). A simple method is to randomly select the "partent" thast a particular element in the array is chosen from.
eg:
Parent symbol 1 might have a "genome" of a, b, c, d, e, f, g
Parent symbol 2 might have a "genome" of z, y, x, w, v, u, t
A "Child" of them might have a "genome" of a, b, x, d, v, u, g
The letters could represent colour, symbol shape, a script, or anything you want to translate them into.
In a GA the properties of your symbol will be represented as a 1 dimentional array (or linked list, string, or other similar data structure). When two sysmbols combine you randomly (or with a preset algorithm) mix the arrays of the two symbols together (there are many methods to do this). A simple method is to randomly select the "partent" thast a particular element in the array is chosen from.
eg:
Parent symbol 1 might have a "genome" of a, b, c, d, e, f, g
Parent symbol 2 might have a "genome" of z, y, x, w, v, u, t
A "Child" of them might have a "genome" of a, b, x, d, v, u, g
The letters could represent colour, symbol shape, a script, or anything you want to translate them into.
Cool, the GA method is much more concrete (and somewhat similar) compared to the one I had previously worked out. I like the random part of it especially, could add some very interesting gameplay, and if the player doesnt like the way the symbol turned out, I could always give them the option to change it... or maybe even another symbol could change it. Hmmmmmm so many possibilities now.
Awesome contribution, you have no idea how much that helps :)
edit: crap I get giddy too easily, i need to find a way to represent the two parent symbols' FULLY in the child symbol :p
to take your example and expand a little for what i have in mind
Parent symbol 1 might have a "genome" of a, b, c, d, e, f, g
Parent symbol 2 might have a "genome" of z, y, x, w, v, u, t
instead of this
A "Child" of them might have a "genome" of a, b, x, d, v, u, g
i would want this to happen
A "Child" of them might have a "genome" of az, by, cx, dw, ev, fu, gt
where az, by, cx and the like are all coherent scripts
it seems that im gonna have to come up with rules of joining for each combination of functions... bleagh this is gonna make my attention span hurt.
[Edited by - Ouoertheo on March 23, 2006 10:00:43 PM]
Awesome contribution, you have no idea how much that helps :)
edit: crap I get giddy too easily, i need to find a way to represent the two parent symbols' FULLY in the child symbol :p
to take your example and expand a little for what i have in mind
Parent symbol 1 might have a "genome" of a, b, c, d, e, f, g
Parent symbol 2 might have a "genome" of z, y, x, w, v, u, t
instead of this
A "Child" of them might have a "genome" of a, b, x, d, v, u, g
i would want this to happen
A "Child" of them might have a "genome" of az, by, cx, dw, ev, fu, gt
where az, by, cx and the like are all coherent scripts
it seems that im gonna have to come up with rules of joining for each combination of functions... bleagh this is gonna make my attention span hurt.
[Edited by - Ouoertheo on March 23, 2006 10:00:43 PM]
I have used a paired genetic structure.
Like
Parent 1: Aa, Bb, Cc, Dd...
Parent 2: Ww, Xx, Yy, Zz...
The child would take 1 from each pair from each parent
Child: Aw, Xb, CY, dz...
The symbol would only need to use 1 from each pair (or you could use both if you wanted).
Instead of having each A, B,C... represent a script, you could have the A,B,C... represent a comand in a script and the list creates the complete script. I did this in an program for an assignment when I was in year 12 of school (many years ago now). The script was a sewt of instructions for a robot (virtual - on sceen) to move around an area and handle inputs from its sensors. It was much more complex than anything you might be doing and I used integers instead of characters to represent commands and values in the script.
One advantage of using a GA to write the script (and determin various values of the symbol) is that the player can "evolve" a symbol to behave as they want through selective "breeding".
Like
Parent 1: Aa, Bb, Cc, Dd...
Parent 2: Ww, Xx, Yy, Zz...
The child would take 1 from each pair from each parent
Child: Aw, Xb, CY, dz...
The symbol would only need to use 1 from each pair (or you could use both if you wanted).
Quote:
where az, by, cx and the like are all coherent scripts
Instead of having each A, B,C... represent a script, you could have the A,B,C... represent a comand in a script and the list creates the complete script. I did this in an program for an assignment when I was in year 12 of school (many years ago now). The script was a sewt of instructions for a robot (virtual - on sceen) to move around an area and handle inputs from its sensors. It was much more complex than anything you might be doing and I used integers instead of characters to represent commands and values in the script.
One advantage of using a GA to write the script (and determin various values of the symbol) is that the player can "evolve" a symbol to behave as they want through selective "breeding".
One question... how can the player WIN in the game / what's the goal?
Or will it be just for fun and "playing around"?
(Or have I over-read that? :D )
I also thought of programming an "evolving" system to simulate life and genetic stuff etc but I think to make it really big it would be pretty much work to do ;)
Or will it be just for fun and "playing around"?
(Or have I over-read that? :D )
I also thought of programming an "evolving" system to simulate life and genetic stuff etc but I think to make it really big it would be pretty much work to do ;)
maybe a two players game ?
I remember a very old "game" I found in a magazine wich goal was to create a program (in a assembly like language) that will destroy the opponent program by writing code in a "memory".
So here, the goal could be to "take control" of the grid by producing better "species" (defined by their "symbol mixing and growing" logic) than the other player...
Edit:
Or you can do a single player game with a goal in each level.
Like:
- put a specific symbol with a specific color in a defined area of the board
- fill half of the board with a limited number of mutations
- move already placed symbols to the other side of the board
and so on...
I remember a very old "game" I found in a magazine wich goal was to create a program (in a assembly like language) that will destroy the opponent program by writing code in a "memory".
So here, the goal could be to "take control" of the grid by producing better "species" (defined by their "symbol mixing and growing" logic) than the other player...
Edit:
Or you can do a single player game with a goal in each level.
Like:
- put a specific symbol with a specific color in a defined area of the board
- fill half of the board with a limited number of mutations
- move already placed symbols to the other side of the board
and so on...
do a google search for "biomorphs"
aww heck: here are a couple of links
http://www.rennard.org/alife/english/biomgb.html (Java -- 2d)
http://archive.eccesignum.org/index.phtml?200406 (Flash -- 2d my own experiment)
http://members.fortunecity.com/timhanagan/applet.html (Java -- 3d)
aww heck: here are a couple of links
http://www.rennard.org/alife/english/biomgb.html (Java -- 2d)
http://archive.eccesignum.org/index.phtml?200406 (Flash -- 2d my own experiment)
http://members.fortunecity.com/timhanagan/applet.html (Java -- 3d)
I thank you all for your thoughtful posts.
In response to some of you the goal of the game is going to be to just have fun, I plan to release it free as an internet app, and the app will store all the created symbols on a server. You win whenever you are satisfied with how your symbols act.
In response to Edtharan's second post, I think that what I have so far come up with (briefly outlined below) sounds actually very similar to what you addressed.
My problem right now is not the actual intermediary code, it is how to interpret that intermediary code in some formal fashion. The way the GA's mix is very fascinating and useful, but I need to work on a lower level then showing how the symbols mix I need to find a way to actually mix the functions of the code.
The setup that I had previously outlined (the intermediary math code) is done by command tables that include functions with the same/similar parameters. One table has action commands, one has conditional commands, one has properties, one table has handles, and one table has miscelaneous functions. The collumns for all the commands represent the parameters of the function and are labeled b,c,d,e (a is reserved for the table it's self), and the rows represent the function it's self.
So for example a symbol moves it's self by 5,3 - from table 1, command 1 (Move), parameterA 1 (self), parameterB [5,3] (by ammount), would be encoded as 111[5,3]
On the same table a symbol could fuse 2 other symbols (an action command with the same parameters). It would look like so : table 1, command 2 (fuse), parameterA 2 (others), parameterB [symbol[x], symbol[54]], would be encoded as 122[symbol[x], symbol[54]].
Another interesting idea occured when pondering over some responses here. What if every time a symbol was created the "flattened" version of it's parents' scripts was actually added to a table as a new command. What do you kind sirs think about that one?
What I would really like is some of your input on command mixing (eg fusing two different if statements or fusing two different group statements)
[Edited by - Ouoertheo on March 24, 2006 1:47:39 PM]
In response to some of you the goal of the game is going to be to just have fun, I plan to release it free as an internet app, and the app will store all the created symbols on a server. You win whenever you are satisfied with how your symbols act.
In response to Edtharan's second post, I think that what I have so far come up with (briefly outlined below) sounds actually very similar to what you addressed.
My problem right now is not the actual intermediary code, it is how to interpret that intermediary code in some formal fashion. The way the GA's mix is very fascinating and useful, but I need to work on a lower level then showing how the symbols mix I need to find a way to actually mix the functions of the code.
The setup that I had previously outlined (the intermediary math code) is done by command tables that include functions with the same/similar parameters. One table has action commands, one has conditional commands, one has properties, one table has handles, and one table has miscelaneous functions. The collumns for all the commands represent the parameters of the function and are labeled b,c,d,e (a is reserved for the table it's self), and the rows represent the function it's self.
So for example a symbol moves it's self by 5,3 - from table 1, command 1 (Move), parameterA 1 (self), parameterB [5,3] (by ammount), would be encoded as 111[5,3]
On the same table a symbol could fuse 2 other symbols (an action command with the same parameters). It would look like so : table 1, command 2 (fuse), parameterA 2 (others), parameterB [symbol[x], symbol[54]], would be encoded as 122[symbol[x], symbol[54]].
Another interesting idea occured when pondering over some responses here. What if every time a symbol was created the "flattened" version of it's parents' scripts was actually added to a table as a new command. What do you kind sirs think about that one?
What I would really like is some of your input on command mixing (eg fusing two different if statements or fusing two different group statements)
[Edited by - Ouoertheo on March 24, 2006 1:47:39 PM]
In genetics, there are codons (sections of genetic code) that indicate the start and end of a gene. These codons are "creativly" called "Start" and "Stop" codons. You could use a system like that to specify a section of your "Genome".
For example:
This could be like {startcodon}, 1, 1, 1, 5, 3, {stopcodon}.
Where {startcodon} and {stopcodon} might be a specific integer (like 0 or 999999, etc). Now instead of just selecting each integer for copying to the child from the parents, you can select and copy whole Codons (that which is between the start and stop codons).
You could also get more complex and have several types of start/stop codons and have a different format for the codon (eg 6 or more integers in the codon).
For example:
Quote:
So for example a symbol moves it's self by 5,3 - from table 1, command 1 (Move), parameterA 1 (self), parameterB [5,3] (by ammount), would be encoded as 111[5,3]
This could be like {startcodon}, 1, 1, 1, 5, 3, {stopcodon}.
Where {startcodon} and {stopcodon} might be a specific integer (like 0 or 999999, etc). Now instead of just selecting each integer for copying to the child from the parents, you can select and copy whole Codons (that which is between the start and stop codons).
You could also get more complex and have several types of start/stop codons and have a different format for the codon (eg 6 or more integers in the codon).
This post is realy Awesome for what im working on now, a game bassed off Evolution and survival of the fittest. I wanted to have some sort of way for the creatures to evolve in relation to the parents and what works to survive. Wile alot of the math you all have been talking about is WAY over my head, i was able to keep up a bit, or maybe im just tired haha.
I do get your aplication of the symbols, my original idea came from Shapes that you combine to create new shapes and so on until you came up with the perfect shape. When i realised there was no perfect shape i went another direction but you get the idea.
I do get your aplication of the symbols, my original idea came from Shapes that you combine to create new shapes and so on until you came up with the perfect shape. When i realised there was no perfect shape i went another direction but you get the idea.
BLOG: http://rhornbek.wordpress.com/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement