Advertisement Jump to content
Sign in to follow this  
ozwizm

need help, how to make a 2d Game Engine in theory?

This topic is 1873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I'm new here and also not even close to a professional game programmer (yet, hopefully i will be eventually). I've been really wanting to learn how to build a simple 2d game engine from scratch recently, but I just cant figure out how to go about doing it. All I want to know from this post is what components I should put into the game engine, and how I should go about doing that (meaning what order to program the components in). I want to make this really simple at first, maybe just enough so that I could make a pong game or something, and then from there build it up until I can make a 2d tiled rpg.

 

Thanks in advance for taking the time to read this and hopefully reply!

Share this post


Link to post
Share on other sites
Advertisement

http://scientificninja.com/blog/write-games-not-engines

 

You should not aim to write an engine but write games.

 

An engine is just a collection of reusable components. The best way to develop these components and to create something that is actually worth using is to have the features develop organically over the course of using them in an actual game.

 

So create a game and factor out the parts that are generic enough to be reused (it may not be much at once), and then repeat for many games. Eventually you will have a set of components that can be used for other games.

Share this post


Link to post
Share on other sites


You should not aim to write an engine but write games.

 

 

Ok, that seems like pretty good advice, thanks for replying, but if that's the case then where should I start? My ultimate goal in the end is a 2D rpg in the style of Secret of Mana, or Legend of Zelda, or something along those lines. But what kind of game should I make first, that I can later reuse some of the code to make something more advance and then continue until I reach my goal? 

Share this post


Link to post
Share on other sites

To answer this question it would be useful to know what kind of experience you have. What kind of experience do you have programming wise? What programming languages have you worked with (if any) and what do you plan to use for this game? Have you made any games at all before?

Share this post


Link to post
Share on other sites

 


You should not aim to write an engine but write games.

 

 

Ok, that seems like pretty good advice, thanks for replying, but if that's the case then where should I start? My ultimate goal in the end is a 2D rpg in the style of Secret of Mana, or Legend of Zelda, or something along those lines. But what kind of game should I make first, that I can later reuse some of the code to make something more advance and then continue until I reach my goal? 

 

 

The most frequent advice is to start with pong. With pong you prove that you can draw images to the screen, move images according to player input, play music and sound fx (optional but recommended), and maybe even do scene management.

 

Then you could move on to breakout or tetris. What functionalities can you reuse from your pong game? Well probably the code for creating a window, creating a sprite, playing sound effects, ect... but you probably will have to do some cleanup of it to make it more reusable.

 

After that you could make a side scroller like Mario. That will involve creating a tile engine, loading some sort of level format, and will get you thinking about scrolling.

 

The above is by no means the only way to start making your game, but it is a potential way.

 

It is all about breaking the problems down into small chunks.

Edited by shadowisadog

Share this post


Link to post
Share on other sites

By the sound of your post, it seem like you have made betweeen 0 and 1 game. if thats the case. then you should start writing games instead of engines.

 

If im wrong on the other hand you could pick up some reading, I have read this one

http://www.amazon.co.uk/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/ref=sr_1_1?ie=UTF8&qid=1385805770&sr=8-1&keywords=advanced+2d+engine+programming

 

it's directx and c++. but no mather what language you use, there are some good points in the book, and gives some idea of what a simple 2d engine requires. and even though it says advanced, its actually not.

Share this post


Link to post
Share on other sites

Hey, thanks everyone for replying.

 

 

To answer this question it would be useful to know what kind of experience you have. What kind of experience do you have programming wise? What programming languages have you worked with (if any) and what do you plan to use for this game? Have you made any games at all before?

 

I have been attempting to learn how to program since 7th grade in middle school, (I'm a senior in high school now). So I have some experience. I've made pong by myself in c++ with SDL last year without any tutorials, I've made a few games with flash and actionscript before, I've made a bunch of text-based console window games in C++, and now I've switched over to Java because I find it a bit easier to set up. 

 

I found a tutorial series on youtube last night for making a very simple version of a top-down shoot 'em up game. I decided to give that a try, but to also take the advice I heard somewhere else, which is to make the game as fully as possible and very polished before moving on to the next game. So I plan to take the game I get out of that tutorial series and improve it until I get something hopefully as cool as those Japanese vertical scrolling shmups.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!