Optimization Goals and Tricks in Core

Optimization Goals and Tricks in Core

This Tutorial will help provide optimization goals and tricks for people both new and not so new to Core. It assumes there's a basic working knowledge of how to build and create in Core.

INTRODUCTION

  • Game Optimization is a combination of many things that result in the "total sum" optimization. It's a balance between Performance, Aesthetics and other things.

GAME IDEA CONCEPT

  • When you are first conceptualizing your game, there a few things you want to consider in your game design which will directly effect your performance and thus how you will optimize your game. Generally speaking the greater the detail of the visual experience or the greater the amount of visuals it has, it will impact upon the performance of the game.

  • There's a balance between Performance, content detail and amount of game content. The more detail and more content you have the more critical optimization becomes to reclaim performance.


GAME TYPE AND FPS

  • What kind of Game? Is the Game Multiplayer or not? If it's a multiplayer what is the targeted maximum number of players it should support? How critical is the FPS rate to the actual game play? What's the lowest acceptable FPS for the game, what's your targeted ideal target FPS. A Targeted FPS could be 30 FPS or higher, or even 60 FPS or higher. Ideally you'll want to try and target for 60 FPS or higher. This is a target to work towards, regardless if you achieve it right away or not.

  • Establish a target Framerate (FPS) for the game.

  • Also Establish what is the lowest acceptable FPS which will severely impact game play.
    Are there any times or spots in game play, where it's acceptable to have Lower FPS for a brief time? Ideally consistent FPS is most desired, or where FPS doesn't drastically change.
    Reaching and maintaining a target framerate for your game without sacrificing the quality of the visuals or features can be a real challenge. This depends upon the type of Game and it's goals.

  • There is big difference between a fast paced PVP combat arena style game that supports up to 16 players simultaneously in the game where higher FPS (Frames per second) is critical, and an slow paced RPG or single player slow action puzzle game where FPS may not so critical.

  • The desired number of players your game supports will without a doubt effect your games performance and how you will need to optimize your game.

  • While creating a new game or working on an existing core game project, it's highly recommended that you set the Max. Players setting of your project to what's desired.

  • If you start of building a new game from scratch and wish to increase this later on. You may discover having to do massive amounts of optimization or changes to your game to support more players later on.




    (Note: Networked Objects and Terrain Limits are greatly effected by the Max. Players settings)


  • In regards to Monitoring FPS rates of your game project. There's a Play-Mode Profiler which is a an exceptionally useful tool for collecting performance data and information. You can enable it in the "Game Settings" Game Object of your game project.


This will enable you to use F4 when playing your game locally or on the server to activate a profiler view. Where you can view the "Frame time" of which your game is running at.

Screenshot 2021-11-16 003212

60 FPS is roughly 16.67 ms Frame Time
30 FPS is roughly 30.33 ms Frame Time
15 FPS is roughtly 66.67 ms Frame Time

  • There are third party tools which you may use for monitoring FPS and Frame Time, such as MSI Afterburner.

  • To learn more about the Play-Mode Profiler, here's the link to the Official Documentation. https://docs.coregames.com/references/profiler/


TARGETED PLATFORMS

  • Low End, Mid Range or High End Gaming PCs?

  • Will players using Lower End PC's need to lower the video quality presets of their Core Client?

  • How do these settings impact upon the desired visuals and performance of the game?

  • How close to your Target FPS do these different platforms get?

  • It's always a great idea to get a few people with a range of platforms to help play test.

  • You may be getting 55 FPS on your PC, while somebody else with a higher end gaming rig is able to get 100+ FPS.


ART STYLE

  • What Kind of Art Style are you using in your game? is it low poly cartoon style or a highly detailed closer to realistic or Hyper Realistic style? Deciding how detailed or simple your artwork should be, is important. This includes the amount and types of materials. Some types of materials are more expensive. Do you wish to establish a Material Budget or a set of reusable materials?
    How much detail for background objects. How much detail for focal point assets? At what point does too much detail in game assets impact negatively upon performance or desired visual level. What kind of Artistic reference material have you collected, and what elements of that art makes it stand out, what elements can be reduced, removed or are not needed. These are some questions to ask when creating the game, and in reviewing the game for optimization.

  • If your game is content rich and dense in detailed 3D game art, you may have to resort to simplification of game art. Depending if you are trying to free up more object space to add more content in, or if too much complex content is the performance issue itself. How does this impact upon the desired Art style?


GAME ART OPTIMIZATION

  • You can use Merged Mesh or Merged Models to help greatly reduce the Object Count of non-networked objects in Core and boost performance.

  • One of the problems many people first have when using Merged Models, is figuring how to best use it. It's best to used on groups of objects which you want to be sent as a whole to be rendered out to the view port screen (game screen) as if it were a single massive object.

  • Ideally you want to keep the merge model to the size of the players view port (screen).

In the example screenshot below. I have opted to work with three mesh merge groups.
One is for the Apartment Building and the other two are for Props which surround the building.
This way the only time the Props (Dumpsters) are rendered out to a players screen is when they become in the visible line of sight for the player. If I had opted to merge all the Props with the Building itself, they would be needlessly rendered or processed without even being in the players immediate view.




For more information regarding Merged Models, here's the link to the Official Documentation.
[Merged Models - Core Documentation]


LIGHTING/SHADOWS

  • What kind of lighting are you using? Fully Dynamic lighting with shadow casting or not. What assets will or won't need to cast shadows. Dynamic Shadow Casting is an expensive task for Render times, along with shadows in general.

  • It's best to reduce the amount of overlap between multiple lights in a scene, or keep whatever overlap to a minimal. Generally speaking you can get away with a 2-3 overlapping lights but best to avoid having like 5+ over overlapping lights all with "Cast Shadows" enabled.

  • Adjusting the Attenuation Radius is important, When the attenuation radius of multiple lights overlap, it takes more time to calculate and render the shadows and lighting effect upon objects or players in game.

Example with Cast Shadows not Enabled without much over lap. (This is good)




Example with Cast Shadows Enabled with a lot of light over lap. (This is not so good).

  • When using more than one light to accent a focal point of interest, using either a 2 or 3 point light system. It's best to pick which one will be the Shadow Casting light source, while keeping it disabled on the other one(s).

  • Always try to reduce the number of lights, and tweak on the settings and placement until you achieve the desired lighting effect you are looking for.

  • Also moving lights into or setting them up under a "Client" Network Context in the hierarchy helps.

    Screenshot 2021-11-16 005644

  • "Disable Casting Shadows" on objects such as grass or flowers in outdoor environments will help improve performance greatly.

  • Try to focus upon shadows which accent focal points of interest, and get rid of shadows which virtually will go unnoticed by the players. Using "Disable Casting Shadows" on objects such as grass or flowers in outdoor environments will help improve performance greatly.

  • You may even want to experiment around with "Disable Distance Field Lighting" on objects to reduce the lighting and shadow complexity


POST PROCESSING/ENVIRONMENTAL COMPONENTS

  • Are there any Artistic choices you make which directly effect how the game is rendered, such as post processing FX. Post Processing FX and other things like Environment Fog will impact performance. If you plan on using "Advanced Sketch Line Post Process" this means less concern you'll have regarding the texturing or materials applied to your game art.

  • When it comes to the game environment. Property Settings on the "Sun light" Sky component can have a deep impact on game performance if Cast Shadows is enabled. If you look under the "Shadows Advanced" Properties Group of the "Sun Light" sky component you'll find properties such as; Shadow Cascade Count, Dynamic Shadow Distance and the other associated properties. The higher some of these values are; the more expensive they will be in processing and rendering time. Especially Shadow Cascade Count, while cranking it's value up might add more shadows to Terrains and your environment. It can prove to be rather costly.

So much of game optimization is a literal balancing act between performance and desired visuals and game content.


VFX/SFX

  • How heavy is your game in the use of VFX (Visual FX) and SFX (Sound FX)?

  • How important is this to the game design? For example a Multiplayer PVP combat game with a lot of VFX/SFX for spell casting or sci-fi weapons. Is there any VFX/SFX which spawn in when a player takes damage?

  • Try to limit the number of VFX objects, and work with lowering or lower particle density and particle sizes. Remember you only need just enough touch of the VFX to enhance the visuals. You can also make adjustment to the particle life. The goal is try and subdue your VFX for added performance gains and maintain a higher FPS. Sure the 8 massive Fire Volumes with 8 Massive Smoke volume VFX might look amazing as hell. But it's probably going to be Hell on game performance.

  • Move your VFX/SFX into client context groups to help with optimization. This places the workload more on the Client and takes it off the Server side.

    Screenshot 2021-11-16 020321

  • If you are Spawning VFX/SFX objects into the game (typical of weapons and spell casting). Make certain to set the Life Span value. This is to insure the object is properly destroyed and prevents from multiple copies of it becoming stacked up inside the game.





TERRAIN (Note: Min player limitations)

  • You can adjust the LOD (Level of Detail) on your Terrain. I decided to write about this because I've seen it frequently asked about in the Discord Channel.

  • Locate the Max LOD Property of the Terrain object itself in the "Properties" tab panel.

  • This is the setting for the Max LOD the terrain can have. Decreasing it will improve how the Terrain looks without a player visibly noticing it. However, it also impacts on game performance.


Please Note: (very important)
Please Note:

This is a min. player requirement connected with your Terrain. It's based upon Collision Complexity. The size of your map and it's complexity determines this. While it's not currently enforced during game publication, it's subject to being enforced or updated later. If you make changes to the "Max Players" of your game project and you see error messages and your Terrain Complexity Count bar turns red. You may want to take this into future consideration.


3 Likes