3D Game Optimization
#1
Posted 24 August 2011 - 05:08 PM
Now, first, I tried taking out the code that wasn't needed(or could be simplified) and when I tested it, it raised only 2 or 3 fps.
Then, I tried putting code into other objects and deleting the objects that had the code in them, and then tested it. No FPS was gained from that.
Lastly, I deleted all the resources and loaded then externally, but no FPS was gained(only the loading speed was way faster, which is good).
So, there is only one choice I have. Delete a lot of the objects in the room, but before I did that, I wanted to ask if there is something more I can do to increase the FPS.
Also, all models are only loaded once, to make the loading time faster, but it did't affect FPS.
Thank you for anyone that responds. The only conclusion I came to was it was my computer or the high polygon count in the models that is causing the problem, but I don't know. Thank you for any responses.
#2
Posted 24 August 2011 - 05:16 PM
#3
Posted 24 August 2011 - 05:18 PM
EDIT: 296 instances
Edited by RoyalCardMan, 24 August 2011 - 05:20 PM.
#4
Posted 24 August 2011 - 05:44 PM
#5
Posted 24 August 2011 - 06:01 PM
#6
Posted 24 August 2011 - 06:44 PM
Try that
#7
Posted 24 August 2011 - 06:45 PM
2. Turn culling on at all possible moments.
3. Don't draw instances behind the camera, directly above or below, or instances that are too far from the camera.
4. Lower the texture quality. A huge amount of processing time is taken drawing detailed textures.
6. Only make the screen redraw ever other step - lowers smoothness, increases speed.
7. Don't draw surfaces that aren't facing the camera or that are behind things.
8. Replace as much as possible with 2D sprites - details like grass.
9. Never draw objects un-necessary to a game - such as an invisible object.
10. Lower the screen resolution. This will greatly increase game speed. However, it lowers quality, so I suggest making your game windowed.
These will all increase game speed if used correctly. Good luck!
#8
Posted 24 August 2011 - 07:18 PM
I still get 8 FPS. O_Od3d_set_culling(true);
Try that
It may just be my computer. I tried lowering my object count, it somewhat worked, but it still lags.
#9
Posted 25 August 2011 - 09:38 AM
#10
Posted 25 August 2011 - 10:47 AM
#11
Posted 25 August 2011 - 11:24 AM
Draw events are terrible slow in Game Maker, and the less the better. So by grouping all static (non-moving) models together, you are also using much fewer draw events.
Also, if you have 100 instances checking for collision with the player - don't do that.
If you have 100 instances of object objWall and they all have an event for "collision with objPlayer" - then that's wrong.
If you happen to have that, remove all collision with objPlayer events from the 100 instances and set a collision event on the player; "collision with objWall".
#12
Posted 25 August 2011 - 12:52 PM
I'll report if it works or not.
#13
Posted 01 September 2011 - 06:19 AM
treemod=d3d_model_create();
d3d_model_primitive_begin(treemod,pr_trianglelist);
with(tree){
d3d_model_tree(other.treemod,x,y,z);//models a tree at x,y,z in controllers treemod
instance_destroy();//Remove this instance
}
d3d_model_primitive_end(treemod);[this code was typed on-post, so there is no guarantee that it will work as-is].
Cheers
~~Brett14;
Edited by brett14, 01 September 2011 - 06:21 AM.
#14
Posted 14 February 2012 - 08:15 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked








