Reinventing the wheel

Started by
18 comments, last by penguinbyebye 6 years, 5 months ago

Hi,

I found something that contradicts what I've been told by a lot of people regarding reinventing the wheel. First, I'm not highly experienced in programming and game programming, but I have a couple years under my belt. Like many of you, I've had my experiences of reinventing the wheel. Sometimes by ignorance, sometimes just for fun. But, almost every time I did, I have been told by a teacher/coworker/mate that reinventing the wheel was a waste of time. That I shouldn't waste time trying to find a solution to something that has been solved by someone else. In the case of game programming, that I should use an existing engine.

CD Projekt Red, the guys who made The Witcher series, wrote a letter regarding the management of their employees in which they shared what seems to me quite contradictory to what I always thought, and I quote:

 "We believe reinventing the wheel every friggin' time is what makes a better game. It's what creates innovation and makes it possible for us to say we've worked really hard on something, and we think it's worth your hard-earned cash." (source)

This makes me think that I should go back to C + OpenGL for my next project.

I'm curious what the more (or less) experienced people here think about this. Perhaps you can share a wiser understanding of this letter than I have.

Advertisement

Like everything, the answer is "it depends". 

Are you a massive studio with resources to burn and the expertise to create new and better wheels? Reinvent away!

Are you a one-man indie dev who has limited time and money? I would ask myself if reinventing the wheel is the best use of my limited time. 

Even that's just one axis on the "should I reinvent this wheel" chart. 

Are you doing this project for fun or profit? What will the return be on this custom wheel? Are you really good at making wheels, or are you more of a flash paint job kinda guy? Do your (potential) customer love wheels, or will they not even see them?

 

 

 

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

Reinventing a crude wheel is good if you want to understand wheels better. For the sake of education, limited reinvention is generally beneficial.

Reinventing a fancy wheel is a waste of time unless you want to be in the business of selling fancy wheels.

 

Doing everything from scratch is rarely merited. Even then, you're most assuredly building upon other people's experience and expertise (or you're going to be a naive failure).

For pragmatic decisions, only one question matters: is rolling your own going to result in a dramatic improvement over the available state of the art, so much so that it offsets the cost of doing it? If so, go for it. That's how advancements happen. Otherwise... don't waste your time and effort. Play to your strengths.

I have done no research besides reading the article in question, but I sincerely doubt they are referring to writing every last bit of code from scratch. That's crazy pants. The splash screens for Witcher 3 show a dozen different middleware packages in use just in that title; obviously RED is not averse to using other people's "wheels" when it makes sense to do so.

 

As for what you should do... It doesn't matter. Learn what you want to learn, ship what you want to finish. Be flexible. Hard and fast rules are useless.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

5 hours ago, Michael Aganier said:

This makes me think that I should go back to C + OpenGL for my next project.

The developers wasn't talking about this point in particular (the way I see it at least). If you look at their product, their milestones and plans (the three Witcher games building on top of each-other in every aspect) you'll see what they are going for. They had specific goals in mind, specific targets they want to achieve and these targets may not align well with the existing "wheels".

If you haven't seen it already check this video out where they show how they approached their dialogue and in-game cinematics (cut-scenes):


I think what they are suggesting (and cleverly so), is that for innovation, efficiency etc... something new, something specific is needed. I don't think this is an argument against engines or off-the-shelf libraries, but it is an argument against overgeneralizing and ending up in a trap where stock stuff actually limits creativity, design space and the goals/targets. I think the Witcher games could have been made with various unreal engine version as an example and I think the developers at CD Projekt Red also know that, but at the same time they know (and try to advertise this idea), that with the mentality that you just choose off-the-self things for every single thing can dim the vision too, sort-of like steering the wheels a bit instead of you maybe even at the most important loops on the racetrack.

Think about it this way, do you really need to do another platform abstraction layer instead of SDL?! Maybe, but it probably will not yield any better results. But if the question is do you need a new workflow or a piece of tech for a dialog system to make jaw-dropping scenes or is it okay to use something stock from the unity asset store. Maybe it is okay to use stock, but if your target is state of the art dialogue scenes without employing 40+ animators and running a mo-cap studio it probably will not yield your target results...

So much words for such a simple idea ( sorry for being a blabbermouth :D ). Don't be afraid of  "reinventing the wheel" where you need to. Don't fall into the trap of overgeneralizing (tech) on multiple levels, because it can bite you in the a$$ :) ...

/ my 2 cents

Blog | Overburdened | KREEP | Memorynth | @blindmessiah777 Magic Item Tech+30% Enhanced GameDev

Also my two cents:

Reinventing the wheel (or the steel) can be helpful to gain some experience. For example, you can use std::list to play with linked lists. You can use std::map to use hash maps. But knowing how these work can be very helpful in (game) programming. If you want to be a 3D programmer and you don't know how a tree works, this will certainly be more of a problem for you than if you did.

1 minute ago, _Silence_ said:

You can use std::map to use hash maps.

Nitpicking time: std::map has an ordering property by definition, which means in practice it is not a hash map but usually a red-black tree. Unordered constant-time maps are generally serviced by std::unordered_map in C++11 and up.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

1 hour ago, ApochPiQ said:

Nitpicking time: std::map has an ordering property by definition, which means in practice it is not a hash map but usually a red-black tree. Unordered constant-time maps are generally serviced by std::unordered_map in C++11 and up.

Indeed :)

Reinventing the wheel is great when (and when you have the time):

  • Your wheel has less dependencies than the current wheels
  • Your wheel is faster than the current wheels
  • Your wheel is simpler than the current wheels
  • The current wheels are obsolete or lack development in the recent years
  • It fits your needs better than the current wheels (specialization)
  • The current wheels have a license that doesn't fit your needs
  • Experience
  • Edit: when you just want to have fun

 

I've reinvented the wheel many times - like finding out how to do 2D collision detection by accident. I have to say it's fun and you now really understand the concept. Who cares it's a "waste of time". There is even a renowned game developer on Twitch, the guy who developed N+ and N++, who said he rewrote the C/C++ STL libraries.

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

I tend to be one of those guys who likes to reinvent all the wheels when doing personal projects - but a few years of doing this as a job has really highlighted the value of using what exists already.

I'm currently doing the C++ and OpenGL thing, in part because I want to, in part because it's an excuse to practice and keep up with C++ since I'm not otherwise using it very often, and in part because I prefer not to use gigantic tools for small projects.  I know some people disagree on how far to take this idea, but to me it's about the right tool for the right job.  Want to make a networked 3d shooter?  Unreal is probably great for it, but it would be overkill to make a quick, small, 2d card game or something where you aren't going to use even a tiny fraction of the features of the engine.  Unity is less overkill, and honestly is probably appropriate for almost any game, but just isn't my favorite thing to work with in general, so I'll use it when there's a good reason to (and there usually is a good reason - time, budget, etc) - but when I get the chance to roll my own stuff for small / simple projects, I tend to just enjoy that more.

But of course "I enjoy it more" is not an appropriate reason to make an engine/tool decision in a professional setting.  At home, go for it.  At work- do the thing that is most appropriate for the job.

Even then, when rolling my own stuff, there's certain stuff that just isn't worth the time.  I'll write the GL / rendering stuff, the scene management, etc., but I don't make my own physics engines, very rarely do any audio stuff, I'll use existing libraries for loading up assets, etc.  I'll roll my own for the "fun stuff", but there's some areas where I know I won't be able to get anywhere close to an existing tool.

This topic is closed to new replies.

Advertisement