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.

DarkBASIC Professional Discussion / [STICKY] DBPro 9Ex

Author
Message
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 7th Oct 2016 06:03
The Standard Advanced Terrain functionality has been built into the Basic3D Object library for quite some time now. If you installed the plugin as a separate package, the errors or probably due to duplicate functions. The built in Advanced Terrain functions work fine.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 7th Oct 2016 06:04 Edited at: 7th Oct 2016 06:09
* Accidental Double Post Again * This is getting ridiculous.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 7th Oct 2016 10:23
Thanks WickedX! I got it working now.
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Oct 2016 07:15
Hey guys. I'm not a tech wiz, but does anybody have an estimation on how long will DX9 will still be supported?

It'll suck if our games that we build in years be unplayable just because DX9 is obsolete and not supported anymore by newest Windows
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 8th Oct 2016 10:25
James H wrote: "Thanks both Indigo and original IDE now working without having to save each compilation."

Happy to hear it.

sladeiw wrote: "All strings are having multiple whitespace reduced to a single space!"

D'oh, that's quite the oversight on my part then. Should be relatively easy to fix though, thanks for bringing it to my attention.

sladeiw wrote: "Also, there is a crazy flickering going on with default screen setttings"

Hm, yes this is an issue with double buffering.
Basically your print etc. 2D commands draw once and then depend on the backbuffer (or "backdrop") not being cleared to remain on screen. However as we're using double buffering this means it only draws to one of them, such that every other frame will be a blank image instead, hence the flickering.
Since you can turn automatic synchronization and backdrop clearing on or off manually and also possibly print or do other stuff in a loop (like you normally have to when rendering anything 3D to get it to remain on screen) it would be hard to detect this from the compiler and automatically sync to both buffers... I suppose it could be done though; I'll look into it. If you have any ideas on how to accomplish it feel free to let me know. For the time being it can be "fixed" by putting your printing code in a loop, or otherwise just print it twice, which unfortunately requirtes extra code. Though in all honesty it is probably quite rare that you use this rendering mode rather than a loop except for very quick tests anyway.

sladeiw wrote: "On Manifests & visual styles..."

Sure, a more modern manifest could certainly be used. Do you happen to know whether these will cause issues on older operating systems or just revert to their defaults if not supported? Nice hackish way to change it by the way!

Kuper wrote: "Get this error message when execute .exe and have DarkShader editor open in same time.
Need every time close darkShader and reopen."

I have been unable to replicate this issue. Which version of DarkShader are you using?
In either case, the AbsFF function has indeed been removed from DBProCore.dll so putting it back in there will most likely solve this. I don't know why DarkShader would even load that file manually from your DBPro installation folder though. Or do you mean you're building the DarkShader editor yourself using the new compiler? (If so it should be a compile-time error though).

hakimfullmetal wrote: "Hey guys. I'm not a tech wiz, but does anybody have an estimation on how long will DX9 will still be supported?

It'll suck if our games that we build in years be unplayable just because DX9 is obsolete and not supported anymore by newest Windows"

This is hard to answer, but it will probably be around for the foreseeable future. Lots of very popular games are DX9 only and even new AAA titles developed today tend to generally support it, at least as an option, in order to appeal to as many potential customers as possible (I believe China is still mostly using Windows XP, which doesn't support any DirectX versions beyond 9?). That said, some large games and companies have begun phasing out DX9 support, for example Eve Online and hardware like the Oculus Rift doesn't support DX9 either. Still, version 9 is by far the most used and it would probably be an unwise move to drop support for it on Microsoft's part anytime soon. Then again those guys have been forcing Windows 10 down our throats lately, and refure to offer support for DX12 on anything older so I wouldn't be too surprised if they decided to do something like that in the future. Still, it is "probably" going to be viable for at least the next 5 years. And when it comes to things like the Oculus, 9Ex is great because it allows you to share textures in realtime with more modern DX versions; as such you could render your scene using DX9Ex and then send it to a DX11 device that will output it to the Oculus.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 8th Oct 2016 10:37 Edited at: 8th Oct 2016 10:38
Im using original DarkShader.Launch DarkShader - then launch Advanced Lighting for example- and get such an error

But when I launch Advanced Lighting first , then dark Shader ,then close AdvancedLighting and at last open it again- there is no error.

Attachments

Login to view attachments
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Oct 2016 12:01
Quote: "9Ex is great because it allows you to share textures in realtime with more modern DX versions; as such you could render your scene using DX9Ex and then send it to a DX11 device that will output it to the Oculus."


Wow, is there any way for a beginner to do this properly?
Do you plan to make a plugin or something that can work with Oculus/VR?
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 8th Oct 2016 15:31
Quote: "Sure, a more modern manifest could certainly be used. Do you happen to know whether these will cause issues on older operating systems or just revert to their defaults if not supported? "


I was using a combination of XP and Vista before Windows 7 and it worked ok on them. So XP is the earliest OS I have used it on, and you still needed the external manifest file on XP so I guess the modification was ignored anyway.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 8th Oct 2016 20:39
@hakimfullmetal

Afaik, I don't think MS will drop support on DX9 anytime soon, proof is the old DX7/8 still works ok with Windows 10 as well.


Question, I'm hearing this DarkShader a lot and I don't see this in the plugin list. Is Dark Shader a separate feature or already built-in? I'm confused

thanks.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 9th Oct 2016 22:11
hakimfullmetal wrote: "Wow, is there any way for a beginner to do this properly?
Do you plan to make a plugin or something that can work with Oculus/VR?"

Yes, texture sharing will be available with the next demo version of my DX11 plugin. Actual VR device support is planned, but I'll have to get a hold of one first. I might around Christmas if I can afford it, though I think I'll go for the Vive rather than Oculus. It appears that OpenVR provides a unified interface that works well for both (and will presumably be updated to include future devices as well) though. It is greatly annoying that they charge 35% more for a Vive here in Sweden than in the US, or ~30% more compared to its GBP price though, but one day...

punkyb wrote: "Question, I'm hearing this DarkShader a lot and I don't see this in the plugin list. Is Dark Shader a separate feature or already built-in? I'm confused "

DarkShader includes both a plugin (ShaderData.dll) that extends the shader capabilities of DBPro a bit, and a visual editor that lets you write and preview HLSL shaders in realtime.
It isn't included in the open source'd version of DBPro and used to be a paid plugin. I'm not 100% on whether it has since been released for free or not.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 9th Oct 2016 22:23 Edited at: 9th Oct 2016 22:26
Version 1.0.0.3 is now available
Click here to download it

This update addresses the majority of the issues reported so far.
As for the remaining ones I have looked at it but have been unable to find much to go on so far.

Whitespaces in strings are no longer consumed by the precompiler.
The MESHRADIUS shader constant semantic has been added back in, thereby fixing shaders that used it. This has been done while maintaining the original mesh format through externalization. Fixes WickedX' first example program.
The ABS function was missing due to an export macro messup. This has now been fixed. Should fix Kuper's DarkShader issue.
Reflection shading now works as intended. This was broken due to a render target clearing going off in-between the two necessary passes for the effect. Fixes WickedX' second example program.
The compiler now enables visual style support for all compiled DBPro programs, permitting Windows UI plugins to yield more modern looks such as this:
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 10th Oct 2016 03:48 Edited at: 10th Oct 2016 03:50
Thanks, Rudolpho. Really knocking these issues out quick. I notice looking through the GitHub source, 37 new string table entries for the object project. A few are self explanatory, a few which are probably used for the new cascade shadow mapping and the rest I haven't a clue. It would be nice to know what these function are for and how to set up the cascade shadow mapping.

Attached is the DarkShader Plug-In extracted from the DBProFreeInstaller.

Attachments

Login to view attachments
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 10th Oct 2016 13:58 Edited at: 10th Oct 2016 14:01
Lee added some functions when FPS reloaded was in develop.I think most of them
should be in last DBPro release on github.
Like new lightmapping system ( which looks much faster then DarkLights )
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 10th Oct 2016 15:56 Edited at: 10th Oct 2016 16:04
Wow thanks Rudolpho! ..and a new version to boot! Just Awesome!!

Yes, I followed your instructions to get the specific opensource folder and overwrite it with 9Ex files. I also found a ShaderData.dll in my plugins-user folder that I think is included in free version or upgrades. What about this dll?

Edit: Just checking the download, it looks like it's DarkShader after all.

@Kuper

That sounds cool! How do I use it? Are there samples and does it support directional lights?
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 10th Oct 2016 18:41
@punkyb
I know only that Lightmapping functions was changed from separate plugin Dark Lights into included functions in DBPro
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 11th Oct 2016 02:27
Quote: "@punkyb
I know only that Lightmapping functions was changed from separate plugin Dark Lights into included functions in DBPro"


Thanks. Too bad I do like to try this one out. I have seen a lightmap tutorial somewhere, I'll post a link to confirm if this is the correct one.


@Rudolpho

Since we're into shaders, I would like to ask if you still have the code and possible some improvements on DX9 directional lights + shadows. I saw this on an old thread you posted. https://forum.thegamecreators.com/thread/207059

Appreciate any help, thanks.



sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 11th Oct 2016 10:23 Edited at: 12th Oct 2016 08:19
Great job Rudolpho, latest version compiles, looks good with the styles change and seems to be running without issue. Some major testing ahead of me now :/

Incidentally, the new version executables are 10-15% bigger than when compiled with the old version. Is there a simple reason for that like extra libraries included by default or something similar?
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Oct 2016 01:32
The increase in size is due to the code to support new functions. DBProBasic3ddebug.dll has 37 new functions alone. I haven't looked at the others, as of yet.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 12th Oct 2016 11:12
@Rudolpho

I tried a clean install. First the github 'Install' folder and then the latest version of 9Ex overwritten. I noticed the DBCompiler version is 1.071 and tried some old examples and now getting some get object effect error (could not determine parameter type).

So is it ok to apply the upgrades up to 7.7? Will it overwrite the 9Ex files if I did this?
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Oct 2016 22:43
Thanks guys.

WickedX wrote: "I notice looking through the GitHub source, 37 new string table entries for the object project. A few are self explanatory, a few which are probably used for the new cascade shadow mapping and the rest I haven't a clue. It would be nice to know what these function are for and how to set up the cascade shadow mapping."

Indeed, I could have a look at those and try to write some documentation files for them I suppose. The last one in your list should be removed as the "character creator" functionality was partial in the first place and I've removed what there was of it to reduce the mesh structure size.
Also some of the mentioned functions have only received more optional parameters such as CONVERT OBJECT FVF, CALCULATE OBJECT BOUNDS, SET OBJECT EFFECT etc., rather than being wholly new ones.

punkyb wrote: "Since we're into shaders, I would like to ask if you still have the code and possible some improvements on DX9 directional lights + shadows."

Lol, those directional shadows sure are haunting me.
As a matter of fact I have, but I've been stuck having problems with directional shadow mapping in particular for my DX11 engine for many months now. The basic principle is simple enough, but I keep getting unexplainable projection jitter even after 3 complete rewrites of the system.
This is all in DX11 though. I think I should have a somewhat upgraded version of that old DX9 implementation somewhere, but I have since changed computers so it will be on an old HDD somewhere (I'm not entirely sure of where I'm afraid). What I was doing as I recall was basically using a 32-bit colour RGBA texture as a shadow map to hold 4 cascades, one in each colour channel. This was rendered in 4 separate passes as there really aren't any options to do it simultaneously in DX9. Then it used a simple software percentage closer filter (eg. in the shadow mapping shader) to smooth out the edges. It did not take stabilization into account however, so there was some edge shimmering when moving around.
The MSDN has a pretty good article outlining some common shadow mapping issues and ways to overcome them that you can read here if you're interested. Sadly the basics are missing and they never go into that much detail on most things, but that is basically the number 1 reference I've used to teach myself shadow mapping as most everything else I've been able to find is either of inferior quality, unnecessarily complicated academic papers or focuses on OpenGL. The latter two types of resources have proven helpful as well but in my opinion this is unfortunately quite the undertaking to get your head around at first. Keep at it though and you'll get it eventually.... at least until you get to the brick wall I'm experience since quite a while now with the weird projection discrepancies

sladeiw wrote: "Incidentally, the new version executables are 10-15% bigger than when compiled with the old version. Is there a simple reason for that like extra libraries included by default or something similar?"

Yes, mainly the size of DBProBasic3DDebug.dll has gone up by almost 200Kb since the previous release. I cannot think of any particular reason for this off the top of my head but the most likely is that I've included some static library that wasn't previously used for one of the fixes in the last version. It may be as simple a thing as utilizing a std::string or something similar. The functions mentioned by WickedX were there even in the previous versions of DBPro 9Ex. Unless you mean that your executables are bigger compared to a non-9Ex compiler?

punkyb wrote: "I tried a clean install. First the github 'Install' folder and then the latest version of 9Ex overwritten. I noticed the DBCompiler version is 1.071 and tried some old examples and now getting some get object effect error (could not determine parameter type).
So is it ok to apply the upgrades up to 7.7? Will it overwrite the 9Ex files if I did this?"

Ah, well you shouldn't look at the compiler version. I haven't modified that at all so if the GitHub version has it at 1.071 then so it will be. This is a completely different, custom-built compiler version though and it is most certainly newer than the 7.7 (which in fact means 1.077 by the way). In fact with all the changes, using the 7.7 compiler will most likely not work at all.
Also I believe GET OBJECT EFFECT is a DarkShader command. Do you have that properly setup?
If so, would you mind posting a short code snippet that reproduces the issue so that I can investigate it further?
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 13th Oct 2016 00:40 Edited at: 13th Oct 2016 01:00
Thanks! Yes, it's most Dark Shader examples where it uses get object effect.. Problem solved and apologies as I'm still trying to differentiate between extended plugins and what DLL features comes with DBP by default.

I was confused about that versioning as well where I read in certain post and finally get what they meant: U77 = 1.077 = 7.7, am I right? http://forumfiles.thegamecreators.com/thread/180294?page=1

About the shadows, thanks for the detailed explanation and info, I will try to look into that later.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 13th Oct 2016 19:22 Edited at: 13th Oct 2016 19:23
Thanks Rudolpho.

I started looking through the source and comparing it with the exported functions and stringtable entries in your DLL's with the idea of uploading some demo's using the added functions and updating the keyword files. Since I have already started with the Basic3D functions, I have continued from there. From the start I have some questions and concerns. I will try not to hit you with too much at once.

Starting with the multiplayer nameplate functions - Make New Object Panel, Set Object Panel Quad and Finish Object Panel. The functions are simple enough to figure out but seem like a lot of effort for what there worth. I would probably remove them all together.

My next concern is with Object Statistics Integer. Seems like a backward way to use more memory just to return the diffuse color set by the function - Set Object Diffuse. Am I missing something here? This is the Google Code source for the internal function - SetDiffuseMaterialEx for comparison.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Oct 2016 19:48
Glad you got it sorted punkyb.

@WickedX: Hm yes indeed, that integer statistic thing seems like it was never fully implemented; I cannot find it used in any more places either.
The fact that it overwrites the custom data block seems even more dubious, as other things may be stored there by third party applications (the only thing the standard DBPro library seems to be using it for besides these statistics are data used by instanced objects, which would read their statistics from the parent object in any case, so that shouldn't cause any conflicts - still a messy system though). The main problem here though is that SetDiffuseMaterialEx will create room for a single DWORD, while ObjectStatisticsInteger will happily read out of bounds if you give it any other index than 0, assuming the memory block was created through the diffuse setting function.
My SetDiffuseMaterialEx function is different and allocates space for eight values by the way; odd as I imagine the current GitHub version should be newer rather than older. I wonder why they shrunk it without removing the whole system, because as you said it certainly doesn't make any sense to use it like that in the first place.

As for the plate functions they seem handy but you're right that it isn't anything you can't do yourself with a normal plane, a texture and some repositioning in each frame. That said, is there any particular merit to removing them compared to leaving them in for whomever may want to try them out?

Also, thanks for the pointers and for helping out!
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 13th Oct 2016 20:12 Edited at: 13th Oct 2016 20:29
Leaving the nameplate functions in is just as well. I think I'll take a break from C++ coding and write a demo using those functions. Should be fun.

*** Edit *** I have changed the about dialog in dbp_config.dll to reflect version DBPro 9Ex. Not sure if all editors use this resource.

Attachments

Login to view attachments
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 15th Oct 2016 06:44
Hey Rudolpho, meant to post this earlier, but here is a link to Cloggy's d3d plugin if you want to take a look at the missing text issue:

https://forum.thegamecreators.com/thread/69221


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 15th Oct 2016 18:49 Edited at: 15th Oct 2016 18:51
WickedX wrote: "Should be fun."



Ortu wrote: "here is a link to Cloggy's d3d plugin if you want to take a look at the missing text issue"

Thanks, I've been looking for that but Google only gave me dead links and the forum search feature seems to sadly be no more (what's up with that anyway?).

So a small update on current developments; I have managed to track the issues with DarkLights and Cloggy's plugin (and quite possibly DarkVideo as well) down to a common issue. To put it simply, DirectX 9Ex removed some convenience functionality that was present in earlier versions of the framework; the intent behind this was likely to force developers to write more efficient code for the problem at hand rather than depend on the generic one-(slow)-solution-fits-all. As such I initially updated all instances of the DBPro source that were relying on this and thought that would pretty much be that back when first starting out this project. Unfortunately certain plugins access DirectX directly rather than through the DBPro runtime and some of these will still use this now unsupported functionality, causing anything between blank textures to crashes as a result.
While the optimal solution to this would naturally be to rewrite all offending plugins to adhere to the new standard, this isn't really feasible (on account of the source for most of them not being available). As such I've begun an undertaking to basically reroute incoming now-invalid requests to D3D and emulate the expected behaviour myself. While this appears to be working as intended (for example I can get Cloggy's text rendering to work at the time of writing this) there will be quite a lot of work to be done before it will be properly functional. I'll keep you updated on my progress though
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 15th Oct 2016 22:40
Has anyone tried the dbp_config.dll and is so does your editor about dialog now show version DBPro 9Ex?
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 16th Oct 2016 04:53 Edited at: 16th Oct 2016 04:55
@WickedX

I did, looks good!



Quick suggestion: how about adding the version if possible?..

Version 9Ex 1.003

and maybe remove the "DBPro" because it's already indicated and would fit in one line.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 16th Oct 2016 06:56 Edited at: 16th Oct 2016 06:58
Thanks for the verification. I just went with the designation Rudolpho gave it.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 17th Oct 2016 15:49 Edited at: 17th Oct 2016 16:12
No worries WickedX, thanks again for this added feature!

I was wondering if you guys have tested this on Windows 10. I sent a friend a sample game built with this version but it crashes right before it runs silently.

Are there steps to make it work with Windows 10, particularly this version?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 17th Oct 2016 15:55
I am using it on windows 10, I didn't have to do anything special. The machine already had the 2010 direct x 9.0c installed for dbpro apps. I'm not sure specifically which release is needed for 9Ex.

Not having the needed version of direct x has caused dbpro applications to either crash or simply do nothing when attempting to run on Windows 10, my guess is this is likely the issue


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Oct 2016 22:04 Edited at: 17th Oct 2016 22:07
WickedX wrote: "I just went with the designation Rudolpho gave it."

I'm just using the minor version notation since it's really just bugfixes and no particular version updates, but I suppose it does get a bit longwinded hah.
Nice find on that dll resource by the way, I'll start updating and including that one in future builds.

Ortu wrote: "I'm not sure specifically which release is needed for 9Ex."

It indeed uses the June 2010 version, which is the final available release of DX9. Try downloading that (get it from Microsoft here), though I actually believe Windows 10 comes preinstalled with both DX9 and DX11 (nice change for once).

In other news I managed to get DarkLights partially functional, though some examples would still fail. Trying to sort that out I managed to fudge the previous working parts up
I may have to revert to an earlier version and start over with that.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 18th Oct 2016 01:43
Thanks guys.

Quote: "Not having the needed version of direct x has caused dbpro applications to either crash or simply do nothing when attempting to run on Windows 10, my guess is this is likely the issue
"


I hope this is the case but..

Quote: "though I actually believe Windows 10 comes preinstalled with both DX9 and DX11 (nice change for once)."


This is what is really puzzling for me, Win 10 already has DX11 and for sure it will have DX9 support and you don't have the need to install DX 9.c. Well, I might tell my friend to give the June2010 download a try, why not.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 18th Oct 2016 03:05
I know for sure the proper direct x was missing on a win 7 upgrade to win 10. Applications that worked prior had these issues until I updated direct x

I'm fairly sure I had to install the 2010 direct x on a fresh/full install of 10 pro on another machine


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 18th Oct 2016 03:12
Thanks Ortu, that gives me something to look forward to!

I'm also curious about the Matrix1 plugins. Does it have some file or package dependencies?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 18th Oct 2016 03:45
Some of them need those two redistributable dlls, msvcp71 and msvcr71, I just include these next to all my exes out of habit


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 18th Oct 2016 04:26 Edited at: 18th Oct 2016 04:27
Yeap definitely missing right version on upgrade to win10 from 7, also last year there was a windows update that screwed up dx9 for an old game my mate used to play(I forget what game but I have the update ref saved as KB 3074683), I just gave him my redistributable copy of the June 2010 dx and things where back to normal right away, so it could be something along those lines although you would have thought they would have it sorted by now...then again they should have had it sorted long before 2015 lol but I am sure there will be more to it than we may ever know. In any case I have auto update killed for win10.

Also with 9Ex and M1U plugins I had to place the MSVCP/R71.dll files in the plugins-user folder as well as in the project folder where the exe is or I get the error "The DBPro compiler stopped but the Error Report nor the Executable could be found."
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 18th Oct 2016 10:39 Edited at: 18th Oct 2016 12:56
Well, the June 2010 updates still does not work so I guess it goes down to the 2 dlls.

Although I'm still not familiar with Matrix1 but seeing the feature set and commands, I'm sure it's an awesome and essential plugin.


EDIT Upon installing the 2 DLLs it's working great now! Thanks guys!
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 18th Oct 2016 19:37
Good to hear.

I dont have them in plugins-user, but I do see them in the compiler folder alongside md5.dll and mfc71.dll

This probably serves the same need.


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 19th Oct 2016 05:52
Find another small bug. Its not important at all, but here it is ( maybe someone will stuck with it )
When DarkShader is open and you use any project which sonsists "set cube mapping on" command ( for example Palm Tree demo from Evolved )
shader will not work at all.Its ok just close DarkShader and it will be work fine.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 21st Oct 2016 04:12 Edited at: 21st Oct 2016 04:26
Hi there thanks for the update I have encountered a critical problem:
Some functions are not returning values correctly.

Look at this function:


All it does is take the gamepad thumbstick input and return the angle for the stick 0 to 360.
There is nothing external acting on this function.

Yet in my game in some functions when this is called it returns out massive erroneous numbers while in other functions it returns the correct angle.

I can even print to screen the value being returned showing it is correct. But as soon as the value is returned 123891263192876312 it turns into some huge number.

For example: The function will report it is returning 279.7820409668 but the number received back will be 1133241344.

If I call the function from another part of my program (a different originating function) it will return 279.7820409668.
It does not happen in every function when this function is called. This was working fine for years and suddenly became a problem when the EX update was installed.

It's like some sort of glitch where the value is not returned correctly.

Other issues:
- A lot of shaders are not working (particularly shader model 1)
- d3dfunc plugin not working
- Hide/Show Object or Exclude Object On/Off not working. My whole culling system is broken now and glitching out.
I will report these properly in a few days with more information.

In this Image: Button_MoveAngle() Called inside of Player Input function returns wrong value. When called from Main Loop returns the correct value.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 21st Oct 2016 19:08
I wrote this function simply because of my obsessive dislike for multiple related if statements. This works the same as Joystick Hat Angle. I have added a 10 percent deadzone. Just thought I would share.

Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 22nd Oct 2016 07:32 Edited at: 22nd Oct 2016 11:04
Quote: "WickedX: I wrote this function simply because of my obsessive dislike for multiple related if statements. This works the same as Joystick Hat Angle. I have added a 10 percent deadzone. Just thought I would share."


Thanks. I had to tweak the function to align the angles correctly. ATAN and ATANFULL documentation is poor so I had to improvise the implementation.



Your function returns an integer for the angle. It works perfectly but the motion does not feel fluid with that precision. (easy to change)
So returning an integer immediately solved the problem. The simple act of changing the data type.

My function returns JoyAngle#. I converted it here below to return JoyAngle (a float variable). Immediately the problem went away.



I have another function that measures how far you move the thumbstick regardless of direction. So to control the player I am measuring the sticks direction and intensity.
Here is the original function to measure thumbstick intensity and a general purpose function that does a simple distance measurement needed:



Thumbstick intensity should only be 0 to 1000.
Notice how both of these functions return variables with # at the end. JoyIntensity# and retVal#.

The resulting Thumbstick intensity is being measured as a massive multi million or trillion number.
In the function the number is fine. But the number returned is not the number that was sent.
This problem is causing the player to move at light speed across the level.

I am not sure if removing # symbol from these variables changes their datatype. Like from DWORD to Float. It's been so long and I can't find documentation.

If I call these functions from the main loop they return the values properly but calling these functions from inside other functions causes the values to not be returned correctly.

This looks like a compiler BUG.
At random parts of the program variables ending (postfixed) with # symbol are not being returned from functions correctly.
It might not even be the symbol but instead the datatype as a whole.
Removing the symbol and returning a float instead seems to help.

I have other issues I am still collecting info on but this is the most serious.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 23rd Oct 2016 06:39
Nice looking game project you got there Mage!


@Rudolpho


I don't know if you have tested this but the Advanced Terrain Plugin does not work with this version, maybe someone can confirm on this issue.

I tried to run it with the online version and it runs ok.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 23rd Oct 2016 07:59 Edited at: 23rd Oct 2016 08:45
Quote: "punkyb: Nice looking game project you got there Mage!"

Thanks
I find that adding a small picture makes reading more interesting for people.
A little extra effort in presentation can go a long way when seeking help.

It also gives people a better impression of where you're coming from and that you're not just tinkering with a tiny demo, or new.
I try to avoid a full size image in a thread like this, I find it a bit pretentious, but in this case I wanted the text in the image to be readable since it describes the error.
Sorry about that.

Cloggy's D3DFunc Plugin is not working. Text does not appear on screen.
https://forum.thegamecreators.com/thread/69221

Though in hindsight using Windows Fonts is terrible. No real video game does this.
I should just switch to a Bitmap Font System, like the one I made.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 23rd Oct 2016 16:35 Edited at: 23rd Oct 2016 17:08
Mage: The # suffix make the variable type float. A variable with no suffix is a integer. I'm not sure, but the problem could be with returning suffixed variables. Try declaring your variables instead to see if the issue persists.



punkyb: Confirmed! In my project I load a saved terrain which works perfectly. However, Advanced Terrain returns a memory failure when building a terrain.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Oct 2016 18:26 Edited at: 23rd Oct 2016 19:04
James H wrote: "Also with 9Ex and M1U plugins I had to place the MSVCP/R71.dll files in the plugins-user folder as well as in the project folder where the exe is or I get the error "The DBPro compiler stopped but the Error Report nor the Executable could be found.""

This should no longer be necessary as of the v1.0.0.1 release.

Kuper wrote: "When DarkShader is open and you use any project which consists "set cube mapping on" command ( for example Palm Tree demo from Evolved )
shader will not work at all."

Hm, yes this does seem to cause trouble; for me the DBPro project will just immediately close rather than the shaders not working though. I've no idea why DarkShader would interface with separate programs, however as it uses a captured DBP program as its render window, I suppose that is somehow related. It would unfortunately be difficult to figure out what to do this without having access to the DarkShader source. On the other hand, the DarkShader editor has always crashed on closing it for me so I believe it is a bit buggy in and off itself.

@Mage: That seems odd indeed.
Would you be able to produce a small code snippet that reliably reproduces this issue? Also have you been able to tie it to any math function such as ATAN, or is it the return value of the function itself that gets messed up (you could check this using print statements from within the function and outside it)?
The one thing that springs to mind is that it somehow reinterprets the floating point value as an integer - 1134759808 corresponds to the bit pattern used by a float value of ~326. So it seems it could be a casting issue where the compiler would suddenly assume your variable# is an integer instead of a float, however it seems odd to think that something like this wouldn't have been obvious long ago - therefore it seems likely that the issue somehow depends on some special circumstance. For this reason, a snippet reliably reproducing it would be a great help in trying to track it down, preferably as small as possible.

Mage wrote: "I am not sure if removing # symbol from these variables changes their datatype. Like from DWORD to Float. It's been so long and I can't find documentation."

It does, the # is a shorthand for "treat this as a float unless otherwise specified". If you remove it it will be treated as an integer (again unless otherwise specified).
For example this is legal:

Is it possible that you could have something like that where the same variable name is used for another data type in another part of your project?

Mage wrote: "- A lot of shaders are not working (particularly shader model 1)"

I'm must confess that I'm not particularly familiar with SM1. Have you tried the USE LEGACY SHADER COMPILER command?
By default DBPro9Ex uses a more strict shader compiler than previous DBP versions did.

Mage wrote: "- d3dfunc plugin not working "

This should hopefully have been fixed in the latest release (see my next post)

Mage wrote: "- Hide/Show Object or Exclude Object On/Off not working. My whole culling system is broken now and glitching out."

I see, thanks for reporting it and your follow-up details!

Kuper wrote: "I don't know if you have tested this but the Advanced Terrain Plugin does not work with this version, maybe someone can confirm on this issue."

Do you have any code to test out? I'm a bit uncertain which one Advanced Terrain is, but if it is the "world" functionality then I can get the second included example to compile and run as intended, however the first one fails on the LOAD BSP function which I could look into.


All in all, thanks for the reports and helping eachothers confirm stuff and everything guys, much appreciated!
Sorry for being a bit absent over the last week; I have been working hard on version 1.0.0.4 though. Hopefully it will fix some of the experienced issues
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Oct 2016 18:27
Version 1.0.0.4 is now available.
Click here to download it.

This version addresses most (hopefully all) issues reported with Cloggy's D3D Plugin, DarkLights and DarkVideo.

Homebrewed texture resource management functionality to emulate a mode that was available in earlier DirectX version but removed from DirectX 9Ex. This relatively seamlessly solves issues with plugins assuming the old mode to still be legal.
Supports multithreaded calls to the DirectX runtime from third party plugins. For example DarkLights uses this.
The About dialog will now reflect the appropriate DBPro 9Ex version. Thanks to WickedX for bringing this up!
Simple programs utilizing PRINT etc. outside of a loop should now properly handle double buffering, ie. the screen contents won't flicker from frame to frame any longer.
Fixed a memory leak in the precompilation system.
Added the following commands, complete with documentation:
Quote: "#USE MULTITHREADE DIRECTX
ENABLE VIRTUAL TEXTURE MANAGEMENT
DISABLE VIRTUAL TEXTURE MANAGEMENT
IS VIRTUAL TEXTURE MANAGEMENT ENABLED"

A new static link library for writing third party precompilers is included in the download. You will have to update to this for your precompilers to work with the latest compiler version. All changes are internal to the library so you won't need to change any code using it.

Also sorry for the long time between updates. Some of these solutions ended up being pretty convoluted.
The main new feature is that the runtime will now emulate a resource management mode available in earlier DirectX versions, such as 9.0c, but that was removed in DirectX 9Ex. The reason for its removal was that it was deemed this would force developers to think through what they intended to use resources such as textures for and in doing so achieving more efficient programs, rather than being lazy and having DX just handle it behind the scenes. I had previously altered the DBPro source to eliminate all references to this and set up appropriate other modes and resourec transfers as necessary. However what I had not anticipated were third party libraries accessing the D3D device directly and trying to use this mode. Doing so would naturally fail with DirectX 9Ex (that the plugins are obvlivious to, thinking they are still running on 9.0c), which was the main reason for most of the previously reported issues.
While I have patched the D3D device pointer to automatically handle this transparently, some plugins such as DarkVideo depends on a texture created by the DBPro runtime to also exhibit the properties of this memory management mode. Of course they don't as I have changed them, and changing it so that everything would use my workaround would introduce a lot of unnecessary overhead as well as memory wasting. As such there are a couple of new commands that can be used to turn this behaviour on for textures created through DBPro, such as through MAKE IMAGE FROM MEMBLOCK etc.
What you would do in this case is call ENABLE VIRTUAL TEXTURE MANAGEMENT, then proceed to create whatever images will be used by the dll in question and / or have the dll create them through a function from the dll itself. After these images have been created you will probably want to call DISABLE VIRTUAL TEXTURE MANAGEMENT to revert to the "regular", less wasteful image creation routine. This approach is for example needed for DarkVideo to function.

The second thing to be aware of is that DirectX is run in single-threaded mode by default in DBPro9Ex. This is because it is more efficient than having to lock the device for each call to the DirectX runtime as would otherwise be the case, along with the fact that DBPro is single threaded by its very nature.
However, DarkLights actually requires multithreaded access to DirectX if you try to render anything from DBPro while it is generating light maps. In this situation you can use the precompiler directive #USE MULTITHREADED DIRECTX to turn on the lock-guard behaviour. Take note that this is a global setting for your program that cannot be turned off at runtime.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 23rd Oct 2016 19:09
Woo-hoo! Been looking forward to this update for cloggys would love to be able to fully switch to 9Ex going forward.

I'll give it a try tonight and let you know if I come across anything new.


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 23rd Oct 2016 22:37 Edited at: 23rd Oct 2016 22:57
Thanks for the update and reply

Quote: "Rudolpho:
Mage wrote: "I am not sure if removing # symbol from these variables changes their datatype. Like from DWORD to Float. It's been so long and I can't find documentation."
...
Is it possible that you could have something like that where the same variable name is used for another data type in another part of your project?"


I can confirm this is not the case. There is no conflict with variable names. All over my program variables being returned from functions are being seemingly scrambled when they are named with a # suffix at the end.
This problem does not seem to happen when the function returning the value was called from my main loop.
This problem does happen when another function has called the function.
The values are not literally random or scrambled. For example returning the joystick angle produces a massive erroneous number but it returns the same massive number repeatedly until I move the joystick to a new angle.


Quote: "Rudolpho:
Mage wrote: "- Hide/Show Object or Exclude Object On/Off not working. My whole culling system is broken now and glitching out."

I see, thanks for reporting it and your follow-up details!"


Hold on there. This might be due to the Variable# problem glitching things out. So it might not actually be the commands themselves.
I'll report back on hide/exclude objects after I work around that issue by declaring the variables and removing the suffix or if you announce a bugfix.


Quote: "WickedX: Mage: The # suffix make the variable type float. A variable with no suffix is a integer. I'm not sure, but the problem could be with returning suffixed variables. Try declaring your variables instead to see if the issue persists."


This seems to work around the problem. Declare the variables and remove the # suffix from the variable names. Hopefully this bug can be fixed. It's a lot of work to track all of these down.

Login to post a reply

Server time is: 2024-04-24 03:27:26
Your offset time is: 2024-04-24 03:27:26