Results 1 to 2 of 2

Thread: D.A.W.N - Question

  1. #1

    D.A.W.N - Question

    Hi Guys!
    Me and a friend are developing a very simple (hopefully one day a game) system known as D.A.W.N - Documentable Artificial Wildlife Network. (Trust me, I doesn't look as good as it sounds ).It works like so: Each day is known as a 'span', one span usually equals 10 minutes. Throught one span, multiple things occur, such as reproduction (if thats what you want to call it), and generate others that have values that derive from the parent (using either a pseudo-random number generator or the processor). Other events include death, which is also determined by the parents life-span. As me and said friend are only 14 years old (plus, i'm the only one who can program), I find it very annoying during the horrific process of debugging. Towards the completion of the program, it suddenly struck me, everything is executed during 1 loop, which, works fine on many PC's, but what about the ones with older CPU's So, before I delve and edit the code, (and probably cause the whole thing to go to pot), would it be a good idea to implement the use of threads for each "creature"??

    Also, another problem that haunts me with this idea, is the 'timing' process, how would I keep each thread under control, keeping to one 'universal' time? As every thread must kill itself, "reproduce" etc in the same span (if they are meant to).

    I know this may be very confusing, so, if you would like me to redefine something, please tell me .


  2. #2

    Re: D.A.W.N - Question

    Ah cool.. Looks like you are doin some "genetic programming", isn't that right?

    I find it very annoying during the horrific process of debugging.
    If debugging is allready scaring you, You shouldn't use threads because they make things even more complicated. They seem easy to use, but can still make debugging sheer hell.

    You should only use threads when you find that your program could really benifit from them. If it works fine without threads, leave things as they are.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts