Sign in to follow this  

How to Start to Code a Game

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

Hi guys!

 

First of, I'd like to know people from around the world who are beginners like me and who are into game dev. If you feel you are open minded, creative an easy going with others you have a friend here smile.png. Just send me a private message or something.

 

My name is Ruben Idigora, I am studying game development in Spain first year, but I have been studying Multimedia so I can code a little. I started Object Oriented Programming and now there is a game project that needs to be done.

The problem is that I have no idea how to plan my code as I have never planned such a big project, and in our uni they are only focused on c++ learning with little examples. 

 

What I did to assess this problem is to try UML or even drawing it on a notebook but I don't know which classes are usually used in game development except for the characters in the game, monsters etc. Is there like a game Manager class which controls everything?

 

Ok, so my question is, can you point me to some resources that show the components of a game like the main loop, usual etc.. or just explain them to me?

 

Just any piece of information will be appreciated.

 

Thanks,

 

Ruben.

 

 

Share this post


Link to post
Share on other sites

what are the rules? Can you use frameworks like OpenGL, tools like Mono or even full engines? Do you have to write everything from scratch?

 

If its the latter, why not have a look how a simple Game Engine is built up? There are many good books on Engine creation, and there are many open source engines and games on the net you could have a look at. Maybe not start with the biggest most complex 3D engine as a start though.

 

A good book I have myself: http://www.amazon.com/Engine-Architecture-Second-Jason-Gregory/dp/1466560010/ref=sr_1_1?s=books&ie=UTF8&qid=1417769248&sr=1-1&keywords=game+engine

 

Generally, you have your main loop, that will run through multiple phases or states. There is a part of the loop that updates game logic, and then there is a part for rendering the graphics for example. Most engines give behaviour scripts and other code linked to the game objects hook-ins to execute custom code at the right game loop phase/state, so you can make sure game logic is run before everything is rendered to screen, and not afterwards.

Share this post


Link to post
Share on other sites

Gian-Reto thank you so much. I think you gave me the answer to what I was asking.

 

The rules are pretty basic, but with my partner we really want to learn and we want to make something challenging. We thought about making a of mud without the graphical part, just messages about results from attacks, description of rooms and things like that. And if we can we would like to network it to try it. 

 

So basically we are doing this to train ourselves with classes and all that's been taught to us. We are doing this in c++ with the sfml library.

 

I'll give a look at the book also.

Share this post


Link to post
Share on other sites

You might want to look up a book called "game coding complete". I have had the second edition for many years which is now showing it's age, but the newer editions are worth a read and even the original and second edition are still full of valid points and useful code and available quite cheaply...

Share this post


Link to post
Share on other sites

This topic is 1100 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this