Ask HN: Game programming – engine or from scratch?
I’ve be writing software for decades. I’m comfortable translating most an algorithm into several programming languages. I’m ready to start building The Awesomest Game Ever (well, in my mind it will be…) 3D, first person, destructible geometry …
My questions for you fine folks: build from scratch or use a game engine? Is having to learn a game engine going to be faster than starting from the ground up? I think I’d enjoy the experience of implementing all those algorithms, but I’d like to start sharing the fruits of my labor some time this summer.
Please feel free to also recommend papers, books, blogs about algorithms or game engines or any topic you think a programmer-turned-indie-game-dev might need to make a go at this crazy idea.
Thank you, HN!
6 comments
[ 2.6 ms ] story [ 31.4 ms ] threadFind out what you really want to build and find out what you can ditch or reuse so you can spend more time on what you’d actually enjoy doing. If you want to build a game engine, consider scoping your game so you spend more time on writing the engine and less on story, mechanics, balancing, etc. On the other hand if you just want to worry about the player’s experience then I’d suggest using an existing engine. But you can also decide to extend the deadline and go crazy on building on your own engine with the kind of gameplay and lore you’d want.
Writing your own engine for your game means your game will take a lot longer to create. That's not necessarily bad. You might enjoy the process, revel in the things you will learn. If you want to make your game, and focus solely on why it will be "The Most Awesome Game Ever", you may get frustrated seeing little movement in development because you're too busy trying to get the engine to work.
https://www.youtube.com/user/handmadeheroarchive
If you want to build a game but start with an engine you'll probably never ship, especially if its your first.
Yes, pretty much by definition, since a game engine saves you the time of writing an engine. ;)
Unity[0] and Game Maker[1] both come with tutorials which will show you how to build a basic game quickly. Game Maker uses its own properietary scripting language called GML, and Unity lets you do scripting in Javascript, C++, and Boo, which is basically Python. Also, attempts are being made to integrate Clojure support in Unity as well[2]
On the other hand, if you like actually writing the code, there's a good chance there's a low-level framework (like SDL[3] for C++) which will let you code, but still take care of some of the hassle of cross-platform support and graphics. I've only played around* with SDL and C++ but there are quite a few tutorials for it.
Also worth mentioning is Construct2[4], a game engine for html5/js. It is possible to do 3d rendering in javascript/html5[5], but as far as I know, only Chrome supports it well. Last I checked you have to change the config settings in firefox to allow opengl rendering to work and I just assume IE doesn't support it by default.
If you want to work with 3D and want to get something done then Unity might be a good idea, although of course you're going to need good models, etc. Game Maker supports 3d but it's primarily for 2d.
[0] http://unity3d.com/
[1] https://www.yoyogames.com/studio
[2] https://www.youtube.com/watch?v=tJr_TD1BtF0
[3] https://www.libsdl.org/download-2.0.php
[4] https://www.scirra.com/construct2
[5] http://www.ambiera.com/copperlicht/
*I've got some of the basics for Space Invaders done, and it's taken a while, after getting bogged down with creating a spritesheet manager and an entity component system, but I have a thing and it shoots bullets, and that's nice. John Carmack won't be taking my calls anytime soon.
If your game requires some special features (for example, creating minecraft withing unity/unreal isn't a good idea), requires performance unattainable by existing engines (you can optimize code just for your cases).
This is a classic build vs buy choice.