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.

Newcomers DBPro Corner / Instancing definition

Author
Message
Bush jumper
18
Years of Service
User Offline
Joined: 28th Nov 2005
Location: United Kingdom
Posted: 2nd Mar 2006 21:47
Hello everyone, I have been trying to understand the instancing code, and was wondering whether it was the same as instacncing an object in other languages such as open gl, where you tell the graphics card to store the objects polygons, and recalls that stored information and places it where you want it to, so the engine does not have to recalculate the polygon positions etc, thus not effecting the frame rate by any signifcant amount. I have been using the instacne command to create a forest of about 50 trees, however it cuts my frame rate in half, it may be my coding, it may be me being nieve. I just wanted to know whether the instacning dark basic uses i.e. instance object object number, source object, does do the same as when you instance an object in other languages so I know it is my coding
Thank you for your time and patience reading my essay, any help would be extremely appreciated

Life goes on
Bush jumper
18
Years of Service
User Offline
Joined: 28th Nov 2005
Location: United Kingdom
Posted: 2nd Mar 2006 23:23
If anyone else is having a similar problem, I have just found a topic posted previously about the same thing, sorry for not searching thoroughly enough, it doesn't answer the question but it does give some info on how to cut down the frame rate with large areas of trees etc
http://forum.thegamecreators.com/?m=forum_view&t=40945&b=1

Life goes on
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Mar 2006 21:26
Basically, you'd have 1 object in memory, and all instances of that object you create will point to the same chunk of memory to reference the object's structure. In DB terms of objects, each one can hold its own rotation values and scale. A good example would be having many trees in your game's landscape.


Login to post a reply

Server time is: 2024-11-27 03:30:36
Your offset time is: 2024-11-27 03:30:36