Making a Game Engine in C++

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 2402 Views - Last Post: 29 August 2013 - 02:31 PM Rate Topic: -----

#1 KKS21199   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Making a Game Engine in C++

Posted 27 August 2013 - 05:41 AM

Hello,I am Sugavanas, or kks21199 (my online lucky name). I am 14 and i have learned VB, C++, C#, html and a little of java & php.

I have made research over game development last year and found many useful resources and made me choose unity 3d for development. My site has some games made in unity 3d. I am using it till now but i also have used cry engine 3, corona sdk, udk.

I have also gone through c++ game programming research and found that opengl and directx programming is pre made scripts which we can use for game programming as they already have basic codes for hardwares.

Now my question is if i want to make a game engine, where should i start ? I have searched it in many places but don't really understand it as every thing gives different meanings :/

Can any one of you help me with my question ? My life is making games and i seriously want to be a developer.

Also do you need directx and opengl for engines ?

Is This A Good Question/Topic? 0
  • +

Replies To: Making a Game Engine in C++

#2 jimblumberg   User is online

  • member icon

Reputation: 5721
  • View blog
  • Posts: 17,520
  • Joined: 25-December 09

Re: Making a Game Engine in C++

Posted 27 August 2013 - 05:55 AM

Moved to game programming.

Jim
Was This Post Helpful? 0
  • +
  • -

#3 KKS21199   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Re: Making a Game Engine in C++

Posted 27 August 2013 - 06:11 AM

View Postjimblumberg, on 27 August 2013 - 05:55 AM, said:

Moved to game programming.

Jim


OUCH, Sorry, didn't see that coming xD
Was This Post Helpful? 0
  • +
  • -

#4 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Making a Game Engine in C++

Posted 27 August 2013 - 06:39 AM

You can make games with things other than DirectX and OpenGl. You could use Java for instance.

You want to learn a programming language and then probably a framework. For example, you could learn C++ as a language, and then there are frameworks like DirectX and OpenGL.

I'm going to recommend that you learn C# and then XNA. We don't know how much longer XNA will be around, but it is a good place to get started and you can always move on to something else later.

RB Whitiker has tutorials on C# and XNA as well. I would recommend going through all of his stuff.

XNA 4.0 and XNA 3.1 are pretty different and so I would recommend downloading both so that you can go through tutorials that were setup for either. XNA 4 requires Visual C# 2010 and XNA 3.1 requires Visual C# 2008. There are many good game programming books written for XNA 3.1, such as Riemer's books. Unfortunately, I am not sure where you can get a reliable copy of Visual C# 2008 express edition. Any 2008 edition is fine for XNA 3.1, but the express editions are free.

After installing the correct version of Visual Studio, you have to install the correct version of XNA.

RB's site is all XNA 4.0 I think. Riemer's site is partially converted. You could theoretically go through the 3.1 tutorials in 4.0 but there is some conversion that has to be done.

And for 3D, I'm working on a site at VirtuallyProgramming.com. I've got quite a bit of example code posted there, but have not had time to write the tutorial pages. The tutorial code is self documented, and so you can download that and go through it. I think Tutorials 1 and 2 are completely finished.

Anyway, to do XNA at all, you need to learn the C# programming language. But it's all free downloads. So, it doesn't cost you anything to try it. And RB's site will help you with both C# and then XNA.

And if you do decide to go with XNA, join us over in the XNA forum. We would love to see you there.
Was This Post Helpful? 3
  • +
  • -

#5 KKS21199   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Re: Making a Game Engine in C++

Posted 27 August 2013 - 07:22 AM

View PostBBeck, on 27 August 2013 - 06:39 AM, said:

You can make games with things other than DirectX and OpenGl. You could use Java for instance.

You want to learn a programming language and then probably a framework. For example, you could learn C++ as a language, and then there are frameworks like DirectX and OpenGL.

I'm going to recommend that you learn C# and then XNA. We don't know how much longer XNA will be around, but it is a good place to get started and you can always move on to something else later.

RB Whitiker has tutorials on C# and XNA as well. I would recommend going through all of his stuff.

XNA 4.0 and XNA 3.1 are pretty different and so I would recommend downloading both so that you can go through tutorials that were setup for either. XNA 4 requires Visual C# 2010 and XNA 3.1 requires Visual C# 2008. There are many good game programming books written for XNA 3.1, such as Riemer's books. Unfortunately, I am not sure where you can get a reliable copy of Visual C# 2008 express edition. Any 2008 edition is fine for XNA 3.1, but the express editions are free.

After installing the correct version of Visual Studio, you have to install the correct version of XNA.

RB's site is all XNA 4.0 I think. Riemer's site is partially converted. You could theoretically go through the 3.1 tutorials in 4.0 but there is some conversion that has to be done.

And for 3D, I'm working on a site at VirtuallyProgramming.com. I've got quite a bit of example code posted there, but have not had time to write the tutorial pages. The tutorial code is self documented, and so you can download that and go through it. I think Tutorials 1 and 2 are completely finished.

Anyway, to do XNA at all, you need to learn the C# programming language. But it's all free downloads. So, it doesn't cost you anything to try it. And RB's site will help you with both C# and then XNA.

And if you do decide to go with XNA, join us over in the XNA forum. We would love to see you there.


thanks, but i really needed help with making a game engine, i have heard that ppl juz transform their games into game engine but my question is how ?
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14987
  • View blog
  • Posts: 59,846
  • Joined: 12-June 08

Re: Making a Game Engine in C++

Posted 27 August 2013 - 07:29 AM

There are books on game engine design.. you can start there or just read up on what a game engine is.

Example - this thread:

http://www.dreaminco...ngine-building/

.. read the response there and realize an engine is just a few states that orderly process input and display output.

Posted Image


Quote

i have heard that ppl juz transform their games into game engine but my question is how ?

That wouldn't make sense.. you cannot have a game without an engine..
Was This Post Helpful? 2
  • +
  • -

#7 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1556
  • View blog
  • Posts: 4,930
  • Joined: 20-March 10

Re: Making a Game Engine in C++

Posted 27 August 2013 - 08:56 AM

View PostKKS21199, on 27 August 2013 - 12:41 PM, said:

Hello,I am Sugavanas, or kks21199 (my online lucky name). I am 14 and i have learned VB, C++, C#, html and a little of java & php.


That is quite a lot for a 14 year old have you really learnt all those languages or is it a case you have
learnt some aspects of those languages without gaining any real skill in any of them.

I would go with BBeck's suggestion of first learning C# (by this I mean to a really high level)
then and only then learn XNA.


Quote

I have also gone through c++ game programming research and found that opengl and directx programming is pre made scripts which we can use for game programming as they already have basic codes for hardwares.


No they are really not pre made scripts they are Libraries which are very specialized and difficult to use.
They do interface with hardware to gain rendering speeds but they are written in C/C++.
I would not approach OpenGL or Direct3D after all you are only 14 and it takes years to learn C/C++ to a level where
you can approach those Libraries with any degree of confidence.

Quote

Now my question is if i want to make a game engine, where should i start ? I have searched it in many places but don't really understand it as every thing gives different meanings


A game engine is fairly simple, it exists to abstract the (sometimes platform-dependent) details of doing common game-related tasks, like rendering, physics, and user input, so that developers (artists, designers, scripters and, yes, even other programmers) can focus on the details that make their games unique.
It will generally use some form of scripting language that can be used to more easily build games, however that may have to take a back seat for a couple of years and I would focus on just making games with game engines like unity 3d or frameworks like XNA for now. The fact you don't know what a game engine compromises tells you that you are not yet ready to actually build one, from your imagination.

As an aside your website doesn't seem to contain any games built with unity 3d are you having trouble with it ?

Best Wishes

Snoopy.
Was This Post Helpful? 2
  • +
  • -

#8 anonymous26   User is offline

  • D.I.C Lover

Reputation: 2
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Making a Game Engine in C++

Posted 29 August 2013 - 01:07 PM

View PostKKS21199, on 27 August 2013 - 09:41 AM, said:

Hello,I am Sugavanas, or kks21199 (my online lucky name). I am 14 and i have learned VB, C++, C#, html and a little of java & php.

It would be more appropriate to say you 'have experience of' rather than 'I have learned'. Many programmers don't realize that in order to learn a language means that you can formulate as complex a problem as you can understand in that language. Kudos for your interest at your age. :)

View PostKKS21199, on 27 August 2013 - 09:41 AM, said:

I have made research over game development last year and found many useful resources and made me choose unity 3d for development. My site has some games made in unity 3d. I am using it till now but i also have used cry engine 3, corona sdk, udk.

Okay, so you link to a site with inspirational quotes but no games. Okay. You need some games on there.

View PostKKS21199, on 27 August 2013 - 09:41 AM, said:

I have also gone through c++ game programming research and found that opengl and directx programming is pre made scripts which we can use for game programming as they already have basic codes for hardwares.

This goes back to my first point about your level of programming knowledge. You should be aware that OpenGL and DirectX are not scripts in the least. OpenGL is an 'API' meaning that it provides a set of function declarations for a given language that permit functionality to be called - in this case graphics functionality. DirectX on the other hand is an 'SDK' that, in addition to having API elements, also provides tools for content creation and integrated debugging for Visual Studio for instance.

View PostKKS21199, on 27 August 2013 - 09:41 AM, said:

Now my question is if i want to make a game engine, where should i start ? I have searched it in many places but don't really understand it as every thing gives different meanings

Can any one of you help me with my question ? My life is making games and i seriously want to be a developer.

Also do you need directx and opengl for engines ?

Firstly you really need to become a strong programmer. Next there are so many examples of everything on Github, so check that out! :)
Was This Post Helpful? 0
  • +
  • -

#9 traxix   User is offline

  • D.I.C Head

Reputation: 85
  • View blog
  • Posts: 117
  • Joined: 10-August 13

Re: Making a Game Engine in C++

Posted 29 August 2013 - 01:53 PM

+1 on starting with C# and XNA.

You are fairly young, and it's great that you have developed interest in game development as you have enough time to devote to it and learn everything in a couple of years. One important thing, is to not deceive yourself that you know anything, but to keep realizing how much more there is to learn (there really is A LOT). I see you've filled your site with quotes so here's a good one to add. :)

Quote

"All I know is that I know nothing."
-Socrates


And "learning" a programming language is pretty easy, it's about how much experience and usage you've had with it. And considering you've worked in Unity and other engines, you really need to get some experience in ACTUALLY programming games. And C# with XNA is really the best place to learn, you should check out the sites that BBeck linked. :)
And I'll also add this site as a great first tutorial.
http://xbox.create.m...getting_started

As for a game engine. I imagine you don't have a clear concept of what a game engine actually is. It's just a platform that you can use to build your game around. It doesn't need to include EVERYTHING that Unity or CryEngine has. For example, it get's as simple as this. Let's say you want to make the simplest 2D game, your "game engine" would consist of: Game Objects(Sprites), Collision Detection(Rectangles), Game Logic(Functionality that you code). So that's it! You can use the classes you create to make as many objects as you want and make them interact. It doesn't need to be all fancy like the big game engines with a GUI and everything. And if you want to make that kind of engine. Then you better back off as that is the worst path you can take right now, and you'll probably never get to actually making a game.

And learning C# with XNA will really make you understand how games are built a lot better. Then you can choose to stay with XNA or go to something more complicated like DirectX or OpenGL with C++.

It's really important to not get discouraged, but to actually take the right path. :)

Cheers! :)
Was This Post Helpful? 0
  • +
  • -

#10 anonymous26   User is offline

  • D.I.C Lover

Reputation: 2
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Making a Game Engine in C++

Posted 29 August 2013 - 01:59 PM

View Posttraxix, on 29 August 2013 - 05:53 PM, said:

As for a game engine. I imagine you don't have a clear concept of what a game engine actually is. It's just a platform that you can use to build your game around.

No, that isn't true. The 'game engine' is what drives your game, unifying all of the interactions that make your software playable as a game. Game makers are not game engines - that's marketing trash.
Was This Post Helpful? 0
  • +
  • -

#11 traxix   User is offline

  • D.I.C Head

Reputation: 85
  • View blog
  • Posts: 117
  • Joined: 10-August 13

Re: Making a Game Engine in C++

Posted 29 August 2013 - 02:07 PM

View PostButchDean, on 29 August 2013 - 01:59 PM, said:

View Posttraxix, on 29 August 2013 - 05:53 PM, said:

As for a game engine. I imagine you don't have a clear concept of what a game engine actually is. It's just a platform that you can use to build your game around.

No, that isn't true. The 'game engine' is what drives your game, unifying all of the interactions that make your software playable as a game. Game makers are not game engines - that's marketing trash.


That is exactly what I meant. You make a "platform" out of your own classes and functions, so you can use them to build your game. I don't get your drift? You probably mistook my taking for the word platform.

I should have probably said libraries.

This post has been edited by traxix: 29 August 2013 - 02:09 PM

Was This Post Helpful? 0
  • +
  • -

#12 anonymous26   User is offline

  • D.I.C Lover

Reputation: 2
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Making a Game Engine in C++

Posted 29 August 2013 - 02:11 PM

That's just it, though. The game engine is not a 'platform' that you build your game 'around' - it 'is' the game! Normally subdivided into the graphics engine, AI engine, etc. All of these subcomponents accept parameters/data that cause them to behave a certain way.
Was This Post Helpful? 0
  • +
  • -

#13 traxix   User is offline

  • D.I.C Head

Reputation: 85
  • View blog
  • Posts: 117
  • Joined: 10-August 13

Re: Making a Game Engine in C++

Posted 29 August 2013 - 02:14 PM

View PostButchDean, on 29 August 2013 - 02:11 PM, said:

That's just it, though. The game engine is not a 'platform' that you build your game 'around' - it 'is' the game! Normally subdivided into the graphics engine, AI engine, etc. All of these subcomponents accept parameters/data that cause them to behave a certain way.


That depends on your taking of the word really. But you're correct too. Those engines are juts libraries in the end, so I mostly view it as a platform of libraries that can interact, in my language.
Was This Post Helpful? 0
  • +
  • -

#14 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Making a Game Engine in C++

Posted 29 August 2013 - 02:15 PM

I don't know that I would go so far as to say that commercial game engines are just marketing trash. Engines similar to Havok, Torque, and Unity have been used to make some top tier game titles.

I know the term "game engine" has somewhat different meanings to different people, but I remember a time when no one had ever heard of a "game engine", and there were lots of games on the market. Someone got the bright idea of realizing that a whole lot of the code for almost all games (especially in one genre like First Person Shooters) had a lot of shared code between them. A couple companies got the idea that they could seperate the reusable code out of the game and sell it to other companies as an "engine". That way, other companies would not have to re-invent the wheel and could buy the base code rather than building it themselves. That has certainly been the philosophy behind Havok and a lot of these game engines anyway. Lots of games have similar things like terrain, skyboxes, lighting, and so forth and it "can" save a team of seasoned developers a lot of time to not have to rewrite that code themselves every time they make a new game.

Of course, most people here know that, but I'm mostly speaking to those that are new to game development and might not know the history of it all.
Was This Post Helpful? 0
  • +
  • -

#15 traxix   User is offline

  • D.I.C Head

Reputation: 85
  • View blog
  • Posts: 117
  • Joined: 10-August 13

Re: Making a Game Engine in C++

Posted 29 August 2013 - 02:20 PM

Yeah definitely. While it's worth learning everything and understanding how libraries work. It is more productive to use existing libraries (engines) instead of reinventing the wheel yourself. In the end it really depends on what you need.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2