Posted: 16th Jun 2007 12:43
Recently got darkmatter. Can someone plz post code to use skyboxes and skysphers.
Thx
Posted: 16th Jun 2007 13:30
The tutorial in the DBPro help shows that already. Load it like a normal object, and then use something like what is in the tutorial in the Help, under Tutorials. There is also some code you need to keep it where it belongs, over the player. You can just substitute the DarkMatter ones for the one used in the tutorial.
Posted: 16th Jun 2007 20:10
The tutorial says you need a bsp but the only files (in the wanted skysphere folder) is a .x a .psd and a few .dds's.

Plz help me
Posted: 17th Jun 2007 10:57
I know how to load skyboxes now. Plz can someone post code for skyspheres (my ones are in .x format). Thanks

Edit : I've searched the forums for skyspheres but found nothing that worked (only saw the backdrop).
Posted: 17th Jun 2007 12:16
On my system, the bsp file is here:
C:/Program Files/The Game Creators/Dark Basic Professional/Help/tutorials/world/ikzdm1.bsp
As are the textures it uses.

The skybox is in another directory. That is just the structure used.

Tut4a shows you this, but it appears to be the wrong call for a bsp that is outside of a pk3 file!:

rem TUT4A
rem Load BSP world and sky model
load bsp "world/ikzdm1.pk3","ikzdm1.bsp"
SkyObj=1 : load object "models/sky/am.x",SkyObj

So, try this for TUT4A:

rem TUT4A
rem Load BSP world and sky model
load bsp "", "world/ikzdm1.bsp"
SkyObj=1 : load object "models/sky/am.x",SkyObj

The way it shows is actually much better, but for some reason...it is not matching what the media directory is providing. That is not good.

Anyway, they are x models, skyboxes and skyspheres. Try the AT code, it has the best use of them, imo...hopefully, it still works!
Posted: 18th Jun 2007 19:54
the darkmatter skyspheres are only .x a .psd and a few .dds's.
The skyspheres are funky and i really want to know how to use them. Plz can someone help me
Posted: 19th Jun 2007 2:45
I edited the line in my above post.

I'm not sure what you mean by funky, but...they are x format models. Scaling is usually the thing that messes me up on those types of things. I mentioned the Advanced Terrain sample because I have used those DarkMatter skyspheres with that, but I don't have any code from it.

I made a project called skysphere, and copied the directories gfx, images, models, sound, and world into that project directory. I pasted the code from TUT9A into that, and made the correction that I showed you above. That game runs fine on my machine now. Hang on a minute, and I'll post up a picture of what I mean, because I want you to do that, as well. In addition, I will post up a shot of putting the skysphere models into the models directory. Then, we can write some code to let you get at them in one piece of code, we will use the TUT9A at first, because it has a bsp common to both of us. I can give you a bsp of mine if you want, but that ties you to bsp, and you may not want that.



P.S. Please forgive my temporal dyslexia...apparently, I misspelled skysphere, you don't have to do that!!!!!
Posted: 19th Jun 2007 6:10
...after having done that, all I did was replace this line:
SkyObj=1 : load object "models/sky/am.x",SkyObj

with this one:

SkyObj=1 : load object "SkySpheres/alien maelstrom/am.x",SkyObj

or, this one:

SkyObj=1 : load object "SkySpheres/space station/ss.x",SkyObj

etc.

A couple of things. One, I did not create the best directory structure, on review, the DM directories should be in the directory models, but...I am being booted off of my own system (hmmph!) so all these projects will have to wait a bit. Next, I finally gave in to Apollo and put the forward slash in my paths, but I'm not happy about it!

I do hope this helps, it is a great starting point, even if you don't want to use bsp. The collision with the world (geometry) is handled by DBPro seamlessly, even camera collisions!



The TUT9A is only a few steps removed from this, which is 1st person view, but has an animated MD2 avatar.
Posted: 21st Jun 2007 21:55
Could you upload source code? Don'y understand what you're trying to tell me
Posted: 21st Jun 2007 22:04
sure, here...

This is simply the tutorial 'Adding shine', with the error fixed. I have created a new project, and also copied the proper files into my project's directory. That is what the pics are showing you, how to do that part of it. Here is the source code that you would use with that.