2

I was wondering why today programmers place so much emphasis on API like DirectX, and even OpenGl. As far as I know, you'd need thousands of lines of code to make a simple 3D game using one of the aforementioned. But with game engines like Unity, the process is simplified and you can pretty much drag around shapes to create the graphics in lieu of programming it. So what I wanted to know: why is knowing APIs DirectX more preferable than being knowledgeable in Unity, other than the fact that with an API you can code it to be portable on other systems. To me it's like choosing Assembly over a high level language like C. Sure, with assembly I'll really understand what's happening at machine level, but it's take a lot longer to write programs using it and it would be a lot harder to debug.

83457
  • 137
  • 2
  • 2
    I think you have an assumption that every game can and/or should be made in Unity (or similar). Perhaps thinking about why this assumption might not be true will also answer your question. – Chewy Gumball Jul 26 '14 at 22:22
  • 3
    related: what is the point in using bicycles when there are cars? and what is the point of living if we all are going to die eventually? –  Jul 27 '14 at 06:56
  • @Chewy Gumball I doubt most console games like COD, SKYRIM, AC are made in something like OpenGl or DirectX alone. I'm 100% they'll use a game engine for a lot of it – 83457 Sep 03 '14 at 21:13
  • @83457 Indeed, many games, especially large games, do use an engine. – Chewy Gumball Sep 07 '14 at 04:53
  • If I use an engine, it's not really my game. It's Unity's. I also don't fancy paying £5000 to remove their bad looking logo from my otherwise beautiful loading screen. – Lucien Feb 12 '16 at 22:37
  • @Lolums - Exactly how is it not really your game? Why do you want to spend most of your time re-inventing the wheel? Using a game engine like Unity simply gives you more time to spend working on more creative aspects of game development. A game engine is just a tool. Your comment is like saying because you bought the wood, nails, saw, concrete and whatnot to build your custom home, then it is not really your home. After all, you didn't chop down the trees for the wood and dig the sand and limestone from the quarry yourself. – Dunk Feb 12 '16 at 22:59
  • @Dunk, I'd feel as if I'm dragging boxes about on a display. With your example: what's the point of building a home if you can buy an existing one? Digging up the limestone is more like kernel level work, isn't it? OpenGL covers a lot of low down stuff for you whilst still giving you as much control as you need over your game. OpenGL = your raw materials, Unity = using a crane to assemble your house, using a few ready made walls and a ready made roof. – Lucien Feb 12 '16 at 23:26
  • 1
    It's more fun :3 – BiiX Feb 13 '16 at 19:42
  • @Lolums - If you think Unity is little more than dragging boxes then you don't know Unity at all. Unity certainly isn't using "ready made walls", although it gives you the option to do so in order to get something running sooner. I'll meet you halfway with materials and equate Unity to using pre-cut lumber. I'm not saying don't play around with creating your own engine, because it is a learning experience. But if you are learning to write your own games and you decide to bypass using an existing game engine then it is nearly a guarantee that you'll never get a game running. – Dunk Feb 16 '16 at 16:26
  • The work of creating a game is not in writing code to do collision detection, getting meshes to display, simulating gravity, light modelling or showing a skybox. The work is figuring out how to get your models to do what you want and getting it all to look good and be fun at the same time. Unity (and similar engines) just removes the need of having to do the grunt work from you. You still have to write the program that makes YOUR GAME fun. That is the hard part. That is the part that makes the game YOURS. – Dunk Feb 16 '16 at 16:32
  • @Dunk, you seem to be focused entirely on results, which isn't particularly a bad thing. However, try heading over to Java Gaming (.org), where many Java/LWJGL (OpenGL) games have been successfully published and delivering your guarantee to them; they would not be amused. – Lucien Feb 16 '16 at 17:00
  • @Lolums - You are right, I shouldn't have put that statement as I was thinking of people new to game development when I wrote it, but that isn't really part of the context of the discussion:( However, I'd be willing to bet that most people who are creating games via "Java Gaming.org" are simply copying and pasting code from the site. If that is true then I don't think the "your game" claim that you made holds water, which is really what I am disagreeing with. Just because you are using a productivity tool, doesn't mean you didn't create the end product and it isn't "yours". – Dunk Feb 16 '16 at 17:26
  • @Dunk, it's one of the only respectable forums. The members are legitimate game developers. A game made in Java/LWJGL is yours and there's no doubt about it. My argument (partly) was that if a Unity/Unreal/whatever game is truly yours then why do you have to pay thousands to remove their logo from your loading screen, for instance? Nevertheless, since we know one anothers' view points, it is time to end this. – Lucien Feb 16 '16 at 17:36

4 Answers4

3

Using your own analogy: Why did people make COBOL? Why did people make C++ if C was around? Why did they make PHP? Why did they make Python? Ignoring the fact that some of those implementations are written in C themselves, this is the same thing.

Some people want to make their own languages for new purposes and to do that you need to start with the graphics APIs. Other people want to learn how they work -- similar to implementing your own C compiler.

In some cases it's a personal case of NIH: "My engine will be better than Unity's!". In other it's appropriateness -- building a 2d game like Monkey Island in Unity3D is probably more difficult than rolling your own simple engine. And finally you need to remember that Unity is a very large API to build upon with a lot of functionality. It's a lot of effort to learn it all, and some people feel that effort is better spent making their own simpler engine.

Pod
  • 243
  • 2
  • 10
2

I can speak only for my self, but I implement my engine for sake of implementing it. It is fun for me. Plus the time spent learning an engine is roughly equal to implementing it yourself.
It also gives you absolute control over the engine and you can specialize it for your task more easily (you would have to read pretty much everything about an engine, read and understand all code to be able alter it).

wondra
  • 4,920
  • 1
  • 22
  • 36
  • 1
    I would note that the time spent doing one versus the other depends on your partiular skills and focus. For me, implementing anything 3d would take an order of magnitude longer than using and learning unity, at least, and i'd be spending much of my time looking up people's explinations of how stuff works and translating their algorythms into my code without realy understanding much of the dep math behind them. – Weaver Jul 27 '14 at 02:51
  • To be precise, there is different learning curve. It is relatively easy to start using an engine, but it is very hard to master it because it requires deep knowledge of the engine. On the other hand, if you implemented the engine (slower at beginning) you already have that knowledge (faster later). – wondra Jul 27 '14 at 11:52
2

Sometimes for compactness a self-made engine ( Despite thousands of lines of code ) can be more compact than a pre-made engine due to the fact that unused features can be removed.

Also keep in mind that if you write your own engine from scratch, you'll know all the ins and outs of it. If you ever want to add a feature or change something, you can!

Some engines can also be very restrictive of what you can do with them or even if you can publish it for money.

The best part about creating your own engine is the knowledge that you can look back on a game and say made it 100% yourself.

MineMan287
  • 35
  • 8
1

cf.

What is the point in designing your own car (e.g. to take part in an F1 race) if there are existing car manufacturers who will sell you cars that already work?

I looked over some other answers here and in the proposed dupe questions and one point not really being championed is that creating your own system affords you more technical (and, as a consequence, creative) control.

The car analogy falls well short because cars are all hardware plus the user, here we're talking about middleware software. Which is just a part of the software. Which usually has to accommodate combinatorial variations of hardware, as well as completely unskilled users.

Anyway, the point is that ABC game engine, no matter how attractive its feature set, was not designed with you in mind. For example, an Unreal engine was designed with an Unreal Tournament game in mind. Unless it is open source, usually you will have no idea how it works.

Of course that may be just fine and dandy, depends on what you're setting out to do.

BTW this is not any sort of a jab at the Unreal engine (the latest iteration of which these days can rightfully be said to be unreal. It's freaking beautiful). Modern engines like Unreal and Unity (and many others) are making huge leaps and bounds toward supporting anything you could realistically expect to build.

The fundamental idea for my answer remains the same and I expect this to be true for a while until paradigms start to shift in game development and computer programming. At the end of the day, writing your own game engine allows you to (in a simple straightforward way) generate machine code which is is not littered with tons of dynamic branches to support dynamic, general capabilities. Call it bloat or call it a feature, this is just how it works.

I envision software middleware in the distant future that has deep compiler integration and we will continue to be able to enhance software optimization capabilities while retaining ease of use for content artists and developers.

Steven Lu
  • 740
  • 1
  • 8
  • 22