Optimizing 3D games

Forum for discussion on 3D games for mobile platform and doubts related to M3G, Mascot capsule and other rendering engines.

Optimizing 3D games

Postby ladty » Fri Nov 21, 2008 4:27 pm

Hello,

I was just wondering, how to optimize 3D games? I don't mean stuff like using small textures, low polycount, small amount of lights and so on. I mean what options of Appearance, CompositingMode, PolygonMode and so on are the least demanding for rendering?

For examle (from CompositingMode) are faster these options:
depth test : enabled
depth write : enabled
color write : enabled
alpha write : enabled

or these?
depth test : disabled
depth write : disabled
color write : disabled
alpha write : disabled


I thought my game would be much faster, if I set all of these to false and set the order of rendering by Appearance.setLayer(i) (of course the order of rendering must depend on position of certain objects, but for example floor in my game can be rendered first so I tried to use setLayer and setDepthTest(false)). But now it's about 3 times slower than before. So I'd like to know, what options like these are the best for rendering in m3g? Thanks for respond.

L.
(Sorry for my english, I'm from Czech rep.)
User avatar
ladty
 
Posts: 24
Joined: Wed Jul 09, 2008 10:36 am
Location: Czech republic

Re: Optimizing 3D games

Postby DevelopmentTeam » Sat Nov 22, 2008 7:28 am

Our first guess would be you are using RayIntersection class. That should be the best enemy for M3G. Using one ray intersection class can slow down, your game twice. So let us first know how many rayintersection objects you are using?
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: Optimizing 3D games

Postby ladty » Sat Nov 22, 2008 11:43 am

In this game, I'm not using any RayIntersections... I'm sure it's slowing down one of these options, because if I set them to "true", it runs good, but if I set them to "false", it's much slower... And I don't know, what of these options causes it. (btw I have for example 100 same (simple-2 polygons) objects and another 100 sprites, so if I change these options, it's quite notable). I'll probably try to "turn them off" one by one and see, where's the problem. Of course I could let all of these options set on "true", but I thought it's much less demanding if not using depthTest, alphaWriting and so on... :(
User avatar
ladty
 
Posts: 24
Joined: Wed Jul 09, 2008 10:36 am
Location: Czech republic

Re: Optimizing 3D games

Postby DevelopmentTeam » Sat Nov 22, 2008 12:09 pm

alpha and depth should definitely give impact on speed. But not sure about color.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: Optimizing 3D games

Postby jhonnydeep » Fri Oct 01, 2010 12:01 am

Its a great information., thanks for sharing...
jhonnydeep
 
Posts: 1
Joined: Thu Sep 30, 2010 11:35 pm


Return to 3D Mobile Game (M3G)

Who is online

Users browsing this forum: No registered users and 2 guests

cron