Performance Questions
Posted: Tue Jan 31, 2006 8:14 pm
In an attempt not to make a post about general performance issues...
I'm working on a maze game for the PPC. Fairly simple little thing, walk through hallways, avoid ghosts and traps.
Each level is segmented into many areas, each area contained in its own isolated activation region. The game is in an isometric perspective. The floor in each region is one actor consisting of many tiles and the walls in each region are an actor consisting of many tiles.
Heres the thing, I can create a fairly large area with no ghosts or traps in it. This area runs smoothly at about 24fps while the view is moving. (Keep in mind this is on the PPC 100mhz device.) I can add a single trap or a single ghost with no performance loss.
If I add more than one ghost or more than one trap then the frame rate drops to around 13fps while the view is moving. As soon as the view stops moving the frame rate returns to 28fps. This holds true whether the area is the size of six screens or one screen.
Also it does not seem to matter what scripts are active on the ghosts. They can be stationary with no scripts running and I still get the same performance decrease.
I have considered that this is all simply because the device I am testing on is only 100mhz. I don't have anything else to test on yet. The only basis for comparison I have are other games. The EverQuest game, Atomic Battle Dragons, A Bloody Mess, ... These all run fine. (At 20fps or higher where I could get an exact frame rate.)
I have also done the obvious to try and optimize :disabled collision and other events where possible, broken down the levels into reasonably small areas, ...
Anyway, I ramble on...
Here is a list of specific performance questions:
Indexed Transparency vs Alpha Transparency
I assume that indexed is always going to be faster having pixels that are either 100% or 0% transparent. Is this correct?
50% Transparent Pixel
In an alpha mapped image is it faster to draw a pixel with 50% transparency vs 20% or some other value not 100%, 50%, or 0%?
Overdraw
Is it true that the more actors you have overlapping the longer it takes to draw a given pixel in the overlapping area?
Drawing Actors Outside the View
Are actors that are within the same activation region but outside the view still drawn?
View Movement
Why does it affect the frame rate so dramatically when the view is moving?
Animations
When an actor is created are all the animations for that actor loaded into memory or only the active animation? How does this work with a tile actor?
I just can't help feeling like I am missing something fundamentally simple here that I could do to make my game run better. Any tips, suggestions, or people interested in testing my game on other PPC devices will be greatly appreciated.
I want to say thanks to Makslane for all the support he's given me so far and to the rest of the community for some very helpful posts throughout this forum.
Thanks.
I'm working on a maze game for the PPC. Fairly simple little thing, walk through hallways, avoid ghosts and traps.
Each level is segmented into many areas, each area contained in its own isolated activation region. The game is in an isometric perspective. The floor in each region is one actor consisting of many tiles and the walls in each region are an actor consisting of many tiles.
Heres the thing, I can create a fairly large area with no ghosts or traps in it. This area runs smoothly at about 24fps while the view is moving. (Keep in mind this is on the PPC 100mhz device.) I can add a single trap or a single ghost with no performance loss.
If I add more than one ghost or more than one trap then the frame rate drops to around 13fps while the view is moving. As soon as the view stops moving the frame rate returns to 28fps. This holds true whether the area is the size of six screens or one screen.
Also it does not seem to matter what scripts are active on the ghosts. They can be stationary with no scripts running and I still get the same performance decrease.
I have considered that this is all simply because the device I am testing on is only 100mhz. I don't have anything else to test on yet. The only basis for comparison I have are other games. The EverQuest game, Atomic Battle Dragons, A Bloody Mess, ... These all run fine. (At 20fps or higher where I could get an exact frame rate.)
I have also done the obvious to try and optimize :disabled collision and other events where possible, broken down the levels into reasonably small areas, ...
Anyway, I ramble on...
Here is a list of specific performance questions:
Indexed Transparency vs Alpha Transparency
I assume that indexed is always going to be faster having pixels that are either 100% or 0% transparent. Is this correct?
50% Transparent Pixel
In an alpha mapped image is it faster to draw a pixel with 50% transparency vs 20% or some other value not 100%, 50%, or 0%?
Overdraw
Is it true that the more actors you have overlapping the longer it takes to draw a given pixel in the overlapping area?
Drawing Actors Outside the View
Are actors that are within the same activation region but outside the view still drawn?
View Movement
Why does it affect the frame rate so dramatically when the view is moving?
Animations
When an actor is created are all the animations for that actor loaded into memory or only the active animation? How does this work with a tile actor?
I just can't help feeling like I am missing something fundamentally simple here that I could do to make my game run better. Any tips, suggestions, or people interested in testing my game on other PPC devices will be greatly appreciated.
I want to say thanks to Makslane for all the support he's given me so far and to the rest of the community for some very helpful posts throughout this forum.
Thanks.