Game Career Guide is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Get the latest Education e-news
 
  • Four Memory Problems to Watch Out for in Game Development

    [08.20.15]
    - Aditya Kulkarni

  • 3) Unnecessary Iterations: Calling a for/while loop once is easier on the resources than calling it multiple times. Batch multiple tasks in one loop if you can.

    Analogy: You are a spy assigned to deliver packages to 3 different, far off locations in tropical heat. You have also been asked to get top secret info by a different boss from the same 3 locations above.


    Since both the tasks have been assigned to you by different bosses, you can either:

    1. Group your mission according to the boss i.e. You would drive over to all 3 locations to complete the task given by Boss A first, then drive over again to the same 3 locations to complete the task given by Boss B. Or vice versa.
    2. Group your mission according to the locations. i.e. You would drive to the first location, deliver the package and get information, then move on to the next location.

    You would be a damn stupid spy if your mission plan was Case 1 due to the simple fact that it takes a longer time and more resources to complete the same set of tasks.

    4) Keeping unused objects in memory: At any given point in time, only a definite number of objects will be used and / or shown on the screen. Since we have limitations on the memory that can be used, any additional objects still in memory are a drain on resources and should be released.

    Analogy: You need to push a cart from point A to point B. Let's assume that the task at hand would be easier if the load on the cart is non-existent or lighter at the very least. Since you love beer, you load up the cart with a barrel of beer anyway, which just makes the task at hand harder, you alcoholic nitwit.


    So the best solution would be to not load up the barrel even if your emotions say otherwise.

    The list of problems is definitely more than I could write about in a single article. As a developer, you should be able to identify these problems quickly and apply the needed solution. Shipping the product after overcoming these challenges is what makes game development exciting. Everyone has 24 hours in a day. For us, it's the idea of other human beings spending and enjoying some of those precious hours of their lives on something that we create, that pushes us to develop games for the populace to consume.

Comments

comments powered by Disqus