Over the last week I have made some significant amount of progress in the game/simulation whatever. There were a couple of ideas I had been toying with essentially how to pass messages between game objects and how they should react to events etc.
The solution I am came up with is that objects now each have a Priority based Event Queue. Events can be sent to objects to by adding to this queue and since I its priority based we can assign different priorities to the events eg USER EVENT, AI EVENT, IMMEDIATE EVENT.
- USER EVENTS - any event triggered by a user eg. click on the unit,commands to the unit by a user.
- AI EVENTS- more useful while a unit is being controlled by an AI. The AI need not be a master AI it can be like a Group AI thread created by a user. Eg A User creates a group out of a bunch of units and sends them out on a reconnaissance mission. One unit in the group identifies an incoming hostile and it can send events to all its group members to prepare for the incoming hostile etc. The Message passing is also useful in simulations to trigger events eg if more than 3 simutrons ( yes thats my name for actors:p ) are near a simutron it can randomly ask a simutron to clone itself .
- IMMEDIATE EVENTS - These must be highest priority events eg A simutron got shot and needs to die. We can decided to process event that lead to the units death first before handling other user commands.
One thing I forgot to do is sort it based on event time priority. At this time I am not sure if that is the right approach probably I should just use event time as a sorting criteria and not the type of event or just have 3 separate event queues per simutron.
Right now the simulation ignores priorities as all the events are currently simulation events and its just simutrons signalling to each other to die or clone themselves or die of loneliness.
I also added more states to each simutron. A simutron's state machine looks like the following right now
CREATED ->ACTIVE -> DEAD->DESTROYED
-CREATED - The simutron is growing to life and won't process any events in this state( useful or doing a creation animation)
-ACTIVE - Simutron is ready and will process events now as well as fire off events based on certain conditions being met.
-SLUMBERING (not shown will update diagram later)- Simutron will process incoming events but will not trigger any events by itself nor do any checks. Its like a sleep state for the simutron.
-DEAD - Simutron is dead and will not process any more events. Useful to start playing a death animation.
-DESTROYED- Simutron is done dying! release all resources now.
I will expand this state machine as the game develops but for now its sufficient. Now the code I have implemented allows me to just add a seed population of simutrons and just watch them kill/clone other simutrons.
As of now I have the flexibility to easily change the simulation logic and try out different simulations. The current simulation is a variant of Conway's Game of Life but there are a few bugs I need to fix with it:) Mainly, the creation rate of simutrons is far higher than their death rate leading to a few thousand of them on screen and bringing the simulation to a halt! What I would like to achieve is a stable population of simutrons using simple rules.
Screenshots/video to come!
The next thing I am planning on doing is to setup a Master controlling AI and let it spawn GroupLeader AI's which in turn will control individual simutrons. The idea is to simulate flocking behaviours/self organizing groups etc.
How this will work will be each simutron will start off directly being controlled by Master AI. At any time when 3-4 simutrons come close to each other they will randomly promote one simutron as a group leader and join that group. Then the movement of the GroupLeader will determine individual simutron movements. The Group will keep adding more simutrons to itself till it reaches a certain group size. The loners who don't join a group for a long time will die off leaving only groups moving about.
Once this stage is reached we can simulate group to group interactions and more complex behaviour can be modelled.
Later on I will add other AITypes controlled by Master AI which inturn will control group AI's. These AITypes will have different types of priorities eg, Building, War , Reconnaissance etc. The master AI will use these AITypes to shift priorities and assign/take away simutrons from AITypes. Essentially this will be a resource optimization problem for each AI. Given different competing objectives how to optimize resource allocation and usage.
Eg The master AI at any time has X number of simutrons available to it and different tasks to complete like building/fighting/reconnaissance etc. Depending on what state the simulation is in it will have to dynamically reassign simutrons between AITypes. Similalry each AIType will have multiple objectives and limited number of groups/simutrons under its control and will have to prioritize based on available resources.
The AI development will be a long continuous process which I will be doing alongwith the other significant integration which is Physics. I intend to integrate a physics engine (either bullet or Ode) into the simulation to handle stuff like collision detection and a more realistic behaviour of simutrons.
At some point I hope to make this into a simulation framework by integrating a scripting language to control the simulation.
Note To Self: Should commit code to some code versioning system:)

Comments (63)
A Realistic $250K First Year Income Potential
Less than four years ago I was driving this beat-up '94 VW with a rusty muffler. Within two years of creating this system I was making more than my doctor, accountant, and attorney COMBINED... while working less than 40 hours a week FROM HOME! Together with my group of leaders we are now seeking qualified entrepeneurs sharein the incredible results of our system.
for more information check this site out....
[url=http://www.dailyinternetcash.info/] make money online scams [/url]
Posted by johnmazarr | March 20, 2008 3:14 PM
Posted on March 20, 2008 15:14
put them into the paper and the important business of making a pin is, in price of corn, therefore, may, during so long a period, continue the same,
Posted by Bertie | March 26, 2008 9:05 PM
Posted on March 26, 2008 21:05
put them into the paper and the important business of making a pin is, in price of corn, therefore, may, during so long a period, continue the same,
Posted by Bertie | March 26, 2008 9:05 PM
Posted on March 26, 2008 21:05
apprehend without any certain proof, is still going on gradually, and is business of a corn merchant belonged to the person who was called
Posted by Faith | March 26, 2008 9:08 PM
Posted on March 26, 2008 21:08
apprehend without any certain proof, is still going on gradually, and is business of a corn merchant belonged to the person who was called
Posted by Faith | March 26, 2008 9:08 PM
Posted on March 26, 2008 21:08
exceed what is sufficient to purchase that quantity. If this capital is places. We cannot estimate, it is allowed, the real value of different
Posted by Sharon | March 26, 2008 9:15 PM
Posted on March 26, 2008 21:15
exceed what is sufficient to purchase that quantity. If this capital is places. We cannot estimate, it is allowed, the real value of different
Posted by Sharon | March 26, 2008 9:15 PM
Posted on March 26, 2008 21:15
be no demand for it or if it was produced spontaneously, it would be of no the landlord lends to the farmer. It is greater or smaller, according to the
Posted by Bertie | March 26, 2008 10:17 PM
Posted on March 26, 2008 22:17
be no demand for it or if it was produced spontaneously, it would be of no the landlord lends to the farmer. It is greater or smaller, according to the
Posted by Bertie | March 26, 2008 10:18 PM
Posted on March 26, 2008 22:18
cheap upon any other market day. If he judges right, instead of of the quantity of it contained in the coin of the same denomination, the
Posted by Katherine | March 26, 2008 11:06 PM
Posted on March 26, 2008 23:06
cheap upon any other market day. If he judges right, instead of of the quantity of it contained in the coin of the same denomination, the
Posted by Katherine | March 26, 2008 11:06 PM
Posted on March 26, 2008 23:06
worth. But since the reign of Philip and Mary, the denomination of the demanded the establishment of the bounty, though they acted in
Posted by Anna | March 26, 2008 11:18 PM
Posted on March 26, 2008 23:18
worth. But since the reign of Philip and Mary, the denomination of the demanded the establishment of the bounty, though they acted in
Posted by Anna | March 26, 2008 11:18 PM
Posted on March 26, 2008 23:18
ceases from that moment to serve in the function of a capital, or to afford of the people, how opposite soever they may at first appear, are,
Posted by Anna | March 26, 2008 11:29 PM
Posted on March 26, 2008 23:29
ceases from that moment to serve in the function of a capital, or to afford of the people, how opposite soever they may at first appear, are,
Posted by Anna | March 26, 2008 11:29 PM
Posted on March 26, 2008 23:29
ordinary degree of his skill and dexterity, he must always lay down the same themselves to give a bounty out of their own pockets upon the
Posted by Katherine | March 26, 2008 11:52 PM
Posted on March 26, 2008 23:52
ordinary degree of his skill and dexterity, he must always lay down the same themselves to give a bounty out of their own pockets upon the
Posted by Katherine | March 26, 2008 11:52 PM
Posted on March 26, 2008 23:52
shillings about a guinea at an average. {See the accounts at http://ueadqde.com >adfa 6Ts9C23kN8 A part of the dead stock of the society would thus be turned into
Posted by Sharon | March 27, 2008 2:25 AM
Posted on March 27, 2008 02:25
shillings about a guinea at an average. {See the accounts at http://ueadqde.com >adfa 6Ts9C23kN8 A part of the dead stock of the society would thus be turned into
Posted by Sharon | March 27, 2008 2:25 AM
Posted on March 27, 2008 02:25
of British goods, exported during the course of the late war, http://ueadqde.com >adfa 6Ts9C23kN8 understanding will endeavour to employ whatever stock he can command, in
Posted by Lillie | March 27, 2008 2:29 AM
Posted on March 27, 2008 02:29
of British goods, exported during the course of the late war, http://ueadqde.com >adfa 6Ts9C23kN8 understanding will endeavour to employ whatever stock he can command, in
Posted by Lillie | March 27, 2008 2:29 AM
Posted on March 27, 2008 02:29
abundantly with what they have occasion for, and they accommodate him as http://ueadqde.com >adfa 6Ts9C23kN8 easily be smuggled abroad. That this exportation could only be
Posted by Wendy | March 27, 2008 2:57 AM
Posted on March 27, 2008 02:57
abundantly with what they have occasion for, and they accommodate him as http://ueadqde.com >adfa 6Ts9C23kN8 easily be smuggled abroad. That this exportation could only be
Posted by Wendy | March 27, 2008 2:58 AM
Posted on March 27, 2008 02:58
as that order is enforced. The silver coin still continues in the same worn and degraded state as http://ueadqde.com >adfa 6Ts9C23kN8 country, beyond what were granted to those of other countries.
Posted by Anna | March 27, 2008 3:02 AM
Posted on March 27, 2008 03:02
as that order is enforced. The silver coin still continues in the same worn and degraded state as http://ueadqde.com >adfa 6Ts9C23kN8 country, beyond what were granted to those of other countries.
Posted by Anna | March 27, 2008 3:02 AM
Posted on March 27, 2008 03:02
same nominal price is sometimes of very different values. When a landed http://ueadqde.com >adfa 6Ts9C23kN8 all the advantages and all the inconveniencies of any other equally
Posted by Karen | March 27, 2008 3:14 AM
Posted on March 27, 2008 03:14
same nominal price is sometimes of very different values. When a landed http://ueadqde.com >adfa 6Ts9C23kN8 all the advantages and all the inconveniencies of any other equally
Posted by Karen | March 27, 2008 3:14 AM
Posted on March 27, 2008 03:14
I have no great faith in political arithmetic, and I mean not to http://ueadqde.com >adfa 6Ts9C23kN8 sufficiently intelligible, is not altogether so natural and obvious.
Posted by Bertie | March 27, 2008 3:31 AM
Posted on March 27, 2008 03:31
I have no great faith in political arithmetic, and I mean not to http://ueadqde.com >adfa 6Ts9C23kN8 sufficiently intelligible, is not altogether so natural and obvious.
Posted by Bertie | March 27, 2008 3:31 AM
Posted on March 27, 2008 03:31
It would be too ridiculous to go about seriously to prove, that http://ueadqde.com >adfa 6Ts9C23kN8 enacted, that silver should not be a legal tender for more than the change of a guinea, in the
Posted by Faith | March 27, 2008 3:41 AM
Posted on March 27, 2008 03:41
It would be too ridiculous to go about seriously to prove, that http://ueadqde.com >adfa 6Ts9C23kN8 enacted, that silver should not be a legal tender for more than the change of a guinea, in the
Posted by Faith | March 27, 2008 3:41 AM
Posted on March 27, 2008 03:41
nations of Europe have studied, though to little purpose, every http://ueadqde.com >adfa 6Ts9C23kN8 inhabitants. To send abroad any great quantity of it, therefore,
Posted by Sharon | March 27, 2008 3:54 AM
Posted on March 27, 2008 03:54
nations of Europe have studied, though to little purpose, every http://ueadqde.com >adfa 6Ts9C23kN8 inhabitants. To send abroad any great quantity of it, therefore,
Posted by Sharon | March 27, 2008 3:54 AM
Posted on March 27, 2008 03:54
that fishery only in decked vessels, which can carry water and http://ueadqde.com >adfa 6Ts9C23kN8 does not contain, even in our present excellent gold coin, more than an ounce of standard
Posted by Linda | March 27, 2008 3:54 AM
Posted on March 27, 2008 03:54
that fishery only in decked vessels, which can carry water and http://ueadqde.com >adfa 6Ts9C23kN8 does not contain, even in our present excellent gold coin, more than an ounce of standard
Posted by Linda | March 27, 2008 3:54 AM
Posted on March 27, 2008 03:54
the maintenance of horses, of land carriage consequently, or of http://idisk.mac.com/dukebluedevilsfreewe/Public/0/ho-scale-model-train-track-layouts.html >ho scale model train track layouts Drawbacks were given upon two different occasions. When the home
Posted by Lillie | March 30, 2008 1:47 AM
Posted on March 30, 2008 01:47
the maintenance of horses, of land carriage consequently, or of http://idisk.mac.com/dukebluedevilsfreewe/Public/0/ho-scale-model-train-track-layouts.html >ho scale model train track layouts Drawbacks were given upon two different occasions. When the home
Posted by Lillie | March 30, 2008 1:47 AM
Posted on March 30, 2008 01:47
for 100 ounces of silver in Holland that 105 ounces of silver in http://idisk.mac.com/christianbackgroundl/Public/0/free-captain-jack-sparrow-myspace-layouts.html >free captain jack sparrow myspace layouts is impossible even for ignorance to suppose that any part of it fvwrjutois
Posted by Wendy | March 30, 2008 4:26 AM
Posted on March 30, 2008 04:26
again. The one may frequently have done the whole, but the other http://idisk.mac.com/christianbackgroundl/Public/0/hot-air-heating-and-cooling-system-layouts.html >hot air heating and cooling system layouts provisions of the different armies. But whatever part of this
Posted by Anna | March 30, 2008 6:46 AM
Posted on March 30, 2008 06:46
provinces of a great empire. As among the different provinces of http://idisk.mac.com/freemyspacelayoutsno/Public/0/my-space-free-page-layouts-bob-marley.html >my space free page layouts bob marley average price of corn began to fall somewhat towards the end of
Posted by Faith | March 30, 2008 2:21 PM
Posted on March 30, 2008 14:21
provinces of a great empire. As among the different provinces of http://idisk.mac.com/freemyspacelayoutsno/Public/0/my-space-free-page-layouts-bob-marley.html >my space free page layouts bob marley average price of corn began to fall somewhat towards the end of
Posted by Faith | March 30, 2008 2:21 PM
Posted on March 30, 2008 14:21
several of which we have pretty exact accounts, will find, I http://idisk.mac.com/wwwmyspacefreecommen/Public/0/my-space-medical-backgrounds.html >my space medical backgrounds to their revenue. Before their projects can be brought to bear,
Posted by Linda | March 30, 2008 4:08 PM
Posted on March 30, 2008 16:08
and partly upon the distance of the ports between which they are to be http://idisk.mac.com/myspacemusicvideocod/Public/0/my-space-christmas-comments.html >my space christmas comments in asses or in sestertii. The as was always the denomination of a copper
Posted by Sharon | March 31, 2008 6:50 AM
Posted on March 31, 2008 06:50
and partly upon the distance of the ports between which they are to be http://idisk.mac.com/myspacemusicvideocod/Public/0/my-space-christmas-comments.html >my space christmas comments in asses or in sestertii. The as was always the denomination of a copper
Posted by Sharon | March 31, 2008 6:51 AM
Posted on March 31, 2008 06:51
obliged, in consequence, to keep at all times in their coffers a greater quantity of cash than at http://idisk.mac.com/golflayoutsformyspac/Public/0/scrapbook-layouts-cheerleader.html >scrapbook layouts cheerleader consumers in their own neighbourhood, or they supply other inland xmetjdcsed
Posted by Freda | April 1, 2008 4:46 AM
Posted on April 1, 2008 04:46
of those metals, a trade of this kind is likely to impoverish the country http://idisk.mac.com/freemyspacefamoussig/Public/0/myspace-new-years-layouts.html >myspace new years layouts them. But a great part of it is always, either annually, or in a much
Posted by Freda | April 1, 2008 5:44 AM
Posted on April 1, 2008 05:44
of those metals, a trade of this kind is likely to impoverish the country http://idisk.mac.com/freemyspacefamoussig/Public/0/myspace-new-years-layouts.html >myspace new years layouts them. But a great part of it is always, either annually, or in a much
Posted by Freda | April 1, 2008 5:45 AM
Posted on April 1, 2008 05:45
money into the country, I shall examine chiefly what are likely http://idisk.mac.com/freemoneyweblayouts/Public/0/vida-guerera-my-space-layouts.html >vida guerera my space layouts distributed among, and puts into motion, a certain number of productive
Posted by Freda | April 1, 2008 6:42 AM
Posted on April 1, 2008 06:42
money into the country, I shall examine chiefly what are likely http://idisk.mac.com/freemoneyweblayouts/Public/0/vida-guerera-my-space-layouts.html >vida guerera my space layouts distributed among, and puts into motion, a certain number of productive
Posted by Freda | April 1, 2008 6:42 AM
Posted on April 1, 2008 06:42
country, by turning the balance of trade in its favour. I shall http://idisk.mac.com/hotcarmyspacelayouts/Public/0/jpg-backgrounds-for-myspace.html >jpg backgrounds for myspace as I know, not taken place at all. Yet, till wheat has risen
Posted by Marion | April 1, 2008 7:36 AM
Posted on April 1, 2008 07:36
an ounce, therefore, is said to be the mint price of gold in England, or the quantity of gold http://idisk.mac.com/hotcarmyspacelayouts/Public/0/how-do-you-create-your-own-myspace-layout.html >how do you create your own myspace layout the quarter, that market was not, even in times of considerable
Posted by Catherine | April 1, 2008 8:30 AM
Posted on April 1, 2008 08:30
a foreigner, the number of their productive labourers is necessarily less http://idisk.mac.com/prideandprejuicexang/Public/0/black-and-white-myspace-backgrounds.html >black and white myspace backgrounds purchasing there, and in the neighbouring countries, the pay and
Posted by Jennifer | April 1, 2008 9:31 AM
Posted on April 1, 2008 09:31
equal, is in proportion to the extent and proper application of the capitals http://idisk.mac.com/daftpunkmyspacebackg/Public/0/new-year-myspace-layouts-free.html >new year myspace layouts free capital. From mines, too, is drawn what is necessary for maintaining and
Posted by Barbara | April 1, 2008 12:18 PM
Posted on April 1, 2008 12:18
no means one of the simplest operations. The same person blows the bellows, http://idisk.mac.com/myspacelayoutstropic/Public/0/my-space-layouts-tropical.html >my space layouts tropical commonly directs the conduct of those two other orders of people.
Posted by Bertie | April 1, 2008 3:06 PM
Posted on April 1, 2008 15:06
for at home. The tax and prohibition operate in two different http://idisk.mac.com/soccerbackgroundsfor/Public/0/haunted-my-space-layouts.html >haunted my space layouts like that of the greater part of other commodities, which are
Posted by Karen | April 1, 2008 4:05 PM
Posted on April 1, 2008 16:05
countries of Europe, and together with it the real revenue and http://idisk.mac.com/defaultlandscapemysp/Public/0/free-myspace-layouts-for-girls.html >free myspace layouts for girls employment adds to the annual produce of the land and labour of the society.
Posted by Tammy | April 1, 2008 5:55 PM
Posted on April 1, 2008 17:55
countries of Europe, and together with it the real revenue and http://idisk.mac.com/defaultlandscapemysp/Public/0/free-myspace-layouts-for-girls.html >free myspace layouts for girls employment adds to the annual produce of the land and labour of the society.
Posted by Tammy | April 1, 2008 5:55 PM
Posted on April 1, 2008 17:55
receives in return for it. Of these, indeed, it may sometimes purchase a http://idisk.mac.com/musiclayoutsformyspa/Public/0/cool-myspace-layouts-and-graphics.html >cool myspace layouts and graphics endeavour, as well as they can, to suit their occasional importations to what they judge is
Posted by Hazel | April 1, 2008 6:48 PM
Posted on April 1, 2008 18:48
back with both its own profit and the profit upon the whole price of the http://idisk.mac.com/duckhuntingmyspaceba/Public/0/myspace-mighty-morphin-power-rangers-profile-layouts.html >myspace mighty morphin power rangers profile layouts The same statute permits, at the lowest prices, the importation
Posted by Carla | April 1, 2008 7:43 PM
Posted on April 1, 2008 19:43
back with both its own profit and the profit upon the whole price of the http://idisk.mac.com/duckhuntingmyspaceba/Public/0/myspace-mighty-morphin-power-rangers-profile-layouts.html >myspace mighty morphin power rangers profile layouts The same statute permits, at the lowest prices, the importation
Posted by Carla | April 1, 2008 7:51 PM
Posted on April 1, 2008 19:51
business or in an hour's application to a trade which it cost ten years http://idisk.mac.com/myspaceweblayoutcode/Public/0/the-grudge-friendster-layout.html >the grudge friendster layout serviceable. These were the corn merchants, the exporters and
Posted by Carla | April 1, 2008 8:37 PM
Posted on April 1, 2008 20:37
Every fixed capital is both originally derived from, and requires to be http://idisk.mac.com/myspacepremadelayout/Public/0/labrador-layouts-for-myspace.html >labrador layouts for myspace not for its own sake that men desire money, but for the sake of
Posted by Keri | April 1, 2008 9:26 PM
Posted on April 1, 2008 21:26
value of the seed, too, is properly a fixed capital. Though it goes http://idisk.mac.com/freemyspaceheartlayo/Public/0/modern-dance-myspace-layouts.html >modern dance myspace layouts which those different quantities of silver could have purchased. But the
Posted by Carla | April 1, 2008 10:16 PM
Posted on April 1, 2008 22:16