Jump to content
  • Advertisement
Sign in to follow this  
Dan86

Game Engine

This topic is 1120 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

Hello forum mates.

I'm new here and I hope to stay.

I have a rather simple question yet I believe the answer will be much more complex.

I would like to ask for a somewhat simple explanation to what does making a game engine (from scratch) means.

For example I follow Notch (Markus Persson) on Twitter and he always write about how he likes to develop his own engines when he is working on a game, like Minecraft with JAVA for example.

 

I'm learning C# for about a year now on my own using books and internet sources and developing a little game was always a dream of mine, which is why I would like to understand a bit more what it means to develop a game engine.

 

Thanks in advance, I really hope someone will have a meaningful answer, and please don't even bother writing to me "ever heard of a search engine?" and so on, it is the first stop, always.

Share this post


Link to post
Share on other sites
Advertisement

Thank you so much for the quick reply.

So here is another question, is it possible to make a 2D side scrolling game out of pure C# code?

From all I have learned the past year I believe I am capable of creating a program with a database to write and view recipes for example, but I can't wrap my head and figure out on my own how to use the C# knowledge I have to create even the smallest game. 

Maybe I don't have the right thinking to develop a more complex project than a simple program...

Share this post


Link to post
Share on other sites

Thank you very much Servant of the Lords your reply made it much more clear to me.

So now I stumble upon my second post on this thread, how do I start making a game using C#, I simply can't get my mind to understand how I start.

Is it possible by using visual studio only? Must I use some third party IDE?

All I find online is Unity and XNA which isn't supported anymore.

Share this post


Link to post
Share on other sites
A game is a program that displays pretty (changing) pictures while you interact with it.

So, all you need is an input from you (keyboard, mouse), and a way to display pretty pictures / text/ etc.

The game then basically constantly monitors your input, and moves the time forward, eg changing the scenery, moving the enemies somewhat, etc.
Finally, it draws the new picture, and the cycle starts again.

It does this at say > 15-20 times a second, which we experience as a fluid motion.

I'd say start simple, eg pong or tetris

Share this post


Link to post
Share on other sites

Thank you all for the information, all of you are helping me a lot.

Now here is a noob C# question this might not be the place to ask..

How do I make it so the program is always ready for a certain input? 

So every time the key "Right Arrow" is being pressed a picture box will move one pixel to the side no matter what other methods and code ran..

Share this post


Link to post
Share on other sites

Games are basically infinite loops. They look (conceptually) like this:

LoadResources();
SetupStartingState()

bool stillPlaying = true;

while(stillPlaying)
{
     HandleUserInput();
     UpdateGameLogic();
     DrawEverything();
}

FreeResources();
EndProgram();

Any keypresses that get received by the operating system get added to a queue, and inside your 'HandleUserInput()', you empty the queue and handle all the input, before continuing on to update and draw everything.

 

That's step one of game architecture: learning the basic game loop.

Step two would be learning about 'game states'.

Share this post


Link to post
Share on other sites

Thank you, once more, Servant of the Lords.

This is a starter baseline I hope.

Do I close this thread somehow? I got all the answers I needed.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!