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 / Collusion system based on a custom designed level?

Author
Message
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Apr 2013 19:41 Edited at: 6th Apr 2013 20:34
collision*

This is perhaps the most frustrating part that I am trying to get over right now. Whenever I find a tutorial on collisions or movement it always uses the matrix that was generated in Dark Basic. As far as I understand a matrix is essentially the terrain/environment in which the player moves around.

The problem is that I don't want to generate a terrain, I want to have it designed myself. I created a tiny environment in which I want to test all my things. (see attachment)

I need to achieve basic player physics/ walking on terrain, jumping and collisions.

In general I use AUTOMATIC CAMERA COLLISION 0, 1, 0, 1 but it seems that my little level has a collusion box wrapped all around it like an invisible aquarium.

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: http://milothatch.isenstadtstudio.com

Attachments

Login to view attachments
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Apr 2013 20:40
Hi there. You could use Sparky's that is free and goes super...if you prefer to do it with code, there are several ways...take a look to this intersect collision. just execute this code with your level.



I'm not a grumpy grandpa
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Apr 2013 21:15 Edited at: 6th Apr 2013 21:22
Oh holy cow, the code works well. I don't really know how to utilize .dll files though. God I miss fpsc environment. Now I need to find a way to get jumping implemented.

Yet, thank you very much for the code by the way.

Another question (for the sake of not creating a new thread) That model of the level. I made it in blender and if I have a UV-Map of the building with different textures for different walls, wallpapers, ceiling etc how do I go about importing those textures along with the .x level file? Making sure that the texture actually mapps pixel to pixel onto the building and terrain model

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: http://milothatch.isenstadtstudio.com
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Apr 2013 21:26
I don't use blender, but I think you had better to export directly from the 3d program you use.Jumping is easy too....this collision works im most cases, but for future levels, you will have to scale your object....if you see it too slow just change variable values...

Cheers.

I'm not a grumpy grandpa
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Apr 2013 21:30 Edited at: 6th Apr 2013 21:31
Hmm well in basics I loaded the level:
load object "demoworld.x",esn
and "esn" became the object id.

then you used:
texture object 1,1:scale object texture 1,10,10

So I assume .x file does not carry any texture information in it does it?
Does my world texture have to be a one single texture map?

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: http://milothatch.isenstadtstudio.com
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Apr 2013 21:57 Edited at: 6th Apr 2013 21:59
Quote: "Does my world texture have to be a one single texture map?"


Not necesary...you can have a big level with several limbs...I tried to asing texture to your level to test collsision...just make other scenary to test collision. If you want, I can send you some more examples...

Cheers.

I'm not a grumpy grandpa
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 6th Apr 2013 22:33
Hmm... well that doesn't sound too complex. Now how do I go about assigning limbs to objects. I mean, if I understand it right, a .x file is converted into one big mesh right?

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: http://milothatch.isenstadtstudio.com
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Apr 2013 22:47 Edited at: 6th Apr 2013 22:48
A level .x could be just a single big mesh or a lot of limbs, all of them with its texture. One object doesn't have to be single mesh, could have as many meshes(limbs) as we want...it is true, the less poly the better result in speed, but nowaday last PC and laptop are good enough to support height poly models.

If we start making an object in Dbpro, we can add another object to it as a limb, but first we have to convert the second object in mesh and then add it to the main object as a limb. That's different in a 3D program, where we make all graphically, and we just add limbs to the main scene without linking limbs unless we are making an animate model or a car..enemy or whaterver.We had better put all textures in the main folder ...if not, we have to give the complete path to it.

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-18 08:38:01
Your offset time is: 2024-04-18 08:38:01