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 / Game Loading Very Slowly (quite a few models)

Author
Message
Sir_Herbert
11
Years of Service
User Offline
Joined: 6th Nov 2013
Location: The InterWebz
Posted: 7th Apr 2014 07:40
Hi, my game is pretty much complete but I need it to load models and such faster. There is about a 5-10 sec delay from when you push play to when it actually loads in. Also when you lose and get to the end section it is [/b]EXTREMELY[b] slow. (But as the title states I have quite a few models but they aren't really that big...) I had to let it sit and run in the background while i did something else for it to show up.... Any ideas on how to make it load faster??? Thanks
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Apr 2014 15:44
You will need to give us much more information about the way you have coded your game and the models you are using to be able to help.

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Apr 2014 16:01
What that guy said...

Where are your models from? Dark Matter?

How detailed are they?

How many is 'quite a few models'? 10, 100, 1000?

Are they identical models with different textures?

Speak up man!



No Seriously help us help you...

Barry Pythagoras
11
Years of Service
User Offline
Joined: 14th Mar 2014
Location:
Posted: 7th Apr 2014 17:11
3DS load slow. X loads faster. DBO is probably fastest.
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Apr 2014 17:17
... and DDS image format files load much faster than other image formats such as JPG, BMP, etc.

Quote: "No Seriously help us help you..."






Powered by Free Banners
Sir_Herbert
11
Years of Service
User Offline
Joined: 6th Nov 2013
Location: The InterWebz
Posted: 7th Apr 2014 17:22
Here's the code. How to do I get it into a dbo file? I don't see an option when I save it to do that.

Ps. I didn't mean to have half of my post bold. I guess I didn't do that right. Oops

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Apr 2014 20:27
Still not answered our questions...



BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Apr 2014 22:05 Edited at: 7th Apr 2014 22:06
If you're not sure about how detailed your models are, add this to your game loop:

print statistic(1)

Then look around your scene and see how high it goes. This tells you the number of polys on screen, which will start to help us help you, although it still leaves a lot open to guess work.

First guess is that your tank model is very high poly.
Second guess, you are deleting a very high range of objects that don't exist
Third guess is that your deletion of objects a to z is amiss and could be doing anything
Fourth guess, your textures may be huge.
You may also be on a very slow PC, have very little physical memory, a badly performing graphics card, out of date drivers etc.

As mentioned earlier, we need more info to help out.

GreenDixy
16
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 7th Apr 2014 22:32
Use fragmotion to change all your models format from .x etc To dbo This will help speed up the games loading time by a lot.
I am fairly certon that's what you are getting at.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
faizeq
16
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 7th Apr 2014 23:41
I can sense that the image being extremely big scenario here. Try what Green Gandalf suggested, switch to DDS instead.

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 7th Apr 2014 23:44
The slowness is because of what GG stated. Do not use jpgs in DBP; unless you enjoy watching loading screens!

revenant chaos
DBPro Master
18
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Apr 2014 07:08
Yep, what the others said. If you convert your images to .DDS and your objects to .DBO format it will drastically reduce your loading time. Fortunately you do not need any additional software to make the conversions, it can all be done using dbpro code.



Obviously you will not want to perform these conversions within your game at runtime, just write a small program to convert your media once then edit your code to point to the resulting files.
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Apr 2014 13:21
That would be my advice too.



Powered by Free Banners
Blobby 101
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 8th Apr 2014 14:10 Edited at: 8th Apr 2014 14:11
Also the paths to your object files are absolute (e.g. E:\DBPro Games\etc\object.x), this will make your game break if the EXE is in a different folder/drive (which it almost certainly will be on another person's PC).

Use relative paths instead, so just something like "objects\object.x", and organise your media - it'll make things a lot easier for yourself!

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 8th Apr 2014 21:44
In addition to the above:

try using INSTANCE OBJECT rather than loading / creating objects separately.

Instead of using cubes and then scaling them, try using MAKE OBJECT BOX and then just make it to the correct size.

Login to post a reply

Server time is: 2025-05-14 06:57:59
Your offset time is: 2025-05-14 06:57:59