• Nothing
  • About
Menu

Asher Einhorn

  • Nothing
  • About
sticker375x360.png

The importance of NOT optimising

June 21, 2015

I talked briefly already about the importance of not trying to optimise when prototyping, but as it turns out, ‘not prototyping’ is generally something I would recommend you do almost all of the time.

This seems like a very odd thing to be recommending, but here are some reasons why.

  • You may not need to. If your game is running at 60fps, there is simply no need to waste time optimising. Remember that your time is a precious resource, you only have so much time to make a game. Wait until you actually need to optimise before you spend time doing it.
  • Always profile first. When your game does begin to run slower, don’t second guess your code and spend weeks or months trying to make everything faster. it will amaze you what ends up being the problem. Use a profiler to actually show you what is taking the most time each frame, and focus in on that.
  • You probably aren’t helping anyway. Optimisation is a very in-depth subject, something that you might think needs optimising may actually be optimised by the compiler anyway, and your efforts could even make it worse.

If in doubt, ALWAYS write readable code over optimised code. Even in AAA, code that someone else can come and jump into is almost always preferred over fast code (unless we’re talking about very low-level systems), because when people leave, someone else will have to try and understand it.

In Scripting Handbook
← Animation State MachinesTips for rapid prototyping →
Twitter
  • RT @CKapmeh: Sunday Capilla San Bernardo / Nicolás Campodonico https://t.co/V56q7uftPf
    May 28, 2017, 10:42 AM
  • Crunch dadaism. Come to @Naughty_Dog and experience the highs of creative culture. https://t.co/9yMPcTdiYA
    May 27, 2017, 9:33 AM
  • Crunch garden #gamedev Avocado, Lemon and Peppers. From right to left. https://t.co/jtZXeWDEgh
    May 27, 2017, 9:31 AM
  • Working with a migraine two days in a row is quite possibly the most unpleasant thing in recent memory.
    May 26, 2017, 3:36 PM
  • Sure is fun to have a night off! #PS4share https://t.co/WMcEMY5yWE
    May 21, 2017, 7:59 PM
  • The EU/US PSN account conflict is an ongoing nightmare. Looks like I'm not playing anything tonight after all.... pain!
    May 21, 2017, 7:49 PM