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.

Newcomers DBPro Corner / How do you stop something flying through the walls of a 3ds world?

Author
Message
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 19th Jan 2007 13:01
Hi, I'm a DarkBasic Classic user and I've been struggling with this problem for ages. I've created a fairly simple world as a 3ds file, but whenever I use it in object collision, the sphere I've created for a character can't move anywhere.

I've put the 3ds world, its textures and the code I've been using in the attached zip file - could someone please modify it for me, so you can move and not fly through the walls?

Attachments

Login to view attachments
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 20th Jan 2007 02:49
A couple suggestions.

1) Use polygon collision, rather than spheres, since you are inside the model

2) even better, use one of the collision sets, like the one by Gman, et al.

3) even better than 1 and 2 (imo), use Sparky's Collision plugin.

Also, I wonder why you use 2 textures rather than one, which would save memory and speed. Also, I had to convert your 3DS file to .x for it to work properly. I like your textures, but the wall tiles pretty obviously from a distance.

Back to your original question. I would definitely use a collision detection created by someone who has done the math, unless you understand and can code it yourself.

nice work, keep it up!!

D
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 20th Jan 2007 11:38
Thanks for that, Dracula!

I've just given Sparky's Collision DLL a go and it seems to work fine!

About the 3ds file, though - how can you use a single texture file and give the 3ds world two textures? The 3d programs I've got always export a 3ds file with each texture as a separate file. Is there a way around this?
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 20th Jan 2007 14:37
when you UV map set up the floor part separate from the wall part. Here's a look at one I am currently working on:

the texture map thus far (done with photoshop):


the uv mapping process(done with cinema 4d/bodypaint 3d):


The rock and wood will be expanded to fill the texture space, once I get the building all layed out. This will give a better texture quality when the player gets close up. But, as you can see, there will be several different types of texture on the one .png image for the building. There will be 4: stone floor, stone wall, wood wall, and roof. I create these as large 512x512 and then scale and tweak to fit the uv map so it will look as best as I can get it.

Hopefully this makes sense.

Happy game making!!!

Login to post a reply

Server time is: 2024-11-26 03:39:31
Your offset time is: 2024-11-26 03:39:31