Comments on: Of Jelly Cars and Other Trifles The entire galaxy was subdivided in sectors, each one being of size of a solar system. Sectors were connected by jump gates only so could be considered independent and thus had completely independent coordinate systems. Inside a sector however I wanted to have consistent world coordinates and int32 was just not sufficient for that. Each sector was about 150 AU in size (approx 2.24e13m). Int64 gave me a resolution of ~1um which was an overkill of course. The game was inspired by the X-series and was a start-up indie project with 2 programmers, 1 artist and 1 guy who had the idea and some money. It was scrapped because of massive financial problems after the first 8 months... A pity as it was a nice piece of work. Maybe not the best example to learn from, but the coordinate system worked very well for me. The entire galaxy was subdivided in sectors, each one being of size of a solar system. Sectors were connected by jump gates only so could be considered independent and thus had completely independent coordinate systems. Inside a sector however I wanted to have consistent world coordinates and int32 was just not sufficient for that. Each sector was about 150 AU in size (approx 2.24e13m). Int64 gave me a resolution of ~1um which was an overkill of course.

The game was inspired by the X-series and was a start-up indie project with 2 programmers, 1 artist and 1 guy who had the idea and some money. It was scrapped because of massive financial problems after the first 8 months… A pity as it was a nice piece of work. Maybe not the best example to learn from, but the coordinate system worked very well for me.

]]>
By: Garett Bass/2011/04/17/of-jelly-cars-and-other-trifles/#comment-2940 Garett Bass Mon, 18 Apr 2011 18:51:06 +0000 Actually, that's exactly the way I handled that problem when I have done a space game where the distances were even too big for int32. So I had world positions as int64 and did calculations only on local deltas. The performance hit was minimal and considering the convinience of having uniform world coordinates I think it's worth it. Before that I had different contexts with own floating point coordinate systems but ended up changing that because the conversions all over the place were driving me crazy. In the end I still had space partitioning but for other systems like visibility and physics. Actually, that’s exactly the way I handled that problem when I have done a space game where the distances were even too big for int32. So I had world positions as int64 and did calculations only on local deltas. The performance hit was minimal and considering the convinience of having uniform world coordinates I think it’s worth it. Before that I had different contexts with own floating point coordinate systems but ended up changing that because the conversions all over the place were driving me crazy. In the end I still had space partitioning but for other systems like visibility and physics.

]]>
By: Garett Bass/2011/04/17/of-jelly-cars-and-other-trifles/#comment-2912 Garett Bass Mon, 18 Apr 2011 05:49:19 +0000