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 Professional Discussion / Death Star like scenario

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 18th Jul 2003 19:47
Hi,

I would like to create a space station something like the Death Star in The Return of Jedi. I can see the space station exterior when space battle, but I can also fly inside the space station, i.e. there will be an opening somwhere. When inside the space station, there will be several passage way.

I have no idea how to tackle this. Will I create my space station with all the interior passageway in a single mesh? Or I model the exterior and interior separately, i.e. into two .X files. Then when initializing the game, I "glue" the interior to the exterior.

The reason why I thought of this is I can turn off the collision detection against the space station interior structure until there is a spaceship inside.

One more question is how do I check the collision detection when a ship is inside the space interior. I guess this is more like the same way used for an indoor 3D game like Half-Life. Do I check the collision against every piece of the wall, floors, and ceiling? If this is the case, since every single pice of wall, floors, etc will be a "limb" in the .X file, how do I perform collision checking on a limb of a 3D object?

Can I check whether the camera is colliding with an object?

Any ideas? Any code examples will be greatly appreciated!
Thanks!
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 18th Jul 2003 19:52
If you do it all in a single mesh, odds are your FPS will be a bit on the low side. I would suggest modelling the entire "shell". Then, make it that as you approach the entrance, the doors would open, revealing only a certain part of the interior. Then you could possibly have a "Load Zone" where it would load a separate, interior BSP (I advise BSP over meshes for the interior...this will be more feasible because you'll no longer be looking at it as one giant object; you'll be inside seeing it as a map). The advantage of using BSP is that there are commands specifically made for detecing BSP collision - check them out in DarkBASIC help.

Hope this helps.

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 18th Jul 2003 20:04
Erm... I am not sure I want to move to BSP, as I heard it is still very buggy. (Am I right?) BTW, can we mix BSP and .X models in a game? I mean, I would I made a smooth transition when flying from outside to the interior side? If possible, I don't want to pop up a message like "Loading..." when you knock the space station door, and when finished loading, you suddenly pop up inside the space station.

I am screwed!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
ChrisS
23
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 18th Jul 2003 20:22 Edited at: 18th Jul 2003 20:24
The problem you have is moving from the "space" scene to the fly through the inside the "space station" scene.

I am assuming the first part of the game will be some sort of space battle, and then when all ships destroyed it moves you into the "space station". To make a smooth transition insert a cut scene at this point. Ie all bad guys destroyed fly close to the station, an animation basically takes control and takes you inside. Where the user is given back control.

Its much easier to manage a smooth transition this way.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Jul 2003 22:37
personally i would make 2 or 3 models... load them as mesh and then make objects from them randomly as you go along then deathstar level.
That way you shouldn't have more than 3 or 4x the polygons of a single section of the DSvalley

if you have each of the walls & floor as seperate limbs you can use the builtin box collision... add helpers in Max and you can then load up object for the weapons and place them using the helpers limb position

hope that helps

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 19th Jul 2003 07:37
Hmmm... ok, so basically I can understand the difficult part will be making the transition between the space scene and inside the space station scene. I can't afford any long or abrupt transition as user can always freely move inside the space station or come out. Is not like you will first outside the space station, and the second part will be going inside and never come out again.

Raven: I don't quite understand what you mean, do you mean I create the exterior part in a single mesh, and all the walls and floors inside the space station are limbs of that mesh? Did I get you correctly?

Hehehe.... nobody answer my question yet. How do I check whether my camera collide with an object. As my game is a 3rd person shooter, I don't want my camera to "go inside" the walls as the character is very near the wall or when turning around against a wall.

Thanks for all your help!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
keeblerElf
23
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United States
Posted: 19th Jul 2003 07:49
just make a cube or something and hide it and just keep placing it at the camera's position, and if the cube collides with the wall then you know your camera will collide with the wall also

AzureZeal
23
Years of Service
User Offline
Joined: 10th May 2003
Location:
Posted: 19th Jul 2003 08:31
Radiuses are your friends. Heres how id do it...

Use a distance check from the player to the center of your spherical model. If the distance ever becomes less than the radius of the model, you know a hit has occured (at which point you can blow up the player, bounce him away, whatever).

Now as for the tunnels, id place square/rectangular 'zones' inside the radius of the main model itself. When youre inside these zones, ignore collision with the model.

Sounds simple? Yeah it does.. maybe too simple.. maybe im missing something but I dont see why that wouldnt work.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 19th Jul 2003 09:59
not quite...
basically you create the world in sections which are loaded into memory, each of these section is made up of limbed objects which you want to have collided.

basically think of it all as a Big grid system... you have the death star surface which is made up of flat section objects, and then you have the value made up of more U section objects.

each object is exactly say 100x100dbu in size...
you only really need a max of like 6 objects for the entire station surface, you then load these objects into DBP and then load them as mesh.

you then create objects form them as and when you need to use them for actual rendering... this way you can build the entire space station on-the-fly.

if each section you want to check collision for is a seperate limb
so say

[_] is your little valley thing, then [ would be one limb _ would be another and ] would be a third limb.

you can then use the "Set global collision on" and "Set Collision to Boxes On" ... then all you have to do is check to see if the camera collides with something using "collision hit(camera dummy object,object)"

if you just stop the movement in the direction which you detect the objects XYZ then its really simple to figure out

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 22nd Jul 2003 20:51
Hmm... thanks Raven!

This is what I tried out last week. I create the whole station, both internal and external into a single mesh. As a result, the DBpro collision detection on the station create collision sphere that covers the whole station. This is not I really want, i.e. if there is a big opening on the station, is consider as collision even I am inside the opening without touching any single poly of the station. I tried to SET COLLISION TO POLYGON, and it doesn't work as well.

What I can infer from here is, whenever you created a 3-D object as a single mesh, DBpro create a collision sphere/box to encompass the entire mesh. If your 3-D object is modelled as a seperate mesh join together, i.e. consist of limbs, DBpro will create collision sphere/box for each limbs.

Correct me if I am wrong. If I am right, then how do I do a fairly accurate collision detection if I model my object as a single mesh? As I think this is more natural when comes to texturing. Let say that I model a human as a single mesh, I want the collision to be TRUE if another object collide with any parts of the body, and FALSE if the object doesn't touch any parts.

If it can be done, then I have some ways to work on my "Death Star"

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Jul 2003 12:25
Thats right - the collision area surrounds the complete object. I think the way around it would be to try and set up collision boxes inside the object, if you know the position and size of each object you want to check for.


Its better than a poke in the eye...

Login to post a reply

Server time is: 2026-07-21 12:50:04
Your offset time is: 2026-07-21 12:50:04