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 / Partial Automatic Object Collision

Author
Message
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 1st Jul 2013 03:12
Hi everyone.

I am in the process of making an RPG game and it is looking pretty good. Automatic object collision has been more than satisfactory on the character, as I have yet to have any glitches. However, when it came time for creating a "skybox" I textured a newly created sphere and inverted the texture. It looks good but is detected as an object in the automatic object collision.

Is there anyway to bypass this collision so the character doesnt collide with it? Due to this he just won't move at all while inside the sphere. Or is there another way of doing this sky sphere without collision.

Thank you very much for your responses.
Rick the Programmer
22
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Maryland
Posted: 1st Jul 2013 03:33
Try



could be as simple as that

Ask not for whom the bell tolls;
It tolls for ye!
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 1st Jul 2013 03:36
Not at my design computer right now but I'm farely certain that it means the skybox won't collide into anything.. but the object will still collide into it.
Rick the Programmer
22
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Maryland
Posted: 1st Jul 2013 03:47
A ghetto solution might be, whenever collision detection with non-skybox objects takes place, to teleport the skybox sphere far enough away that collision between the skybox and player definitely won't happen. Move the skybox back before the sync and all should be well, yes?

I'm sure there's a better solution than that, though.

Ask not for whom the bell tolls;
It tolls for ye!
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 1st Jul 2013 03:54
Umm that's kinda asking for memory leakage hahaha
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 1st Jul 2013 19:56
I've been trying to find a solution to this type of problem since I started working with dbpro. If you do happen to find anything, please update this thread!

http://mattsmith.carbonmade.com/
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 1st Jul 2013 22:09 Edited at: 1st Jul 2013 22:10
With the command shown earlier :

set object collision off skyboxID

as well as setting the skyboxID to the same exact X, Y, Z Position of your camera, you shouldn't be getting collision errors. Plus your skybox is always centered with your camera.

I use an inverted sphere in mine and it works just fine.
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 1st Jul 2013 22:15
It isn't camera collision. It is object collision. Will the same apply?
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 1st Jul 2013 22:17 Edited at: 1st Jul 2013 22:18
Yes, the camera is not the issue and has no collisions.. I just use the camera to center my sphere with so that the skybox stays centered. But with the set object collision off with the number of your object sphere, it should be ok.
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 1st Jul 2013 23:16
Yup at the center there is no collision! Thank you JackDawson saving the day again
Rick the Programmer
22
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Maryland
Posted: 1st Jul 2013 23:22 Edited at: 1st Jul 2013 23:25
B-b-but... that was the first thing I suggested

*forever alone face*

Does basing the position of the skybox on the camera position really make a difference with the skybox's collision being set to <off>?

Ask not for whom the bell tolls;
It tolls for ye!
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 2nd Jul 2013 05:13 Edited at: 2nd Jul 2013 05:19
In all fairness, Rick the Programmer did mention using the object collision off function.

As for putting the sphere at the same X, Y, Z of the camera is how skyboxes work.

The illusion is what your after, and centering the sphere around the camera is how you keep the stars at a distance. Then you can make other spheres / objects that can have planetary / rock-like textures. Moons and stars and other rocks like-asteroids can be actual objects. Use the FOV as well as other commands to create the illusions to fake the vastness of space. You can generate textures that have some color to it to make cloud-like nebulae. See, the nebula can be set at extreme distances at specific spots randomly. As you move your camera around you can simulate the clouds moving around. Same with the other planetary objects. The further away an object is, the smaller it gets.. eventually it will go behind your sphere. When this happens.. unload the object by deleting it. This keeps your memory foot print down.

You can also use Billboards with planet textures for asteroids / planets in the distance, just like you would trees around you on a terrain. The closer you are to the billboard, you would fade the object of the planet, or asteroid into view FROM BEHIND the billboard. The closer you get to the billboard you would move the object through the billboard and once you get to that midway point, you would delete the billboard and you would have the physical planetary object in its place that you can interact with.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 2nd Jul 2013 09:31
Quote: "You can also use Billboards with planet textures for asteroids / planets in the distance, just like you would trees around you on a terrain. The closer you are to the billboard, you would fade the object of the planet, or asteroid into view FROM BEHIND the billboard. The closer you get to the billboard you would move the object through the billboard and once you get to that midway point, you would delete the billboard and you would have the physical planetary object in its place that you can interact with. "


I agree adding 3D backdrop object is great and really improves visuals. Especially when you can see perspective changes. When you move across the level they provide depth to the background.


Quote: "The illusion is what your after, and centering the sphere around the camera is how you keep the stars at a distance. Then you can make other spheres / objects that can have planetary / rock-like textures. Moons and stars and other rocks like-asteroids can be actual objects. Use the FOV as well as other commands to create the illusions to fake the vastness of space. You can generate textures that have some color to it to make cloud-like nebulae. See, the nebula can be set at extreme distances at specific spots randomly. As you move your camera around you can simulate the clouds moving around. Same with the other planetary objects. The further away an object is, the smaller it gets.. eventually it will go behind your sphere. When this happens.. unload the object by deleting it. This keeps your memory foot print down."


I'd agree with this only if this was either a space game or some sort of infinite scrolling terrain style game. If the game world is just some elaborate fixed area or arena then it's probably best to use a cube mapping shader. It will ensure that the sky sphere never appears to get closer. With this you can set it up to cover the entire playable area, in a fixed position. You can even set it to span a very far distance out from the playable area.

Distance Clipping is a problem. If you move the sky sphere with the camera then anything too far away, falling outside of the moving sphere, is going to pop out of view. If you use a fixed position for the sky sphere then if the far side from the player is too far away the camera might not render that far if you used Set Camera Range. Generally you can plan your scale and distances to avoid this.

The bottom line is, with all this billboard and backdrop populating, it's a good idea to be moving around as little as possible, and the code complexity will be less.


Quote: "Is there anyway to bypass this collision so the character doesnt collide with it? Due to this he just won't move at all while inside the sphere. Or is there another way of doing this sky sphere without collision."


You should be using Sparky's Collision plugin. You'll save yourself a lot of trouble, and it'll do this for you. There's only 2 or 3 commands that you'll need if you are doing simple collision checks.

Login to post a reply

Server time is: 2026-07-06 20:31:07
Your offset time is: 2026-07-06 20:31:07