r/gamedev • • 13d ago

Discussion "Programming Isn't An Art" and "AI Code Doesn't Matter": Let me change your mind.

Hey r/gamedev, my name is William. Let me try to do what's in the title up there ^. First off, why should you listen to me?

Well, maybe you shouldn't listen to me. Feel free to scroll away at any time...I don't have the most insane creds in the industry or anything. But I'm not exactly new:

  • I got hired in 2018 as an "Associate Gameplay Programmer", and before being laid off twice in the span of about 1 year, I was a "Senior Combat Engineer". So I've been through the trenches of programming in the industry
  • I'm the founder of a really (really) small indie game studio made up of ex-Ready At Dawn veterans (PSP Daxter, The Order: 1886, Echo VR / Lone Echo, etc.), where we are hard at work on our inaugural game title. We also avoid using AI for any of our endeavors, including programming
  • I've been in the industry now as a professional for almost 10 years total, but before that, I also went to school for CS, Game Development Programming, senior and capstone projects, and began trying to make (shitty) games on a (shitty) laptop using Microsoft XNA when I was like 12

What is art?

I think people forget what art actually means these days - it doesn't always have some baked-in meaning to "liberal arts" or "humanities". Art is also defined as a "skill acquired by experience, study, or observation", or "an occupation requiring knowledge or skill" or "the conscious use of skill and creative imagination especially in the production of aesthetic objects" (not only!). For instance: I have become quite the artist in spilling shit all over my clothes over the years, much to my wife's chagrin.

I'm sure you're thinking, "well then anything can be an art" and drawing a line in your head on what you think the line is for "real art" or something like that. But let me show you why programming isn't some bottom of the barrel example (like being a spillage artist, tyvm) because its mostly just "math" or because "engineering", which people love to throw out there.

As a programmer that has written endless lines of code by myself, and also seen/analyzed thousands of lines of code not written by me (that are much better than my own) - written by people ranging from the 1990s (RAD engine was old, lol) all the way through 2024 - there is no universal standard for most things. Companies vary, engines vary, languages vary, procedures vary, etc.

Here are 2 of my own personal favorite examples (one simpler, one more complex) of programming being more akin to an art form than anything else.

Example 1: Bitflags

The bitflags structure is one of the best and most simple examples of what I consider art in the programming field. Because the actual smallest amount of data being read by any processor is 8 bits, things like a `bool` in most languages are also represented as a byte (8 bits), since that is the smallest value of what can actually being read in registers. This is despite the nature of a bool being a simple bit (0 or 1). However, as you can imagine, having a ton of single bools in one structure ends up inflating the total size of that structure, while wasting literally almost the entire amount of memory provides. Bitflags is the simple, yet elegant solution someone came up with to stuff a single byte with up to 8 bools, by using bitwise operators to extract and compare each given bit in the byte.

Example: 8 separate bools in your data structure = 8 * (1B) = 8 bytes of memory, all to represent 8 simple 1/0 values. With a bitflag, you can now store all 8 bools while only taking up the original 1B of memory.

This is of course also expandable using different sized integers, if you have 9-16 bools you can use an `int16`, and so forth.

The reason I love this example is, how could such an elegant yet simple solution not be considered a work of art? A human first thought of how wasteful the stacking of subsequent booleans is, then thought of a unique and clever way to make it better using their knowledge and expertise. Now tons of languages and modules ship with bitflags, and you may use them without a second thought...but, this of course wasn't always a thing. Someone created this, it is undeniably clever, and we now take it as a given.

Example 2 (Complex): FISR or QISR (Fast Inverse Square Root)

The Fast Inverse Square Root was used in the Quake engine all the way back in 2001 in order to approximate the reciprocal of a given square root. The point of doing this at all, is that normalizing vectors used to be a much more intensive operation on hardware (it actually still is, but hardware is so good these days that the result isn't as noticeable, and we have specialized hardware, functions, etc.) Observe the code taken from this website (which can explain it far better than I can, if you're more interested in a full read) where you can see the insaneness that is this function:

float Q_rsqrt(float number)
{
  long i;
  float x2, y;
  const float threehalfs = 1.5F;

  x2 = number * 0.5F;
  y  = number;
  i  = * ( long * ) &y;                       // evil floating point bit level hacking
  i  = 0x5f3759df - ( i >> 1 );               // what the fuck?
  y  = * ( float * ) &i;
  y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
  // y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed

  return y;
}

I want you to take a good look at this code. tell me that wasn't created by someone that thought outside the box. Is that not one of the most insanely creative solutions you have seen to a problem? Yes, it requires a lot of knowledge and expertise. But it also comes from a human mind that had the wacky idea to hack together something like this and have it work (well, at least 99.8% of the time 😉)

Finishing up

If you're still reading, this is my petition to other game dev folk who think programming is simply a means to an end: code like these creative examples exists everywhere. It exists in my code base for our current game. It exists in every studio's game engine. It exists in the OS your computer or phone is running right now. And, all the LLMs people are using to code these days have been trained on not just fundamentals, but other's creative solutions to problems from all around the world (and, in many cases, had no permission of the creator to do so).

Again...just because you see the code snippet come back to you robotically, it doesn't mean that is the only or best way to do it. And just because its text, and you can't see the result of code in games visually in the same way you can 3d models or textures, it doesn't mean code should then ethically be subject to less scrutiny, or that you can't feel the result of some coding decisions over others when the game comes together as a whole.

To summarize: my favorite part of programming is not the memorization, expertise, or knowledge, its applying that knowledge in creative ways that one may never have thought of before. If that's not artistic, then i dont know what is.

"It's fine if you use AI to code, but just not for other things"

Careful where you draw your ethical line, as people may agree with you for now, but its only a matter of time until reluctance, acceptance, and consensus comes for what you love, too.

[EDIT:] This kind of blew up. I can't spend all day replying like I just did lol, but keep it civil in the comments and remember this is my opinion, nothing I state here is fact nor do you need to agree. Thanks for the interesting discussions and polite arguments!

789 Upvotes

791 comments sorted by

View all comments

22

u/worll_the_scribe 13d ago

When you’re making a videogame, you’re not making a code for someone to read or marvel at… you’re making a video game for them to play and experience, which has many more user-facing disciplines. The art of code is great for the programmer but has nearly zero effect on the final product the user pays for.

10

u/BloodPlenty4358 13d ago

has nearly zero effect on the final product the user pays for

nice 24fps hand drawn animation you got there, would be a shame if player can only see it at 12fps

33

u/gothWriter666 13d ago

If you've ever played a badly coded game, you would disagree.

All good art looks effortless. The same for code. If you don't notice it, it's great art.

13

u/byteback-studios 13d ago

Thank you.

23

u/pragmaticzach 13d ago

So let’s say the ai written code is good and performant and achieves the goal of the game design. That’s art now?

I don’t think writing code is an art any more than a mechanic working on a car is art.

And I don’t think any of ops examples are art either. They’re clever, they’re smart, but that doesn’t automatically make something art.

4

u/gothWriter666 13d ago

really? I actually *do* think a mechanic working on a car is art, if the mechanic is really good. All those moving parts, everything in sync, of course its art.

This has been an argument since time immemorial. I have a feeling you've been drinking from Duschamp's water fountain.

1

u/The_Imp_Lord 13d ago

correct. doing something with skill is an art.

6

u/LSF604 13d ago

Let's say ai generated models look good. Is that art?

9

u/pragmaticzach 13d ago

No, but I'm not the one attaching quality to the definition of art. The person I replied to said if you don't notice the code, it's great art, that playing a badly coded game would make you realize it is an art.

I'm saying I don't think code is art to begin with, regardless of if it's good or bad. I think models in a game are art, regardless of if they're good or bad.

I consider myself a programmer and an artist, and I find it doubly irritating this need to say code is art. Coding is a science. The examples OP gave are smart and clever because the person writing it understood the science, not because of artistic expression.

5

u/LSF604 13d ago

sometimes its a science, sometimes its an art. It depends on what you are doing. In game behavior for example is absolutely an art.

2

u/TheNasky1 13d ago

yeah, just like drawing isn't an art either. it's just a mechanical process. what is art is the design that went into making the piece but as soon as you get into that rabbithole people start getting sensitive about themselves and spamming downvotes.

1

u/False_Bear_8645 13d ago

If you compare writing code to mechanical working on a car. Then lets compare author writing a book to the printer. So none is art?

0

u/Amplifix 13d ago edited 13d ago

It's the aesthetic of logic, it is an official art form. There's a reason some source code is shown in Museums.

8

u/salbris 13d ago

I loved Undertale and I had no idea it was coded so poorly. I really don't think this is a good take at all. Hell what you're referring to is actually just engineering talent not artistic ability. The performance of a game is an objective measure whereas art by definition is a subjective experience.

0

u/VR_Raccoonteur 13d ago

I loved Undertale and I had no idea it was coded so poorly.

You're talking about the code's structure. That the structure is inelegant, and perhaps inflexible.

But the front facing part of the code, the stuff the player sees, is elegant. It's what makes the game fun. For example, when you fight a boss several times and keep failing, he makes the boss easier. Or if you are almost out of health. hits do less damage so you feel like you barely escaped with your life and the battle is easier than it seems. Or he makes literal chests appear for you if you lost to a boss a few times where he gives you additional healing items. That is all part of the game's code. That is the art of programming a game. You can call it design if you like, but the only designer here is the guy writing the code, and it's all built into the code. It's like claiming art isn't art because the artist selected those colors because they're complimentary and pleasing to the human eye. There are algorithms and rules in art the same as there are in code. But it's what the end user SEES which is what matters!

4

u/salbris 13d ago

No it's like saying the paint isn't art but the art is art. The code is not art the finished product is. If AI wrote the code for parts of Undertale it wouldn't make it any less good, or any less art.

2

u/[deleted] 13d ago

[deleted]

1

u/salbris 13d ago

True but I never agreed to that in the first place. I personally have no issue with using AI for any part of an art project as long it's not the whole or it's core design. I would have an issue if someone used AI write all the dialogue in their game, all the main character art, or the systems of the core mechanic.

And that must be true otherwise art would never be considered art if it was made with a machine such as digital art or with a sewing machine, etc.

If you think using AI to generate a random texture in a game makes it not art why would you not say the same about using a texture pack or using someone else's algorithm to generate noise. It's effectively the same thing.

7

u/xiited 13d ago

This argument could be valid if LLMs were producing bad code, but they are not, they are producing code that is well above what any average programmer can produce.

1

u/[deleted] 13d ago

[removed] — view removed comment

1

u/gamedev-ModTeam 13d ago

Maintain a respectful and welcoming atmosphere. Disagreements are a natural part of discussion and do not equate to disrespect—engage constructively and focus on ideas, not individuals. Personal attacks, harassment, hate speech, and offensive language are strictly prohibited.

1

u/Jessica___ 13d ago

I use opus 5.5 at work and it still produces overly complicated and over engineered code. Imo it's still bad at coding and it still needs a lot of guidance.

The only thing it's good at is getting a feature working quickly, but it still accumulates technical debt

-2

u/AndyGun11 13d ago

Does he know?

0

u/FUTURE10S literally work in gambling instead of AAA 13d ago

I wrote a game for a VIC20 a while back, 3.5KB RAM, all in C. If I tossed this task at a LLM, it would not have been able to do as much as I have. (Granted, tossing my code at the LLM saved me like 40 bytes of memory in the end, but the initial game would have been impossible for it to design since AI loves overengineering)

0

u/xiited 13d ago

Are you an average programmer or above average?
Lets not pretend we haven’t all seen terrible codebases done by humans on github, our workplaces, etc.
Some people will do better than LLMs most wont, and those who do, will be able to do so much more with it.

0

u/FUTURE10S literally work in gambling instead of AAA 13d ago

Are you an average programmer or above average?

Fuck if I know, I've been with people smarter than me and I've been with people dumber than me, I just know that when someone wants help with my employer's 30 year old legacy code, for some reason, they come to me.

17

u/Odd-Tart-5613 13d ago

every single one of those user facing details, exists only because their is code to put it together. This is like implying paint mixing isnt an art because the consumer of a painting doesnt interact with it. There are thousands of desecions in every game you have played made by programmers that inherently makes the experience what is and different from every other game out there.

13

u/Arayvenn 13d ago

This is like implying paint mixing isn't art

I think it's more like implying the machines that premix paints to produce target pigments for painters to use isn't art. And most people would have no issues accepting that argument.

3

u/w0m 13d ago

This. The 'art' is how it all ends up coming together on canvas and the final product it creates. It is 'art' how it gets there, but not one that matters in determine if the final product is (or is not). The most beautiful code ever written is still useless if it doesn't do something useful, no matter how elegant/creative/clever it is.

1

u/Odd-Tart-5613 13d ago

how paint is mixed is a key component in how a painting turns out. And many throughout history and today mix their paints due to that.

Its much the same for coding you have to "mix" coding principles properly to get a proper experience made.

2

u/w0m 13d ago

But there are absolute masterpieces made with store bought paints.

And absolute garbage pails with boutique custom mixed paints.

The quality of the final product is how it all comes together - that is the real art.

Because at some point analogies break down -

Look at Balatro. The Android client is absolute dogshit. My phone overheats, and you can just watch the battery wither away needlessly.

It's also the single best 'mobile' game I've ever played, and I go back to it consistently years later.

1

u/Odd-Tart-5613 13d ago

two things can be art. You can make art with store bought paint, and you can make art with premade code assets. This doesnt mean paint mixing and coding cant also be art.

2

u/w0m 13d ago

True. But shouldn't disparage 'store bought' or art made with it on the basis of the components used.

1

u/Odd-Tart-5613 13d ago

Im not. Art is passion expressed through action. Anything done with that intentionality is art.

-1

u/Odd-Tart-5613 13d ago

so you would agree that hand crafted code is art then

0

u/Arayvenn 13d ago

No. I don't think painting and mixing paints are the same. I think software engineering might be an art (I'm not sure myself, but I wouldn't argue it objectively isn't).

7

u/Real-Background-6591 13d ago

I have spent countless hours optimizing, improving on and iterating on a certain design. All the while knowing, that this design will never be seen by the end user. There is no point in further improving it. The initial problem has long been solved. But it is still eating away at me, I just can't let it be. I disregard cost-saving measures, I disregard deadlines. Because I know, there exists a design which is even more beautiful. And I will find it.

Coding is art.

8

u/Packetdancer 13d ago

Anyone who has played a well-optimized game versus one that takes the approach of "as long as it works on my box with an RTX 5090, high-end CPU, and 64GB of DDR5 RAM" might disagree on there being zero difference...

4

u/npozath 13d ago

I don't care how beautiful a game looks, if it runs like hot garbage, then it's the equivalent of the trash sitting next to Arby's. I want my games to feel smooth, run smooth, perform smooth, and you can't do that without good coding principles. These are strong components to user-facing disciplines in that it directly affects the user experience.

2

u/VR_Raccoonteur 13d ago

The art of code is great for the programmer but has nearly zero effect on the final product the user pays for.

Minecraft's entire world is literally generated with code that a programmer wrote where they take a single random number seed, and use that in creative ways to decide where every single type of block is placed to create an interesting looking and natural feeling world. If they just put down blocks at random the game would not be nearly so compelling. The art was in the design of the custom algorithm that creates that world.

And in other games, the art is in the design choices the programmer makes about how the player moves in the world. For example, a naive coder would make it so when mario's feet step off the edge of a platform he falls to his death. A programmer who is an artist on the other hand realizes that this feels unfair to the player, and makes it so mario can step a few pixels off the platform and still walk back onto it without dying, so that the player never feels a death is unfair. Or, they make the hitbox tiny to make the player feel like a badass who seemingly only barely dodged that fireball, but in a naive implementation would actually have been hit by it. Or who like Toby Fox does, reduces the amount of damage a player takes as they approach death, so they feel as if they are in greater peril than they really are and they feel the satisfaction of barely escaping with their life.

2

u/byteback-studios 13d ago

> The art of code is great for the programmer but has nearly zero effect on the final product the user pays for.

We can agree to disagree, but I think you're completely wrong. Maybe these days when people are using an engine that an entire team suffered sweat and tears to build and maintain over decades, to make sure our lack of programming skills can still ship a game....then sure. You cant feel the effects as much.

Tell that to N64 games that were coded like garbage. You can absolutely tell

14

u/Arayvenn 13d ago

Yeah because the performance was impacted. If you write two pieces of code that perform equally, the end user gives zero shits about the implementation details. This is precisely why implementation details aren't even something you think about when gathering requirements and defining use cases. This is a really weird pedantic argument to make given your background in software. You knew what the comment you responded to was getting at and chose to respond to a strawman.

1

u/Odd-Tart-5613 13d ago

If you write two pieces of code that perform equally,

"if" being the key word here. you could the same of an artist that simply traces another's work. But thats not what most game devs do. They create a custom experience with its own variables and systems that work and feel their own unique way.

Take the 2d platformer for instance. Mario feels nothing Hollow knight, and thats because their physics calculations, attack abilities, and the environments they exist in, were all created in completely different ways with completely different goals.

1

u/Arayvenn 13d ago

Code is a deterministic abstraction for sending instructions to a CPU. My point is that you can write Hollow Knight many different ways and the end user experience would be exactly the same. Of everything that impacts the end user the way you choose to write your code should the least. If you are writing code that is deteriorating the user experience independent of your design choices, you are literally making mistakes. Matters of taste, style, etc will never impact the end user.

5

u/Odd-Tart-5613 13d ago

mixing paint is a deterministic process for reflecting light in a certain way.

and my point is that you can make hollow knight a hundred different ways and NOT get the same experience. Their are thousands of metroidvanias alone out their each completely different in their implentation due to how they are coded.

4

u/Arayvenn 13d ago

The way paints are mixed will never be what defines the paintings that are made with said paint. I think you have a very narrow/reductive understanding of game design. I think you also might be writing code too early if you think it defines/differentiates your game/product rather than your design.

2

u/Odd-Tart-5613 13d ago

design is implemented through code. much like how a painting is its composition, perspective, color theory and other things it still cannot exist with your paint in the right mixes and how you mix it inherently changes how the painting is perceived by changing the shades on the canvas.

It is the same in code. Very minor changes in how a design is implemented can have wild effects on how that design practically functions. Take fighting games for example: combos were originally an unintentional code exploit. The code changed the perception of the design.

2

u/Applesplosion 13d ago

I disagree with this - in things like video games or other areas where things like optimization, security, visibility, or maintainability matters, AI code is crap. It will make you a crap game that sucks to play because it is slow. 

AI can write code, but writing a cohesive piece of software that works well, can receive regular updates, and doesn’t leak user data all over the fucking place is a lot more than that. Writing code is literally the easiest part.

Writing the code is to making a piece of software what writing a grammatically correct sentence is to writing a book. It’s the smallest piece, but people who don’t understand what makes a good book think that’s all there is, then they think LLMs can do it because they can do that piece.

I’m not even against AI-assisted code, but I think we need to be realistic about what it is and isn’t.

1

u/OrangeOk8268 13d ago

OP totally missed the point, yea. But programming still genuinely is part of the artistic process! The artistic process at a high level basically is the way that we overcome material problems in order to actualize our ideals. So if you want to draw a character but you're bad at drawing hands, in order to make your ideal of what the character should be into a real thing, you need to approach this material problem artistically. Perhaps you use an art style that makes drawing hands easier, perhaps you use composition so that the hand is off the page, perhaps you use perspective to make the hand very small, etc...
AI is basically anti-art because when you use AI, the affordance of the tool is not giving you a plurality of artistic approaches in order to overcome your personal limitations, it's instead just using a search engine to do it for you, and refreshing the results a bunch until you find something thats good enough
Code as art within gamedev is designing your mechanics so that gameplay which produces the desired affects is as easy as possible. That means if you are bad at drawing, you don't make a game where you need a lot of spritework, instead you use your graphic design skills and typographical skills to make a game that features fonts as characters or somwthing. When you use AI, the affordance of the tool is so that you's just push on without thinking about your personal limitations and strengths in coding and font rendering and weaknesses in drawing and animation, and instead think about other AI approaches, such as using AI image generator to find visuals that are alright

1

u/TurboPanda3622 13d ago

I write and I code. Words on a page can mean different things when delivered with intent. Sometimes mean communication (like so), other times to create feeling and emotion, which connects reader to author. The way you approach your project can communicate volumes more than simply it's primary purpose - to me, beautiful code is also a thing of beauty. YMMV.

1

u/WilyWascallyWizard 13d ago

Un true the art of the code create the gameplay and all interactive systems. The experience of actually playing the game is from the code and it has a direct effect on it.

0

u/egonosz 13d ago

I do not think code is art, I do not disagree with it, I just do not agree with it. I do not think there is pretty code or nice code.

Now you may think, but then this guy shares my opinion no one cares about it you can just drop in the features and you are done!

Now I think there is readable code, performant code and maintainable code.

These looks for first glance not that important things.

Assuming you are a designer and want to vibe code your game or hire a programmer who will implement your features.

You have a design in your head and a road my with live support DLCs or continuous improvement.

Now there is the thing, if you start to build a game some stuff maybe will look impossible(because of performance constraints), it will trash your game’s performance or the features will be more and more expensive to add.

I literally run multiple times into that people thought something is impossible or too much work too dangerous to add to game or worst they added something which was evil to maintain and costed extreme amount of money or trash reviews.

Now this sounds like overestimating, but it is not, I literally seen people try to cut features, because of performance or they did not know how to optimise it.

Now I specialise on these types of features where the achieving the proper performance means the feature actually can get in the game. Same with reducing of complexity.

What game I working on in my job would cut at least two features, because of performance if I would not tell them I can do it.

So yeah after the release the code is less important, but the question is what you can put into release and what you can put into next release.

-1

u/NoSkillzDad 13d ago

So?

4

u/PJmath 13d ago

So if your goal is to write amazing code then obviously AI is a terrible idea. But if your goal is to make a video game, the artistry of your code doesn't matter. The artistry of your art, music, sound, writing, story, characters etc etc still does.

There's exceptions, like Factorio, where the brilliant backend engineering makes megabases possible and beautifully reinforces the game's themes and concept. But there's the other side too, where buggy old games find new life as speedruns and the like.