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.

Author
Message
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 4th Feb 2012 14:59
Max could we email I think me double posting all the time is not so good... would prefer keeping this thread clean... what do you think?

PS please see my post above its edited...

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 4th Feb 2012 15:07
@MrValentine
Sure, I'll send you an email

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 5th Feb 2012 12:12
Any plans for DGDK?

Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 10th Feb 2012 09:49
Hi, I've compiled a game with DOC, but when I start it claims it cannot find Dark.Occlusion. I've copied the file and folder to where my compiled game is, but that doesn't work. Am I missing something?

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 10th Feb 2012 11:44 Edited at: 10th Feb 2012 11:44
The Dark.Occlusion file should be in a folder called Dark Occlusion. The Dark Occlusion folder should be in the same folder as your exe.
If you want to change the location/name of the Dark.Occlusion file you can change the name inside internal.dba. Search for #Constant OC_CLIENT_NAME and change the path behind it.

@Morcilla
Not for the moment, maybe in the future.

Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 10th Feb 2012 13:58
I tried that Max, but it didn't work. I figured out why though; my exe was running from a different location. Once I moved D.O to that folder, it worked.

Cheers for the rapid response.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Feb 2012 15:23
Max Any news on the function converts?

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 10th Feb 2012 15:50
@MrValentine
If you mean the functions to import a 3DWS map, they are in the first post.
If you mean the renaming of all the functions and variables, an update is comming soon. I am quite bussy lately so I'm not working verry often on this, but the update should be finished this weekend.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 10th Feb 2012 16:13
Hey Max,

Could you please explain how DO integrates into DBPro. I mean in terms of dll files, includes, etc. Am looking forward to implement it into my upcoming engine written in PureBasic with PureGDK (http://forum.thegamecreators.com/?m=forum_view&t=187939&b=38). To be honest I've been designing my own static PVS system but if DO works as good as I expect it then I could get rid of the whole unnecessary PVS compilation process.

Thanks!

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Feb 2012 16:42
thanks Max... no rush just checking on update

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 10th Feb 2012 17:35
@Olby

Dark Occlusion contains some include files, written in DBPro language, 4 of the matrix1 utils and one exe.
The code in the include files basically does this:
1. start the exe
2. add your objects to an array (with OC_AddObject etc.)
3. send the data to the exe (camera position etc.)
4. retrieve the visible objects from the exe
5. show/hide the objects
6. repeat from step 3.

So if you can convert the include files to pureGDK everything should work.
If you need a more detailed description I will send you an email.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 10th Feb 2012 19:00
Quote: "some include files, written in DBPro language, 4 of the matrix1 utils and one exe"


Wow, thats unexpected, why did you use executable instead of a dll? Isn't there an additional memory and CPU overhead to run two processes and communicate between them?

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 10th Feb 2012 20:43 Edited at: 10th Feb 2012 20:44
I don't have the knowledge to write such a dll, so I had to do it in DarkBASIC. Because there are a lot of heavy calculations going on, it would kill the framerate if it was in the same program/thread as your game. So I had to get it out of the program or do small pieces of the calculations every frame. Making all that stuff in a different executable made it a lot faster, especially on multi-core pc's. They communicate with a piece of shared memory, this is why I needed the matrix1 utils, altough it can be done with windows dlls. I decided to stick with the matrix1 utils because it was easier. Having everything in another executable that is already compiled also protects my code

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Feb 2012 22:20
Well it now looks like I am forced to use Matrix utils... how do I go about installing it?...

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 11th Feb 2012 11:54 Edited at: 11th Feb 2012 11:54
@MrValentine
The dll's that are necessary for Dark Occlusion come with it when you buy it. They should be installed automatically.
If they weren't installed you can find them here:
https://forumfiles.thegamecreators.com/download/2287932
If you don't want to install all of then you can just install #1, #3, #4 and #7, these are the only ones that are necessary.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Feb 2012 17:54 Edited at: 12th Feb 2012 18:31
strange the installed matrix utils were smaller and older than the ones you just gave to me ...

so should I retry that code with the matrix utils code not the converted code?

EDIT

I forgot to mention I now have a better system at home my baby


I feel lost now... can you give me the code you use to load my megamap? then I can get blasting through this...

I need to relearn functions *sigh* [begins search for Hands On Vol 1]

EDIT

I install the Matrix utils you gave fully and deleted 16.dll as it conflicted with STYX... I get it to compile but I have to move all the functions below the do loop.... please show me what to do correctly...

Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 17th Feb 2012 19:44
I have a little problem white Dark Occlusion

"Variable 'message' name is not valid inside Dark Occlusion\Dark_Occlusion\Internal.dba."

I thinks it came from another plugins with the same constant, how can I fix it ?

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Feb 2012 20:06
HI Abrakan...

I simply renamed or deleted the conflicting plugin... alternatively you can create anew folder name it restore and move the conflicting plugin into there for now...

Hope that makes sense and helps...

Max Keep us posted

Todeswalzer
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 20th Feb 2012 18:51
Does Dark occlusion work with sparky's collision? to be honest i've only just downloaded it and not tested it yet, but looking at some of the commands, I was just curious if they might conflict? maybe i'm just being a bit stupid...
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 24th Feb 2012 11:03
test

to move side ways - is to move forward
Since a Strait line gets thin fast
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 24th Feb 2012 13:02
@MrValentine
You should use this for importing the 3DWS map:


These functions should be somewhere at the bottom of your code (not in a loop):


@Arbrakan
You can replace the variable name inside the file, remove the conflicting dll or wait for the next update.

@Todeswalzer
No, Dark Occlusion doesn't use Sparky's and it won't conflict in any way

@Everyone
I'm verry busy with school at the moment, so I am not able to spend a lot of time updating Dark Occlusion. I will try to release an update fixing all the illegal variable names and missing plugins before the end of the week. If there are some big bugs I will fix them, but for the rest I won't do much for the next 2-4 weeks.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Feb 2012 13:14
@ MAX

Thank you will try it tonight

No rush as always buddy, take your time... perfection comes with time not speed

I hope this allows me to get cracking on some early demos

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 24th Feb 2012 13:52
a thought To think about

From about 2006 to 2008 and a bit .. the forums when pretty quiet

but since mid 2009 to lately well 2010 up

several addition were created for the DBP

I've even seen notes about couple of people coming back
since they basically were not interested in DBP coding

I've found one addition that gives DBP even more speed to work with
the owner gave me a copy for free and refund my payment after I payed for a copy
but even he had stopped considering it worth spending any more time on it

but after my interest in the addition
he is looking at seeing if he can do more with it
so I wait to here back from him on that

I suspect there were be a few more tweaks and updates to the family
to finally round off DBP so that beats out other programing types

I've seen a lot of examples of what DBP Can do with the right people

even in DB there were some amazing examples of people were able to do

I've watched the forums since 2000 more so in the last 3 years
I've poked people once in a wile

we all wait good things ;o)

to move side ways - is to move forward
Since a Strait line gets thin fast
SamKM
15
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 24th Feb 2012 16:49
Hi
I do hope this isn't a silly question, since I haven't seen any posts about this, and if there wasn't a work-around for it, others would probably be protesting.
I bought Dark Occlusions for a game I'm making called Mindshape (a Minecraft clone). If you've heard of Minecraft, you'll realise that naturally I need lots of objects onscreen at once, thousands of cubes. So Dark Occlusions could prove highly useful, but I'm having two problems with it. The first is that when I run Dark Occlusions in my code, it seems to uncap the frame rate. At one point, I do call OC_BEGINLOADING(), but do also call OC_FINISHLOADING() afterwards. Nonetheless, the framerate seems uncapped after this, meaning the player has sudden spurts of speed when looking at a spot with not too many objects in it. How do I recap the frame rate?
The other problem is that there seems to be no simple way to tell if an object is part of the Dark Occlusions system, in other words if it has been added using OC_ADDOBJECT. What I'm talking about is a kind of Occlusions equivalent to the OBJECT EXIST command. At the moment, I'm having to write my own function which scans every object using the OC_FIRSTOBJECT command, then a loop with OC_FINDNEXT at it's end, and I'm having to call it every time I want to know if an object is part of the occlusions system, which is quite regularly. Anyone know an alternative?
Thanks!
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 24th Feb 2012 19:23
@SamKM
Calling OC_DisableAutoBalance() at the start of your program will stop Dark Occlusion from adjusting the framerate.
If you want to check if an object is added you can use one of the following commands, they return an index of -1 if the object/limb wasn't added:


SamKM
15
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 25th Feb 2012 01:43
Ok, thank you very much
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 25th Feb 2012 17:14
When I use the OC_setobjectbounds it kills all of my collision code and I can walk/fall through my map

I can see from your smile, you're not here for the sunset

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 2.5 TB HDD
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 25th Feb 2012 18:02
@Levanthus
What kind of collision are you using?

Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 25th Feb 2012 18:44
Sparky's. If I removed the command my collision was fine but with the command it just stopped

I can see from your smile, you're not here for the sunset

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 2.5 TB HDD
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 25th Feb 2012 19:06
@Levanthus
Everything works fine here with Sparky's, I used this code:


Maybe you can post the code where you setup your objects so I can take a look at it.

JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Feb 2012 06:34 Edited at: 27th Feb 2012 06:36
All of my objects are disappearing. If I don't add one to the OC system, it shows up normally otherwise, nothing. I've run it on two different laptops with two different graphics card mfgs, one running XP the other Win7.
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Feb 2012 15:06
@JRNTexas
Are you creating bounds for them (OC_SetObjectBounds)?
If you have bounds and are using mode 1, you should try mode 0. I have found a bug when using mode 1. It is fixed for the next update, I am running the final tests now to check if everythings works, so it will probably be released tomorrow.

JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Feb 2012 16:04 Edited at: 27th Feb 2012 16:04
@Max P

I use a "for" loop, OC_SetObjectBounds(h, 0) then (h, -h), (h, 1). None worked. I did get an error with h, -h, that stated object too large.

I have about 175 objects.
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Feb 2012 16:21
@JRNTexas
Can you try to run this example, the media files are attached:

If this works it probably is an error in your code. Maybe you can post the code where you add your objects?

Attachments

Login to view attachments
JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Feb 2012 20:05 Edited at: 27th Feb 2012 20:11
@Max P

I was not running the latest version of DBPro. I upgraded to 7.61, which I believe is the latest version.

I now have a different problem. some objects now disappear randomly while in plain view.

I added "OC_SetRange(1, 900000)". Without it objects are not visible AND OC_SetObjectBounds(objectNumber, 1), must be set to 1. All other settings either fail or all objects are not visible.

Also, collision is no longer working. I am not using a plugin for collision detection.
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Feb 2012 20:29
@JRNTexas
Try using these settings:


Can you post a screenshot if you still have the problem?

JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Feb 2012 21:53 Edited at: 27th Feb 2012 21:55
@Max P

Thanks for your help!

I added your code and all objects disappeared. I changed my "SetObjectBounds" from 1 to 0.

The objects came back AND collision now works!

However, some objects are still randomly disappearing.

Here is a couple of screen shots:







Although the two images are slightly different angles, they are from approximately the same distance from the objects.
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Feb 2012 22:17
@JRNTexas
It is probably disappearing because it is behind the bounding box, wich is used when you set the bounds using mode 0. It just creates a box around the entire object.
Mode 1 doesn't work because of a bug wich is fixed now. I have send the update to TGC so it should be online tomorrow.
So if the update is out you can use mode 1 and the random disappearing will probably be gone.

JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Feb 2012 22:52
@Max P

Thanks! I appreciate your input and help.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Feb 2012 03:45
Feeling like an idiot I thought I had U7.7 this whole time... only been using U1.0761

Max any update on loading my megamap using DO I now have IanM's utils plugin installed

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 28th Feb 2012 10:22
@MrValentine
You can use the snippet from the first post, it should work. If you can't get it to work I can send you my test project.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Feb 2012 10:29
@Max P

Will give it a shot soon, but your test project minus my map [just keep the reference] and I would be ever so grateful!!!

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 28th Feb 2012 11:05 Edited at: 28th Feb 2012 11:06
@MrValntine
The project is attached, it loads "Megamap(2).dbo".
edit it takes a while to start cause it is pretty large.

Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Feb 2012 12:14
@Max P

Finally I can move on!

and haha yeah the maps will get bigger... I just need to work out the texture issue and I am good for now

thank you!

I will try to create more complex maps soon and create a sample video for you with full environments... my first tech demo!!!

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Feb 2012 12:20
Max... A small issue... when objects inside 3DWS are in contact with each other they are picked up as one by DO... the only not ideal solution was to place spaces between them but this is not ideal when building a wall structure... like a wall around a building... the enritre wall becomes one object...

also I am having texture issues... might be because the ones im using are BMP's but I need to relearn how DBPro handles textures again eitherway...

any help appreciated

Sorry for double posting but I suppose its ok as I have something to add... the general etiquette is confusing XD

but yah I decided to try creating a new map to experiment and I should make a ideo soon but I will not be using YouTube... so hope you got DivX web player

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Feb 2012 14:24
@MrValentine
That is how the converter works. It was the only way I could think of to sepperate the limbs. If you want to keep them sepperate you can give it a different texture.

Quote: "also I am having texture issues"

What kind of issues? Maybe the uv's aren't copied correctly by the converter.

Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Feb 2012 14:25
Version 1.0.1 is available for download!
Changes:
- added OC_StartFrom so you can change the location of the Dark.Occlusion file.
- added OC_ObjectAdded and OC_ObjectLimbAdded to check if an object/limb was added to the system.
- Dark Occlusion now checks if there already is a copy running at startup.
- Bounds are now created correctly if the object was moved before creating.
- msvcp71.dll and msvcr71.dll are included in Editor/Dark Occlusion/.
- OC_End now correctly ends the program and Dark Occlusion.
- All variable names now have OC_VAR in front of them to prevent conflicts with your code or other plugins.
- Updated the examples with correct comments.
- Updated the help files with the new commands.
- Automatic framerate balancing is now off by default.
- Added a default setting for auto balancing the framerate. (Dark Occlusion/Settings.dba)
- OC_ForceObjectVisible now works correctly.
- LoD now keeps updating when an object is forced to be visible with OC_ForceObjectVisible.
- Dark Occlusion now works correctly when objects and limbs are both used.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Mar 2012 03:59
Quote: "What kind of issues? Maybe the uv's aren't copied correctly by the converter."


seems to be using the same textures...

Quote: "That is how the converter works. It was the only way I could think of to sepperate the limbs. If you want to keep them sepperate you can give it a different texture."


you mean within 3dws? will give that a go but... kinda odd as walls will use the same texture... but sort of makes sense I figured it was because theyre so close to each other and I split them apart in 3dws and it worked... I will make a video soon to show what I mean...

thank you

Quote: "Version 1.0.1 is available for download!"


time to download...

but first some work that pays the bills ^^

[oooo looksie I am number 100 yay bring on page 2!... yeah I have 100 posts visible... think everybody should by default...]

Thanks for your patience Max P its very much appreciated... but then again lol you would not be debugging without a cause

T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 2nd Mar 2012 16:52
small question: say if i had a realtime world editor, and i place objects in realtime would they get occlusion culled in realtime?

original topic question here: http://forum.thegamecreators.com/?m=forum_view&t=194837&b=7
Max P
14
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 2nd Mar 2012 18:44 Edited at: 2nd Mar 2012 18:47
@T4r4ntul4
Yup, they get culled immediatly, you just need to add them to the system and create bounds for them (you can load them from a file or let Dat Occlusion create them). In the worst case scenario it takes a few ms to add the object.

edit
For example when you add a new object to your scene you only need to do this:


Login to post a reply

Server time is: 2024-06-26 16:05:26
Your offset time is: 2024-06-26 16:05:26