
Create your own game engine but don't use it (2017) - majikarp
https://www.zeroequalsfalse.press/2017/07/12/engine/
======
seba_dos1
I started in 2012 by making a 2D game as a university assignment using Allegro
5. Some time later, when I started game jamming, I decided to reuse some of
its code. After a few games done this way I've separated the common code into
an engine.

Now I'm at 36 games made with it, and I even have proper CI and containerized
toolchains for cross-compiling on GNU/Linux for Windows, macOS, GNU/Linux
(using either Steam Runtime or Flatpak), Android, Maemo 5 (Nokia N900), PureOS
(Librem 5), Emscripten (asm.js/WebAssembly) and Steam Link. The engine also
works fine on Raspberry Pi and FreeBSD (there's just no toolchains yet), and
I'm looking forward to port it to iOS, DragonBox Pyra, Sailfish, Nintendo
Switch and UWP (Windows 10/Xbox One), neither of which should be hard, I just
need some time and/or devices. The only significant platform that would need
some larger effort that I identified is Playstation.

Some of this stuff wouldn't be possible at all when using Unity or Unreal, or
would have been much harder when using Godot.

Having said that, I probably wouldn't start writing a full-blown 3D engine if
writing a 3D engine wasn't actually my end goal.

BTW. This "Lonely Cube" game could be easily written in a simple 2D engine
using perspective transformations ;)

~~~
babuskov
> The only significant platform that would need some larger effort that I
> identified is Playstation.

Is that a technical issue or just conditions you have to satisfy to get a
development environment up and running?

~~~
seba_dos1
All the other platforms I listed are already supported either by Allegro or
SDL (which I can also use via Allegro's SDL backend), while it doesn't seem to
be a case with PS4. Also, so far I've used GLSL and relied on Allegro's OpenGL
(ES) renderer. In case of UWP I can use ANGLE, but PS4 seems to require more
effort there (most likely renderer implementation and separate shaders).
Nothing impossible, but it moves it out of "I'll eventually do it when bored"
status to "I'll only do it when there's strong business case behind it".

------
krapp
Ah yes.

I think I started my "game engine" as such a few years ago when I got
interested in ECS and SDL and wanted to see what it would take to make a
"simple game." It's been a constant, almost pathological, cycle of deletion,
fence-painting and restarts. Fun, and educational, but I've come to terms with
it likely never leading to anything productive.

But, even if it goes nowhere, it can be liberating to work outside the
constraints of a framework, in a "chop wood, fetch water" kind of way.

~~~
vvanders
The saying goes: "Teach a man to use a game engine and he'll ship a game,
teach a man to build a game engine and he'll never ship anything".

That said they sure are fun to build.

------
babuskov
Don't take the title too literally. The article talks about full featured 3D
engine which took them year to build and it was still lacking features.

For 2D engine, it's actually a couple of weeks to build one. I have built my
own in 2013 and have released 4 games using it so far, two of which were very
successful:

1\. [http://sonofawitchgame.com/](http://sonofawitchgame.com/)

2\.
[https://store.steampowered.com/app/949790/Rogue_Bit/](https://store.steampowered.com/app/949790/Rogue_Bit/)

~~~
skidd0
What resources did you use to guide the creation of your engine?

~~~
babuskov
I read a bunch of articles on game loops and other more general C++ stuff like
design patterns, memory management, etc. It's just knowledge I picked up over
the years while programming general software (mostly desktop applications), so
it's hard to pin-point any specific resource.

For some particular game related tasks on top of the base engine, I found
[https://www.redblobgames.com/](https://www.redblobgames.com/) very useful.

------
johnisgood
I did not read the post, but the title reminded me of "Limit Theory". People
have been waiting years for him to release the game, then in September he said
he would release the source code, but sadly nothing happened ever since. I
hope we will not have to wait years for that, too.

That being said, the game already looks amazing as it is, the graphics are
phenomenal. I am pretty sure people would be willing to pick it up after he
open sources it.

As far as I can tell, everything is written from scratch, in C++.

[http://ltheory.com](http://ltheory.com)

[https://www.kickstarter.com/projects/joshparnell/limit-
theor...](https://www.kickstarter.com/projects/joshparnell/limit-theory-an-
infinite-procedural-space-game/posts/2270873)

~~~
KaoruAoiShiho
He was making Star Citizen but with $187,000 instead of $400 million and 1 guy
instead of 500.

~~~
johnisgood
I know. He has done a great job considering those facts. I do not know if you
followed the reports, but it seemed to me that he has been obsessing over
minor details. His inability to make decisions, and his depression probably
contributed to the outcome we are seeing now. Still, he promised to release
the source code, and I wonder what is taking so long. Is he trying to polish
it up and ending up with the same kind of indecisiveness and problems he had
before? I hope not.

~~~
KaoruAoiShiho
He probably thinks there is stuff that can be done to make the source code
actually usable for people. However that stuff is causing him anguish in his
current mentality, leading to procrastination and unwillingness to actually
accomplish things.

The screenshots are pretty though and he's obviously talented. Things would
probably be completely different if he had a steve jobs-esque figure to guide
him. There's a lot of consternation on HN over business guys trying to find a
tech co-founder but in this case we have a reverse. What a shame. Ultimately I
see this as a logistical problem in society, our inability to pair people up
effectively.

~~~
johnisgood
Yeah, he is definitely talented and it is a shame that it ended up this way. I
hope he will release the source code (if he really wants to do so) as soon as
possible so other people can pick it up and potentially finish it for him.

------
boardwaalk
I think there's a difference between "creating your own game engine and then
building a game in it" and "creating your own game without a game engine."

The former is much less focused and you're much more likely to build things
that are not exactly what you need, more general than you need, or just
because it's some feature a game engine usually has.

------
ggambetta
As a counterpoint, I wrote a game engine, and proceeded to release 18 games
over 9 years using it exclusively
([http://www.mysterystudio.com](http://www.mysterystudio.com))

I wrote a SDL based software renderer for the first game, then extracted some
reusable code for the second game, and just keep using it and adding stuff.

It started as a Linux/Windows SDL thing. Later became OpenGL/DirectX. Then
came Mac support. Near the end I added iOS and Android backends.

It was good fun. I'd probably not do it again today.

------
petermcneeley
Mike Acton has some pretty common sense views on this:
[https://youtu.be/qWJpI2adCcs?t=2796](https://youtu.be/qWJpI2adCcs?t=2796)

Basically if your making your own game engine then use the context in which
you are working. If you are going to end up with something generic like Unity
maybe you should just use something like Unity from the start.

------
avmich
"Create your own software X but don't use it".

The reasons provided - actually, one reason - is that whenever you need
another feature (the second reason provided is the ability to run on another
platform) it's easier to just use whatever is there already in the existing
software rather than making that feature yourself.

This is a pretty general problem of writing your own parts or taking external
pieces, often called "dependencies".

There are problems (and benefits) with those external pieces, not mentioned in
the article - cost of learning (vs. cost of creating), cost of bugs (you
usually know bugs in your code better), ability to fix bugs (sometimes
external teams take forever to do that...), weight of features which you don't
need but which exist anyway in the external software (that code takes space,
time and sometimes require you to work with that a certain way when you'd
maybe prefer another)...

I fully agree that educational value of creating such a system from scratch is
quite significant though.

------
polytronic
I started development of my own 3D-graphics engine in 2005 as I wanted to
create a 'simple' 3D modeller, refusing to learn the industry packages. My
first prototype was able to create convex hull meshes over half-edge geometry.
Then another revision, starting from scratch, to implement a scene-graph.
Another revision for undo-redo functionality and I was sitting already atop
40k loc. 14 years and 12 revisions later have turned my pet-project into a
full blown 3D graphics package I am quite proud of. Development has slowed
down ever since I became a father but the lesson learned is that developing a
3D-graphics engine (and a game engine ie logic later on) leaves no techique
stone unturned. Would I do it again? Certainly, if one would rewind my age
back to the day I was as h0rny as 10 apes together ;-)

------
kiba
Tangentially related, is there an open source game engine that's recommended
for building games?

My experience in game development pretty much amount to an incomplete
multiplayer tetris game.

~~~
Bernard_sha_256
I've heard good things about Godot, MIT license written in Go I think.

I've seen it's praises on HN, but I'm not a game dev so YMMV.

~~~
slezyr
> written in Go

In C++ and their python-like language with bindings to other languages.

------
edoo
Cross compatibility is a poor excuse to not use your own engine. You can use
cross platform libs that give you exactly what you need, for example SDL for
basic graphics or QT if you want GUI support.

------
mcphage
Sadly, their game doesn’t seem to be available in my region on iOS.

~~~
nottorp
Same here - Why would you region restrict a game and give up on sales?

~~~
krapp
It's usually to prevent consumers from one region buying it more cheaply in
another region.

There may also be issues of asset rights, censorship and copyright involved.

~~~
nottorp
Uh, what stops you from setting the same price in all regions?

~~~
krapp
If I had to guess, differences in currency value and return on investment in
different markets, to get as much value out of each region as possible, while
limiting the effect of trade between markets to drive prices down.

~~~
nottorp
Note that we're talking about the iOS app store here, not physical goods...
kinda hard to trade app store purchases between regions isn't it?

------
sabret00the
I went to Blind Mystics and the website doesn't work.

~~~
majikarp
Works for me - [https://www.blindmystics.com/](https://www.blindmystics.com/)

~~~
sabret00the
It's just a spinning ball for me.

------
bluedino
Also rings true in “create your own php/JavaScript/python framework but don’t
use it”

~~~
cardiffspaceman
Or compiler, or interpreter, or crypto library...

