Jump to content

  • Log In with Google      Sign In   
  • Create Account

Learning 3D and physics.


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
13 replies to this topic

#1 GarrettTheThief   Members   -  Reputation: 117

Like
1Likes
Like

Posted 05 January 2014 - 08:06 AM

Hi people.

I'd like to try to make an indie game.
I'm 16 years old and I'm pretty confident with low-level coding (I've made some console 2D games like snake and a nethack clone) and also with autocad designing. But I do not know how to... well to get started. I do not know how to make models, animations, and how to manage physics and audio. Basically I do not know how to start making a game but I know coding. Inspired from thedarkmod, I'd like to make a stealth game so I need to put my efforts in the AI and in the light/audio systems. Regarding the AI, I know little to nothing about that, I've just made a simple actor on the nethack clone but I don't know how to make all that complex 3D stuff.
But for now I'd like only to make a simple game engine to learn a bit. How do I start? Are there any free open source programs? What do I need?

edit: I also know how to code with python, if that may be useful.
edit 2: I am also already improving my maths skills with khanacademy.
edit 2b: may I also ask how much time (considering that I can work about 2.5 hours a day everyday) will it take to have the first playable builds? (more or less...)
edit 3: just to make this clear: I know how to code but I don't know anything about *game* coding. I do not know neither the libraries nor everything else.

Sponsor:

#2 Nathan2222_old   Members   -  Reputation: -400

Like
-6Likes
Like

Posted 05 January 2014 - 09:34 AM

if you want to make a game engine you will have to learn c++ and make some console games, then move to using an engine (like cryengine) to make games, then move to making games without an engine using libraries like directx, physx/bullet, ogre3d, havok AI etc., (if manage step 3) you have your engine. After these, you should know how to make it.

For 3d stuff, check out blender, it's free and open source.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy


#3 GarrettTheThief   Members   -  Reputation: 117

Like
0Likes
Like

Posted 05 January 2014 - 10:42 AM

Should I use tools like unity3D or should I build my very own engine? If so, how do I build it?



#4 PragmaOnce   Members   -  Reputation: 755

Like
7Likes
Like

Posted 05 January 2014 - 10:44 AM

Firstly you are talking about two completely different disciplines found in game development: A programmer and a 3D artist. I am no artist so I won't be able to help you regarding the 3D modelling, but you need to decide what you are going to focus on. I am a programmer so I can give you some advice from my perspective.

 

Making a game engine without any previous experience will be more of a learning experience rather than actually finishing it and developing a game in it. If you want to improve as a programmer and love solving complex problems while maintaining a good architecture try and make your own game engine, BUT if your goal is to actually develop a game then using an existing engine is probably your best option. The reason I say this is because learning about all the different implementations, systems and methods in a game engine is a very long process and can be quite daunting to new programmers. However, since you specifically asked how to implement your own engine I will provide possible steps to take concerning both processes.

 

Using an existing engine:

 

One of the best free engines out there (opinion)  is Unity. With the new iteration (4.3) it is not only a 3D engine but allows users to easily make 2D games as well. The nice thing about unity is that all the complex math and physics are already done for you so you can focus on gameplay elements. You can also build your games for multiple platforms.  The scripting languages you can use are C#, Javascript or Boo (the syntax is a lot like python).

 

There are a lot of other engines to choose from so doing a quick search on google will get you far. 

 

Creating a custom engine:

 

The thing about game engines are that you won't find a tutorial anywhere that goes step by step in implementation, so a lot of research is involved. By researching modular systems found in a game engine you can learn more about the implementation of such a system. 

 

Now there are a lot of engine systems that are not that important for a basic engine, for example: a memory management system. So without further ado here are some of the more critical systems found in a game engine:

 

Input manager: You need some way to convert input from the user into logic that the rest of the engine can understand.

Rendering engine: This is the system responsible for drawing all your objects, an API like OpenGL or DirectX is used to do low level communication with the hardware.

Physics engine: Responsible for detecting and resolving collisions. 

 

Now those are only the critical parts, you will maybe need a event/messaging system so that your different systems can stay decoupled, or a interpreter if you want a scripting system. I can go on, and on for quite a long time discussing resource mangers and state management systems but as I said those are all research topics.

 

Steps in the right direction:

 

If you are set on creating a engine the first thing you will want to do is learn an object orientated language like C++ and master it. You want to make sure that you understand inheritance and polymorphism as well as knowing your object orientated design principles. 

 

Then start creating your own games using a library like SFML. Note that I said games, not game engines. SFML is nice because it already contains a rendering engine, input manager and various other systems that are useful for creating games without diving to deep into various systems. This will get you acquainted with main game loops and object hierarchies. 

 

The one thing that SFML lacks is a physics engine. So your next step could be to implement a very basic physics engine that detects AABB (basically a box around an object) and then resolves it. 

 

As your projects grow in size you might feel overwhelmed because everything feels like a big blob of code with new bugs popping up after every feature. This is a good indication that you need to start investing time in design patterns. These patterns are there to solve problems that occur a lot when programming in an object orientated language. 

 

After a while a game engine will actually evolve out of your games (or this is how it worked with me!). But the thing is, as you dive deeper into the various systems it takes a lot more time to actually get something done. Remember, you actually get programmers that are "specialized" in a certain field like physics or graphics. For a single programmer to learn techniques spreading over multiple domains takes a s***load of time and dedication. The thing is I love game architecture and implementing all of the different features but because it takes so long I divide my time between making an engine and actually making a game. 2-4 hours a day I will spend on my engine and 2 hours I will work on a actual game inside Unity.

 

I hope I helped a little bit and remember this forum has great resources and a nice community if you ever get stuck on something.

Happy devving smile.png

 

EDIT: I gave very vague steps on how to start with a game engine. Shoot me a message at anytime if you want to know about more concrete steps you could take, this is of course after you mastered an OOP language


Edited by PragmaOnce, 05 January 2014 - 10:49 AM.


#5 GarrettTheThief   Members   -  Reputation: 117

Like
0Likes
Like

Posted 05 January 2014 - 10:50 AM

Wow! Thanks for the long and detailed answer!
Since I am not interested into making a game (ie: campaign, story, etc) I think that I'll try to make my very own engine. I already know OOP but I have no idea how to implement physics. Do I need some extra libraries/APIs/Tools or is it all about coding?

 

edit: even if my final objective is to make a game, right now I'm only interest in developing my skills. It's more about learning right now.


Edited by GarrettTheThief, 05 January 2014 - 11:00 AM.


#6 Nathan2222_old   Members   -  Reputation: -400

Like
0Likes
Like

Posted 05 January 2014 - 11:07 AM

Wow! Thanks for the long and detailed answer!
Since I am not interested into making a game (ie: campaign, story, etc) I think that I'll try to make my very own engine. I already know OOP but I have no idea how to implement physics. Do I need some extra libraries/APIs/Tools or is it all about coding?
 
edit: even if my final objective is to make a game, right now I'm only interest in developing my skills. It's more about learning right now.

Looks like you want to do what i want to do. Khan Academy teaches physics right? If you are looking for a physics library, from my previous post, physx/bullet/havok/ode/newton (make a choice, for the graphics api, directx (windows)/opengl, rendering, ogre3d, for the engine gui -> Qt and game ui -> cegui etc.
Wait a minute.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy


#7 PragmaOnce   Members   -  Reputation: 755

Like
3Likes
Like

Posted 05 January 2014 - 11:08 AM

Wow! Thanks for the long and detailed answer!

Since I am not interested into making a game (ie: campaign, story, etc) I think that I'll try to make my very own engine. I already know OOP but I have no idea how to implement physics. Do I need some extra libraries/APIs/Tools or is it all about coding?

 

It really depends. There are API's like Box2D and Bullet that you could use to implement physics or you could code it yourself. When it comes to implementing physics you generally have two aspects to look at. Detecting a collision and resolving the collision. Now before you can start with your 3D physics you're going to need to do 2D. 

 

Now there are thousands of ways to to implement a physics engine and even more ways to optimize them. I am not too experienced when it comes to physics and I don't want to give advice that is above my skillset so I will provide you with some links that I have used to implement physics. Most of the material is the same but covered in another way or maybe with more details, by studying all of these you'll hopefully be able to understand how a possible implementation could look.  Hope it helps. 

 

http://gamedevelopment.tutsplus.com/tutorials/collision-detection-with-the-separating-axis-theorem--gamedev-169

http://gamedevelopment.tutsplus.com/tutorials/create-custom-2d-physics-engine-aabb-circle-impulse-resolution--gamedev-6331

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/

http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/

 

A lot of theory: http://buildnewgames.com/gamephysics/

 

As I said earlier the key thing is to do a lot of research, whenever you find a nice website/link. Bookmark it so that you can come back to it later.

 

EDIT:

 

Also, to really understand these you are going to need to be familiar with vector math:

http://www.wildbunny.co.uk/blog/vector-maths-a-primer-for-games-programmers/vector/#Magnitude


Edited by PragmaOnce, 05 January 2014 - 11:12 AM.


#8 GarrettTheThief   Members   -  Reputation: 117

Like
0Likes
Like

Posted 05 January 2014 - 11:11 AM

 

Wow! Thanks for the long and detailed answer!
Since I am not interested into making a game (ie: campaign, story, etc) I think that I'll try to make my very own engine. I already know OOP but I have no idea how to implement physics. Do I need some extra libraries/APIs/Tools or is it all about coding?
 
edit: even if my final objective is to make a game, right now I'm only interest in developing my skills. It's more about learning right now.

Looks like you want to do what i want to do. Khan Academy teaches physics right? If you are looking for a physics library, from my previous post, physx/bullet/havok/ode/newton (make a choice, for the graphics api, directx (windows)/opengl, rendering, ogre3d, for the engine gui -> Qt and game ui -> cegui etc.
Wait a minute.

 

I'll check those out and see if I'm able to use them. Thanks! 
 

 

 

 

Wow! Thanks for the long and detailed answer!

Since I am not interested into making a game (ie: campaign, story, etc) I think that I'll try to make my very own engine. I already know OOP but I have no idea how to implement physics. Do I need some extra libraries/APIs/Tools or is it all about coding?

 

It really depends. There are API's like Box2D and Bullet that you could use to implement physics or you could code it yourself. When it comes to implementing physics you generally have two aspects to look at. Detecting a collision and resolving the collision. Now before you can start with your 3D physics you're going to need to do 2D. 

 

Now there are thousands of ways to to implement a physics engine and even more ways to optimize them. I am not too experienced when it comes to physics and I don't want to give advice that is above my skillset so I will provide you with some links that I have used to implement physics. Most of the material is the same but covered in another way or maybe with more details, by studying all of these you'll hopefully be able to understand how a possible implementation could look.  Hope it helps. 

 

http://gamedevelopment.tutsplus.com/tutorials/collision-detection-with-the-separating-axis-theorem--gamedev-169

http://gamedevelopment.tutsplus.com/tutorials/create-custom-2d-physics-engine-aabb-circle-impulse-resolution--gamedev-6331

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/

http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/

 

A lot of theory: http://buildnewgames.com/gamephysics/

 

As I said earlier the key thing is to do a lot of research, whenever you find a nice website/link. Bookmark it so that you can come back to it later.

 

 

Thanks a lot! I'll read them and see if I'm able to code one myself. Otherwise, I'll use some of those APIs.



#9 Nathan2222_old   Members   -  Reputation: -400

Like
1Likes
Like

Posted 05 January 2014 - 11:20 AM

Found it. For the list of most (if not all) the libraries for my future engine, check out my thread (read to the end and you'll see i still wanted to make it and changed my mind from modifying to making). Here's the url. Modifying an open source game engine. You'll also find a thumbnail of what an engine is made up of.
Good luck !!!

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy


#10 GarrettTheThief   Members   -  Reputation: 117

Like
0Likes
Like

Posted 05 January 2014 - 11:51 AM

Thank you!



#11 Nathan2222_old   Members   -  Reputation: -400

Like
0Likes
Like

Posted 05 January 2014 - 11:58 AM

¤edit¤ Double post

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy


#12 Nathan2222_old   Members   -  Reputation: -400

Like
0Likes
Like

Posted 05 January 2014 - 12:00 PM

Thank you!


You're welcome. Please when you start, post your progress (if you want to, i'ld love to know about it)

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy


#13 GarrettTheThief   Members   -  Reputation: 117

Like
0Likes
Like

Posted 05 January 2014 - 12:00 PM

Sure I'll do. Not today tought, I'm very busy.



#14 Nathan2222_old   Members   -  Reputation: -400

Like
0Likes
Like

Posted 05 January 2014 - 12:06 PM

Sure I'll do. Not today tought, I'm very busy.

Okey dokey.
Good Luck !!!

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32
smile.png
--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy





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