Focus on Technology
I think I have to retract a statement I made earlier.
At my new job, there is a focus on experimenting with new technology. This can involve evaluating new technologies produced by others, or development within our own department. Whereas my last jobs were very regimented by comparison, this job is very free-form. And like in video games, I perform best in free-form mode.
I've had a lot of opportunities in the two months I've been working now to design systems that I've had 100% control over. And as it turns out, I find a lot of pleasure in optimizing, tweaking, and retuning these pieces of clockwork to better do their job. In fact, I'm learning to think in different ways, and I think that's bleeding over into the Vyde effort. I'm finding it really hard to keep that "WRITE SOMETHING!" idea out of my head, and all the minion ideas that come with it screming "TRY THIS!"
As I was reading over my blog up to this point, I realized that I may have jumped the gun by saying (more than once) that I want Vyde to be an experiment in gameplay and not technology. The more I think about it, the more I want to make Vyde a platform for technological ideas, too.
But there's a catch. Vyde is admittedly a "public" project, in as much as I'm publishing my progress on this blog and will likely make works-in-progress available to anyone who's interested in seeing them. But I'm afraid its publicity is going to be disappointing to some who are interested in seeing new technology ideas. As much as I'd love to promise that I'll come up with a new, better mousetrap, I can't, and I expect that a lot of the eureka moments I have will probably be impressive only to me. It's happened before: I derive a clever way of doing something that I pat myself on the back for, only to find out that it has been done several times before, and I just didn't know the right phrase that would bring my Googling self to it. So you've been warned: don't expect too much. :) I've been known to impress people, but so far it's been people who are in another industry. I can't recall having ever impressed seasoned computer scientists.
Enough of that then. Here's a problem I've been baking at 450 for several days now:
Unreasonably Infinite
Assume that Vyde will, in fact, be boundless, with tiles stretching in all directions. It's reasonable to assume that every tile must be describable in 2D coordinates -- x and y. But even a 64 bit integer isn't infinite. And I'm pretty f$@#ing dedicated to this infinity concept. So further assume that when I say infinite, I mean truly infinite, not "mostly infinite," or "reasonably infinite." I mean unreasonably infinite. The player should be able to move in any direction without the possibility of running into an artificial boundary. So how is Vyde's coordinate system supposed to work when a tile could potentially extend beyond the reach of the machine representation of an integer?
I keep coming back to some kind of exponentiated coordinate system. Something that permits a tile's X or Y coordinate to be represented by more than one integer: a tile needs exponents, but an infinite number of them.
Say the machine can't deal with anything outside a signed 8-bit integer. A tile in such an environment would be constrained to lying somewhere within the square defined by corners [-127,-127] and [128,128]. What happens when I make a tile at [129,129]? At that point, Vyde's coordinate system would have to be extended. Whereas it previously used an exponent of 0 to describe tile locations, it must now use a base of 1. 129 = 1281 + 1. But that only affords the player 128255 + 128, or 2.18 x 10537 tiles (to the right of the origin).
What happens when the player discovers immortality and exceeds that boundary? The limits of the machine's numeric representation (and its hard drive, no doubt) are once again exceeded. So, naturally, another exponent is needed. With apologies to Knuth, we keep adding exponents until we reach SuperV, or 128256256... tiles in any direction. We can't do that, 'cause eventually the limits of the computer's memory will be exceeded just holding exponents.
Generally, the Vyde world can be thought of as a bunch of tiles. Every tile (which in this case could consist of sub tiles) must be addressable by some Cartesian coordinate. Even if tiles/zones/partitions/whatever were stored on disk separately, with no concept of each other, and stitched together by the engine as needed, each zone would still have to be assigned an address in, well, the infinite domain.
I think the problem at this point is how to overcome the CPU's immutable limitations of numeric representation. It's not a problem of scale, it's a problem of size -- the engine can be built to only consider one "piece" of space at a time. If the CPU's registers could be grown indefinitely by simply spending money as needed, this might not be a problem. So instead of relying on the CPU's representation of numbers to afford us an infinite address, let's instead think of an array of disks, which can be expanded as needed by simply spending more money.
Until addressability becomes a problem. Even under the assumption of infinite space, time must be spent locating a given address. Bummer. Space vs. time always gets you in the end.
Space vs. time is only a constraint so long as computing power remains constant. As computing power increases, so do both space and time. So isn't this a problem of scalability instead? Can the Vyde engine be built so that it can augment its numeric representations as needed, as long as we, the users, promise to provide it with the resources it needs?
What if a law were passed that said all software must be capable of representing any year, not just 4 digit ones (or ones that would fit in some unit of addressable memory)? How could that problem be solved?
And if I get stuck on this problem, what solution will I accept as "good enough?"
0 Comments:
Post a Comment
<< Home