Showing posts with label Tech Landscape. Show all posts
Showing posts with label Tech Landscape. Show all posts

Thursday, May 14, 2009

Random thoughts on the model for Twisted Frontier

Segments need to be able to tell whether their 'next' angle is concave or convex, in order to handle triangle division. I figure the triangles would be done via 'phantom segments', the need for which scales linearly with the number of edges, which is something, at least.

To determine whether a techpoint has been reached, iterate over all unreached techpoints, to find the closest segment. From there, it's relatively simple to work out whether the techpoint is inside or outside the boundary. The calculations are much the same as the angle calculations alluded to above. The easiest way to conceptualize checking points is to iterate around each boundary and take the lowest distance. I'm worried because all of these calculations basically scale linearly with the number of segments involved, which scales however it damn well pleases, which isn't reassuring. Anyway, there are some assumptions we can make: the 'blob', in general, is a single boundary, which may contain inverted boundaries within itself. These boundaries will never contain any more boundaries, so the only issue surrounding them is their creation.

Actually, that serves the same function as any hypothetical triangle code, so I may just use that idea instead, since I sort of understand it better.

However, all of this vector algebra stuff is kind of geometry-agnostic. I wonder if there are any efficiencies that can be derived from a more geometrical basis of calculation.

Sunday, May 3, 2009

A change in plans

I've decided that the Tech Landscape project needs a game to live in. Its working title, in the venerable tradition, recently established, of making a game name by colliding an adjective and a noun at high speeds, will be Twisted Frontier.

At the moment, this means very little in terms of development. The most significant aspect of this idea is that, once I get the project into a respectable form, the landscape code will live under a "twistedfrontier" directory. I mean, until we think of a name that isn't just silly.

Saturday, May 2, 2009

Dammit

I made some significant mistakes in the latest version. I'm going to fix them now, before code gets written around them.

Friday, May 1, 2009

Work on Tech Landscape

So, head over to the Launchpad link in the sidebar, or just grab the latest revision yourself. I did some, but not all of the work, necessary to drive expansion using lines.

In short, what needs to happen now is, there needs to be code to use the Newton's method solver to find solutions, and then divide the segments into intervals. Over each interval, use the other Newton's method solver to find extrema. On each extremum, (which IS a word, thank you very much, Firefox), calculate the force, and project that coordinate out by the outward force on it. (Nothing is done when the force is negative.) Corners should be projected outward by the vector sum of the two forces on them. The most efficient way to do this would be to find a stationary corner, and then go around from it, stopping at stationary corners to write everything that came before to memory. Then, there's the issue of determining whether any vertices (that's also a word...) lie inside the shape at their new positions.

I think the trick to that is to divide the interior into triangles, and test that no points lie within those triangles.

This will all take a lot of power.

Thursday, April 23, 2009

Project Description: Tech Landscape

This was originally Lifewish's idea, but I'm currently the most active (read 'only') dev over on Launchpad. The basic idea is that, instead of a tech 'tree', which constrains development to 'sensible' paths, technological advancement is modeled with a 'landscape'. The current plan is that each tech is a single point on a landscape (currently 2-dimensional), and a player's knowledge is represented by a closed surface (currently arcs of a circle, though there's no sound reason for this beyond having something coded). If the surface contains a point, then that point's tech is available to the player.

This is all complicated by the fact that most points exert a repulsive influence (currently not modeled, though it does follow inverse-square) on 'knowledge'. Some techs, when obtained, will modify the repulsion of other techs. This allows 'synergy' between apparently-unrelated techs.

Ideally, techs will be randomly-generated and hidden from the players. (Including AI. I think I sublimated my brief ant-burning phase into tormenting things that actually give me a reason to hate them, like cheating AI.)