Optimizations? Types of optimization

0 votes
How does companies do optimise their softwares and games according to the needs which can be variate i.e. sometimes for eg. there is a company which makes a game and publishes it after that they release some "optimizations and bug fixes" related to that game and because of that the same game in another update may be using less resources and working in the same condition as it was working (here it means gamers will get full satisfaction) and their ram usage or load will be reduced or might be that particular software or game as such will be working smooth again. So, in this criteria, as such what do they do that same program code which was using more resources and leading to device heat now is using less resources like ram and less power sometimes. So, same in the case of software
Apr 10 in Ask us Anything! by Ayush
• 120 points
36 views

1 answer to this question.

0 votes

Hello Ayush,

Program optimization or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. 

In general, a computer program may be optimized so that it executes more rapidly, or to make it capable of operating with less memory storage or other resources, or draw less power.

Optimization can occur at a number of levels. Typically the higher levels have greater impact, and are harder to change later on in a project, requiring significant changes or a complete rewrite if they need to be changed. Thus optimization can typically proceed via refinement from higher to lower, with initial gains being larger and achieved with less work, and later gains being smaller and requiring more work.

It's likely that an optimised program will be smaller than the unoptimised program, but it depends on the exact nature of the optimisation changes you make.

Also relevant is how the compiler for your chosen programming language converts your program (game) and assets into machine code. Sometimes its results are counter-intuitive.

For example, if you have a for loop in your game you may choose to “unroll” it into longer code that doesn't involve a loop, which may result in a larger program, that runs more quickly and efficiently after compilation.

Another example might be optimisation of image assets. You can process PNG, JPG, etc. to reduce their filesize whilst maintaining quality. Xcode actually goes one step further and whilst building/compiling your game changes the order of bytes in your image assets so they match the order expected by the GPU on your iOS device, meaning they can be loaded/processed more quickly when your game runs.

Updates always need to work from the original download or the game on the disc. That size is set in stone, therefore updates can only add to that file.

  • If you have a game 10Gb and an update 2Gb you can’t make the files smaller afterwards. You can only optimise before going public.
  • If you wrote a game 10Gb and then optimise the code to 8Gb you can’t safely replace the file. What happens if there’s a bug in the second version? What if someone has a problem with the first version (they download it and stop auto-updates) and the helpline only works for the second version?
  • You’d need to store separate updates depending on which version you bought. Then you’d need the software to know which version it is and only update in specific ways, that’s not going to make the code smaller.
  • Also, some games have multiple updates and you need to run each one as they fix different things. If update one fixes bugs and update two fixes multiplayer, you still need to update both.

Basically, optimising code can only be done before the game goes public, not after .

Hope this is helpful!!

Thank You!!

answered Apr 30 by Niroj
• 22,790 points

Related Questions In Ask us Anything!

0 votes
0 answers

all values of R in science

Jul 16, 2019 in Ask us Anything! by anonymous
• 120 points
69 views
0 votes
1 answer

Need the recording of the masterclass I attended through meetup!

Hey @Srinivas,  You can find the recording here https:// ...READ MORE

answered May 19 in Ask us Anything! by Sirajul
• 53,080 points
37 views
0 votes
0 answers

I have 2.7 years of work experience.

I have 2.7 years of work experience.I ...READ MORE

May 20 in Ask us Anything! by anonymous
• 120 points
22 views
0 votes
1 answer

Types of Hadoop Clusters

Below is the difference given between Standalone, ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by nitinrawat895
• 10,920 points
1,505 views
0 votes
1 answer

Why Java Code in Hadoop uses own Data Types instead of basic Data types?

Hadoop provides us Writable interface based data ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
163 views
0 votes
1 answer

In Java, how to find out the min/max values from array of primitive data types?

import java.util.Arrays; import java.util.Collections; import org.apache.commons.lang.ArrayUtils; public class MinMaxValue { ...READ MORE

answered Jun 12, 2018 in Java by Daisy
• 8,090 points
181 views
0 votes
1 answer

What are the different types of cloud?

Cloud are basically of 4 different types:- ...READ MORE

answered Jul 13, 2018 in Cloud Computing by Priyaj
• 57,530 points
159 views
0 votes
2 answers

What are the types of dictionary in python?

There are 4 types of dictionary Empty Integer Mixed Dictionary with ...READ MORE

answered Feb 14, 2019 in Python by Shashank
• 1,370 points
91 views
0 votes
1 answer

Different types of seasonality in time series modelling

Seasonality in time series occurs when the ...READ MORE

answered Aug 8, 2018 in Data Analytics by DataKing99
• 8,150 points
567 views