Sunday, May 30, 2021

Preliminary Specs for 'Tribes'!

I was thinking about how I never finished anything and how I was supposed to write a very simple civilization game called tribes, where the whole point was for the tribes to spread out and grow their population to the point where the land can support them, like in civilization as I remember it. So I need a grid of land tiles, land and sea, actually, with production values. A tribe with agriculture could support a larger population on a given bit of land, which would be random but should be based on area, soil, climate, etc. I was thinking that I can make terrain by picking points in a canvas and making triangles, defining land and sea based on elevation. The elevation of a point comes from clicking a second time, with the sum of the difference between the second point and the center giving a number between +/-390 pixels. Anything less than zero is below sea level and would be underwater, above is above water and makes land. The initial point subdivides the rectangle into four triangles and the page further subdivides the triangles generated from user selected points six ways to fake up some Voronoi tiles and sets the new points to be the average of the endpoints or triangle corners. The four corners might be random or set by the user if they choose; I need a button which will toggle between ‘Random Corner Heights’ and ‘Select each corner and height’. Then subsequent points picked will fall within an existing triangle which will be subdivided three ways, or it may subdivide a triangle edge. If the subdivided triangle on that edge is really small in area, then it will subdivide two adjacent triangles into four along that edge, at that midpoint.


So that would let me make a world rectangle with land and sea and maximum population based on area and a random factor. Then I can toggle on a button to place peeps and turn them loose to fill up my world. Not Simple Civ but Sims: Tribes, if you will...

No comments:

Post a Comment