• Advertisement
Sign in to follow this  

Wanting to create my own Game Engine

This topic is 388 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've started to learn how to create my own game engine and truthfully, so far I haven't got far. I was watching some videos on creating a game engine in Java using LWJGL but I decided to switch to C++ instead and I'm a little stuck.

Of course using C++ means I can't use LWJGL so I'm a little confused on what exactly I should use, I've heard about GLFW and SFML and seen some tutorials on both of them but I'm not sure which one I should be learning? I was originally going with GLFW as I noticed it uses the same functions as LWJGL but I've heard a lot of good things about SFML and how it also includes features for Sound, Networking, Fonts and some more.

I am actually wanting to create a game with my game engine while I work on it so I was wondering if someone could recommend what I should use? 

SFML seems to have far more tutorials online and people seem to be using it more then GLFW

Share this post


Link to post
Share on other sites
Advertisement

Why did you switch languages?

The best way to learn how to make an engine is to write a bunch of games, reusing as much as you can from the last game in the next. To that end I'd suggest you focus on making the game rather than the engine, because otherwise you'll wander off on ridiculous tangents that you'll never actually really need.

Well I've made games before within the Unity and Unreal Engine, I just wanted to learn how to make a game engine as it's something new.

Edited by codelyoko373

Share this post


Link to post
Share on other sites

Since the goal is education it really doesn't matter what you use.  You've heard good things about three systems. Use whatever one you want more education about.

Share this post


Link to post
Share on other sites

The best is to write an engine the same time writing a game, working only on what the game needs and not work on lot of features which ends to nothing.
But then if it's only a research, it's never bad to experiments everytime new things.

Edited by Alundra

Share this post


Link to post
Share on other sites

The best is to write an engine the same time writing a game, working only on what the game needs and not work on lot of features which ends to nothing.
But then if it's only a research, it's never bad to experiments everytime new things.

Well that's exactly what I want to do, work on a game while working on the engine.


Since the goal is education it really doesn't matter what you use.  You've heard good things about three systems. Use whatever one you want more education about.

I'm quite interested in GLFW so I'll use that though for features such as audio and stuff, what other libraries would I need?

I know LWJGL uses something called OpenAL for Audio

Share this post


Link to post
Share on other sites

 

The best is to write an engine the same time writing a game, working only on what the game needs and not work on lot of features which ends to nothing.
But then if it's only a research, it's never bad to experiments everytime new things.

Well that's exactly what I want to do, work on a game while working on the engine.


Since the goal is education it really doesn't matter what you use.  You've heard good things about three systems. Use whatever one you want more education about.

I'm quite interested in GLFW so I'll use that though for features such as audio and stuff, what other libraries would I need?

I know LWJGL uses something called OpenAL for Audio

 

 

GLFW does not support audio, GLFW is a window and opengl context creation/handling library, you'd either have to use a separate library for audio, or utilize OpenAL (the audio equivalent of opengl)

On another note, as someone who is also working on a game engine, the rabbit hole goes much further than you might anticipate. While I won't discourage you from this path, I would recommend that you keep your eyes on the goal, don't get too distracted by the enticing prospect of having your own fancy game engine, there's no shame in using someone else's engine to create something fun to play.

Share this post


Link to post
Share on other sites

Half of the entire point of writing a game engine is that you actually write it.  Forget about GLFW and friends and use Vulkan and/or Direct3D 11/12.
Use OpenAL for audio.

If all you are planning to do is cobble together a bunch of premade parts, then you haven't actually made anything and you have certainly learned absolutely nothing.  Making an engine means getting into the nitty-gritty.

You might end up using smaller libraries such as FreeImage to load image files because loading images is not part of the learning process, but if you want to learn graphics then you need to use Vulkan/Metal/Direct3D 12.  If you want to learn audio then you need to use OpenAL.  If you want to learn physics then you write a physics engine from scratch.  Want to learn networking?  Write it from scratch.

Asking for a bunch of libraries defeats the whole purpose of writing an engine.  And as mentioned above you need to have made games before in order to have a good idea as to how an engine should be structured and what it should do, but you are also allowed to make mistakes and start on a new engine later down the line once you have more experience, so don't be afraid to jump in.


L. Spiro

Edited by L. Spiro

Share this post


Link to post
Share on other sites

 

Forget about GLFW and friends and use Vulkan and/or Direct3D 11/12.
Use OpenAL for audio.

 

GLFW only provides window creation (Vulkan and OpenGL support) and callbacks for it (for each major platform). The only other option is writing each backend for each platform (write with Xlib for Linux, wgl for Windows, Cocoa for Mac) and writting loading libraries for OpenGL (if OP uses OpenGL), which I feel like something really out of scope and a big amount of work for a beginner to start seeing minimal results.

 

With exception of SFML, all other libraries are barebones, so I don't think they defeat the purpose of writing an engine.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement