Hacker News new | comments | ask | show | jobs | submit login
Create your own game engine but don't use it (2017) (zeroequalsfalse.press)
51 points by majikarp 7 days ago | hide | past | web | favorite | 40 comments





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 ;)


> 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?


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".

Anything opensourced from it?

Everything, although nothing really documented, so I don't really advice using it just yet if you're not me ;)

It's GPL, but I plan to change it to LGPL once I declare it stable and documented enough.

https://gitlab.com/dosowisko.net/libsuperderpy/

Games live here: https://dos.itch.io/ (or more specifically, https://itch.io/c/195242/libsuperderpy-engine). Most are small game jam things, but recently I've been working on bigger ones as well.


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.


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.


This is how I feel about my overscoped personal project as well. It'll never be done or turn into anything useful, but it's liberating and exciting to work on outside of the deadlines and scoping requirements of my day job (which actually involves working on a game engine).

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/

2. https://store.steampowered.com/app/949790/Rogue_Bit/


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

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/ very useful.


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

https://www.kickstarter.com/projects/joshparnell/limit-theor...


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

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.

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.


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.

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.


As a counterpoint, I wrote a game engine, and proceeded to release 18 games over 9 years using it exclusively (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.


Mike Acton has some pretty common sense views on this: 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.


"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.


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 ;-)

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.


Hard to beat Löve2D! https://love2d.org/

Came here to say the same! I'm a C++ programmer by day, but I love the speed at which I can bang out a prototype in Love2D (Lua).

I found kikito's[1] bump, gamera, and anim8 libraries to be excellent complements to Love, adding a few of the otherwise missing elements.

[1] https://github.com/kikito/


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.


> written in Go

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


Godot is OK, I really don't like GDScript and as far as I know its 3D support is lackluster. I check the Godot subreddits now and then to look at projects and nothing is really impressive.

In my opinion, if "open source" is a necessity, then Godot currently seems like the leader in terms of community support and maintennance, otherwise I'd suggest going with Unity, even for 2D, and waiting until Godot's featureset matures a bit more.


Why the downvotes? Godot is a perfectly fine engine to start out with. There's a couple other options like: https://xenko.com/ and http://www.monogame.net/ *monogame is actually a Framework so you won't get an editor window or many of the bells and whistles you'd come to expect, but it's quite robust and some popular games have been built with it.

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.

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

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

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.


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

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.

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?

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


It's just a spinning ball for me.

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

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



Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: