2

I want to make a fancy 3D game for an assignment. Would it make sense to separate the game content completely from the engine? The way I imagined it, there would be a game folder with all the content in it (textures, shaders, scenes, scripts etc...) and the engine would "load" this folder, construct the scene and run the game. I was even thinking of using a lightweight scripting language for the game logic, like javascript, so I don't have to make an api and compile DLLs, and the engine (written in c++) would communicate with these scripts.

Is this a good design, or should I just put everything in one project so both the engine and the game logic compile to a single exe?

Comments
  • 1
    Sorry if this is a dumb question. I'm still a noob at game development.
  • 0
    What problem are you trying to solve?
    What are the benefits?
    What are the drawbacks?

    Clean code and clean projects are nice, but for games performant code is always better.
  • 1
    @Root I think the biggest benefit of this approach would be reusability. The engine would work like Unity or Unreal where everything is already pre-made and all I need to do is to provide the textures and the scripts. Also it would be easy to create multiple games with the engine.
  • 0
    This is for an assignment? What's the timeframe? Because what you described would be a huge hassle to do depending on what your plan is... From the post it sounds like you want to make your own engine instead of using an existing one, and if that's the case Im almost certain you wont be able to write all that in any reasonably short time as engines quickly turn finicky, not to mention one very smart quote I remember is "don't write engines, write games"... That essentially means that an "engine" is rarely something you set out to do if you're making an actual game too... Engines usually evolve from the game you're making as you start noticing and abstracting patterns... It is usually recommended to use an existing engine if you want to make an actual game instead of just learning about engines
  • 1
    @Hazarth The thing is, this course itself is about making game engines, so using an existing one would be cheating. I have until the end of the semester to complete it (somwhere in december).
  • 1
    @SparkyTD so you're probably talking 2D only until December going 3D would be utter madness, unless it would be suuuper basic.
    You can have a project folder with the assets and scripts and you would just load these, but that either assumes everything in the folder is useful or you have to create unitylike .meta files. A better alternative would to define some kind of entry point for the scripts to start from and load resources manually there.If you want to go the scripting language route, bare in mind you have to implement all your engine functions for it and some kind of interpreter/language-runtime. For such a short term project you should rather create a c++ engine which you then extend to become a game in c++, creating some kind of scripting runtime for this is really overkill.
  • 0
    If it's supposed to be finished relatively soon do NOT use C++. If you want to make a half decent 3d engine relatively quickly use Java or C# whatever you are more familiar with. Do note that learning OpenGL (which I assume you don't have experience with?) can be a bitch and takes quite some time... For me it took probably half a year to a full year to properly get into it
  • 2
    @12bitfloat I wish I could use C#... The requirements are C++, OpenGL, SDL and no third party engines.
  • 2
    @SparkyTD Oh, well that sucks. Make sure to don't go overboard then because game engines are a black hole for time
  • 0
    Never go overboard with assigments.
    I can ruin your life.

    Be lazy.
Add Comment