When i made my first creature, and when it reproduced first time i was surprised that the child location is chosen randomly from all over the terrarium. I see that it is not right, the child must be placed near his parent. In many means it will be reasonable. Firstly to protect young growth: the parent would be able to protect his children right away; the children could stick to parent till they grow as needed; it will reduce occurrences with child born in not habitable areas. Secondly it will open new strategic possibilities, e.g. "areas of living", so different areas of terrarium can be occupied by different species holding theirs strongholds. Therefore a lot of different creatures would have their chances to survive and prosper in terrariums, not only dominating ones.

Unrealistic animal birth
Glennpd
The algorithm can be optimized to search 1 empty cell instead of group, it comes from that in Terrarium creatures always have odd width and height sizes in cells because they have radius, therefore just add child's radius to all other creatures radiuses and voila! Fill the binary (empty = true, not empty = false) matrix. Then traverse matrix in best-first style starting the radius of parent radius + child radius from the parent position, searching for the first empty cell. Very simple.
Again the birth isn't given by every creature by every tick, 3-4 times (ticks) average per creature's life!
The significance of realistic birth shouldn't be underestimated.
ryan_gartner
DavidHanlon
> Once the Terrarium Source is released I'll just replace the grid system with a bounding circle
> system which will make the concept of placing babies next to parents quite a bit easier,
> along with speeding up the LOS algorithm (Scan), simplify path finding algorithms
Ok, if you'll implement bounding circles in the next release i hope you'll implement new birth
scheme either. This and other improvements should push the app closer to real life simulation.
> and will remove the Bresenham implementation for grid cell locking that currently exists
> and makes everyone's life a living h*ll
But if you ask me i'll say that i get used to them. =)
Say, what would happen after this great "source release", who would mainly support the terrarium development What major features would appear And when this release would happen
Bri68
Sit down and write an algorithm that iterates over a 10,000 x 10,000 array looking for 3x3, 4x4 and 5x5 groups of empty cells after you've randomly filled 40-75% of the space already with 3x3, 4x4, and 5x5 groups. In many cases there doesn't even exist a single group of cells that fits the criterion because much of the remaining space is cordoned off into single cells or strange patterns.
Once the algorithm is done, have your application run the algorithm 60 times every second. That is basically what the Terrarium is doing during normal operation. In addition, unless the algorithm operates at blazing speed, it can't be used. It basically needs to consume only about 10 or 20 milliseconds of game time every second.
Ed.S.
I'd say it sounds like you know your way around some of the internals.
JB-Bellevue
So first off, the Terrarium already has a grid system that is integral to about 15 different internal algorithms, so it can't be changed. The grid system is aligned on 8x8 pixel boundaries, and creatures during their lifetime will take up from 9 to 25 of these cells at any given time.
The alogrithm would never actually take into account parent radius or child radius because these numbers don't matter. However, since each child actually takes up 3x3 cells or 9 cells the algorithm gets pretty hairy, simply finding a single empty cell won't work. You have to find a 3x3 grid of these cells in order to place a child.
I won't say the algorithm isn't easy. Not in the least. However, it is time consuming. Simply try it for yourself given the criterion I cited in the previous posting. If nothing else I'll work out the code tomorrow sometime and post it.
I do think it is a moot point for now. Once the Terrarium Source is released I'll just replace the grid system with a bounding circle system which will make the concept of placing babies next to parents quite a bit easier, along with speeding up the LOS algorithm (Scan), simplify path finding algorithms, and will remove the Bresenham implementation for grid cell locking that currently exists and makes everyone's life a living hell.
Ajil
Most of the issues here are because the Terrarium is implemented using a grid layout. If we got rid of the grid and used bounding circles this wouldn't be an issue and it would be much faster to find a *close to parent* location than with the grid system.
The largest issue with the grid system is *unused space* that is locked because of a small overlap in a creature's bounding box or a plant's bounding box.
PlumFighter
lovely
I'd probably look at implementing the birth close to parent. With bounding circles it becomes a lot easier and using a proper space subdivision algorithm (QuadTree), even if the immediate surroundings are blocked off you'll find some space for the new creature that is close to the parent much faster than the current algorithm randomly finds empty space.
After the great "source release" I plan on working on the code and releasing updates weekly/monthly as I'm sure many other programmers are. Independent developers will be responsible for their own source trees for support, so small community sites are going to have to be developed. As for major features, that is up to the developer(s) working on their particular implementation. When it happens I'm not sure, that is up to Microsoft.
As far as different versions of the Terrarium go, I'm sure MS will continue to support some version of the Terrarium. They may even take code submissions for future releases from the community and maintain an MS supported version of the game. As for me, I'm just going to go all out on the code as spare time permits and won't bother working with the supported version since I have so many huge changes already coded that will make any versions of Terrarium I release drastically different from any source release MS does.