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.

Dark GDK / GDK Problems

Author
Message
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 22nd Oct 2007 00:28
So we were going to use GDK as the rendering backbone for a simple game, but I have run into a problem.

After reading the forums for a while, I discovered the problems with dbDelete*() functions, which is a pain, but not too hard to work around. The problem I've noticed now, is that my app will not exit since it is dying when GDK tries to delete all the objects I have loaded.

So now my application will not quit properly, it just hangs when the user exits.

Any ideas?
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 22nd Oct 2007 00:41
On further testing, it doesnt crash when I reduce the number of objects I have created.
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 22nd Oct 2007 00:48
Does anyone have any insight?

I have only tested it with 2 different data sets, an 8x8 grid of objects, and a 40x40 grid of objects, the 8x8=64 test works fine, except if you leave the game and go back then youre at 128 since i cant delete the originals

the 40x40=1600 objects does not work at all. I know its alot, but I was trying to test out how the framerate goes with that many objects. (In case you are interested, 30 frames per second w/ 1600 objects plus network updates)

Someone must have run into this problem before? It doesnt seem like this is useful at all if you are capped at a few hundred objects and you cant ever delete them.
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Oct 2007 01:17
hey Matt... could you direct me to the problem thread... this sounds like it's worth looking into...

thx

--Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Oct 2007 02:52
Matt have you made a simple test app to instantiate like 4000 cubes or something and then remove them all - using only stock GDK (JNo wrapper stuff etc)??

matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 22nd Oct 2007 03:50
Red Ocktober:
http://forum.thegamecreators.com/?m=forum_view&t=77560&b=1


Jason:
Yes, I have, We are using GDK as a prototyping tool so it is all stock gdk code right now.
All I have created are cubes, and textured them with 1 of two images, at a certain point it dies and I dont know why.
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 22nd Oct 2007 04:00
Hmm ive found a workaround that seems to work.

If I call dbDeleteObjects(1, 5000) either when necessary or at the end of the program it does not hang, however I've noticed that it will hang if i leave any objects behind. So only call this when you want to delete everything.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Oct 2007 04:15
Ouch - I think this is a MAJOR MAJOR ... did I say that loud enough? MAJOR BUG - Not acceptable. Deleting a Range as the only "workable way" is just not acceptable. Time to maybe start looking elsewhere - this stinks. Glad I found out about this now at least. Jeesh...

I'm a FAN - many here know that - but this is as bad as "Print" or "CLS" or Make OBJECT CUBE not working - its a CORE functionality - under "BASIC 3D" - If BASIC 3D is hosed - what's the point? Time to seriously start considering other engines.

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 22nd Oct 2007 11:16
Hey, sorry but I don't see much problem here.

I load and delete objects all the time, and I do not have any slow downs. It rather depends on the number of objects and the running machine specs.

By the way, you don't need to delete all before exiting. If you want, you can flush the whole video ram with a single command.

If this is major for you, then post some sample code for testing, so you can have some feedback about deleting speeds. Just an idea
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Oct 2007 14:15
It's easy to anticipate loading 1000+ objects. Also, having to also make sure objects 1-100 lets say is "Always there" and everything else is the range you kill for level a level - is kind of backwards. This isn't a problem in DBPro. It changss how we delegate ID's. Also, Video Ram is a precious commodity - and having to just "Hide/exclude" models as the "Best way" - With Frame rates what they are - seems weak.

Also - on top of this - we need to add physics, aquire decent shaders, and use tricks for bumphapping because its hosed. I'm starting to look elsewhere and I may or may not jump ship and I already have found some viable alternatives.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 22nd Oct 2007 16:21
Hey ... lets not get too carried away here. If this is a genuine bug then we should be able to reproduce it fairly easily and log it officially as a bug and give the Developers a chance to comment.

We all know that there are issues with the software but this is not uncommon with any development system of any complexity. There is a general feeling that DarkGDK has been somewhat left out in the cold but I think the developers are aware of that and are already starting to move behind the scenes to address this.

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Oct 2007 16:55
Ok - Ok - I'll calm down a bit - I just have a lot vested in this system - and now having to rethink the whole "Order of objects" back to the Dark BAsic common method of Sequential Loading... like object 1000-1500 = Tree, 1501-2000=cars , 2000-2050=recyclable bad guys is kind of a big deal.

Having the program crash on exit after making all the code smart enough to clean up after itself - is bad for morale in a big way.

The "info" that made me get real negative is "Oh they know about this and they made a function called "dbDeleteObjectRange" or some such thing as the "Fix" (a nice function in its own right but hardly a replacement for DeleteObject(ObjId). That developer/response/solution just sounded like an extremely weak one - and I'm not mean - I know how hard this stuff is - but - this problem and the response of this new command - which doesn't really fix the initial problem made my stomach drop.

If the developers haven't heard of it - I would not be so dismal sounding - the writing on the wall says they have - and they made a "alternative" - that just bums me out.

I have a lot of time/money vested here.

matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 23rd Oct 2007 16:51
I don't think its as huge an issue as that.. Yes it sucks that we cant just do what we want, but I can
t even count the number of times that happens when using 3rd party libs either at work, for personal or professional use.

As I am sure this has already been reported as a bug, to the TGC guys, can we expect this to be fixed?

As much as I don't want to ruffle feathers, it *is* pushing back my schedule having to find workarounds for alot of things.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 24th Oct 2007 12:05
Quote: "As I am sure this has already been reported as a bug, to the TGC guys, can we expect this to be fixed?"


Sorry, but as far as I know this is NOT reported as a bug.
To do so, name and define the bug with a good description of what it should do and what it does, along with the code that proves it.

Once the 'bug' is reproducible by anyone, then it may be declared as that.

If it is that "to delete 4000 objects is slow" then I would say that you better forget about it, and start thinking about doing things in some other way.
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 24th Oct 2007 13:41
In cases like this it will be helpful if someone can post an example program with source code. This will help us to get an understanding of the problem and fix it if necessary.

The function to delete a range of objects is virtually the same as that of dbDeleteObject. The reason for adding this function is that we can reduce some of the work going on. In dbDeleteObject we need to update some internal data. This will happen every time you call dbDeleteObject. When dbDeleteObjects is called we can do this process once at the very end. By doing this deleting a range of objects will be quicker.
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 27th Oct 2007 18:08
The only problem i noticed with the range delete is if I call it multiple times it slows down in the same way as delete object. I understand deleting lots of objects will be slow, but it freezes, i let it sit for over an hour to see if it would finish to no avail.

Unfortunately I am on a tight deadline right now and I dont have time to make a sample program for you, however in a month or two I may have time to do so.

Cheers

Login to post a reply

Server time is: 2024-11-16 20:52:15
Your offset time is: 2024-11-16 20:52:15