Blokworld
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Vertex buffers and collision handling

3 posters

Go down

Vertex buffers and collision handling Empty Vertex buffers and collision handling

Post by jclvngstn Fri Apr 01, 2011 1:00 pm

I notice that you (and others who have worked on similar projects) split up your cube faces, so that there are 6 vertex buffers created (one for each face direction).
I can see the performance benefits of this, though you still have to create the vertex data (you just don't display them). Is that correct?

I'm using the Unity game engine, which allows people to create objects with pretty generic collision handling. This means you could drop in say...a dragon gameobject, with its movements and behavior scripts, and expect it to be able to do just fine in the game world. The developer doesn't have to know about the blocks and such.

The trade-off is, I pretty much have to generate the entire collision mesh and display mesh, for each chunk/sector of terrain.
So, I'm wondering just how much of a performance boost there is to only showing the 3 visible faces. And, seeing as how that seems to be how you are going about things, do you see this as a limiting factor when considering new creatures/entities in your game world?

jclvngstn

Posts : 1
Join date : 2011-04-01

Back to top Go down

Vertex buffers and collision handling Empty Re: Vertex buffers and collision handling

Post by Slaihne Wed Apr 13, 2011 2:26 pm

Hi again JC,

In fact it's 8 meshes i generate (the 2 extra meshes are for liquids and non-blocky blocks like leaves).

And, atm, i actually draw all 8 every pass. I know there will be a performance increase but just haven't bothered writing the logic to suppress drawing the relevant face meshes. It's one of those optimisations i know i can make down the line but just haven't needed to atm. And yes, i still create all the meshes at once.

I'm not sure about the Unity engine and the collision meshes you mention. I've got direct access to the blocks so collisions are relatively simple to handle.

I'm afraid i'm not too sure what you mean by a 'limiting factor' at the end there?
Slaihne
Slaihne

Posts : 264
Join date : 2011-03-17
Age : 56

Back to top Go down

Vertex buffers and collision handling Empty Re: Vertex buffers and collision handling

Post by jeevzilla Mon Apr 18, 2011 4:28 pm

hi this is kinda off topic but my name is jeevan sehmi and ive been making small games like yours (but not as good) and ive been wanting to work on blokworld i know how to code so you dont need to worry about that and if your wondering why this is in this section its because i thought this was the best spot to put it anyways send me a message and we can decide

jeevan sehmi

jeevzilla

Posts : 1
Join date : 2011-04-18

Back to top Go down

Vertex buffers and collision handling Empty Re: Vertex buffers and collision handling

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum