Create strategy game in Away3D

Software: Away3D 4.x

Rayen123, Member
Posted: 08 February 2012 12:29 AM   Total Posts: 70

Hi,
is possible create strategy game in away3D, because if I have on scene 200objects FPS go rapidly to low.
Is there any special proccess how create many “units” in strategy game without low FPS ?

Thanks for reply.

   

Avatar
theMightyAtom, Sr. Member
Posted: 08 February 2012 07:58 AM   Total Posts: 669   [ # 1 ]

Start here
http://www.derschmale.com/2011/07/25/building-efficient-content-in-away3d-4-0-sharing-materials-geometries/

Good Luck!

 

   

Rayen123, Member
Posted: 08 February 2012 09:31 AM   Total Posts: 70   [ # 2 ]

Hi, I tried it,
but if you have lot objects (shared materials and geometries), it has low fps, (only if you have merged meshes it have full FPS, but I need lot of object, not merged)

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 08 February 2012 12:18 PM   Total Posts: 669   [ # 3 ]

Are all 200 objects animated meshes or something?
Maybe you could post some code, or more description and it will be easier to suggest a strategy.

 

   

Rayen123, Member
Posted: 08 February 2012 01:02 PM   Total Posts: 70   [ # 4 ]

Hi,
in this I use shared geometry and material, but on scene is maybe <200 objects, and FPS is too slow. Source is in attachment.

createScene only initializing and prepare away3D scene, generateScene only generate 3D array, and renderScene add cube to scene

 

File Attachments
source.txt  (File Size: 12KB - Downloads: 589)
   

inSertCodE, Sr. Member
Posted: 08 February 2012 11:40 PM   Total Posts: 105   [ # 5 ]

First obvious question but I need to ask. The comp that you are making the test has 3d rendering support with Flash 11 right? Because if you are testing in software mode don’t expect anything more than few models and no light to work flawlessly.

Second, strategy games have many units. Your models should not be more than 400-800 polys and you should avoid using light on their textures. Instead make some good quality textures with static shadows painted on them.
You can find some good reference on how your models should look like here:
http://www.polycount.com/forum/showthread.php?t=41232

Browse through as many pages as you can. There are some pretty good low poly model examples.

 

   

Rayen123, Member
Posted: 09 February 2012 10:44 AM   Total Posts: 70   [ # 6 ]

Hi,
yes, pc has support for flash 11 and 3D rendering. I was adding only cubes with textureColor on scene, when was separetere every cube ,fps was too low, when I merged all to 1 mesh, fps was full. But I need suparate objects(cube) to move them.

 

   

inSertCodE, Sr. Member
Posted: 09 February 2012 01:16 PM   Total Posts: 105   [ # 7 ]
Rayen123 - 09 February 2012 10:44 AM

But I need suparate objects(cube) to move them.

That’s understandable. But, as I said before, calculating light on that many objects is consuming (although I wasn’t expecting that it will choke for you on 200 cubes but on more complex models sure). You can add the light on the floor (terrain) so that your cubes (units) cast shadows on it but most of the 3d strategy games I’ve played don’t use lights on the units. Instead they use per-calculated shadowing or have the shadows drawn on the texture (defuse). *I’m not talking about the very latest games here*

So if you don’t use light on your unit (cubes) texture I’m sure it will run at full fps.
Also although rendering with Hardware support there is a difference between hardware and Hardware. So what has 10 fps on your PC may have 60 fps on other.

...beside everything I would take a look at the optimization again, because as I said 200 cubes with lights shouldn’t be a problem like more complex models.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X