shubla wrote:Benefit is simply that you can make more, with less.
Supposedly so, at least. Every piece of external code is a cost and a liability, though, and especially so for something so complex and loosely defined as a game engine. Whenever you're using an external library, constant and fixed costs include having to learn the library itself (which can be a huge task in and of itself, especially for complex things like game engines); having to adapt all your constructs and structures to the precedents established by that library and basically having to think in its terms; always having to adapt your needs to the library, rather than the other way around; and, of course, having to ship and deliver the libraries with your program in some reasonable manner. There are also very real risks, including, but not limited to, the library not doing something you need it to do, in which case you may well be stuck; or encountering a bug in the library that you are the only one to encounter and which the developers aren't interesting in solving; or a future update breaking something crucially central to your code.
That's not to say that all libraries are worthless, of course, but in order to be worth using, the benefits they bring can't be trivial. I too use libraries, of course, but I tend to be more comfortable around libraries that do a very constrained and well-defined task. Examples of external software I use include libraries and programs like GnuTLS, BSDDB, LLVM, the Python Image Library, Jogg/Jorbis, and, of course, GCC, JOGL and Java. (In that list, it is somewhat interesting to note that JOGL is among the libraries that have given me the most amount of trouble; there are surprisingly many bugs in JOGL that are simply being triggered in slightly unusual environments. Somewhat surprising, since one might imagine JOGL doing a very limited and well-defined function in just wrapping OpenGL calls.) Other things I've tended to avoid are pre-packaged web frameworks.
All that being said, I don't really intend to be overly negative in using game engines – if the idea of really learning to program appalls you and you really just want to get that game you have in your head into the real world, I'm sure they can provide shortcuts. Just know that those shortcuts come with costs, risks and limitations. And also that, to the extent that it indicates you're just being impatient, you're probably not going to have a good time anyway.
shubla wrote:And maybe loftar wasnt so skilled when he started making HnH, and would do many things differently if he started coding the client from scratch today.
To be sure, my greatest learning journey during the making of Haven/Salem has been that of OpenGL. When I started making the 3D client with Salem, I still basically hadn't even an idea what a GPU really did. It is only relatively recently that I've started to consider myself having a somewhat firm grasp on how modern GPUs "want" to be used through OpenGL (and even with that said, there's a lot that's still unclear to me). For me, one of the things that made OpenGL difficult to learn is the amount of outdated or otherwise incorrect information out there, which makes for a terrible amount of confusion as to how one is supposed to use OpenGL. One of the main things that come to mind is the commonly repeated wisdom that switching textures is expensive – that was certainly true 20 years ago, but it doesn't seem to have been true for a very long time by now. Arguably, reading about Vulkan is a better way to understand modern OpenGL that reading about OpenGL is.
It can be mentioned that, when we first started with Salem, I did strongly consider using a rendering engine instead of writing my own – the one I considered was
JME. I spent quite a while going back and forth, but I ultimately rejected it precisely because I deemed it very opinionated about its rendering model and data structures. While I could certainly see the journey of writing my own rendering engine a long one, I also saw all the frustrations I was going to go through maltreating and beating up JME in order to make it do what I wanted it to do (Java is enough of that as it is).
shubla wrote:With some decent game engine such as Unity, HnH would be better optimized without a doubt.
Perhaps, but another very real possibility is that it would simply not have existed at all that way. And, on the contrary, if you're doing something which causes performance problems in Unity,
good luck trying to trace down why that happens and how to fix it.
NOOBY93 wrote:basically asking, what does NOT using a pre-packaged engine even bring to the table?
To summarize the above: It avoids the frustration of a pre-packaged engine not doing what you want it to do and being bound to its world-view.