Page 4 of 5

Re: Underlife (WIP)

Posted: Sun Aug 14, 2011 2:45 am
by Taehl
By "empty star", I mean, a large, spherical, cavernous shape. Like in this picture. You're inside it, not on the surface. While I do like the idea of central gravity (and therefore, as you said, walking around it ends up where you started), unfortunately, that kind of geometry isn't conducive to square tile-based environments.

Re: Underlife (WIP)

Posted: Tue Aug 16, 2011 10:26 pm
by SoggyWaffles
I've been thinking about this some. You could create a map that was the surface of a sphere and have it loop back on its self fairly easily. If you made a terrain generator (noise maybe?) to populate the surface of a sphere and store those values in spherical coordinates (where your radius will be a constant), then set up a parametrized function. You can extract the surface of the sphere onto a rectangle (array and then a framebuffer?) and then loop it. You won't get the orientation of the map to change, but you can potential loop back to where you started and you will get seamless edges. And if the initial map is large enough give the impression of an infinite space.

I only know the math to get you from the sphere to a 2D rectangle, populating sphere is up to someone else.

Re: Underlife (WIP)

Posted: Tue Aug 16, 2011 10:48 pm
by Taehl
I'm afraid I don't understand what you're saying. How would I build a spherical surface with square tiles? And what would you do about the fact that as you go outward, each ring of tiles will require more tiles to fill it than those under it?

Re: Underlife (WIP)

Posted: Tue Aug 16, 2011 10:48 pm
by kikito
I definitively prefer stars/islands/planets to "continuous caverns". I don't particularly mind if gravity simply goes "down". It's a game, not the universe.

I also like being able to walk straight from time to time (I really hope you include some walkable surfaces of more than 3 tiles before you have to jump/fall/whatever).

Re: Underlife (WIP)

Posted: Tue Aug 16, 2011 10:53 pm
by Taehl
I probably won't favor flat, easily-walkable surfaces, but this is intentional: The game is about building the map. In fact, its most important mechanics kick into play when you do. So by avoiding natural walkable paths, I encourage building, which will increase the effects of said mechanics. That being said, my current terrain algorithm often puts out flat areas six or seven tiles long, and I've seen it make flat floors over a dozen tiles long.

Re: Underlife (WIP)

Posted: Wed Aug 17, 2011 12:50 am
by SoggyWaffles
When you parametrize a 3D surface (an surface of any 3D function) you can take that surface and flatten it out into a rectangular 2D surface (technically a plane) with in a giving domain. I wish i could draw a picture! Oh, took me a bit, but google produced a result. Its not the best, but its a start. http://www.math.oregonstate.edu/home/pr ... rsurf.html
But if you have a idea on how you're going to be doing things, don't let me get in the way, and I don't want to end up hogging/hijacking your thread.

Re: Underlife (WIP)

Posted: Wed Aug 17, 2011 12:59 am
by Taehl
You're not hogging my thread. ... But I'm afraid I still don't know what you're talking about.

Re: Underlife (WIP)

Posted: Wed Aug 17, 2011 1:13 am
by SoggyWaffles
After some more thought, i don't think it would work out anyway. But here is an example, if you take a cylinder and parametrize it you basically "unroll" it into a rectangle, so any given point on the surface of the cylinder can be found on that parametrized rectangle. Same thing is true with a sphere. Consider a rectangular map to the a globe. Which brings me to my point of not really working. Antarctica doesn't line up with the Arctic when you stack to maps together. East and west will work perfectly, but not north and south. Too bad i didn't think that much sooner. :P

Re: Underlife (WIP)

Posted: Wed Aug 17, 2011 1:16 am
by ljdp
Take a piece of paper and roll it up, you have a cylinder. But it is still a 2D surface. So you could travel in any direction on your 2D platformer and you'll eventually wrap around to the other side.

edit: lol you posted while i was typing this message, but yeah ditto what he said ^

Re: Underlife (WIP)

Posted: Wed Aug 17, 2011 1:32 am
by Taehl
I don't get how that would help. This game is a 2D sidescroller. You don't walk on a 2-dimensional surface, you move back/forward and up/down. Once you dig down into the star, a grid would break down badly.