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 / Will this's faster by using dbObjectInScreen to hide or show?

Author
Message
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th Oct 2009 09:57
if (dbObjectInScreen(ObjectId));
dbShowObject(ObjectId);
else
dbHideObject(ObjectId);


will it make my game faster if there are many object(rock tree grass) that not in the screen..
so hide it and show it only if it in the screen...

or it notthing different..
entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 30th Oct 2009 10:55
This is called "culling," and I've understood that the GDK does it automatically in its rendering pipeline. But I can't be certain.

I think what you need to do is to look into LOD steps. LOD is for Level of Detail. There was a newsletter article about doing this quite easily, a year ago or so, written by Lee Bamber. I think it should introduce you in the right way.

Essentially what it means is that you only show the pretty tree when it's close to the camera and then exchange the detailed model for models with fewer details or even a sprite when it's farther from the camera.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th Oct 2009 11:42
culling and lod are both supported by gdk

culling works automatically, you have to write no code.

lod has an easy setup

Login to post a reply

Server time is: 2024-10-01 16:43:19
Your offset time is: 2024-10-01 16:43:19