A noob question ?!

Started by johnnyh, September 14, 2011, 20:58:46

Previous topic - Next topic

johnnyh

Well I am sure this is very noob style but anyway, as I dont find the answer anywhere, I post it here.

I  dont understand one thing. lets suppose that you have a man in a 3D world (minecraft for example :)), if you say to the man to destroy a three in the 3D world, where are we going to store that information so that the loop doesnt call anymore the three ? Do we need a text file to store datas or what ?

broumbroum

use a cache where the loop will ask for OBJECTS to be DRAWN. No tree at all. ;)

johnnyh

a cache ? ok do u have an example of code which uses cache ? how do I call a cach ? any tutorial ?

Chuck

Your render loop goes through a list of objects to draw.  When the tree is gone, you remove the tree from the list, and it won't be drawn.  That simple.

If you're asking where the code to manage that list goes, that's the stuff of entity and scenegraph management, and comprises a good chunk of code in any engine.  There's no single answer for that.






johnnyh

Well I am noob and what you said is confusing me. Scenegraph management is an API, so you cant manage that with LWJGL ? What is entity? Would you have an example to show me ? or a tutorial ?

broumbroum

You surely have to read the SaceInvaders tutorial, the demo is included in LWJGL http://www.cokeandcode.com/info/tut2d.html

johnnyh

ok bro I am going to check that shit.

Cheers.