Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Matrix Planets

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 6th Aug 2004 03:33
Is it possible to make a matrix into a ball or to make a load of matrixes into a planet ball?
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Aug 2004 10:13
doubt it

"eureka" - Archimedes
NathanF
21
Years of Service
User Offline
Joined: 24th Mar 2004
Location:
Posted: 6th Aug 2004 12:25
It's not possible as you can't overlap the x/z points. If you really needed to, you could make a planet object, add some collision, and some gravity to pull you towards the centre. But that's a load of work...

"I....I like rice?"
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 6th Aug 2004 15:11
It is not possible to wrap matrices into a spherical shape. You could randomly generate matrix terrain to simulate the effect of walking around a planet, but then again that's pretty cheap and would not achieve the same effect. The only other solution would be to do what Dark Sephiroth mentioned, an actual planet object. It actually wouldn't be too hard. Set up collision like normal (NG would probably be the best choice for this).
Then, to create the gravity use the newx,newz,and newy value commands. The direction should always be angled toward the center of the planet object and the speed/force would be the force of gravity. You just need to rotate your character correctly at the start and collision should take care of the rest.

The hardest part would be the amount of FPS a giant planet object would chop off. You would need to cut the planet object into pieces and only have two or three shown at a time, and then most of it can be hidden by clipping with fog.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Sleet
21
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 6th Aug 2004 15:20
It IS possible to makke a planet out of matrices.

It is true that it is imposible with 1 matrix but if you were to create a matrix that resembled half a sphere (you'd need to be creative to turn a square into half a sphere though) you could then create a second matrix that's inverted, piece the two together, and you now have a sphere made up of 2 matricies.
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Aug 2004 02:43
...But it wouldn't look like a modeled planet object. The x and z size of the tiles are fixed. So at the edges, one tile may represent a huge percentage of the height, and at the poles one tile would represent a tiny percentage of the height.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 9th Aug 2004 10:40
I see, it is a pity you couldn't shpae a sphere like the matrixes or actualy make the sphere a matrix that you can raise and lower parts
to create hills and mountains and planes.
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 10th Aug 2004 00:37
Like Dark Sephiroth said, you can still insert a .x model in your game, that would work

- Mind the gap -
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Aug 2004 00:44
@vampire: Essentially, you can, if you give the sphere enough polys. If you load it into a memblock, you can easily move points at normals from their current position to create mountains etc, exactly the way you'd do it with a normal matrix. All it takes is a bit of figuring out.

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 10th Aug 2004 01:45 Edited at: 10th Aug 2004 01:46
Yes I see kentaree , that means either buying or making a level editor that can do this, also I would need to know how many polys I would need
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Aug 2004 02:23
Well, the only difference to a matrix is that you'd have to write a function to move vertices. A matrix also asks you how many segments you want. For the sphere itself, you could use make sphere and then enter how many rows and columns you'd want, and then convert it into a memblock, so I dont see the problem.

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 10th Aug 2004 11:53
Rows and columns hmmmmmmm I would have to try that out but I am notthat great a programmer I would need an example bit of code but I will try it out
BigDan256
21
Years of Service
User Offline
Joined: 29th Oct 2003
Location: NSW, Australia
Posted: 12th Aug 2004 18:59
Here's some code that makes a sphere-matrix setup

The first problem is the texture on the lower hemisphere, you'll need to turn backface culling off

The second problem is also with texturing, but at the spots where the flat parts meet the edges of the sphere. If you want the flat part invisible, you'll need to have specialised textures for these squares

Plus all the other problems mentioned above about the sphere still being on an x,z grid so positioning of little people and objects won't match whatever tiles you have

The only bonus of using a matrix-sphere I can think of is the ability to use the get matrix height commands, but you'll need to know which hemisphere you're in, etc. And simple math can do that, unless you have hills and stuff.

vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 12th Aug 2004 23:24 Edited at: 12th Aug 2004 23:35
So you are saying that the little people and objects won't cling to the matrix ball but ride or walk flat BigDan256? that ia a shame because I liked the ball by the way the program worked well

Couldn't you get around the problem of hill by simply importing stuff from Bryce and placing it on the ball?, plus can you turn the matrix into a dynamic XYZ grid?

Also I was thinking if you could raise and lower parts of the planet with a virtual brush say you had several brushes square, oblong, round tublar e.t.c and you could change the width and lenth of thes brushes and also you could raise and lower the ground with comands with thes brushes then youcould then make rivers and sea and continent an mountainous regoins as well but I would really need to know how I would programm that
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 13th Aug 2004 01:24 Edited at: 13th Aug 2004 18:19
Actually I got now Kentaree but is there a way to manipulte the sphere so I could raise and lower parts of the mesh, if that could be done a landscape planet maker could be made using memeblocks?


I know you can use the scale objects command but I was thinking of being able to raise parts of the mesh using increments so that you could raise and lower parts of a planet in real time in a wysiwyg kind of way, it that possible?

and can you use hidden 3d objects like shapes ? If so how would it be done?

Login to post a reply

Server time is: 2025-05-25 10:05:21
Your offset time is: 2025-05-25 10:05:21