Advertisement

How to make a Game Engine For Super Beginners?

Started by April 03, 2014 03:47 PM
26 comments, last by Buster2000 10 years, 10 months ago

Unless you really want to spent a lifetime creating a efficient engine You should just pick one of the dozens of amazing engines out there. Creating an engine requires you to already be a expert game developer. And if you where an excellent game developer you would not have posted this question here. So take my advice and just pick an engine to create your 2d rpg.

If you want to become an expert some day, you must go this way and reinvent something every time.

To create an engine you need a lot of knowledge of game development. To create a proper and efficient engine you need to be expert on the subject. These are the first steps to take imo. For learning purpose reinventing is good, for developing anything it is a absolute no go, you should already have that knowledge. If you want to sent the OP straight into C++ engine design you clearly missing the point of the beginners topic.

So getting to the main point, my questions are what does a game engine really need? How to structure the engine in a industry-standard structure? (I'm still a student, but I'm going to graduate soon...) And last but not least, how do we make a game using this engine in question?

The fundamental point of a game engine is that a game engine is just a concept. If you make a breakout clone then the code that relates to how the game itself interacts is usually what you would consider the "game logic" layer. For instance the code that says if a ball hits a wall it has to reverse velocity and bounce off the wall, that would be logic level code.

On the other hand, the code in the game loop that gathers input on how to move the paddle, then code that actually renders the ball and the bricks and all that, that could be considered engine level code.

The thing is there isn't any "rule" on how seperated these things have to be, many a beginner and even professional will happily make a ball class that should be game logic and they put a bunch of opengl drawing commands in it, that usually is bad in terms of engine seperation because it means that the parts of the game depend heavily on each other, and are coupled. If you want to change from opengl to directx suddenly instead of having to go into the "rendering subsystem" and change all the "draw a thing" code into directx, you'll instead be going into every single game object class and changing it, bad news!

The only real difference between that and something supermassive like unreal is:

-More parts: big engines tend to be generic, they tend to be designed to happily render different file formats, different shapes and sizes and materials and so on. They also tend to have more subsystems that you might not even use. For instance if you want to play full motion video in your game, you'll probably need a library for that. Most big engines have a lot of these features built in standard and extensively tested and performance benchmarked.

-More generic: big engines, even if they aren't sold, are often used to develop multiple games because they are seen as an investment by the team with programming time. If they spend two years making an engine and it makes three games with some minor modifications, they've saved perhaps a year of extra programming time for each title.

-More people and expertise: With size can often come advantage, between the years of experience of the engineers and money poured into big engines they tend to be a lot more tested and designed with performance in mind. For someone like an indie there isn't usually practical purpose to spending three years improving the framerate of your pong game, with a large 3d open world game with lots of shaders and nonsense, performance is critical, so they have a lot of people spend a lot of time on each subsection of the engine to make them perform as optimally as they can.

So what should YOU do? That depends on what you want to make. If your plan is to become a programmer for a living in the AAA industry it is definitely worth making your own projects. Experience is never wasted in programming, learn that lesson early. Using unity or something isn't a 'waste of time' but it will teach you -specific- things. You won't ever learn the fundamentals of making a game engine by using unity, like the game loop and the rendering libraries and stuff like that. Realistically if you get into the game industry as a programmer, or even as an indie, you will probably need to acquire that knowledge at some point.

It really comes down to goals, if you just want to design games then I would never recommend coding, even using an engine like unity might be too much "lower level" work for most people. On the flip side if you wanted to become specifically a programmer an learn the real meat and potatoes of how a game functions as a program, you might get a good start using an existing engine, but eventually you'll have to learn that lower level stuff.
Advertisement

Can someone explain to me what all the fuss about 'engine' is, and why there is so much magic and mysticism around it? In my world, an engine is what you naturally create while you are making a game, not necessarily a ready made 'system' made by some other company/person.

Not an uncommon game loop (details may of course vary):


    while (!quit)
    {
        //Manage inputs from the user (joystick, keyboard, mouse, etc...)
        //Do some calculations
        //Draw your scene/graphics based on the previous steps
    }

To me, this is an engine. It arises naturally from the process of creating a game. Yes, it looks simplistic, but might not necessarily be. Please explain if I am wrong?

While OpenGL or Direct3D might be hard to learn initially, it is an important process in learning to make games, and if you can make one textured quad output to the screen, it is not hard to expand to that so you can make your own class to plot a lot of tiles to the screen either. If you want to postpone on that, you can of course use one ready made APIs to render 2D graphics, or if you are more adventurous, try to make some simple 3D graphics. How about running around in a maze? That would be a nice challenge if you are going for 3D. My point is that you have to start somewhere, and it is just to dive into it. Make something really bad, and refactor and make better as you go. Start with something that is so easy that you think you can manage to do it. (I wouldn't really recommend 3D, if you are an absolute beginner, though.)

Sorry if I am way off with my thoughts.

EDIT: I also disagree that you need to be an expert to make an engine. When you are learning, you are allowed to fail. Actually, failure is what you will learn from. Your first 'engine' need not be perfect in any way - just work. Knowledge is what you gain by doing.


You can spend all your time working on the engine, or you can spend your time working on all (or even some) of that other stuff.
Try to do everything and you'll end up accomplishing nothing.

Absolutely! Take it from me!

They call me the Tutorial Doctor.

Hi,

Typical successful game engine: Takes a team many thousands of coding hours to create and more thousands to update. Budget is typically 100,000s to millions of dollars each version of a game engine that is really worth doing.

Typical successful game: Takes a team many thousands of coding hours to create and more thousands in following versions. Budget is typically 100,00s to millions of dollars each version of the game that is expected to be popular and profitable.

Exception: Genius game developer works 70 hours per week for 10 years and hit the big time with his or her high achievement Indy self or the stupid public likes a simple game that took only a month to create but sells millions of copies. rolleyes.gif

"Do you feel lucky?"

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Hi,

Typical successful game engine: Takes a team many thousands of coding hours to create and more thousands to update. Budget is typically 100,000s to millions of dollars each version of a game engine that is really worth doing.

Typical successful game: Takes a team many thousands of coding hours to create and more thousands in following versions. Budget is typically 100,00s to millions of dollars each version of the game that is expected to be popular and profitable.

Exception: Genius game developer works 70 hours per week for 10 years and hit the big time with his or her high achievement Indy self or the stupid public likes a simple game that took only a month to create but sells millions of copies. rolleyes.gif

"Do you feel lucky?"

To be fair and less cynical you tend to get back the amount of money you put into something though, generally a low budget game that succeeds will make a moderate amount of money, probably a lot more than was put into it, depending what it is. It also has to fit the market, tahts why you don't see huge RPGs and crap on iphone, because the best way to be profitable is to have 20 small games in rotation instead.

Most of the big devs, even if they make a complete flop of a game, still end up spending a couple, or tens of millions of dollars, if they screw up royally they might not even get it back.

And yes we all think Minecraft is a roulette wheel win, not a well designed game.
Advertisement

To be honest if you are a beginner and you want to create a game without using a third party engine then the steps to writing your engine is this.

  1. Dont't write an engine. Just start writing your game and finish it.
  2. Now you want to write another game.
  3. Hmm I can reuse bits of my previous game to write my new game
  4. GOTO 1.

Follow these steps a few times and you will soon discover that you have a library of code that you know perfectly and can adapt to suit your needs and your coding style. This is your engine.

There is the alternative way which is to try writing perfect systems upfront but you will never finish because you will read an article that differs with the way your engine works and then keep restarting and could spend the next 20 years trying to write the perfect engine. Don't forget ALL successful games engines from simple ones like cocs2d to Crytek are permenantly under development.

To be honest if you are a beginner and you want to create a game without using a third party engine then the steps to writing your engine is this.

  • Dont't write an engine. Just start writing your game and finish it.
  • Now you want to write another game.
  • Hmm I can reuse bits of my previous game to write my new game
  • GOTO 1.
Pong to pacman?
If you want to write an engine (i.e. not from the scratchy scratch), write a game using the needed libraries instead of an engine. By the time you're done, you would have made the different libraries work together well (i.e. if you did it well).
Voila, that's your engine (which would be as good as the work you put into making the game).
You would need to learn how to use those libraries though.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
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

Unless you really want to spent a lifetime creating a efficient engine You should just pick one of the dozens of amazing engines out there. Creating an engine requires you to already be a expert game developer. And if you where an excellent game developer you would not have posted this question here. So take my advice and just pick an engine to create your 2d rpg.

Well, I did mention I am still a student...and yeah that's what I wanted to do initially...but yeah I got curious about making a game engine...that's why I posted the question.


You can spend all your time working on the engine, or you can spend your time working on all (or even some) of that other stuff.
Try to do everything and you'll end up accomplishing nothing.


I will take note of that. Thanks.

This topic is closed to new replies.

Advertisement