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.

PureGDK / Dark Occlusion in PureGDK

Author
Message
Richaldo
7
Years of Service
User Offline
Joined: 12th Nov 2009
Location: Hertfordshire, England
Posted: 14th Mar 2012 20:45
Hi,

I just wondered if anyone had got this to work in PureGDK (or if it was even possible)?
I'm currently using PureGDK with Visual C++ and this would be a great addition.

I was thinking that Dark Occlusion would be a dll but at first glance it just seems to be additional DarkBasic code and functions.
Do I just need to convert the DB code into PureGDK & C++ to get it to work, or is there a reason this wouldnt work at all?

Thanks in advance for any help.
Richaldo
7
Years of Service
User Offline
Joined: 12th Nov 2009
Location: Hertfordshire, England
Posted: 14th Mar 2012 21:07
I notice there's a sticky thread on the site called "New video on how to use DarkBasic Professional plugins with PureGDK".

In this video it mentions that there will be documentation available in the future explaining how to generate the code for plugins for use with PureGDK.

Does this documentation exist somewhere yet?
Olby
13
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Mar 2012 01:58
Author of Dark Occlusion said it consists of DBPro include file and a runtime application which runs in the background and does all occlusion calculations (you're running 2 processes at the same time). So yeah, theoretically it should work if someone translates the DBPro include file to PGDK, am not sure but I think DC include file also requires some of the Matrix plugins by IanM - not all of them are available in PGDK. This can be another drawback.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Richaldo
7
Years of Service
User Offline
Joined: 12th Nov 2009
Location: Hertfordshire, England
Posted: 16th Mar 2012 18:48
Thanks for the information Olby.

I will continue to look into this in more detail, although at the moment I'm still experimenting with the plugin in DB-Pro to see if it does what I want it to.

It would be great to have a rendering optimisation such as this in my project so in the meantime if anyone else finds anything out about this (or knows of anything similar for PureGDK) please let me know!

Thanks.
Vax Tracker
11
Years of Service
User Offline
Joined: 24th Jul 2005
Location:
Posted: 20th Apr 2012 16:29 Edited at: 23rd Apr 2012 17:41
Ok so I've been converting the code into puregdk because I want to use Dark Occlusion in my game, but I've hit a snag. When I call OC_SetObjectBounds(obj, 1) an error appears saying there is an invalid memblock size or something like that. This appears to be happening in the Dark Occlusion client, but since I can't see what's going on in there I'm not sure what the problem is. It's probably just some problem in the converted code I'm attaching my project solution(22mb) with all dependent files in the hopes someone else can get this working. In the meantime I'll keep trying to get it to work

EDIT: Realized that some of the files in the download probably should not be publically available as they are part of the Dark Occlusion system which is sold commercially, the download has been removed, but am still attempting to get the system to work. Will provide the include files if I get this figured out.
Vax Tracker
11
Years of Service
User Offline
Joined: 24th Jul 2005
Location:
Posted: 26th Apr 2012 16:03 Edited at: 26th Apr 2012 19:58
Ok so the good news! Dark Occlusion works in PureGDK.
The bad news, it's gonna take a little to setup. In the download are 2 files, the DarkOcclusion folder goes in your project folder, and then the PureGDK folder has a file to replace the Matrix1Util.gdt in the PureGDK Install folder.

Required:
Install the Matrix1Utils from:http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

Setup:
1)Copy the Matrix1Util.gdt in the PureGDK folder to your PureGDK Templates folder(usually at C:\Program Files (x86)\PureGDK\templates\libraries\plugins-user) and replace the Matrix1Util.gdt already there. (NOTE: If you've already made changes to the Matrix1Util.gdt, copy those changes to the new one)

2)Then navigate to the PureGDK\bin folder and open the libraries file. Scroll down till you find the Matrix1Util section and make sure it looks like this:

+ Code Snippet

3) Now you should be able to rebuild the PureGDK engine by running the "Compile engine with plugins.bat" file. Then copy the new gdkengine.dll and includes to your project.

4) Now for the project, I currently have the DarkOcclusion engine split up into two parts, header and cpp files. Copy the DarkOcclusion folder to where you keep your includes. Now in your Solution make sure to add all the header and cpp files to your project.

5)Now to use the DarkOcclusion engine, add the following include to your project:

+ Code Snippet

Then all commands should be as normal.

Enjoy!

EDIT:Fixed a small bug that made the engine not display the first object added, and fixed another bug that made the dynamic objects not work.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2017-07-22 03:52:37
Your offset time is: 2017-07-22 03:52:37