Intro Optimizing 3D Web Games
In this video tutorial set your learn the tricks to optimizing 3D Games for the web.
Videos 1 and 2
Tips for Building 3D Games for the Web
3Games – qball (chapter 12), footBall, bowling buddies
elegantly simple and highly addictive
- Good news everything is getting faster
Hey we are native now!
- What about cache – careful where you
put your passwords!!!
- A Few Optimization Tips:
Unprojection vs Jiglib
Sprites plus 3D
Video 2: Image Tricks
Optimize your images (the designer developer war)
— Photoshop export for the web!
Mip map your images (2, 4, 8, 16, …1024
Reduce Viewport size (1/3rd + 2/3rd rule)
Combine low polygon with good sound!!!
This gives a real feel effect.
- Book List from Chapter 10 Professional Papervison3D
- Viewport size-as mentioned earlier rendering your 3D objects to the stage is about 2/3rds of the CPU work. Whenever you can reduce viewport size this lessens the amount that needs to be rendered. So bring your viewport down to the point that you do not diminish game play. In the shooting game this has already been done. But when you design your next game keep this in mind. If you need to fill the entire screen do it with some static graphics.
Transparency-transparency is real CPU killer in PV3D. So in the pool game, get rid of your transparent bounding box material and add a line3D outline instead. It’s not as cool but it’s faster. You’ll have to do a little reprogramming of the PV3D plugin and create a line3D bounding box class to accomplish this.
Movie Clip Animation-Movie clips are expensive items on your CPU-they carry a lot of overhead. You can use a frame ripper instead, which cycles individual bitmaps, or just use a single graphic.
Mipmap all your Graphics and Filters-you’ve already done this for the pool game, but keep this in mind as you create other games in the future.
Use Solid Colors When Possible-whenever possible exchange your texture colors with a solid color. In the case of the pool game, you can dump all your ball textures for solid colors. However, this may save some resources, but it’s guaranteed to make your game look ugly. Use this option sparingly.
Reduce Vertices Number-reducing vertices can make a big difference. For example, if your balls are 8×8 and you reduce them to 8×6 you’ve saved 16 vertices per ball or a total of 160 vertices for 10 balls. It adds up, so whenever possible bring your vertex count down.
Drop the Bullet Imprint-adding more bitmap material slows your processor; dropping the bullet imprint will save some CPU resources.
Drop the Spring Camera-the spring camera requires a few extra iterations and substituting in a Camera3D in this case will make little difference on how your game looks and performs.
Remove tracer filters, line blur, and panel drop shadows-removing drop shadow from your panel will not change much, but removing the line trace blur filter will since you’re generating it every time you shoot.
Remove the tracer line or replace it with a recycling particle or bitmap. The problem with line material in PV3D is that it accumulates in memory and even if you remove it properly, it still waits around for garbage collection. If you really need a tracer, use a recycling particle that doesn’t need to be removed from memory; another option is to use a bitmap.
Drop the Skybox and add a simple background image. Skyboxes are beautiful but can add a serous lug to your game-especially if they are being moved often.
Turn off scroll policies-in Flex, make sure that all scroll policies are turned off. Scroll bars require resources and turning them off saves on CPU resources.
Keep stage quality low (stage.quality=”low”)-setting stage quality to a higher level will cause anti-aliasing to kick in, requiring a x2, or x4 iteration of every frame which is a significant processor hit. In most cases, keeping stage quality low doesn’t make a difference in appearance.
- Watch out for hidden background objects. Sometimes in game development objects are left invisible, layered in other objects, or left in the background. You might not see them, but your CPU does. So make sure that all unnecessary objects have been removed from your game.