swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question reguarding using DblBuffer2d and other algorithms...


From: bleydorf
Subject: Question reguarding using DblBuffer2d and other algorithms...
Date: Thu, 04 Sep 1997 15:50:46 -0400

All,
I have been having trouble with my "two types of Agents simulation"
Problem/Solution.

I have two possible ideas for fixing the problem...the problem is I get
Problems and Solutions that want to be in the same place...

First thought:
I think I might have the "space" divided up into cells (made up of 9
positions each)

1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9

The Problem agents would inhabit only "5"s, so each time they moved it
would be by 3 spaces.  Then Solutions could inhabit any othe the other
spaces...(1,2,3,4,6,7,8,9) And then I wouldnt have the problems I have
been having trying to get the solutions to move along with a Problem
they are attached to.  

The only problem I might foresee, is that Problems movement would be
pretty jerky jumping 3 spaces each step.  And another problem would be
keeping Solutions out of "5" 

And if a Problem is attached to more than one solution, like:

1 2 3
4 P S
7 S S 
And it moves into a cell with unattached solutions in spaces 6,8, or 9
what would happen... (I guess I could have the solutions move into other
available cells (ie. 1,2,3,4,or 7) 

and what would happen if the same problem moved into a cell where there
were already 6+ solutions...
 
Or:
I might implement DblBuffer2d and keep Problems on one lattice and
solutions on the other lattice...

I would assume that doublebuffering is mainly used for doing animations
etc, but I think it might work for my needs.

The two lattices would be switching back and forth pretty fast and there
might be a slight flicker, but it might work...
What do you think?

Thanks,
Brad.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]