Advertisement

Are you the "From Scratch" type?

Started by June 18, 2015 08:07 PM
63 comments, last by Oluseyi 9 years, 4 months ago

Rather than being saying I'm a A or B type of guy, I'd rather give some reasons.

Reasons I write from scratch:

#1: To learn new things - The less things that obfuscate me and my understanding, the better. I don't want to hit an incorrect assumption caused by third party code.

#2: Degree of control/understanding

#3: Inflexible and bloated existing 3rd party libraries.

Examples: Collision routines, ai steering algorithms.

Reasons I don't write from scratch:

#1: Features that use extremely complicated algorithms and I need not understand how they work.

#2: A quality and small library exists that does what I need and follows #1 or something that I already understand and need little control over.

Examples: Image loading.

In my own projects:
Sometimes from scratch if I want to learn something new or think I have a better way of doing it.
Sometimes I'll just use a library or engine because I already know it does exactly what I want.


On a paid for job:
Third party library every time. It may not be as efficient as custom code it may end up having to be bug fixed and patched for the next 10 years but this is still a price worth paying compared to not finishing a project on time or writing it in house and still have to bug fix it for the next 10 years and not be able to blame anybody.

A little story:

When the Wii launched I was working at a games company that had a lead programmer who insisted on writing everything in house by the time we had finished writing an cross platform engine to support Wii, DS, XBOX360 and PC (we didn't do PS3), an in house scripting language, in house exporters for MAX and Photoshop, an in house shader language and in house physics engine the Wii was pretty much obsolete and all the publishers had already started to abandon it. The publishers who saw our products said that they were some of the most amazing games in the Genre that they had seen on Wii hardware but that they could not fund because the Wii ship had sailed.

Most of our competitors had used things like Gamebryo, got publishing deals early and shipped games in less than six months. We all got made redundant.

Advertisement

I normally start from scratch, but let me be clear that I don't always start from scratch on everything. I always reuse libraries that are meant to be reused. STL, OpenGL, database, frameworks. These are the stuff that I am not going to write from scratch, probably ever.

But if I am making a game, let's say a Chess game. Looking for an open source chess game out there is the last thing I will do.

Why? A game like chess sits at the top of the application stack. It's very unlikely that you are going to build something on top of your chess 'engine'. This is the final layer, the layer that you want to customize as much as you want. This is your chess game.

Taking an open source game is like buying a painting from a flea market, with all the dusts and the blemishes, fix it, and call it yours. You are taking the joy out of painting! That's not why you paint. You don't paint just so that you can buy a painting. You paint because you enjoy painting. But would you build your brushes and canvas from scratch? No. These are your tools. The joy comes from using these tools to draw your painting.

I've always written from scratch because big engines were either outside my budget or not to my liking.

My current game might be the last one I do from scratch and I am currently investigating unreal engine for future projects.
Why bake bread from scratch? Why not buy a loaf?

Because all bread that you can buy is shit. It's as simple as that.

(You picked the probably most unlucky example that you could pick to make your point biggrin.png )


Why bake bread from scratch? Why not buy a loaf?

I think the best way to answer this is with a similar analogy. wink.png Let's say you go to the salad bar at your local grocery store. You want tuna today, so you scoop some into your container, go to check out, and proceed to enjoy your lunch...but wait...there's a lot of mayo and it tastes really fishy (I know it is fish, but other ingredients help to lighten the flavor). Turns out you didn't like it that much.

So you go back to the grocery store. This time, you purchase all the ingredients you want, you go home, and you make your own tuna...this time, you find that it's absolutely delicious by your standards! What's more, you have enough to last for a few meals rather than just one.

There's nothing wrong with the pre-made tuna in the store. I imagine many people enjoy it. But what about the people who don't? How many other people prefer the sweeter, creamier tuna you just made? That's your target audience.

Long story short, you could use Unity or Game Maker to make your games. Many people enjoy games produced from those engines. But there are also many people who would prefer a change of pace or just something outside of the norm. You could modify the pre-made tuna you purchased earlier, but you would have to consider the ingredients that have already been added, and if your own ingredients would work or clash with what's already there. It's easier to start from scratch, in this case, because you will know exactly what goes into your tuna (game).

happy.png If that was confusing, I apologize in advance.


A little story:
When the Wii launched I was working at a games company that had a lead programmer who insisted on writing everything in house by the time we had finished writing an cross platform engine to support Wii, DS, XBOX360 and PC (we didn't do PS3), an in house scripting language, in house exporters for MAX and Photoshop, an in house shader language and in house physics engine the Wii was pretty much obsolete and all the publishers had already started to abandon it. The publishers who saw our products said that they were some of the most amazing games in the Genre that they had seen on Wii hardware but that they could not fund because the Wii ship had sailed.
Most of our competitors had used things like Gamebryo, got publishing deals early and shipped games in less than six months. We all got made redundant.

It seems to me that your story proves the value and usefulness of writing your own engines from scratch. Some of the "most amazing games" they've ever seen? Wow! Clearly, the issue was that your team didn't finish fast enough. happy.png I wouldn't write myself off like that just because I didn't make it in time. If the team had, it would've been quite successful!

In any case, I wonder what could lengthen a project to a degree that extreme anyway. I mean, the Wii was popular for quite a long time after it was released in 2006. I think the issue was that the team wasn't focused on the Wii alone (Shouldn't porting come later?).

Advertisement

At a large organizational level, third-party is almost always better unless there's simply no substitute. We have multiple hand-rolled libraries and tools at work, and almost all of them generate huge headaches. The people that wrote them predominantly are all gone, so from a functional level it's little different from a third-party library with no support that we wasted time and money developing.

For home projects and small teams, it's a bit different. By making things yourself, you gain a huge boost to familiarity. So for lighter tasks, it can be massively beneficial to write it yourself. No, that doesn't mean you should go out an implement your own web framework, but if I need something like a noise library, I'm more likely to just write it myself than try to learn the entirety of libnoise and match to its design patterns.

For work I'll use third-party every time. For hipaa compliance, and also because business development doesn't need the most efficient method, we need a working method, and the critical areas refactored.

On my own, I'll use both. For example, I use/like Directx, however, I also like C# more than C++. So I'll opt to use sharpdx because it's just a thin wrapper. Something like Unity, for example, I won't use because it teaches nothing but how to use their tools.

I always prefer to use existing code where possible, and write from scratch when an existing solution cannot be found that works in the required way and is available in suitable licensing/costs. I'm not going to spend forever looking for existing code I can use, but I would rather use an existing code base that does a given task and has a strong backing with a community providing input and testing for the code rather than having to rely purely on in-house testing and work.

If the code is well partitioned then even if I start with an existing library and later find too many issues with it that make rewriting the functionality of it that I need from scratch, then I can at always rewrite it without having a major impact on other sections of the project.

I don't see any of the shame that many groups seem to have with the idea of making use of someone else's code for a project. I don't want to sit there and write code, I want to create software or tools, so anything that gets me to my end product with less coding on my own is a good thing in my books.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

I think almost all coders are "from scratch" types by default -- it goes with the classic personality type, and I'd definitely include myself. However, everyone has their own limit (and yes, I did know someone who'd start projects by starting a new operating system; yes, for real) it's definitely a habit you can get yourself out of if you need to! That said, there's nothing wrong with inventing a rounder wheel if that's what's required for your project or for learning or for fun.

This topic is closed to new replies.

Advertisement