Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Advanced Questions?
 

Advanced Questions?

Hi all. I have read around and downloaded the .chm that Henrik Yllemo kindly compiled. While writing a creature I have come up with some questions that I could not find answers to. I will try and test some of these, but its probably a lot of work. Hoping someone has a quick answer for this one in particular:

Is attacking range proportional to creature radius? Or is it constant and equal for all creatures?
MigrationUser 1  Wednesday, June 18, 2003 6:34 PM
Attacking range is related to the creatures CELL radius.  A creature can attack another as long as there is no more than one cell between the cells that the two occupy.  If you like to read, a lot of questions like this one are answered in the posts at the old Terrarium discussion forums on GotDotNet.
MigrationUser 1  Thursday, June 19, 2003 12:32 AM
Thanks - I'll go read. Nothing wrong with avoiding everyone else's mistakes :) I hope...

One more - but if its also in the old forums, let me know:

If I remember the state of a whole lot of organisms, can I test them at any time? E.g. if I bump into a plant / animal, keep the state in an arraylist and then carry on my business, can I iterate that Arraylist many ticks later (the original organism may be the other end of the ecosystem) and test the various state properties?
MigrationUser 1  Thursday, June 19, 2003 5:06 AM
The OrganismState that you get is a copy.  Therefore, when you hold on to it, it will remain unchanged.  If you want "up to date" information, you have to refresh it.  I forget what the call is to refresh it since I don't use it myself.  I just Scan each tick then compare the results to what I have in "memory".  My OrgMemory class keeps track of organisms I've seen and how long it's been since I've seen them.  It "forgets" them whenever it's been too long since I last saw them or I see an organism (myself included) occupying the space where I last saw them.
MigrationUser 1  Thursday, June 19, 2003 10:46 AM
That was more or less the same idea that I had.

I was trying to correlate that with a "map" of the landscape (including mostly plantstates since they don't move are rarely die if people code their herbivores well) and hopefully "remembering" areas where there were more plants. I was trying to figure out if I could update the "map" and remove plants that had died, even if they were out of visible range.
MigrationUser 1  Thursday, June 19, 2003 11:24 AM
You must "see" an organism to update it's state.  However, you could always make an educated guess as to when a plant will no longer exist.  For example, if State.TickAge + TicksSinceLastSeen > Species.LifeSpan remove from map.  This is an oversimplified example, however, since most plants die of sickness (or are munched) well before they come close to their maximum age.  An equally simple, but probably more accurate guess would be LifeSpan / 2.  This underestimates the plant's true life span, but then again, you don't want to wander over to a grove of plants that are about to die off anyway.
MigrationUser 1  Thursday, June 19, 2003 12:10 PM

You can use google to search for other answers

Custom Search

More Threads

• Hosted Web Site Login Manager
• Sounds interesting but looks dead
• Terrariom Down?
• Label Question
• DataGridView not raising CellPainting event
• to Mitch walker
• Wanted : Developers to convert Terrarium to .NET 2.0 and enhancements in their free time.
• AppUpdater Componet Download?
• draw a waveform
• Terrarium Servers Back Up!