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.

3 Dimensional Chat / Switching 3D objects during game...

Author
Message
Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 17th May 2003 21:39
Hey,

I am making an RTS game. I need some help with loading multiple 3D objects during the game. You can have a maximum of 100 robots out, but these robots can be of different types. For example, you can load a robot of type 1, and it will be assinged robot 1. If that robot gets destroyed, you can build another one. It will also be assigned as robot 1, even if it is a different type. This way, you can load any 100 robots at once, no matter what kind they are. This was working fine before because my robots were just primitive objects while I got the engine working. They objects (sphere, cube, and cone) were stored as meshes, and then when a robot was made, the object for it was just made from the mesh of the corresponding primitive object. Get it? I just finished the basic engine, and am making objects with Anim8or for the robots in my game. I was going to use the same method (loading them into meshes, and just makeing the robots out the whatever mesh they should be), but when I try to load the object into a mesh, it says that there are too many polygons for the mesh. However, it will work if I just load whatever object I want into the robot slot whenever one is make. But that is waaaayyy too slow. It lags for about a second every time a robot is loaded. How do I overcome this problem? Hope you understand it
Xander
Bolt of Bolt Software Productions
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 17th May 2003 22:50
Preload all robots you'll be using and store them in a "bank", where you can hide them for later use, also turning off their collision. When you need one, you switch collision on for and unhide it, much faster than loading every time. When you destroy one, it goes back into the bank and get's hidden again, and the collision is switched off for it too

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Conrad Brown
21
Years of Service
User Offline
Joined: 18th Apr 2003
Location:
Posted: 26th May 2003 04:47
Too many polys? How many are we talking about here? I have been using a memblock to create mesh data recently, and have not (as yet) run into any 'too many polys' problems. Perhaps that is your answer - load the object into a memblock mesh and then use 'change mesh from memblock' and 'change mesh' commands when you want the robot to change.

Login to post a reply

Server time is: 2024-05-09 03:30:55
Your offset time is: 2024-05-09 03:30:55