Flatland

Started by
12 comments, last by NIm 18 years, 4 months ago
I have a problem, and I hope someone will help me. I admit that it's not a common problem, nor is it something someone is likely to already know the solution for. I hope, howecver, that someone will take the challenge of trying to figure it out. I am currently contemplating a space combat game, and I've decided to do it in two dimensions, but with a twist. The space that the ships move around on will be 2 dimensional, but I want the space the camera moves around in to be three-dimensional. For a better idea of how this would work, I refer to flatland I want to allow this 2 dimensional "space" that my ships in to be able to warp, or bend. Objects which cause high space-time curvature such as black-holes should actually curve the space. I don't plan for relativistic effects such as time-dilation at this time, because of representation issues. I also want to allow for spheres and other underlying geometries, as well as just plain wierd Star Trek style space-time anomalies, although in my game these anomalies and constructs will consist of 3 dimensional warping of 2 dimensional space, so you will be able to see what the anomaly is actually shaped like. Unfortunately, I don't know how this could be implemented, code wise. I would appreciate any ideas about solving this problem I know that I've asked this several weeks ago, but I got very few replies, and none of them were helpful, so hopefully it was just the wrong time to ask. I hope I don't offend anyone by doing this.
Advertisement
If you intend to use a parametric surface, then you only need to evaluate the final position of a point using the 2D coordinates of that point as the parameters.
You want your action to take place on a 2-dimensional manifold, embedded in euclidean 3-space. Lucky for you, computer animation researchers are so down with this. You'll need to decide what the equation of your manifold is... whether it's a surface made of triangles (not really a manifold, but can be made to act like one), or a B-Spline or NURBs surface (this may well be a good approach, for your needs), or whatever. Then you'll need to describe how position, velocity, and acceleration in 3-space can be projected onto your manifold, to keep everything in line.
Great... do you know of an excellant tutorial about NURBS? If so, where? what sort of information is there on calculating the various geometric aspects(finding angles between three points, finding shortest distance between two points, etc) of such a space?
I'm not sure what web material on NURBS is out there... any decent computer graphics textbook should have a good section on them.
What you really want to invest your time and geomorphic interest into is Assembly language programming. If you can master this, you can make some incredible pixel shaders which will obsolidify and unrequite any necessitation of 3d to 2d conversion or conversation: You can bridge the boundary yourself!
Quote:Original post by Funkymunky
What you really want to invest your time and geomorphic interest into is Assembly language programming. If you can master this, you can make some incredible pixel shaders which will obsolidify and unrequite any necessitation of 3d to 2d conversion or conversation: You can bridge the boundary yourself!

What the heck are you talking about?
Hah, good. that didnt make sense to me either. I'd like to know what you meant.
Maybe he meant to say "I just bought Ultimate Spiderman and defeated Rhino" (ok, you need to have played it to get that).

Anyway, my first instinct would be rendering to texture in plain 2D and apply it to a grid to go crazy with in terms of twisting, bending and whatnot. Though the second instinct would be, that the result might look pretty ugly and stretched.
f@dzhttp://festini.device-zero.de
Don't know whether I understood the original question totally, but as a second possibility besides spline surfaces the FFDs come to my mind.

If not known: FFDs are grid based "free form deformation" tools, originally intended for modelling but also good for animation. Their initial state is a regular box grid, cylinder grid, or whatever, defining the "normal" 2D space. The secondary state of a FFD is defined after pulling the grid CVs around like wanted to model the warped space. This deformation is analogously applied to geometry.

EDIT: In comparison to spline surfaces the space between the CVs of a FFD is not so smoothly curved, since it is normally defined by tri-linear interpolation as far as I remember.

[Edited by - haegarr on December 5, 2005 2:04:38 AM]

This topic is closed to new replies.

Advertisement