Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Pre load mesh  (Read 589 times)
Canning
Community Member
*
Posts: 320


« on: February 25, 2008, 08:36:14 PM »

In my game, if i move the camera to a place with lots of 3d models (not alredy loded), my app slows down as it loads the models.

To fix this, i presume i will have to preload the models.

Can someone help me on this problem.... do i load the mesh at the start of the game and then duplicate it when needed ... or some other idea.

thanks

Canning
Logged
serial
Customers
Community Member
*****
Posts: 299


« Reply #1 on: February 25, 2008, 10:34:42 PM »

Really depends on the type of game and engine.

If its a FPS type you preload everything

if its a MMO type you will have to come up with an elegant way to stream in new information and stream out old information.  It usually consists of multi-threading and queing.

You definatly can't load tons of content at one time.  If you want you can setup a simple queing system that processes a few of the requests everyframe.  Thus evening the loading over several runs through your game loop instead of just 1 . 
Logged
Canning
Community Member
*
Posts: 320


« Reply #2 on: February 26, 2008, 12:17:46 AM »

It is a MMO.

Can you give me an example of how to preload say 5 mesh's
Logged
Canning
Community Member
*
Posts: 320


« Reply #3 on: February 26, 2008, 12:18:20 AM »

I am using vb 6 and 6.3
Logged
agentchris1
Community Member
*
Posts: 29


« Reply #4 on: February 26, 2008, 04:42:38 AM »

I'm pretty sure that you when you load the mesh you get an ID for that mesh back. You can then use Globals.GetMesh($ID) to give you the mesh.

So basically you would set the properties of that mesh to not render, and then when it is needed you set it so it does render.

I like Serial's suggestion a bit better though.
Logged
willyg
Community Member
*
Posts: 22


« Reply #5 on: February 29, 2008, 10:22:32 PM »

Hi Canning.  I'm also using VB6 and TV3d 6.3.  To load numerous meshes during the intialization, I call a sub (named "Models") in a private Form well before the Do Loop.  I then have the "Models" subroutine in a public module.  To render, you could call a sub in the Form inside of the Do Loop, or render individually, or use the render all meshes function.  Hope this helps.  If you want an example just let me know.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks