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
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 00:40 Edited at: 24th Oct 2016 00:43
Great update Rudolpho!

Quote: "
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.
"


Actually that was me. Ok attached is a basic AdvancedTerrain code, executable also included which was compiled using the online version for reference.

@WickedX

Thanks for the confirmation!

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th Oct 2016 00:55 Edited at: 24th Oct 2016 01:08
@ Mage

I declare all variable and would have never known about this issue. However, replacing all suffixed variables in your code with variable declarations does sound like a daunting task.

@ Rudolpho:

Advanced Terrain no longer generates a memory failure. However, it also does not generate any height from the map. In Cloggy's D3DFunc - Showcase the 3D Text Mesh example does not return an object, crashes with object does not exist error after calling - D3D_Make_3DText 1, 1, "D3DFunc - Low Quality", .1, 0, 1 on line 204. The D3D Object example simply crashes.

The attachment contains the D3DFunc Showcase example, the Advanced Terrain example and the Advanced Terrain plugin source.

Attachments

Login to view attachments
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 01:07

I just tested DarkLights and some examples have the same results and NOW generates the lightmap same with the online version but other projects crashes. I'm using the newsletter tutorial to test it out.

@Rudolpho

I'm still having problems getting a basic DarkLights example to work, on both which is the lightmap texture is generated but not applied. Maybe you could post some test code with DarkLights?

Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 24th Oct 2016 19:35 Edited at: 24th Oct 2016 22:11
It turns out I am having problems returning float variables from functions even if the suffix is NOT #.
I completely removed the suffix # from all my functions and discovered the issue remained at seemingly random parts of the program.
So the suffix does not appear to be the root cause of this.

Cloggy's D3DFunc Plugin:
I am now getting an error box "D3D9EX: Failed to update pixel data." and then the program crashes.
This happens when I try to use the plugin to put text on the screen.

I am also getting problems with loading times. Though I can't narrow the issue down with such a disruptive issue as the float function returning issue is.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Oct 2016 14:35 Edited at: 25th Oct 2016 14:39
@Mage

Which cloggys command specifically is causing the crash?

I am now able to use the 2d text from that plugin without issues, previously it just didn't show anything, but no errors and no crashes.

I can try to reproduce.

I do still get the frequent crash on calling the end command, but only in my larger project, smaller tests seem to be OK. The project writes an entry to a log file just before end and there are a couple of functions on the call stack before reaching the end command, either of these may be involved somehow, I will be doing further testing to narrow it down


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: 25th Oct 2016 14:44
Adding to the plugin testing (but I already got over it due to performance reasons) was the Dark Occlusion compatibility.

It builds ok and runs without crashing but it shows weird render results. Most objects are not rendered at all but debugged as visible (via the command, get visible objects()). I confirmed this by building it again with the old online version which worked perfectly.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 25th Oct 2016 15:15
@Rudolpho
1)How to use "ENABLE VIRTUAL TEXTURE MANAGEMENT" command ? Does it give some advantages?
2)How to use "#USE MULTITHREADED DIRECTX" command ? Can I send Sparkys collision for second core , for example ?
@Rudolpho @punkyb
Dark Occlusion doesnt work endeed) For me It culls objects by camera and not culls when object cover each other
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Oct 2016 16:16
@Kuper

I think those commands are compatibility settings, not added features


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Oct 2016 16:32
OK I just got the unable to update pixel data error on either d3d_box or d3d_boxText

It is intermittent though and doesn't happen every time, which will likely make it harder to track down and fix


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Oct 2016 21:14
I was directed to this thread by Ortu. Thanks Ortu.

I will definetly check this out, it should work on the same OS with vanilla DBP installed right?

Sorry I have not yet read the whole thread, very short on time today.

Thanks in advance (once again) for all of your hard work Rudolpho, I hope we can start to invest some money into your years of commitment.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Oct 2016 21:42
Quote: "
I will definetly check this out, it should work on the same OS with vanilla DBP installed right? "


Yeah just copy the vanilla install to a new directory then stick this into the copy

I just copied side by side:
Dark Basic Professional Online
Dark Basic Professional Online (Copy)
-Renamed it to Dark Basic Professional 9Ex

Extract 9ex files. You then need to point the editor in the 9ex directory to the compiler in the 9ex directory.


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: 26th Oct 2016 00:14 Edited at: 26th Oct 2016 00:53
Ortu wrote: "Which cloggys command specifically is causing the crash?"

This is a snippet of code I am using Cloggy's D3D Func plugin with.
This Snippet draws the text to the main menu of my game.
It now generates a "Failed to update pixel data." error.



Rudolpho wrote: "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."

I did this and right away my cubemap sky shader started working again.
If you find the time please let me know if there are any drawbacks to using this command.
Also here is the Sky Shader for reference:


I still have random functions not returning float values correctly. Now even without # suffix on the variables.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 26th Oct 2016 02:07
Quote: "OK I just got the unable to update pixel data error on either d3d_box or d3d_boxText "


Same here. I downgraded to 1.003 and it shows no error but the d3d fonts won't render at all.



Switched to Online Version again and it works.

punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 26th Oct 2016 12:35 Edited at: 26th Oct 2016 12:38
@Rudolpho

Is it possible to use the fast compile feature with the online version? What files are affected on that?

Just asking if this is possible.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 26th Oct 2016 22:47
Thanks for the support and bug reports guys.

I don't have that much time at the moment but to address what I can without further investigations;

punkyb wrote: "Actually that was me. "

Ah sorry
I'll blame how you have to scroll around to select the quotes, hit the quote button and then manually enter the name of the... quotee (Is that a word?) when you can't see the post anymore.

@WickedX:
Thanks for the nicely packaged example projects and source code.
It appears to be the same kind of issue as before but in a different package when it comes to Advanced Terrain. Unfortunately this one will be harder to solve as I can't just patch the D3D device's vtable when the procedural functions like D3DXLoadTextureFromFile() and the like are used with unsupported D3D9Ex parameters from a dll. I suspect that they ultimately rely on the device's functions though or there would be much more conflicts so I will think about what could be done about this. The system I currently have in place only works on IDirect3DDevice9::CreateTexture / LockRect / etc. and not the D3DX functions so this is quite likely the root of most of the reported lingering issues.
Another thing that may be an issue is basically the same issue again but with vertex buffers (my latest fix only addressed images); this is most likely what is happening with Cloggy's object-/mesh-related commands failing.

@Kuper:
Indeed those commands are for compatibility as Ortu put it. The multithreading will make sure that a lock is acquired by the calling thread for each DirectX function call, thus stalling any other threads trying to access it simultaneously. Not doing this will cause crashes if multiple threads attempt to access DirectX at the same time. DarkLights does this for a fact, I believe that some physics plugins may also do it, but apart from that I think nothing is directly reliant on multithreaded DX access.

Mage wrote: "This is a snippet of code I am using Cloggy's D3D Func plugin with.
This Snippet draws the text to the main menu of my game.
It now generates a "Failed to update pixel data." error."

Hm... I tried a slight variation of that and it is giving me no such error:

May it be that it is in fact triggered by something else in your code?
The error message itself means that a rerouted call to UnlockRect failed where it attempts to copy the contents of a staging buffer to the "locked" image. I must confess that I can think of no logical reason that this call should ever fail, unless Cloggy's dll is secretly utilizing multithreaded access as well (could you try it with the #USE MULTITHREADED DIRECTX directive just so that we can write off this unlikely possibility?) so some code that reproduces the issue would be most welcome. Does it only occur intermittently when run for a long time as I think someone mentioned?

Mage wrote: "If you find the time please let me know if there are any drawbacks to using this command."

Support for pixel shader versions 1.x has been deprecated by Microsoft.
The reason for this is listed as those being very old, limited and compiling to hardware-specific instructions (as per this MSDN page). As such it is probably not entirely safe to rely on shader model 1 producing reproducible output across all different brands of graphics cards produced after ~2010.
As for the strictness of the compiler in general, this is to safeguard against undesired usage. Basically the older shader compiler would allow invalid settings and just fall back to the defaults if so, whereas the new one requires that you explicitly tell it what you want it to do. Besides this the legacy compiler can also perform some typecasting such as from a DWORD colour to a float4 and so on, which the new one does not => it will treat the wrong kind as an error.

Mage wrote: "I still have random functions not returning float values correctly. Now even without # suffix on the variables."

That is a most weird issue indeed.
When this happens, does it consistently happen throughout the compiled project's runtime, or can it change from "working" to "not working" within the same compilation? The second thing really makes no sense at all as type casting is determined at compile time, and seems to be functional (it would basically always be broken for user-defined functions otherwise, which clearly isn't the case, as they use the same parsing rules).
Can you have a look at the assembly dump in your DarkBasic Professional\TEMP\_Temp.dbm file and see if anything looks off in there?

punkyb wrote: "Same here. I downgraded to 1.003 and it shows no error but the d3d fonts won't render at all."

Yes, that makes sense as that error message was only introduced in the latest version
The earlier versions would just yield a silent error (ie. no texture updates => they'd be black) instead of try to correct it like the newest version is.

punkyb wrote: "Is it possible to use the fast compile feature with the online version? What files are affected on that?"

I'm not sure, version 1.0.0.3 and below might work. Version 1.0.0.4 (and later once we get to there) won't though as it relies on added functionality in the setup and core dll's.
Feel free to give it a try with an earlier compiler version, but no promises.

Also regarding Dark Occlusion, I don't have access to this. It is quite possible that it suffers from the same vertex data issues as Cloggy's plugin probably does, but there may also be more to it than that.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 27th Oct 2016 00:47 Edited at: 27th Oct 2016 01:15
Thanks Rudolpho. Nice, working good so far!

Quote: "Also regarding Dark Occlusion, I don't have access to this. It is quite possible that it suffers from the same vertex data issues as Cloggy's plugin probably does, but there may also be more to it than that."


Ok I have attached a demo of dark occlusion test DLL that I found somewhere in this forum for your reference.

Attachments

Login to view attachments
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 28th Oct 2016 07:44 Edited at: 28th Oct 2016 07:53
Rudolpho wrote: "Mage wrote: "This is a snippet of code I am using Cloggy's D3D Func plugin with.
This Snippet draws the text to the main menu of my game.
It now generates a "Failed to update pixel data." error."

Hm... I tried a slight variation of that and it is giving me no such error:
+ Code Snippet

May it be that it is in fact triggered by something else in your code?
The error message itself means that a rerouted call to UnlockRect failed where it attempts to copy the contents of a staging buffer to the "locked" image. I must confess that I can think of no logical reason that this call should ever fail, unless Cloggy's dll is secretly utilizing multithreaded access as well (could you try it with the #USE MULTITHREADED DIRECTX directive just so that we can write off this unlikely possibility?) so some code that reproduces the issue would be most welcome. Does it only occur intermittently when run for a long time as I think someone mentioned?"


I narrowed down the snippet of code. D3D_STARTTEXT and D3D_ENDTEXT don't seem to generate the error. The error occurs when D3D_TEXT is used.
I turned off most of the fun stuff but the problem didn't go away.

#USE MULTITHREADED DIRECTX had no effect.

Rudolpho wrote: "Mage wrote: "I still have random functions not returning float values correctly. Now even without # suffix on the variables."

That is a most weird issue indeed.
When this happens, does it consistently happen throughout the compiled project's runtime, or can it change from "working" to "not working" within the same compilation? The second thing really makes no sense at all as type casting is determined at compile time, and seems to be functional (it would basically always be broken for user-defined functions otherwise, which clearly isn't the case, as they use the same parsing rules).
Can you have a look at the assembly dump in your DarkBasic Professional\TEMP\_Temp.dbm file and see if anything looks off in there?"


When float variables are returned the number is correct before being returned, but massive and wrong after being returned. The number does not get endlessly randomized. I was watching the joystick input. I calculated the angle of the thumbstick and the function doing this had this issue. The number being returned was massive and wrong but did not change when I held the thumbstick still. It would change when the thumbstick was moved around. It's as if there was a casting or a binary math problem.

These returned float values also don't have decimal values. They appear as large integer values when written out.

I had a look at the assembly dump. I can't say I recognize an obvious problem. I would need to sit down with an instruction sheet and familiarize myself with this architecture and the registers. That would be painful.
I have included a snipet of the end of the mentioned function returning a float variable:

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th Oct 2016 22:42
punkyb wrote: "Ok I have attached a demo of dark occlusion test DLL that I found somewhere in this forum for your reference."

Thanks, I'll try to have a look at it.

Mage wrote: "When float variables are returned the number is correct before being returned, but massive and wrong after being returned. The number does not get endlessly randomized. I was watching the joystick input. I calculated the angle of the thumbstick and the function doing this had this issue. The number being returned was massive and wrong but did not change when I held the thumbstick still. It would change when the thumbstick was moved around. It's as if there was a casting or a binary math problem. "

Ok, yes indeed; what is happening is that it's interpreting your floating point value as an integer. Floats are stored as a sign bit, eight bits for the exponent and then a 23-bit mantissa value, which leads to the numbers looking very large when viewed as integers. It all adds up in your screenshots though and would those integer numbers be interpreted as floats they would represent the correct "assumed" angle values.

Now as you say the value seems to still be considered a float inside the function, the point of interest is where another function calls this function and gets the wrong value.
If you can find that part in the assembly it may be possible to see whether it is doing anything funky with it. The instruction in question will probably be something like JE, JNE or JMP with a comment like "CALL Button_MoveAngle" but that is not the one we're interested in, rather the area immediately following that instruction is likely to be relevant. Basically there should be a POP instruction that reads the return value from the stack and puts it in a register; then the question is what is done with said register. So if you could locate and copy ~50 - 100 instructions in this area that would be interesting to look at.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 29th Oct 2016 02:59 Edited at: 29th Oct 2016 05:57
No problem and sounds good. Happy to report plugin issues, the least I can do to help is test them out for incompatibilities.

Here's another one with ImageKit when I try to resize an image, it's a simple error (I hope) that throws out "Could not lock image" then exits.



On the bright side, Advanced2D works without a hitch and it looks like a good replacement.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 29th Oct 2016 08:12 Edited at: 29th Oct 2016 08:13
Rudolpho wrote: "If you can find that part in the assembly it may be possible to see whether it is doing anything funky with it. The instruction in question will probably be something like JE, JNE or JMP with a comment like "CALL Button_MoveAngle" but that is not the one we're interested in, rather the area immediately following that instruction is likely to be relevant. Basically there should be a POP instruction that reads the return value from the stack and puts it in a register; then the question is what is done with said register. So if you could locate and copy ~50 - 100 instructions in this area that would be interesting to look at."


Yes I will lay this out as simple as I can:

I have placed q# = Button_MoveAngle() in both the main loop and an input function.

I am writing the returned value directly to the screen from both the main loop and also an input handling function.
From the main loop always seems to work correctly. From the function always seems to not work correctly.


This is what the code looks like in the input handling function:


This is an assembly code snippet from the input handling function:


This is an assembly code snippet from the main loop:
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 29th Oct 2016 11:34
Alright, well it would seem the DBM dump is generally a bit weird... what's with all those added characters in places, and missing in others I wonder?
If you were to compile this with the official compiler, would the DBM data change?

In any case, it would seem that your input handling function calls Button_SecJoyY(0) rather than Button_MoveAngle(). Is this a function you actually have in your code and if so how does it look? Does it return an integer?
Another thing you could try would be to add 0.5 or so to your q# variable and see if it still prints it as an integer or not.

As for the main loop portion it seems to perform a lot of type casting. Like way too much. It then seems to initialize an array with this data so it seems doubtful if this is indeed the correct part of your source being reflected here? This could perhaps be the case for the previous (input handler function) section as well then. Try searching for CALL MEM $label Button_MoveAngle and see if that shows up anything.

punkyb wrote: "Here's another one with ImageKit when I try to resize an image, it's a simple error (I hope) that throws out "Could not lock image" then exits."

How are you creating its image?
Have you tried using ENABLE VIRTUAL TEXTURE MANAGEMENT before you create said image? This currently only works with images created using MAKE IMAGE FROM MEMBLOCK I believe so maybe I could extend it to cover other creation routines as well.
As a workaround you could try something like this, which may work:


punkyb wrote: "On the bright side, Advanced2D works without a hitch and it looks like a good replacement. "

That is good to hear
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 29th Oct 2016 13:37 Edited at: 29th Oct 2016 14:04
Rudolpho wrote: "If you were to compile this with the official compiler, would the DBM data change?"


The main loop snippet from the official compiler:


The input function snippet from the official compiler:


Rudolpho wrote: "In any case, it would seem that your input handling function calls Button_SecJoyY(0) rather than Button_MoveAngle(). Is this a function you actually have in your code and if so how does it look? Does it return an integer?"


Yes it also returns a float. The assembly jumps around a bit I may not have provided the best section.
Specifically in this situation Button_SecJoyY(0) is not used. But it is used elsewhere in the program.



Rudolpho wrote: "Another thing you could try would be to add 0.5 or so to your q# variable and see if it still prints it as an integer or not."

There was no change. There is an anomaly here.

This result prints to screen looking like an integer no matter what I do.
q# = Button_MoveAngle() + 0.5

Putting this in front has no effect.
local q# as float

Putting this ahead of the first line mentioned and separately writing to screen writes 0.5 to the screen. Does not affect the other line,
q# = 0.5

The behavior is consistent with q# being a float but once Button_MoveAngle() is added in the mix the result turns seemingly into an integer.


Rudolpho wrote: " Try searching for CALL MEM $label Button_MoveAngle and see if that shows up anything."


There are several matches. I cannot seem to identify any of them to specific places in the source code. The assembly might not be laid out the same way here.
This is a snippet from one of the matches compiled with DBPro9ex:
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 29th Oct 2016 15:54
Hm OK, that does make it seem like there is indeed an issue at hand with the compiler rather than a plugin here.

While not really similar, there has been another report of seeming compiler issues starting with version 1.0.0.3 and onwards. Would you mind testing version 1.0.0.2 (downloadable from here) and see if this issue persists (note that you should replace the dll's as well in this case or there will be issues, at least with a downgrade from version 1.0.0.4)? If you have the time you could also try version 1 available here. If either of these work they would at least give some idea as to where the issue may originate from.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 29th Oct 2016 22:50
Thanks Rudolpho, here's the code. same error.



Anyway, not that critical since there are other ways to achieve. I was successful with just image to sprite conversion, then resize.

I'm also thinking that maybe you can look at the mipmapping issue when you do a load image from memblock command. Is this even possible? how do you retain mipmaps or generate one? I'm using DDS textures.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 29th Oct 2016 23:37
I'm also attaching the dump files for Advanced Terrain, it only crashes when you try to build the terrain "build terrain objnum"

Hope that helps with the debugging.

Attachments

Login to view attachments
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 30th Oct 2016 06:48 Edited at: 30th Oct 2016 06:54
Rudolpho wrote: "Would you mind testing version 1.0.0.2 (downloadable from here) and see if this issue persists"

The problem persists. Here is the 1.0.0.2 assembly snippet:


Rudolpho wrote: "If you have the time you could also try version 1 available here. If either of these work they would at least give some idea as to where the issue may originate from."

Version 1 also has the issue. Here is the assembly snippet from version 1:


I will also add that in all these cases the DBProEX was freshly installed onto the original CD installed DBPro updated to the latest official patch.
I backed up the program folder before testing this so I just retrieve it each time.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 30th Oct 2016 13:50 Edited at: 30th Oct 2016 13:56
@Rudolpho

I don't want to forget some issues that I have encountered while doing some things and working on DBPro, so I thought that might as well post them here for posterity and in case you have the time to take a look at it.

I just learned LOD is a built-in feature which is great and the same as Dark Occlusion, it does not work right now with 9Ex. I also tested this with online version and it works no problem.

Attached is an example that I got from the dbpro wikia site somewhere and modified a bit, includes the susan monkey lod models to test it with.

Attachments

Login to view attachments
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 5th Nov 2016 00:06
I have also noticed that there is a Bullet Plugin that comes along with 9Ex, is this StabInTheDarkSoftware's Bullet wrapper? Where can I find the examples?

punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 5th Nov 2016 02:48
While doing some command testing, I found out that some of the Basic 3D Commands is sort of incomplete or non operational (DBProBasic3DDebug.DLL). This also has the same errors with the new TGC open source version.

As an example, the PERFORM CHECKLIST FOR OBJECT LIMBS command does not work with TGC and 9Ex

I have attached a project example that is tested with online version. I would assume most of the 3D commands are affected by this DLL including most issues I posted previously?

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 5th Nov 2016 17:49 Edited at: 5th Nov 2016 17:50
Quote: "the PERFORM CHECKLIST FOR OBJECT LIMBS command does not work with TGC and 9Ex"


What is the issue? Perform Checklist For Object Limbs appears to work fine.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 6th Nov 2016 00:13 Edited at: 6th Nov 2016 00:19
Hey WickedX. Thanks and that gives me something to look forward to. Can you post your DBP and 9Ex version upgrade steps?

I'll post my errors with my setup. BTW did you try the attached example that I made?
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 6th Nov 2016 00:27
Quote: "Can you post your DBP and 9Ex version upgrade steps?"


Yes, I can do that. But, first can you upload a screenshot of the output you get running your LimbCheckList demo.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 6th Nov 2016 01:50 Edited at: 6th Nov 2016 02:08
Thanks. Yes, here's the screen using 9Ex. It looks running but there's no response if you try to press any of the 1-9 keys. It should rotate if the function is actually working.

9Ex (any version)



ADDED: Online version which works perfectly..

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 6th Nov 2016 03:19
The objects limb structure appears to be correct in both the online version and 9Ex. In 9Ex, Rotate Limb does not seem to handle the linked limb hierarchy properly. The snippet is a simple demo of building a linked object with code. Compare the output in the online version and 9Ex.

punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 6th Nov 2016 03:32 Edited at: 6th Nov 2016 03:37
Ok thanks WickedX! That was really confusing but I see it now. So how should I use it here as this is one has shorter parameters



Quote: "In 9Ex, Rotate Limb does not seem to handle the linked limb hierarchy properly. "


And yes this presents a new issue if the checklist works.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 6th Nov 2016 04:04
You're using the function correctly and with the same parameters. This last bit "wrapvalue(limb angle z(1, 3)+rightkey()-leftkey())" just rotates the limb on it z axis based on its current z angle +/- 1 depending on whether the right key or left key is pressed.

It seems to be an issue with the DBO format or how it's rendered.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 6th Nov 2016 07:18 Edited at: 6th Nov 2016 07:20
Thanks. I was hoping to get the Newton Plugin Mesh Ragdoll working with 9Ex, those assets are part of the wrapper examples btw. With your findings it looks like it has trouble finding the right limbs.

The only ragdoll system that works so far with 9Ex is the Dark Dynamix version but it is a bit difficult to setup (maybe someone can share some info/tutorial) and it looks like the Newton version is much faster and can handle more instances with good framerates.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 6th Nov 2016 15:22
I was wrong, having read the docs, it looks like Dark Dynamix is way faster because it supports multi-threading.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 9th Nov 2016 05:00
Tracked down a memory leak today, affects both Vanilla and 9Ex if you want to have a look at it.

It occurs when setting a UDT variable = another UDT variable that has values set:



A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 9th Nov 2016 23:03 Edited at: 9th Nov 2016 23:08
In the loop that leaks try adding...

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Nov 2016 11:52
Sorry for my lack of replies recently; I've got a pretty big deadline at work coming up which is claiming most of my would-be free time.

punkyb wrote: "Thanks Rudolpho, here's the code. same error."

Thanks for providing a code snippet, I will look into it when I get the time.

punkyb wrote: "I'm also thinking that maybe you can look at the mipmapping issue when you do a load image from memblock command. Is this even possible? how do you retain mipmaps or generate one? I'm using DDS textures."

That should be possible to do; the LOAD IMAGE FROM MEMBLOCK function doesn't generate any mip maps, nor do memblocks images support them. One could easily be auto-generated from the top level mip (main image) though, I could add an optional flag to the command for that.
Retaining mip maps when locking an image would be more difficult; it would be possible to add a mip count to the header but this would then break all old code using the 12-byte memblock image header. Although, thinking about it the depth can really only be 16 or 32, so maybe that DWORD could be split into two 16-bit words with one holding the mip count, and with 0 or 1 both indicating a single image, hmm... I'll look into it!

Some of the object-related issues, such as physics plugins may probably be due to roughly the same issue as with the textures (removal of features in D3D9Ex compared to D3D9.0c). At this rate it looks like I may end up having to wrap half of the DirectX functionality to handle this
As for the compiler I'm rather confounded as to whatever may be causing this. It must be very selective in when it fails like that too; for example Starwraith 3D Games is using a slightly modified version of DBPro 9Ex for Evochron Legacy since around last Christmas without any issues, and have recently upgraded to version 1.0.0.2, also seemingly without encountering compilation issues. Considering the size of said project the issue at hand doesn't seem to be something that would just randomly creep up but may rather be tied to a very specific collection of dll's being linked in a certain order or something like that. If you were to do a fresh installation with only the minimalistic set of dll's required to build your project, does the floating point issue still arise?
I may otherwise try to restart from scratch on the compiler source to see whether this will work when I get the time.

WickedX wrote: "In 9Ex, Rotate Limb does not seem to handle the linked limb hierarchy properly."

I'll look into that when I get the opportunity, thanks for reporting it and the example code.

@Ortu: As WickedX pointed out, you have to manually release strings in UDT's using the FREE STRING$() function when changing them or they will leak. This "issue" has been around for as long as I can remember and is probably more of a design choice than a real bug with DBPro.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 13th Nov 2016 14:43
Quote: "That should be possible to do; the LOAD IMAGE FROM MEMBLOCK function doesn't generate any mip maps, nor do memblocks images support them. One could easily be auto-generated from the top level mip (main image) though, I could add an optional flag to the command for that.
Retaining mip maps when locking an image would be more difficult; it would be possible to add a mip count to the header but this would then break all old code using the 12-byte memblock image header. Although, thinking about it the depth can really only be 16 or 32, so maybe that DWORD could be split into two 16-bit words with one holding the mip count, and with 0 or 1 both indicating a single image, hmm... I'll look into it! "


Thanks Rudolpho! appreciate this but I realized and considering that this is a specific issue which is really not part of the original features in DBPro, I think it would just be fine the way it is as it looks like you can do this with using IMAGEBLOCK instead which WickedX suggested on my other posts.

It seems it will be worth getting some of those DLL plugin compatibility eventually fixed or DX9.0c features support instead as you mentioned.


WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 14th Nov 2016 15:45
Thanks, Rudolpho. Really appreciate all the effort you're putting into this. DarkBasic Professional Forever.

Quote: "That should be possible to do; the LOAD IMAGE FROM MEMBLOCK function doesn't generate any mip maps, nor do memblocks images support them. One could easily be auto-generated from the top level mip (main image) though, I could add an optional flag to the command for that.
Retaining mip maps when locking an image would be more difficult; it would be possible to add a mip count to the header but this would then break all old code using the 12-byte memblock image header. Although, thinking about it the depth can really only be 16 or 32, so maybe that DWORD could be split into two 16-bit words with one holding the mip count, and with 0 or 1 both indicating a single image, hmm... I'll look into it!"


I was thinking, just add a function like "Generate Image Mipmaps" should suffice. This way we could just generate the mip levels as needed.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 18th Nov 2016 05:44
Rudolpho wrote: "As for the compiler I'm rather confounded as to whatever may be causing this. It must be very selective in when it fails like that too; for example Starwraith 3D Games is using a slightly modified version of DBPro 9Ex for Evochron Legacy since around last Christmas without any issues, and have recently upgraded to version 1.0.0.2, also seemingly without encountering compilation issues. Considering the size of said project the issue at hand doesn't seem to be something that would just randomly creep up but may rather be tied to a very specific collection of dll's being linked in a certain order or something like that. If you were to do a fresh installation with only the minimalistic set of dll's required to build your project, does the floating point issue still arise?"


I'll try to do some more tests in a day or so.
I'll do what you suggest. I'll also try and eliminate massive sections of my source code and plugins to see if I can find the specific moment the issue stops occurring if at all.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 18th Nov 2016 08:18
For my test and reports, actually I'm still gathering some examples and playing with plugin demos to check what works and comparing between the online version, nothing serious as of the moment.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 18th Nov 2016 23:18
Here is the simple demo of the floating point issue. If it helps.

Bored of the Rings
User Banned
Posted: 19th Nov 2016 07:48 Edited at: 19th Nov 2016 07:53
@Rudolpho-I would like to make a donation to this project as it's impressive so far. [edit-just twigged what the gmail address is-ignore]

Keep up the great work.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 20th Nov 2016 06:38 Edited at: 20th Nov 2016 06:51
I have been looking into that float variable returning bug.
It looks like I was able to eliminate my entire program and the bug remains.
Downloading the open source DBP and installing it and DBPro EX latest fresh had no effect.

I also tested 2 Windows 10 Systems:
AMD FX-9590 and Intel Core i7 2670-QM
So this is not a CPU architecture thing.

I have attached an Xbox one Controller with a USB Cord.

Here is the entire source code:


Here is the Assembly Dump:


I have attached the compiled EXE.

Attachments

Login to view attachments
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 20th Nov 2016 11:08
@Mage

I already reported Cloggy's D3D Plugin weeks ago that it does not work at the moment with any 9ex versions. Better look at Advanced2D next if you are aiming for smooth fonts which works great btw.

Your reported example works on my setup. I have Win7 and a controller plugged in and it does not return a float, looks like long integers. Same here latest 9Ex and build on top of the open source version, as Rudolpho instructed.


@Rudolpho
Is the current setup for 9Ex now default to backdrop off? I have to do backdrop on for Text functions and backdrop off for Print to work. This is completely the opposite with the online version and without the blinking text which I thought first was a bug.

Check Out My DarkBasic Blog and Resource!
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 20th Nov 2016 21:47 Edited at: 20th Nov 2016 22:00
punkyb wrote: "I already reported Cloggy's D3D Plugin weeks ago that it does not work at the moment with any 9ex versions. Better look at Advanced2D next if you are aiming for smooth fonts which works great btw."

Not talking about that.
Though I would not use Advanced 2D for text. Not directly.
I use a sprite based text system. Using Windows font system is ridiculous. Nobody does that.
When was the last time you saw a video game install a font it needed? Never I'm guessing.
https://forum.thegamecreators.com/thread/207584


Quote: "Your reported example works on my setup. I have Win7 and a controller plugged in and it does not return a float, looks like long integers. Same here latest 9Ex and build on top of the open source version, as Rudolpho instructed."

You confirmed the bug. Thanks.

Login to post a reply

Server time is: 2024-04-23 18:27:39
Your offset time is: 2024-04-23 18:27:39