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 / Speeding it on up...

Author
Message
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 18th Oct 2011 17:22
Hi, just wondering if there's something I'm missing here...

In my levels, I load up around 30 different 3D models (.X files), each only around 100kb each, and use cloning/instancing to populate the level with them. It all works well and the game runs smoothly.

However, the game takes a good 30-40 seconds to load all of these models. Is there a way to speed up this process? They aren't of very high poly count or size... I'm just using the LOAD OBJECT command. The cloning/instancing part of my loading routine is only responsible for around 4 seconds of the load, but loading in the models takes quite a bit of time!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Oct 2011 17:59
Hi CumQuaT


I noticed that big textures cause DBP to take a really long time to load. So my tip would be to reduce the size of your textures if possible. If you can't do that, loading the textures as images and then texturing a blank loaded object manually is faster. I believe 3DS files load faster than X files, but someone will have to confirm that for me, I'm not sure.

TheComet

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Oct 2011 18:04
JPG's take ages to load too... switch to PNG or DDS for faster load times.

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Oct 2011 18:07
You can save your models as .DBO - which is DBPro's internal object format, meaning you skip the conversion stage, and should get better loading times.

Another option might be to have low and high res textures, load up all the low res images and use those, then replace them one by one after the game loads. Sometimes a few seconds on startup can save hours of development time.

Health, Ammo, and bacon and eggs!
Jeff Miller
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 18th Oct 2011 18:11
If your models share some textures, DBP loads the same textures again and again when it loads each of the models. One developer found that he could save plenty of loading time by saving such models in an untextured state. He then would load the untextured models, load the textures as images, and texture the models within the program.
miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 18th Oct 2011 23:34
The .x files can be saved in different ways. The loading speed of a compressed binary format .x is also fast. (the loading of a text or non compressed binary .x is much slower)

The dbo format may be the fastest, but for personal reasons, I prefer the more general direct x format.

For loading textures, I agree with baxlash. The fastest formats are the .dds and .png files. Again, for personal reasons I prefer the .png format.

No place like 127.0.0.1 .
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 19th Oct 2011 03:44
Hi, thanks guys. I've actually isolated it to just the models. Texture loading is fine.

I might try the DBO format then. Anyone know of a good converter?

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Lucas Tiridath
AGK Developer
17
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 19th Oct 2011 06:25
Quote: "I believe 3DS files load faster than X files, but someone will have to confirm that for me"

I didn't think 3ds was supported any more. I remember one of my first 3D tests complete failed because the documentation said 3ds was supported so I was trying to use that. Took about 5 minutes to load a 20 poly object and then didn't render correctly. That was probably a couple of years back though so I don't know if it's been corrected because I've been using .x since.

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 19th Oct 2011 07:08
You can use DBpro's save object command to convert to *.DBO.

A few months ago someone posted about slow load times and narrowed it down to being that his models were in *.3DS format.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 19th Oct 2011 07:29
Interesting... I'm using mostly .X files but there are about a quarter of them as .3ds files. So that will be very interesting to test them out as .DBO

Fingers crossed!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 19th Oct 2011 08:09
Hoooooooooooooly poop on a stick. Yeah, it makes a little bit of a difference when you just use DBO files... Just a teensy difference...

O_o

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame

Login to post a reply

Server time is: 2026-07-11 11:26:12
Your offset time is: 2026-07-11 11:26:12