When Your Game Is Bad But Your Optimisation Is Genius

1,381,036
0
Published 2023-11-20
The source code and demos are available here: patreon.com/vercidium
An extra heightmap renderer is available here: github.com/vercidium-patreon/glvertexid

I spent the past 6 years creating a game engine, and I've been shocked at the things that can make or break performance.

I put together 3 simple optimisations that you can use to make your game run up to 10 times quicker.

Music is Orbit, Saturation, Abberations and Chroma-quay by Disjoint Square
disjointsquare.bandcamp.com/

Timestamps
0:00 Intro
0:30 Triangles
0:56 Triangles In Practice
3:28 Triangle Results
4:01 Batches of Ice Cream
5:28 Batching Results
5:58 3 FPS is Enough Right?
6:26 Triangle Reduction
7:35 Sinking Illusion
7:57 Final Result

#gamedev #gamedevelopment #gameengine

All Comments (21)
  • @muggzzzzz
    As someone wise said once upon a time, "The real programming starts when you run out of memory".
  • @Poly_Knight
    Didn't realize how deep you can get with optimizing your environments, I've always kept a consistent LOD with my environments without realizing how much memory i was wasting. Thanks for the video it was very informative!
  • @Anduardus
    optimization enables the potential of modern tech, if we optimize badly it's like optimizing well on worse tech. So this is really damn important.
  • @stillww
    As an alternative to pitch/yaw for compressing normals, you can also use GL_INT_2_10_10_10_REV which also lets you store the 3 vector components in 4 bytes at a lower precision.
  • @Bananenbauer123
    This is some incredible production value. Very nice visuals to go alongside your explanations!
  • @jixal
    As an artist who doesn't know code.....I had no idea you could reduce the data on terrain like that! Always amazes me what can be done when you reeeaallly know how to manipulate the 1's and 0's
  • @ghostl337
    I feel like there should be a definitive list of optimizations devs should just go through whenever making games, I've seen some really bad optimized games from AAA devs and I wonder how it's so bad sometimes.
  • Also, culling triangles and using sprites can help a lot. Shamus Young has a project where he could generate the texture for the terrain at full detail, then cull triangles, then when rendered, looks full detail but runs way faster. OLC demonstrates that relying on sprites, even transforming them all, can be blazingly fast with insane numbers of sprites.
  • @Rhodoran
    I am not a game developer, but a video game enthusiast. Never dived behind the scenes like this and it's beautiful seeing you explain everything on how to optimize and make something run quicker. That, and the presentation and music choise were top notch! Thanks for this entertaining video!
  • @goldenknight1756
    I just finished my bachelors in game development this september, and I have been really losing interest in coding etc.. But watching this video reminded me of how cool i used to think it was, and I actually feel extremely motivated to get back to it, Its insane what you were able to accomplish and I cannot wait for more on this. Please keep posting blogs on this topic or anything related to it !!! I genuinely feel like I've had my eyes reopened to coding. Despite not being the best at coding nor remembering how to do things properly, I can't wait to see more and get back into the swing of things!
  • @potatovonepicus
    These dev videos are really high quality and interesting to watch.
  • @zipsexe
    I was astonished by the performance of Sector's edge on laptop integrated graphics Also, I've never seen such short loading times on an HDD, kinda reminiscent of old Source Games/Battlefield/Early Minecraft where It's basically just click and play Hope this gets the recognition it deserves some day
  • @anzhel3268
    The visuals are INSANE! You really put a lot of effort into it! Good Job!
  • @Finding_Fortune
    Wow those animations are clean. Nice stuff, this is very high quality and interesting!
  • I know nothing about game developing nor do I have any plans to do game developing but this was still very entertaining and educational to watch because optimization just feels good :D It's sad to see that computing power has grown so much but we're not taking full advantage of it in games because so much is spent on skipping the optimization that was previously obligatory to make any game run well.
  • @BrightBitGAMES
    The first optimization technique has one drawback: GPUs calculate texture mip mapping levels by screen space partial derivatives. That means: There will be visible seams for fragments where the UVs wrap (i.e. where a u or v component suddenly changes from 1 to 0 or from 0 to 1). Ben Golus has a very good article about that issue titled "Distinctive Derivative Differences".