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 / Slow dbAddLimb or another alternative method.

Author
Message
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 14th Jun 2011 03:52
I've just finished a piece of code which generates a 3D level. The code adds lots plane meshes to a single object to create the level but it takes quite a while to do. Is there a faster way of doing this.

Here's my conversion code that does the job:


Or the full project downloaded from HERE...

I've not yet sussed out how to build up vertices arrays but I will go down that road if it works out faster if anyone has anything to start from.

I did start by creating each part of the level separate which was much faster.

Warning! May contain Nuts!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 14th Jun 2011 17:32 Edited at: 14th Jun 2011 17:35
It's probably alot faster using memblocks, here is a function I used when trying to create an imposter system using DarkGDK commands. In the end I wrote it just with DirectX but for different reasons, there is nothing wrong with this function:



I'm pretty sure I got this code from Techlord/S3GE, I may have changed a couple of things. I have posted this before not long ago but can't remember why

If your whole level is made of planes then you could use this as a guide and add more vertex data, in this function the 'imposter' structure holds the vertex data.

You might be best doing some simple things with memblocks first, make a triangle maybe, but the above code might make a good reference.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 15th Jun 2011 05:09
Ah thanks Matty. That should make me a good start.
I'll have a play around with various ways starting with your example. If I get stuck, I suppose I can just ask. Hopefully I can figure out multi texturing along the way.

Ideally, if I can keep the amount of vertices down and still build the level fast as well as texture each plain (tri pairs) then that's that part completed done and dusted.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-19 10:34:13
Your offset time is: 2024-11-19 10:34:13