Jump to content

  • Log In with Google      Sign In   
  • Create Account

3D full game engine advices


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 SimoHayhaa   Members   -  Reputation: 103

Like
0Likes
Like

Posted 15 November 2013 - 04:23 PM

Hello community !

 

A project was recently launched in my school, it's about creating a full 3d game engine form scratch.

Here is a short pitch :

 

 - It should be cross-platform (for the moment we are targeting only windows (desktop) and linux platform with a Direct3D and OpenGL renderer but the architecture should be well designed in order to add more platform in the future).

 - The less library we use, the better it will be (it's an educational project).

 - It must be a complete game engine, we are thinking about studying multi-threading architecture, physics management, a "easy to use" level editor, scene management, debugging tools, ...

 - When I write this post, we are about 10 students from any level on this project, and we will use Redmine for project management.

 - Also the engine should be used as a base for future students to make their first shaders.

 

We are aware that it's a very big project, and so other students will work on it later.

To give you an idea of our level, we are all 2nd years student in a full time game programming school (C/C++ all the day ! and some C#), the language is not an obstacle, but the general architecture is.

 

For the engine core we are thinking about entity-component system such as Unity (we still have to put a concrete idea about what will be an entity) and should have obvious feature such as AI component, physics, input, scripting, ...

 

So here is my question, as I say earlier, the main problem is the architecture. We are thinking about starting with the threading system and the networking system.

I'm asking for some advises or tips about how designing this kind of project from the beginning.

 

Feel free to ask questions if I forget something or if you need further information.

 

Thank you in advance, and good luck with your games !


Edited by SimoHayhaa, 15 November 2013 - 04:24 PM.


Sponsor:

#2 HappyCoder   Members   -  Reputation: 2887

Like
1Likes
Like

Posted 15 November 2013 - 09:43 PM

That is quite the project. My advice to you is to simplify your project and probably, more importantly, to focus on making a game instead. By simply making an engine you end up not having very clear requirements. Features pop up that sound like a good idea, or would be cool, but may not be that useful for making a game. If you are making a game to go along with your engine you add features to the engine as the game requires it and you build up the engine as you go. Make sure you have milestones setup so you can see progress. You don't want to write a bunch of engine code and try to test it all out at once.

A few things I would do. First of all, don't try and do a multithreaded game engine, expecially if you don't have experience with threading. Multiple threads don't simply speed up any program. It can actually hurt performance in some cases. It takes carful planning to make a good multithreaded system. So I would start by dropping that feature. As for the rest, I think it is a great idea to study how unity is put together. I am not saying it is the perfect example of how to make a game engine but you can learn a lot from it, expecially if many of you don't have much game development experience.

For scene management, develop a scene file format that uses json, or xml, my preference is json. Then make sure the file format is easily editable by hand. Make all of your game object file formats the same way. This way you can start making your games with no level editor. You simply modify these resource files by hand only adding features your game requires. Once you get to this point, you can start working on a level editor. The level editor should simplify editing the game object files in your json format.

My general architecture advice. Make sure you seperate out your classes so each class only does one thing. For example, in your game engine you will have a Mesh class. It should only be responsible for storing mesh information. Don't add a load mesh function to the mesh class, instead have a sperate MeshLoader class that creates Mesh objects from a file. You can even make this an abstract class to let you create different subclasses that can handle loading different file formats, so you could start with loading a simple file format using an OBJMeshLoader, later if you need more than what obj offers, you can create an ColladaMeshLoader or even include a seperate library that already loads existing file formats and you simply create a MeshLoader subclass to handle converting the data so you can use it. These MeshLoader classes may end up being part of ObjectLoader classes, since an fbx file, and other formats, contains more than mesh data. The point to take away from this is by seperating out the functionality, you gain a lot of flexibility.

Avoid singletons. I used to use them quite frequntly but after trying to make a fairly large game project without using any singles I learned two things. You don't need singletons and there are much more elegant solutions that you discover when you don't use them.

Anyway, I don't want to overload you with information here. The main takeaway I want you to get from this is to start simple. You may be in love with certian features or ideas for you engine, but you need to kill your babies or they may end up killing your game project.

#3 SimoHayhaa   Members   -  Reputation: 103

Like
0Likes
Like

Posted 16 November 2013 - 09:11 AM

Thank you for your answer.

 

It's a great idea, I think we could make a simple fps, this should give us the basic features.

 

About the multi-thread, we already have a small experience using them with the famous dining philosophers problem, then later we made a http server using a thread pool system. So maybe for more simplicity we could stay on our main thread at first, then after try to thread our AI system or other systems.

 

I totally agree with you concerning singleton, if we could avoid having to much static classes or variables it would be great.

 

I got the idea, stay simple. We will discuss about it with the group next week anyway.



#4 wintertime   Members   -  Reputation: 1882

Like
0Likes
Like

Posted 16 November 2013 - 10:28 AM

I think its the right way to focus on a game (and not an engine), too.

You probably want to drop even more features, for example making a D3D and a OpenGL renderer is duplicated effort. OpenGL also works on windows and if you concentrate all calls in a few classes its possible to add the other later, but you most likely will want to focus your effort on unique features that add value.

You also should probably not let those people program all low level things like window creation(that is quintupled effort if you want to keep cross-platform), pointer loading(use GLEW), vector/matrix library(just use glm) and so on themself. Better let them use good tools that enable them to actually see something on screen in a week than let them stumble around for years and only have the third generation of students actually see some useful result.



#5 Winfield   Members   -  Reputation: 179

Like
3Likes
Like

Posted 16 November 2013 - 12:01 PM


 - It should be cross-platform (for the moment we are targeting only windows (desktop) and linux platform with a Direct3D and OpenGL renderer but the architecture should be well designed in order to add more platform in the future).
 - The less library we use, the better it will be (it's an educational project).
 - It must be a complete game engine

 

I like how the first three bullet points are, basically, mutually unfeasible. I realize that's a pretty downer thing to say, but unless you're targeting a very low tech level (2003-era graphics) I have trouble believing a team of second-year students is going to be successful. 



#6 HyperV   Members   -  Reputation: 880

Like
0Likes
Like

Posted 16 November 2013 - 01:35 PM

Hi

 

Does it really have to be created in C++? Because i thought the same thing what Winfield said.

Crossplatform , that will be a pain in the ass creating it in C++.

I highly recommend using a crossplatform langauge like Java.

It also reduces that time creating a engine, C++ can't take more time.

 

 

how long is the project length?

if it's more 1 year then it's possible.

if it's 3-5 months i don't believe that that is a project from school.

create a framework instead.

 

 

regards,

HyperV



#7 SimoHayhaa   Members   -  Reputation: 103

Like
0Likes
Like

Posted 16 November 2013 - 01:59 PM

There is no date limit for this project, we will work on it until June, after that, other students will work on it. If they want they can restart from scratch or continuing what we have done already.

 


I like how the first three bullet points are, basically, mutually unfeasible. I realize that's a pretty downer thing to say, but unless you're targeting a very low tech level (2003-era graphics) I have trouble believing a team of second-year students is going to be successful. 

 

I'm aware that this going to be difficult or maybe unfaisable as this is an optional project and we still have to work on our primary projects. But as I said it's a school project, there is no money or time to loose. We want to make it for the experience.

 


I highly recommend using a crossplatform langauge like Java.

 

We don't have the choice of the langage, C++ is imposed.

 

Thanks again for your answers !



#8 AgentC   Members   -  Reputation: 1419

Like
2Likes
Like

Posted 16 November 2013 - 03:09 PM

This will be a hard task, but not impossible. You'll need to stay focused and make sure you don't write code that is wasted. It would be preferable to have a game to back up your requirements, but you can also pick up an engine like Unity for comparison, look at what features it implements, and of those, choose the most basic / important ones you think you need to get a game up and running (good judgement needed, do not get distracted by "eyecandy" features). If going that way, I recommend to make some kind of test game as you go along. It can be simple & silly, the important point is to exercise the engine features and validate that they're useful.

 

It is a somewhat dubious requirement that the less libraries you use, the better. Though I can understand that you're expected to write your own renderer. In the very least I'd use existing libraries for

- cross-platform window & input management

- audio

- image loading

- physics

- scripting language

- pathfinding / navmesh generation

 

As for the architecture, keep it as simple as possible. Stay away from complicated C++ constructs, like template over-use. Do not aim for state of the art where it complicates things or if you're unsure how to proceed. Eg. like other posters I'd advise to stay away from multithreading. Also, networking is something you can add later. Something you can instead start from is the scene or entity model. You can test its logical functionality (like adding / removing objects) even when you don't have rendering yet.

 

For architecture comparison I can offer my open source engine Urho3D which has been developed as a hobby project for about 4 years now, mostly for fun / self-educational purposes, without an actual game project backing it up either:

 

https://github.com/urho3d/Urho3D


Edited by AgentC, 16 November 2013 - 03:14 PM.

Every time you add a boolean member variable, God kills a kitten. Every time you create a Manager class, God kills a kitten. Every time you create a Singleton...

Urho3D (engine)  Hessian (C64 game project)


#9 Tutorial Doctor   Members   -  Reputation: 1693

Like
0Likes
Like

Posted 19 November 2013 - 11:46 AM

I have suggested this engine numerous times because several people have needed just what it is. It is called Maratis 3d  by  Anaël Seghezzi and it is FREE and OPEN SOURCE and coded in C++. 

 

That means you can recompile it and do whatever you want with it. Perhaps you could even add to it and help him out a bit (I think he created this engine on his own.) 

 

You could even use it as a basis for your own engine. 

 

If this is just for a learning experience in C++ or in how game engines work in general, then this is one way to go. 

 

It has ASSIMP support for importing assets. It uses LUA for programming the games (C++ for the engine).


Edited by Tutorial Doctor, 19 November 2013 - 11:46 AM.

They call me the Tutorial Doctor.


#10 SimoHayhaa   Members   -  Reputation: 103

Like
0Likes
Like

Posted 21 November 2013 - 03:22 PM

I was out of town last days; I just saw the two last post.

Thanks a lot for the two engines.

We should take a look at them tomorrow ! 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS