Write a Game Engine? - WHY and HOW.

preview_player
Показать описание
Should you write your own game engine?
And how do you even write one?

I never quite understood why some game developers write their own game engines nowadays. A couple of days ago that changed, because I got to talk to Travis Vroman, who has written multiple game engines for his company and I got to ask him some of my most pressing questions:

0:47 Why should you write your own game engine?
4:39 Why shouldn't you?
9:48 How long does it take to write a game engine? What takes the most time?
12:45 What's the hardest part about writing a game engine?
14:04 Who should write their own game engine? Who shouldn't?
15:48 How does the process of writing an entire game engine look like? Where do you even start?
20:40 Where can you learn how to write a working game engine?
21:36 Which tools and which programming language should you use?

I got some pretty fascinating answers and I feel like I understand this subject a lot better now.

Make sure to check out Travis channel:
He makes daily videos about game development.
Рекомендации по теме
Комментарии
Автор

"To make a pie, you first have to make the universe"

tiger-bee
Автор

Real men create the CPU, instruction set and higher level language first.

boots
Автор

it is so much fun to write your own engine, including all the learning about how it all works, i learned so much about 3d programming and understand how and why certain elements in other engines run slow.

Silentsouls
Автор

Jonas, thank you for this collaboration! It was really a neat experience, and I'm glad I could be a part of it. The video turned out awesome!

Edit: Holy cow, I can't believe it's already been over 2 years since this was made!

TravisVroman
Автор

Personally I respect anyone who makes their own tools/engines..
however if you are going to build a house do you first build a hammer or do you use one that someone much better at making hammers has made for you..?

REAL-NANO
Автор

If you just want to get a game made then writing a game engine is the last thing you should be doing. But if, like me, you are even remotely interested in how game engines work then I seriously recommend you at least give it a try. What I've learned is invaluable and because I'm interested in the field anyway I find it hugely rewarding.


If you do decide to write your own engine, then having a game or genre in mind will help keep you on track and focus your priorities. But he's right in that you need to think of building the engine as a very different process from building the game. And I would argue that building the tools is another process in itself: and unless you want to hand code the entire game, then you'll need some tools. But obviously it depends what you're core motivation is.


So I think it's doable to build an engine for a specific game you want to make, just be prepared to spend exponentially longer on it than you would using an already existing editor.


Hardest part? Probably collision detection if you ask me. It's arguably the hardest part of writing a physics engine (I skipped joints) and if you're game doesn't support physics, you'll still probably want to know when two objects are in contact. There still isn't really an elegant solution to this problem either, and it's typically the buggiest part of any game, even when there's been loads of polish. I am of course talking in respect to a 3D game engine, 2D is obviously a lot simpler.


I've never had a problem staying motivated, my problem is with work/life balance and physical burnout. But I've always been fascinated by the technology behind games, so even though I also want to design games, I'm fulfilling another passion in creating my own engine. We've all heard this a million times before but the key is to pursue the things you are most your most interested in and/or passionate about.

hayabusax
Автор

I remember a friend and I wanted to try to design an operating system for a computer from scratch. We opened up information on current operating engines along with some tutorials and we soon realized why there are basically only 3 operating systems. Shit is fucking impossible, saying that now.

lumps
Автор

I made my own game engine years ago just for fun and to see if I could and it worked great.

PatrickMcMahon
Автор

Compromise: Use an opensource engine and adjust it to your needs.

MrAntiKnowledge
Автор

"What can go wrong"
Bethesda

mousely
Автор

He knows his stuff! My experience: If you just want to make a game, do not write your own game engine. It is a massive time sink, but is a good learning experience for an advanced and dedicated software engineer. I wrote a few game engines for prototype games in java using libgdx and c# using monogame (libgdx and monogame are cross platform boilerplate code libraries). I did this for educational/job reasons, and have years of software engineer experience, but wanted to improve and learn. Each engine took months to years, very proprietary, some bugs were insane to fix, my engines were beyond barebones compared to unity. Hope my experience helps some people.

Woodythehobo
Автор

I accidentally attempted to develop a 2d game engine with python and thought "why am I making a collision editor for a map? where's the game?" then I stopped.
I accidentally attempted to develop a 3d wireframe renderer with a spinning cube in c# and winforms and thought "why am I making a terribly performing 3d renderer? why am I reinventing the wheel?" the I stopped.

That was years ago in my college, I still don't know any game engines and I can say I learned a lot with just doing those things. Now that I have more dev experience, my next attempt (if ever) might be different.

paulwhiterabbit
Автор

Had to develop a game engine for a company. The requirements were.
1. 2D
2. .NET
3. Our distrubutiion system only allowed for .dll to be used.
4. Windows XP (only capatible with .NET 3.5)
5. WPF integration
6. Small. < 10mb

first i wrote simple cpu multitreaded blitting. Performance was subpar.

second i attemped an OpenGL C++ dll interoperating with C#. Great performance. Crashed on XP.


Lessons learned? Unless you're fairly confident working in a low level API; Don't write your own engine. Especially if your boss is breathing down your neck expecting a release within a week.

Cyberfoxxy
Автор

"Most people don't write their own physics engines these days"
Me, studying vector calculus:

dimitrishideaway
Автор

It's easier to be a critic than a creator-

critterpower
Автор

I also have 2 reasons for doing all of this:
1. I love retro games (megaman x, sonic the hedgehog). As a way to start, id like to recreate them.

2. Some engines i used often lack some features that i want to use on my game. My idea is to basically replicate the engines (or create a new one) then i would add in the features.

Anywasys. Thanks for answering the questions

carrot
Автор

This is one of the most complete videos I found about the topic.
Thanks :D

sushidev
Автор

i"m currently writing a game engine and it's fun ^^

Akab
Автор

I've never not wrote my own engine
i've also never finished a game... so theres that
i usually hit a road block and have to come back after i learn more

RunslikWind
Автор

It's only been a year since I started learning C++ (I had some basis in C before that but it wasn't much, I couldn't even use pointers correctly). I was a few months in when I started making my own game engine and I would say it was invaluable learning wise.
In only a year doing it in my spare time, I'm coming closer and closer to mastering the language by the day. Doing it is also pushing me to do things and learn to do things as professionally as possible.
But apart from doing it because I love it and I'm learning through it, I've started doing it because I had needs for a game engine that just wouldn't make it worth it using an already built one. The most important ones being a need for a very advanced color system and how the game is displayed.
In doing the game engine however, one of the most surprising thing I did not anticipate is the colossal amount of time I needed to do things totally unrelated to programming such as learning color theory and color spaces for weeks or learning tons of math.
Longer term use for making a game engine for me is to be able to produce games very quickly for myself and for others which could make enough publicity to sell licenses for the engine once it is made really easy to use.

Zatmos