I’m pretty familiar with bge (I can basically build anything I want with few setbacks) but recently my games graphics and logic have been a little bit …… off, you know what I mean. I can make a character walk around but it never seems a smooth within the game engine. I look at professionally made games, (legend of Zelda, Mario, ect.) and they run so smoothly from one level to another with several levels to go through, how can I get my game to run a smoothly as those?
I have seen this done with blender games such as yo-franky a project a couple years ago. They had impressive textures and complicated objects but it runs extremely smooth, how is this accomplished.
My thoughts:
It seems looking through the forms that object linking will be helpful but how is it done and why does it help?
How can I make the game run faster by not rendering objects out of view. (I see this happen especially in LOZ wind waker with the islands popping up in the horizon, I don’t mind this happening if it helps the game)
Are there any tricks messing with frame rate and screen resolution to speed up the process?
I want to know how to generally optimize my game to run smoothly as a professional game would.
No high poly objects! Animated objects must low poly! No wide range realtime shadows as they are really expensive!Better bake them!DOnt use lots of 2d filters or filters that have too many samples!Use occlusion culling,this way you hide objects behind walls.Dont over use large textures because it will increase gpu memory usage.Dont use too many lights,and if you do so disable specular ,this way less calculations for your gpu.
Use level of detail based on distance,this wat things that far and harder to see will have lower polyes and the performance will increase!
There are many other things to say but this is what i remember at te momment!
@BlendingBGE: turning off specular was a good idea thanks!
You said to use detail based distance, how would you go about doing that? also what would be considered low poly? right now all of my obects are under 100 faces is that “low” enough?
Under one hundred faces is perfectly acceptable for most systems. Is is important to note that the reason it is not for some is that many BGE users are using very limited hardware, which could not run Mario either.
Asides from BlendingBGE’s useful tips, there are a few other things to consider. Most of the bad feelings you get from a game may come from simple mis-implementations. I have plenty of experience with feeling things aren’t working “right” and it is just a matter of time to find out why. For example, It feels far nicer to have velocity based movement, instead of location displacement.
The engine already has “frustum culling” which ignores any geometry out of the view. You could modify the precision function (World -> Occlusion Culling) to find the balance between speed (If it is too precise it can take too long to process, and too little precision may mean that large objects near to the side of the screen are noticeably absent when they shouldn’t be.
Object linking is useful because you can separate the asset files. I believe this is just a design preference (and it avoids the duplication of identical data).
It is important to remove physics from objects that do not require it. Likewise, avoid logic running every frame unless it is needed.
As well as all of the above, it is important to understand that an outdated processor / graphics card will never run many games, regardless of their engine. If your Graphics card is older than 5 years or so, It may be time to upgrade. Likewise, a processor less than dual core may struggle to keep up. (Please note that you must check first which part of the game loop is slowing the game down - Logic or Graphics (Physics, Logic Bricks, Python, Animation = Logic) (Rasterizer=Graphics)
I was looking at a game i made recently and im realizing what is bugging me the most is the lighting for one an easy fix, the camera needs some work,
but the thing ill need help on is that, at the begining of the game when you turn around for the first time it freeses of about a half a second. this is because i have several levels on the same scene and to get to the other it just kind of teleports you to that place. these are not in view because of a sky dome but could the game be loading these up? if so could they be loaded earlyier, or with a low priority so that it doesent affect the game?
at the moment it frezes for a second the rasterizer jumps to 160 and then drops down two the regular 70.
I need to add that i have been told that my graphics card is realy out dated even though the computer is only a few years old.
by grafics is a NVIDIA GeForce 6150SE. but for a competition that i will be entering my finished game in i don’t know what kind of graphics they will have. how can i optimize with the bad graphics card considered?
Switch to a scene with a single object on it (loads nearly instantly), that reads ‘Loading…’
Then from there you switch to your game scene. As it’s loading it will display the previous scene, (or rather, won’t display anything over it) so you will see the loading screen.
@cam.dudes - No, Yo Frankie, while they tried to get it working with Crystal Space, ended up being made with only the BGE. The collaboration really didn’t work and as they got to the end of their alotted time without much game done, Pablo went and did a demo with just the BGE in a couple of days. Out of that grew what we ended up getting, which to me shows how good the BGE is at rapid prototyping. I mean they were able to make with the BGE in a couple of days what weeks of fiddling with Crystal Space failed to materialize.