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 / What Can We Do To Fix DB Pro

Author
Message
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 17th Jul 2014 22:02 Edited at: 17th Jul 2014 22:24
Hey guys, I have been looking into DB Pro a lot over the past few days. I also asked in another forum about what FPS:R can do and as cool as it sounds, its still not finished.

Now, I'm a stubborn old codger and I refuse to give up on DB Pro. Although admittedly I have given up in the past, I always end up coming back to it. I use it off and on for my prototypes. But what if you could do more then just prototypes ? What if the bugs were fixed ? What if we could add more functionality that we need / want ?

So, I guess my question is, since this is a community effort, what exactly can we do to fix DB Pro ourselves ? What is it that needs fixing ? I know for me, there are a couple things. But I would like to hear from you.

I personally use the Matrix1 DLL plugins. It's been great. But even that set of wonderful plugins may not account for every problem that might occur. Is this too much of an under taking ? I would like to hear from you all.

And please, give real answers as to what needs to be fixed, not "screw DBP because DB Pro is dead" type of answers.

EDIT UPDATE : I forgot to mention, I am using the latest U77 update.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Jul 2014 23:49
Quote: "What if the bugs were fixed ?"


If the bugs aren't fixed then do what several successful Indie game creators do - work around them.

If you wait for every bug to be fixed you'll never create anything - and what about the bugs that nobody has discovered yet, they must be real showstoppers .



Powered by Free Banners
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 18th Jul 2014 00:41
Thats kind of my point. What is it that is stopping DB Pro from getting used more ? What other language is everyone using if DB Pro is not working out for them ? And why isn't it ? My guess was bugs, but is it more then that ? I see posts all the time here lately about "I'm done with DarkBasic", what I am wanting to know is why ? If its something we can fix, then what is it ?
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 18th Jul 2014 00:59
there's nothing you can fix.

dbpro's renering routine is extremely slow and can't be fixed. It needs to be written from scratch. Dbo format is very limited and is one of the bigger causes of dbpro slowness. It can't be fixed, only written from scratch.

There's also some serious problem with rendering animated models.

And the biggest problem is that it's hard to make money as indi developer if you develop for desktop os only. Real money nowadays is in mobile platforms which dbpro doesn't support

JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 18th Jul 2014 14:25 Edited at: 18th Jul 2014 14:26
Quote: "there's nothing you can fix.

dbpro's renering routine is extremely slow and can't be fixed. It needs to be written from scratch. Dbo format is very limited and is one of the bigger causes of dbpro slowness. It can't be fixed, only written from scratch.

There's also some serious problem with rendering animated models.

And the biggest problem is that it's hard to make money as indi developer if you develop for desktop os only. Real money nowadays is in mobile platforms which dbpro doesn't support"


OK that does make sense.

So how is FPS:R going to be any different ? I do not see it going crossplatform either. In fact on their website it shows it to be only for windows. Is it going to end up with the same fate as DB Pro ?
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 18th Jul 2014 17:09 Edited at: 18th Jul 2014 17:11
Brendy boy

Quote: "dbpro's renering routine is extremely slow and can't be fixed. It needs to be written from scratch. Dbo format is very limited and is one of the bigger causes of dbpro slowness. It can't be fixed, only written from scratch."


Could you please explain how you know that the rendering routine is broken and can't be fixed.

Quote: "There's also some serious problem with rendering animated models."


I have never found any problems with rendering animated models.
I am developing a physics wrapper for DBPro and I am very familiar
with the DBPro source code.


JackDawson

Making a game with any language is a daunting task but it can be done.
There are plenty of examples, these forums are a great resource and I can't think of any other language that has such a great community to learn from.
As you can see by my join date I have been here a little while.

Check out my WIP using Bullet Physics we are developing an easy to use wrapper. It might give you some motivation.

http://forum.thegamecreators.com/?m=forum_view&t=208831&b=8

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 18th Jul 2014 19:44
Quote: "OK that does make sense.

So how is FPS:R going to be any different ? I do not see it going crossplatform either. In fact on their website it shows it to be only for windows. Is it going to end up with the same fate as DB Pro ? "

I don't know. Lee is doing some tweaks to dbpro to make it faster i think. If anybody can make dbpro faster by fixing it the person who made it (Lee).
I won't be cross platform, it uses directx just as current dbpro does.

Quote: "Could you please explain how you know that the rendering routine is broken and can't be fixed."

it's not broken, it's slow. It contains only basic optimizations such as frustum culling.
For real speed you need occlusion culling and some sort of scene graph for faster traversal of the objects in the scene.

Quote: "I have never found any problems with rendering animated models.
I am developing a physics wrapper for DBPro and I am very familiar
with the DBPro source code."

well, at the times when i used dbpro daily i compared the speed of the same program made with dbpro and with c++ using only directx.

100 animated models killed dbpro, while the program in c++ was running with more than 100fps. That's a big diference.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 18th Jul 2014 20:45
Is it available to add (fix) sprite filtering when scaling?

All your TGC are belong to us.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 19th Jul 2014 16:27 Edited at: 19th Jul 2014 16:38
So from reading these comments, I see there is a mix of feelings.

@ Stab in the Dark software
I all I see in your answer is you boasting about how long you been a member. Nothing in your reply was about why this thread was made. This thread is about fixing the problems DB Pro has. I have been here long time myself, and I have seen with my own eyes the problems DBPro has. In fact even Lee himself sent me a DLL file to fix one of the bugs I reported. There are bugs. This thread is not about how HARD it is to make a game, its about what can be done to fix DBPro.

@ Brendy Boy
Yes, Lee made a thread about fixing or updating DB Pro to possibly even DB Elite. That was over a year ago and no one has heard from him since. And as you said, there are serious problems with the rendering engine. I totally agree as I have seen it with my own eyes.

@ Mr Handy
That is a good question but is beyond my knowledge. Hopefully someone will see this thread that can help with that.

EDIT UPDATE : I meant to say, that even with the rendering issues out of the box, with certain DLLs being called and some tweaks, it can render better with no problems. But if we can do something to improve it, I made this thread for us to discuss it.
Kuper
18
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 19th Jul 2014 17:00 Edited at: 19th Jul 2014 17:04
I hear that DBPro sourece code can be downloaded from google code.
https://code.google.com/p/darkbasicpro/ .Its like open source now. So group of people who knows c++ well can optimize or rewrite parts of Lee's code.... But the most curious thing is that Lee didnt dо it for himself all last years
p.s. Some people already tried to download it.Just search in forum
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 19th Jul 2014 19:28
JackDawson

Quote: "So, I guess my question is, since this is a community effort, what exactly can we do to fix DB Pro ourselves ? What is it that needs fixing ? I know for me, there are a couple things. But I would like to hear from you."


1.Dbpro is free and open source. Go and pull a copy from the SVN repository and study it.

2.Compile a proper list of bugs. By this I mean bugs that can be reproduced with a proper code example.
Some of the bugs that are reported are not bugs at all but just a misunderstanding of how DirectX works.
Here is an example

http://forum.thegamecreators.com/?m=forum_view&t=193531&b=1

If it is a legitimate bug first check to see if has been handled by a third party plugin.
Here is an example.

http://forum.thegamecreators.com/?m=forum_view&t=163815&b=15

3.Any bugs you have at this point, fix in the DBPro source code, rebuild the dlls and test.

4.Then get permission from Lee to upload your changes to the SVN repository so every one else can use it.

FYI: SVN is software to keep track of code changes. You will need it to download the DBPro source.
Here I the link for tortoise SVN.

http://tortoisesvn.net/

My son and I have an intimate knowledge of the DBPro source code.
Our current physics plugin demonstrates that.
I would not be posting here if I was not willing to help fellow members.

DBPro is a mature language compared to some.
DBPro is using DirectX 9.0c which has been around a long time and is stable.
There is a misunderstanding that DBPro is a complete game engine, it is only a code library that you can use to make a game engine.
Items like occlusion culling, animating a 100 models efficiently would be something you code
in your game engine, not done by default in DBPro.



[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Jul 2014 19:52
Quote: "Items like occlusion culling, animating a 100 models efficiently would be something you code
in your game engine, not done by default in DBPro."

the problem is you can't code that in dbpro, it needs to be coded in c++ which eventualy means you have to rewrite part of dbpro.

e.g. in order to make rendering a litle faster by optimizing dbpro object format you would have to retwrite almost 50% of dbpro.

That just is't worth of anybodys time, is easier to pick another engine or write your own.

There are some super cool engines out there, some of them writen with begginer in mind, very easy to underdtand and modify if you know c++, cross platform etc...

dbpro is excellent for learning 2d/3d graphics and game development fundamentals.

If you want to make money -> c++, unity, udk or some of the c++ game engines which are quite popular like construct etc...

Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 19th Jul 2014 20:48 Edited at: 19th Jul 2014 20:50
Brendy boy

Quote: "the problem is you can't code that in dbpro, it needs to be coded in c++ which eventually means you have to rewrite part of dbpro. "


Dark Occlusion was originally coded in DBPro then rewritten in C++ to put in a DLL.
He did not have to rewrite DBPro.
This is not a bug because it has already been done in a third party DLL.

Quote: "e.g. in order to make rendering a little faster by optimizing dbpro object format you would have to rewrite almost 50% of dbpro."


There is nothing wrong with the DBPro object format (.dbo).
I have written a Milkshape file importer and a Giles file importer.
Both importers hand off to the DBO format, so I have extensive experience with the DBO format.
Changing the DBO format would not make rendering faster.

Here is the link to the free dll for loading Milkshape file format.
It also contains some extra limb commands.
http://forum.thegamecreators.com/?m=forum_view&t=190035&b=8

As I posted above, back up your bug claim with real evidence not just a rant about rewriting 50% of DBPro.
I am using the DBPro source code every day in the development of my current project.
I have already demonstrated in the past that if I find a real bug or limitation I have made free dlls to fix it.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 19th Jul 2014 21:51
I downloaded the full Trunk of the Source code. I will look it over.

I'm no where near an expert on C++. But hopefully I can read it and see where it takes me.

I have another language that I use.. PowerBasic, which can use Direct APIs with no problems, and its extremely fast. Including OpenGL. Which actually I am in a discussion with on their forums about shaders in PoweBasic. Since I can and have made DLLs / Plugins for DarkBasic Pro with the PowerBasic code, I might look into what can be done with that. Either way, this C++ code will help. Those 1139 files I downloaded will take a while for me to sift through.

I might just be over my head on this.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Jul 2014 22:21
Quote: "Dark Occlusion was originally coded in DBPro then rewritten in C++ to put in a DLL.
He did not have to rewrite DBPro.
This is not a bug because it has already been done in a third party DLL."

the problem is that you have to buy this dll, author can vanish after some time and plugin can stop working in some future version of dbpro. It's not good to depend on others people work which you can't fix/upgrade if needed.
I didn't say it was a bug. It just a feature that is missing and was introduced as a payed dll 10 or more years after dbpro was introduced. A little to late.



Quote: "There is nothing wrong with the DBPro object format (.dbo).
I have written a Milkshape file importer and a Giles file importer.
Both importers hand off to the DBO format, so I have extensive experience with the DBO format.
Changing the DBO format would not make rendering faster."

there is. If you want an object with more textures you have to create additional limbs. Taht limbs consume memory because they have offsets/world matrices. That matrices have to be server to the graphics card. This concumes valuable time and causes slowness in the rendering proccess.

In directX you can have one object/one limb with 1000 different textures and only one world matrix. Thats gonna be faster that dbpro version of the same object.

It's not a dealer breaker but to fix it you would need to change dbo format and that would break a lot of things in dbpro.

Again it is not a bug, it's a defect in dbpro desing.

JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 19th Jul 2014 22:51
@ Brendy Boy
I was trying to grasp your meaning of the Limbs and Textures combo and I am wondering ... what if you use HLSL to render the limbs ? You upload the DBO and then convert it so that the shaders can render it instead of DBPro's default rendering ?

I admit, I use GLSL for my shading language, but I have barely dabbled into HLSL enough to make a difference. My Terrain Demo I made uses HLSL for the water. But that's all I was using it for.

In OpenGL however, I have played a lot with GLSL and so its a hope that I can make something that could potentially use it. My friend WGLfx made a demo using the IrrLitch engine and it was using OpenGL with DarkBasic Pro. Hmm.. this gives me ideas....

( Steps away to madly pound on his keyboard )
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 19th Jul 2014 23:09
Quote: "In directX you can have one object/one limb with 1000 different textures and only one world matrix. Thats gonna be faster that dbpro version of the same object."


Can you please back this statement with some facts?
DBPro is a DirectX graphics engine, so it has the same limitations as DirectX.
A DirectX object can only have 8 sets of UV coordinates.
Here is a link to prove that.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb206246(v=vs.85).aspx

I guess DirectX is defective in design!



[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 19th Jul 2014 23:18 Edited at: 19th Jul 2014 23:25
@ Brendy Boy
Agreed 100% !


@ JackDawson
Quote: "I downloaded the full Trunk of the Source code. I will look it over.

I'm no where near an expert on C++. But hopefully I can read it and see where it takes me."


Good luck with that.But it won't be piece of cake ! i'm an experienced c++ programmer and i found the code really non OOP standard and hard to read.So i suggest you first learn the c++ language before you start coding.

You asked "What Can We Do To Fix DB Pro" I think the most relevant question is "Do we have to fix DBPro". Because , lets face it : Basic is a really old language.I remember it was fun coding on my C64 in the 80's , but those days are over... now we have really complex platforms , hardwares , that requires some Object oriented language to easily "handle" the complexity of today modern hardwares and platforms.Basic is simply not enough anymore to write complex code.

Also as Brendy boy said , you need to write a new DBPro from scratch in C++ OOP and after at the top of that API , you can put a simple basic style wrapper. If you really need a basic language there are hundreds other free basic compilers (my favorite is Freebasic it comes with a really cool editor , and an extremely powerful basic language that a modern compiler should support (pointers , parameter passing by reference , macros UDT's with arrays and functions etc) it is crossplatform and frequently updated, and it's free , still less and less people use it , because everyone moves to OOP languages

[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 19th Jul 2014 23:21
Quote: "Can you please back this statement with some facts?
DBPro is a DirectX graphics engine, so it has the same limitations as DirectX.
A DirectX object can only have 8 sets of UV coordinates.
Here is a link to prove that."


I think he talks about multitexturing (1 mesh different textures on each face)

[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Jul 2014 01:37
Quote: "I was trying to grasp your meaning of the Limbs and Textures combo and I am wondering ... what if you use HLSL to render the limbs ? You upload the DBO and then convert it so that the shaders can render it instead of DBPro's default rendering ?"

nope. The cause of the slowness isn't in the actual rendering of the mesh so shaders wouldn't help. The problems comes from all the state changes and matrix calculations between 2 renderings.

Quote: "Can you please back this statement with some facts?
DBPro is a DirectX graphics engine, so it has the same limitations as DirectX.
A DirectX object can only have 8 sets of UV coordinates.
Here is a link to prove that.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb206246(v=vs.85).aspx

I guess DirectX is defective in design!"

you missunderstood me.
As @Hotline said, I was talking about multitexturing.

In direct x you can have a mesh were each poly has its own texture. In dbpro you can't. If you want 200 textures in you level that means 200 limbs.

Yes, you can import .x object with multitextures but you can't change any texture afterwards and the real problem arouses when you need to apply normal map to 2nd layer of every poly in a level. In dbpro you just can't do that without introducing crapload of additional limbs. In a serious development which inludes shaders thats a real show stopper.

Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 20th Jul 2014 02:38
Brendy boy

Can you provide a example of what you are talking about with multitexturing?
Could you post a link to a DirectX page were it explains how you can do what you are describing?
DBPro can do everything that can be done in DirectX 9.0c.
In DBPro and DirectX you can only have 8 texture layers and you can blend them.
You need to back up your claims with some proof or nobody will take you seriously.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 20th Jul 2014 03:16
Quote: "In direct x you can have a mesh were each poly has its own texture. In dbpro you can't. If you want 200 textures in you level that means 200 limbs."

Unless you mean by setting the texture coordinates of the vertices used by the particular face to index into a certain texture atlas slot, this is almost certainly incorrect.
Basically how DX works is you bind your texture resources to the shader pipeline, then execute a draw call for a certain vertex (and optionally an index) buffer. If the vertex / index buffer only defines a single triangle then sure, you can change textures "per triangle" by drawing more of the same mesh over and over again. But that's definately not multi-texturing and you get back to the other issue you pointed out with needing to provide separate transforms for all drawn meshes. Bottom line, you can only change textures between draw calls and as Stab pointed out, DX9 only supports up to 8 different texture resources that can be bound to the shader pipeline at once. Even DX11 has a hard texture limitation of 128 resources (and that is among all shader stages so unless you only bind resources to your pixel shader stage you won't be able to use even that) so I'm not sure where you get the figure of "thousands of textures" from.
You may however be right in the way that a limb should be able to contain multiple meshes, which would all be drawn using the limb's transform. In this way you could change textures for the meshes, but they would still require one draw call per sub-mesh, there's just no way around that. I'm not sure if DBPro allows more than one mesh for a limb but I don't think it does.

Quote: "Yes, you can import .x object with multitextures but you can't change any texture afterwards and the real problem arouses when you need to apply normal map to 2nd layer of every poly in a level. In dbpro you just can't do that without introducing crapload of additional limbs."

This also isn't true, you can add up to 8 textures (which again is a DX9 limitation and nothing arbitrarily imposed by DBPro itself) to each limb. So to add a normal map to each limb in an object you most definately won't need to add more limbs! That doesn't even make sense.

Quote: "e.g. in order to make rendering a litle faster by optimizing dbpro object format you would have to retwrite almost 50% of dbpro."

Not that I'm that familiar with it but it makes no sense at all that the DBO format alone would permeate 50% of the source code for DBPro. Of course if you want to strip elements out of the sMesh structure or similar you would have to also strip out all places which refer to these. Most modern IDEs can do this for you, however you will of course have to do some fine tuning here and there (such as when reading / writing data to files) in order for the application to work with your altered structure. Still so 50% is quite the exaggeration, you'd possibly have to revise about 2-5% of the code (and most of that just to look up contexts to determine whether you'll have to change it at all).

Quote: "Also as Brendy boy said , you need to write a new DBPro from scratch in C++ OOP and after at the top of that API , you can put a simple basic style wrapper."

Which is more or less what I'm working on over here, but I'm not here to toot my own horn. As for answering the question from the opening post, that is what I'm doing to "fix" DBPro though.


"Why do programmers get Halloween and Christmas mixed up?"
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 20th Jul 2014 06:37
@ Rudolpho
I totally understand what your saying. And wow, DirectX11. I am going to have to dig into that and see what you got going on over there. Thanks for the heads up.

@ Hotline
I really like the Syntax of DBPro. That is the only reason I keep coming back to it. Heck, if it was Java using the OpenGL LWJGL library, but using this Syntax, I would be even happier.
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Jul 2014 07:52 Edited at: 20th Jul 2014 07:53
Quote: "What is it that is stopping DB Pro from getting used more?"


In my opinion it’s all the negative publicity from post such as this. I am in total agreement with what most everyone has said in this thread. But, Green Gandalf pretty much sums it up here. I am sure everyone agrees, you are not going to produce the next big blockbuster game using DBPro. As stated you can learn C++ and optimize the source code, but it will not change that fact. If we want to build this community, we need to start using DBPro for what it is. Take a look on the Blitz Basic website. Blitz Basic still used DirectX 7. Look at all the programs and games the users there have produced. Imagine the user base we could have on this forum if we started producing game instead of whining about DarkBasic Profesionals limitations. DBPro is quite capable of producing anything Blitz Basic can and more. Well, that’s my two cent.

JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 20th Jul 2014 13:43
Quote: "In my opinion it’s all the negative publicity from post such as this. "


Actually, no question or post is negative. It's all how you want to take it personally. But look what this whole thread has been doing. It's getting info out there. It's pulling us together. Sorry, but I see this all as positive. How you perceive what is in your grasp is how it will end up. I see DBPro revival and getting fixed as a positive thing.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Jul 2014 19:23 Edited at: 20th Jul 2014 19:24
Quote: "an you provide a example of what you are talking about with multitexturing?
Could you post a link to a DirectX page were it explains how you can do what you are describing?
DBPro can do everything that can be done in DirectX 9.0c.
In DBPro and DirectX you can only have 8 texture layers and you can blend them.
You need to back up your claims with some proof or nobody will take you seriously. "

- don't have time to write examples
- no, dbpro can't do everything directX can. DirectX doesn't have "objects" to render, it renders from buffers, how you organize buffers is up to you. In dbpro you can't organize buffers, you are limited to objects with limbs.
- i'm not talking about texture layers, i'm talking about posibility to make vertex buffer, index buffer and material buffer. In dbpro you don't have material buffers, you are forced to use one texture in layer 0 per limb. In directX you aren't.


Quote: "Unless you mean by setting the texture coordinates of the vertices used by the particular face to index into a certain texture atlas slot, this is almost certainly incorrect.
Basically how DX works is you bind your texture resources to the shader pipeline, then execute a draw call for a certain vertex (and optionally an index) buffer. If the vertex / index buffer only defines a single triangle then sure, you can change textures "per triangle" by drawing more of the same mesh over and over again. But that's definately not multi-texturing and you get back to the other issue you pointed out with needing to provide separate transforms for all drawn meshes. Bottom line, you can only change textures between draw calls and as Stab pointed out, DX9 only supports up to 8 different texture resources that can be bound to the shader pipeline at once. Even DX11 has a hard texture limitation of 128 resources (and that is among all shader stages so unless you only bind resources to your pixel shader stage you won't be able to use even that) so I'm not sure where you get the figure of "thousands of textures" from.
You may however be right in the way that a limb should be able to contain multiple meshes, which would all be drawn using the limb's transform. In this way you could change textures for the meshes, but they would still require one draw call per sub-mesh, there's just no way around that. I'm not sure if DBPro allows more than one mesh for a limb but I don't think it does."

in directx you specify vertex buffer, index buffer and material buffer. You can have one mesh with 1000 textures. Yes that means 1000 draw calls, but vertices need to be transported to the GPU only once. That's where dbpro fails, you need to transport them 1000 times, once for every limb. That causes slow down.

Quote: "This also isn't true, you can add up to 8 textures (which again is a DX9 limitation and nothing arbitrarily imposed by DBPro itself) to each limb. So to add a normal map to each limb in an object you most definately won't need to add more limbs! That doesn't even make sense."

no, you can have as many texture as you want per mesh. I'M NOT TALKING ABOUT LAYERS.

Quote: "Not that I'm that familiar with it but it makes no sense at all that the DBO format alone would permeate 50% of the source code for DBPro. Of course if you want to strip elements out of the sMesh structure or similar you would have to also strip out all places which refer to these. Most modern IDEs can do this for you, however you will of course have to do some fine tuning here and there (such as when reading / writing data to files) in order for the application to work with your altered structure. Still so 50% is quite the exaggeration, you'd possibly have to revise about 2-5% of the code (and most of that just to look up contexts to determine whether you'll have to change it at all)."

you have:
- loading of diferent formats and converting to dbo
- saving
- rendering
That's quite about of code, maybe/probably not 50% but definitely more than 10%. And 10% is alot of rewriting. It's easier to start from scratch. IMHO.

Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 21st Jul 2014 03:05 Edited at: 21st Jul 2014 03:06
Brendy boy

As someone who has actually written a importer for DBPro for two different file formats.
I can say you have no idea of what your are talking about.
You have not provided one single link to a DirectX webpage to back up your claims.
I have provided proof that I actually know how DBPro and DirectX work.
If you had time to write your post surely you had time to Google one link from Microsoft's DirectX webpages to prove your point.
I am amazed that you actually wrote a GUI plugin. You must have done some research to learn how.

Most of the long time forum members at least try to provide accurate information, not just contradict with absolutely no proof to back up their statements.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 21st Jul 2014 08:43
People, Call dbpro. outdated, But I personally, Will not stop using it.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 21st Jul 2014 14:10
@ GreenDixy
Yea I agree. It is outdated, but I still use it for prototyping.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 21st Jul 2014 19:31
Quote: "As someone who has actually written a importer for DBPro for two different file formats.
I can say you have no idea of what your are talking about.
You have not provided one single link to a DirectX webpage to back up your claims.
I have provided proof that I actually know how DBPro and DirectX work.
If you had time to write your post surely you had time to Google one link from Microsoft's DirectX webpages to prove your point.
I am amazed that you actually wrote a GUI plugin. You must have done some research to learn how.

Most of the long time forum members at least try to provide accurate information, not just contradict with absolutely no proof to back up their statements."


i don't have time to search for links.
Here' sone from stack overflow: http://stackoverflow.com/questions/3899448/c-directx-9-mesh-texture

in the first post you can see how rendering is performed in directx.
- set transform matrix for object
- loop through material list
- set texture from current material
- draw subset for that texture (subset is part of the mesh which is rendered using the same texture, it can be one or more polys or the whole object)

That's a simplified version of rendering when you use directx mesh to render "objects". In most cases this is useful only for demonstration purposes. Usualy game engines have their own object structures where vertex/index/material buffers are defined.

In this simplified version transformation matrix is set only once, but vertices and indices are sent to gpu for every subset.

When you don't use diretcx meshes you can optimize rendering proccess even more so you don't sens vertices for every "subset".

There ...satisfied?


And to conclude - what i'm saying is - dbpro is not used for comercial stuff because:
- 1) it's to slow for stuff that most people want to achieve and what is needed for commercial success
- 2) it's not cross platform (it's easier to make money on sparphones/tablets if you are indi developer).

Dbpro is excellent for learning 2D/3D graphics fundamentals and prototyping

david w
20
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 22nd Jul 2014 06:58
I would just like to say that without DBP I would not have learned 3D programming as I have. These forums and the wealth of information in them are the real testament to the power of DBP. There is probably a example program written in DBP that can be downloaded or code posted that covers almost every situation you can think of for a game.

I mean honestly DBP is a excellent program and I have nothing but respect for it. I was using the normal Darkbasic now Darkbasic classic before DBP came out. I can tell you huge improvement. The thing that makes DBP shine is its BASIC format. True you can use a different "engine" or "language" but in the end you use DarkBasic because it is BASIC and easy. This of course has been the trade off for basic languages since day 1! ANY form of BASIC is traditionally slower because it provides a layer the others simply do not. Hence the ease of use.

I personally use DBP for prototyping and I mainly code in C++ with direct X of course the discussion with DBO objects is pointless because in C++ you will use some kind of container class and put all your "standardized object" code into it. And you would have the engine handle all the matrices, vectors and timers for you. Very similar to what DBO does. Also why do you think things like the cry-engine and unreal and typically suited to FPS style games. They are not a one size fits all. Hard to make a racing game with Cry-engine. DBO is not a bad format and it is not a limitation.

Somewhere along the line decisions had to be made and since DBP is simply a continuation of Darkbasic classic and that was based on DX8 - You can not have all the functions of DX 9 incorporated.

If you rewrote DBP for DX10 or 11 then you would need to rewrite the entire thing simply for the fact that they are not coded like DX8 and DX9 are. I have used DX11 and I can tell you its is much more complicated to get going than DX9. So as for DBP based on DX11 I doubt that will ever happen. Besides what can DX11 really do that DX9 simply cant? -- and don't talk about shader model. For indi devs sm 3.0 is perfect.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 22nd Jul 2014 15:05 Edited at: 22nd Jul 2014 15:13
Quote: "I would just like to say that without DBP I would not have learned 3D programming as I have. These forums and the wealth of information in them are the real testament to the power of DBP. There is probably a example program written in DBP that can be downloaded or code posted that covers almost every situation you can think of for a game.

I mean honestly DBP is a excellent program and I have nothing but respect for it. I was using the normal Darkbasic now Darkbasic classic before DBP came out. I can tell you huge improvement. The thing that makes DBP shine is its BASIC format. True you can use a different "engine" or "language" but in the end you use DarkBasic because it is BASIC and easy. This of course has been the trade off for basic languages since day 1! ANY form of BASIC is traditionally slower because it provides a layer the others simply do not. Hence the ease of use.

I personally use DBP for prototyping and I mainly code in C++ with direct X of course the discussion with DBO objects is pointless because in C++ you will use some kind of container class and put all your "standardized object" code into it. And you would have the engine handle all the matrices, vectors and timers for you. Very similar to what DBO does. Also why do you think things like the cry-engine and unreal and typically suited to FPS style games. They are not a one size fits all. Hard to make a racing game with Cry-engine. DBO is not a bad format and it is not a limitation.

Somewhere along the line decisions had to be made and since DBP is simply a continuation of Darkbasic classic and that was based on DX8 - You can not have all the functions of DX 9 incorporated.

If you rewrote DBP for DX10 or 11 then you would need to rewrite the entire thing simply for the fact that they are not coded like DX8 and DX9 are. I have used DX11 and I can tell you its is much more complicated to get going than DX9. So as for DBP based on DX11 I doubt that will ever happen. Besides what can DX11 really do that DX9 simply cant? -- and don't talk about shader model. For indi devs sm 3.0 is perfect. "


I couldn't agree more dave. I love DBPro's syntax. Rudolpho is actually working on a DirectX 11 version though. At least, the way he is doing it, it will work with what you have already. Just install it like you would any other plugins.

http://forum.thegamecreators.com/?m=forum_view&t=210180&b=8

I gotta say, I am excited to see his work. I tested his code, its amazing. The reason to use DirextX 11 over DirextX 9 is very apparent though. You can use features in 11 that are not available in 9. Which speeds up your frame rates.

This video shows what you can do in 11 as a feature, that 9 can't unless you write a lot of code.

www.youtube.com/embed/2DtK5PefhIY
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jul 2014 00:49
Sorry if I've come to this late (our Internet was zapped by a thunderstorm last week and we've only just got the replacement up and running ).

I spotted these:

Quote: "Unless you mean by setting the texture coordinates of the vertices used by the particular face to index into a certain texture atlas slot, this is almost certainly incorrect."


Quote: "In direct x you can have a mesh were each poly has its own texture. In dbpro you can't. If you want 200 textures in you level that means 200 limbs."


The DirectX X file format certainly does allow different textures for different polygons. I've created simple examples myself manually for demo purposes. Also, DBPro supports such X files as well - but not fully, i.e. they display correctly but you can't access the different "materials" (as DirectX calls them) separately in DBPro which makes things difficult for shaders, etc. I don't know what the limit is but this is almost certainly much higher than the limit of 8 for texture stages. This has nothing to do with limbs - you can have an object with a single limb and as many textures as you like (subject of course to some upper limit of which I am not aware ).

As far as I can see, all it needs is an extension to the texture object command, something along the lines of



since all the necessary information is available to the DBPro engine. It just isn't available to the user yet.

If anyone doesn't believe me, please email me directly and I'll put together a simple demo X file with several textures and post it on this thread. I see no point in continuing a vacuous discussion without concrete examples to discuss.



Powered by Free Banners
Hotline
17
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 26th Jul 2014 04:10 Edited at: 26th Jul 2014 04:19
Yes , you can load objects with so called "multi sub object material"
The reason you can do this is because load object is nothing more than a C style wrapper for D3DXLoadMeshFromX function. It loads the x file but you have no access to the materials (limb texture()function returns negative numbers as image ids).Personally i don't like engines where useful data is hidden from the user...

DBO also supports multi sub object materials , unfotunately 3d world studio can't export dbos with multi subobject material , instead each time a new texture is applied to a face , it creates a separate limb with that texture.At export you will en up with : numOfTexturesInScene == numLimbsInDBOFile.

This is a problem... why ? because the :
- transform
- render states
- materials , textures
are set for each limb in the DBO before it is drawed.This could be slow if you have lots of textures.

Also the original question was "What Can We Do To Fix DB Pro"
Well here are my thougths on this question.AKA what would I change in DBPro :

1 . Object handling :
the syntax :



shuld be changed to :



I mean seriously , do we need to iterate trough the whole object list (or map or whatever) to find the object we need ? This is really time consuming... And also why should i keep track of my FREE object slots ? To avoid the "object already exist at line.." error ? This is absolutely useless.If i dynamically allocate an object in c++ the new returns a pointer to the object which is guaranteed to be unique for every new object in the program.So why not use the returned pointer instead of passing in constant ids ?

myObject = load object

2 . structure... DBPro badly needs a parent child structure !
object id = load object fileName , parent

3. OOP behind the scenes ! All entities should derive from "DBEntity" class. This way all objects (lights , sounds , objects particles , etc) can be automatically attached to each other (parent child hierachy)



The above code loads a torch model , an attach a light source and a sound to it. So if you move , rotate , scale the torch , all it's children are move rotates scales automatically.


3 . Static geometry handling.
DBO is ok for a simple animated model / enemy etc but it is horrible for large levels. The map format should have the following features :
- octree optimisation
- material sorting

4. UDTs with arrays
5. functions returning by reference or pointer
6. function parameters passing by reference or pointer.

So thats what i'd like to see in future versions of DBPro

[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 4th Aug 2014 12:52
to Brendy Boy's first comment here...

"Where the real money is..."

Wow, i guess i have never realized we are supposed to be shareholders running for our money or something, i've always thought i'm here to entertain myself and others.

If it brings money, that's an added bonus.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th Aug 2014 23:31 Edited at: 4th Aug 2014 23:32
You aren't but many of us are.
you are free to do what ever you want with your free time, many of us try to earn money.
For people like you dbpro is great, for others...not so much[quote]

James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 7th Aug 2014 02:19 Edited at: 8th Aug 2014 03:55
um I`m dumb and don`t understand a lot of that about sub meshes but think I have a vague idea of what has been said, but I do have curiosities
I assume a sub mesh would be created in a model editor and exported?
Will dbp fail to load the object?
Or is it possible specific export settings might help?
Or maybe this is why we have to have specific export settings in modeler package like blender in 1st place?
Though I could have sworn in my early days of learning blender I was able to get multi material objects imported but they couldnt be textured and remained black. I can`t remember anything about submeshes in what I did back then as its a long time ago so are materials not submeshes?
If it didn`t fail then could effect files be written to display them? I realise thats a long shot but I tried to read up and failed miserably as you can tell, but did read effect files can assign to materials with specific sub mesh names *I think* - didnt save the link.
I really was trying to understand draw calls in relation to dbp. I understand 1 object is a primitive draw call and any extra limbs beyond the root mesh is an extra draw call each? (Ive just returned to dbp and am revising what little I know)
If dbp had submeshes succesfully implemented(ok probs not gonna happen) then the performance hit of 1k objects each with a submesh would be less than the performance hit of 1k objects each with a limbed mesh instead?
I also seem to recall a texture is a draw call, so am wondering - is 1 texture whatever its size 1 draw call? Dbp has command for primitive draw calls in scene but does it have 1 for textures? Can`t find anything in help files so maybe someone knows something?

EDIT Memory jolt! First thing when I woke up I started to remember...the specific sub mesh names turn out to be the same name as the texture as thats how they should be exported, the link was detailing how to get submeshes to show in a specific engine via instructions for creating and exporting models in model editor and the shader code example to match the model, I think it was for something called WME
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 8th Aug 2014 18:38
Um sub meshes do work - without additional code or shaders, get blender(in this case i use 2.43), use a box mesh, go to uv edit, change other panel to uv tab, select a face in the edit window, go to drop down menu in other panel(uv tab) and open a texture, select a different face in edit window, and repeat for as many times you feel you want to. Export as normal, open x file in notepad, search for texture names in x file, you will note only the first has the image file extension and the rest don`t - edit the other entries to include the correct file extensions. Load in dbp and your done. I did 2 objects both the same cube - only the first 1 had just 2 faces selected with 2 different textures and the second had 4 faces selected with 4 different textures. In both cases the number of limbs was 3. As the remaining faces were without material I *think* this is the 3rd limb or its the sub meshes- trying to access this limb with rotation command failed, other limb rotations affect the whole object so I assume for 1 limb with sub meshes an additional 1 or more is created?? perhaps 1 needs to be the fvf another a duplicate with indices or something I dunno, just thoughts really. The real question is how useful is it, after all there is 1 object in the scene with 3 reported limbs and 5 primitive draw calls, 5 different materials. For this I must spend some time pondering and at some point test when i realize what Im looking at, perhaps some of you guys(and gals if any here) might help us out with either facts or speculation? Ive attached media for you to see and code is here;
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 8th Aug 2014 18:46 Edited at: 8th Aug 2014 19:18
@Jack Dawson
sorry for half hijack buddy but its sorta related, in this case perhaps more control over submeshes is required rather than it being a thing to fix - idk what possibilities exist for usage other than flexibility from modeling to dbp point of view unless there is performance gain(might be just load time for example), certainly worthy of looking into much further Id say. I wonder what uses in a shader this might have if any.

MAJOR EDIT
dunno how I missed from GreenGandalfs post onwards, *walks away in shame* (awaits facepalm pics)
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 8th Aug 2014 21:40 Edited at: 8th Aug 2014 21:41
I have stated above that DBPro can do everything DirectX 9.0c can do.
In DBPro you have Materials, Textures, and Meshes.
If you make a cube in a modeling program with 12 polygons and you give it 12 different materials you then can have 12 different textures.
When you load it in DBPro it will be one object with 1 limb but because it has 12 different Materials it will have 12 draw calls.

As Green Gandalf noted you do not have access to the 12 materials.
If you break up the cube into 12 limbs (one for each polygon) each limb has a material so becomes one draw call.
As limbs you have access using the limb commands. Both ways give you the same number of draw calls.
3d World studio exports as limbs for this reason so you can access them with limb commands.

For every Material you can have 8 texture layers because of the limit of 8 sets of UV data in DirectX 9.0c.
The misconception is that DBPro would be faster or more efficient if it could do everything DirectX can do, but it can.
I am speaking from experience. It should be a simple conclusion that this is not a bug, defect or slow down.
DBpro has texture and material commands so you can have control of what is assigned to your object.
If a texture is assigned in the object file it will be loaded by DBpro but you will not have access to it.
If a texture is loaded with an object and you load the same texture separately, DBPro will only load that texture once in memory.
I make these statements based on facts. I am very familiar with the DBPro source code so this is not guessing on my part.
Here is an example of my experience, it shows I have extensive knowledge of DBPro objects.

http://forum.thegamecreators.com/?m=forum_view&t=210697&b=1


James H
When you export from your modeling program setting the Material diffuse and ambient to white will prevent your objects from appearing all black in DBPro.

WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Aug 2014 23:24
Quote: "If you break up the cube into 12 limbs (one for each polygon) each limb has a material so becomes one draw call.
As limbs you have access using the limb commands. Both ways give you the same number of draw calls.
3d World studio exports as limbs for this reason so you can access them with limb commands."


Interesting suggestion. Any downsides to converting multi-textured objects into limbs? Sounds like the answer is "no" from your post. If so, that is very useful - except for the annoying fact that we don't know in DBPro which polygon is which (if I've understood correctly).



Powered by Free Banners
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 9th Aug 2014 02:58 Edited at: 9th Aug 2014 02:59
Quote: "Interesting suggestion. Any downsides to converting multi-textured objects into limbs? Sounds like the answer is "no" from your post. If so, that is very useful - except for the annoying fact that we don't know in DBPro which polygon is which (if I've understood correctly)."


As BrendyBoy pointed out, there would be a slight overhead resulting from the world transform having to be updated for each limb, whereas it wouldn't need to do that for meshes (which can share the same transform). That alone shouldn't take any particular amounts of time into account, at least on modern hardware (although on older DX9 systems it might be a significantly slower operation to bind a buffer resource), as long as it isn't used as in the given example to have different textures per triangle. It is also possible that DBPro is just being inefficient and traversing all limb hierarchies from leaf to root to recompute the matrices for each limb (it has been known to conduct similarly in other circumstances, but I won't claim knowing whether it is the case here).


"Why do programmers get Halloween and Christmas mixed up?"
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Aug 2014 17:31
Quote: "there would be a slight overhead resulting from the world transform having to be updated for each limb"


Good point.



Powered by Free Banners

Login to post a reply

Server time is: 2026-07-06 04:29:35
Your offset time is: 2026-07-06 04:29:35