Game Programming Vexations Part 4: High Level vs. Low Level

By Shamus Posted Thursday Sep 19, 2019

Filed under: Programming 0 comments

Languages are usually described in terms of being “high level” or “low level”. This is usually presented as a tradeoff, and as a programmer you’re obliged to pick your poison.

High vs. Low Level Programming

Wow. This game must have been written in a very high level language. I'm getting vertigo.
Wow. This game must have been written in a very high level language. I'm getting vertigo.

If you’re not a programmer, then I need to make it clear that these two concepts are probably the opposite of what you’d expect. A high-level language sounds like something for advanced programmers, and a low-level language sounds like something for beginners. But in classic engineer thinking, these paradigms are named from the perspective of the machinery, not the people using them.

A low-level language is said to be “close to the metal”. Your code is involved with manipulating individual blocks of memory and worrying about processor cycles. It’s very fussy work and it takes a lot of code to get anything done, but when you’ve got it written you can be confident that it will be incredibly efficientAssuming you’re knowledgeable and experienced, you didn’t create any major bugs, and the limitations of the target platform were made clear to you and were accurate. You know, the usual.. 

A high-level language allows you to express complex actions using very simple bits of easily-written code. It’s easy to write, but often wastes processor cycles and memory. How much? There are arguments all the time over whether the overhead for language X is significant or trivialAnd I’ll bet your viewpoint depends on your domain..

If you want to output the phrase “Hello World!” to the console, then here is how you do that using assembler, the lowest of the low-level languages:

Continue reading ⟩⟩ “Game Programming Vexations Part 4: High Level vs. Low Level”

 


 

This Dumb Industry: Raytracing

By Shamus Posted Tuesday Sep 17, 2019

Filed under: Column 106 comments

This article has a companion video. I try to make the article and the video roughly equal in usefulness, but like the old saying: One second of footage is worth 60,000 words. This video shows off some footage from Minecraft with a raytracing mod, and footage from Control with raytracing enabled. There’s something amazing about seeing shadows and reflections update in realtime, and static screenshots can’t really do it justice. As always, you can watch the video or read on for the article…

Continue reading ⟩⟩ “This Dumb Industry: Raytracing”

 


 

Borderlands 3: Second Impressions

By Shamus Posted Monday Sep 16, 2019

Filed under: Video Games 115 comments

There’s no Diecast todaySorry., so instead I’m going to do a follow-up to yesterday’s post where I complained that the guns in Borderlands 3 felt weak and ineffectual and the foes were all super-absorbent damage sponges. I had a lot of other gripes with the game, but that was the main one. The responses were very mixed. Some people agreed, some people reported the opposite. Both groups seem to be people who are familiar with the series and I’m sure everyone is giving an honest report of their own experience.

This means we’re probably missing some context. Something about this game is causing different people to report different experiences, and I’m curious to see if we can drill down and figure this out. Please do read the original post if you haven’t already.

So now let’s ask the question…

Continue reading ⟩⟩ “Borderlands 3: Second Impressions”

 


 

Borderlands 3 First Impressions

By Shamus Posted Sunday Sep 15, 2019

Filed under: Video Games 110 comments

I’ve only spent a few hours with the game so far. I just dinged level 18, and the game ends around 30-ish. My lack of progress since Friday’s release is mostly due to my switching between a few different characters. I started out as Moze, who can summon a battle mech. After a few levels of that I tried Zane, a hitman with a bunch of different abilities. I played him until level 18, and then started again as FL4K, a robot with a pet skag.

The game seems to be doing okay with critics. A score of 85 isn’t “OMG Game of the Year”, but it’s still a respectable score. Everyone has a few gripes with it, but the criticism is pretty scattershot. It’s not like everyone is rallying around one or two obvious flaws.

This is baffling to me, since I think there’s a really obvious problem with the game and nobody is talking about it.

Continue reading ⟩⟩ “Borderlands 3 First Impressions”

 


 

Game Programming Vexations Part 3: The Dominance of C++

By Shamus Posted Thursday Sep 12, 2019

Filed under: Programming 159 comments

C++ is the main language of game development. This is changing slowly as indies embrace other languages, but in the AAA space C++ is still overwhelmingly dominant. C++ is descended from – and is very similar to – the language C. First created in 1972, C is just one year younger than I am. It was devised for the world of the 1970s. It was targeted at the hardware of the 1970s, and was originally intended for writing operating systems.

This seems crazy, doesn’t it? Writing operating systems for Nixon-era mainframes is so vastly different from building AAA games in 2019 that it’s like we’re using coal-fired steam engines to go to the moon. Sure, the steam engine has been modernized a bit, but there are still conventions built into the language that don’t make a lot of sense in the world of 2019. The fact remains that somewhere underneath all those rocket engines and silver wings is a chugging steam engine.

C++ certainly has language features not available in C. C++ has classes, inheritance, operator overloading, and a bunch of other slick ways of expressing complex solutions in code. Those are nice, but none of those things uniquely address challenges faced in games programming. We could, in an alternate universe, use a different sort of language with a different set of features.

It’s not like this industry is incapable of evolution! Studios have changed game engines, and game engines have changed what graphics API they favorOn the PC side, this boils down to DirectX vs. OpenGL, with third-party candidate Vulkan landing a few recent wins.. Our tools are different, the target hardware is different, the operating systems are different, and the performance challenges have changed numerous times. Rendering technology has gone through at least two major revolutions. First there was the jump from software rendering to using dedicated graphics hardware, and then another jump when we added the ability to program that graphics hardware using shaders. Over the last 30 years we’ve changed every single thing about game development except the language!

Continue reading ⟩⟩ “Game Programming Vexations Part 3: The Dominance of C++”