Jump to content
  • Advertisement
Sign in to follow this  
???? ????? ????

Need help with beginning game programming with C language

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

Guys I really need help as I have no experience in game development and have been given a project by my instructor to develop an innovative game.
I have thought of a game in which we have random trains passing on several tracks that cross each other and the user has to stop some trains so that they might not crash. Can anyone help me with that, I don't know even where to start.
Here is what I know about C,
I know about functions and a bit about arrays.
Our instructor recommended glut for making games.
Also remember I can only use C language.
 

Regards.

Share this post


Link to post
Share on other sites
Advertisement

I have to agree with Alberth,  This post discusses breaking your project down into part that can be completed.  Knowing the type of game and the style of game play is important in the starting stages of your game.  To build a game idea you might start out old school and make a paper type game that is playable so you can test your idea before going forward into code.  Coding and building a game at the same time can get very complicated.  Using pen and paper can help you iterate the game design fairly quickly with out having to use your computer.  The more you can get planned before you start programming will help aid you in the development process.  With a working game you will have an idea of the data and game play structure this game will need.

 

Depending on the type of game you want to make Glut maybe overkill for it.  Since this is a first time game project I have to agree in the advice that keeping it simple will help you make a game.  Using a 2D graphics library will reduce the amount of data you will need to track and make the game easier to build.  Now don't think making a game is going to be easy!  This is a tough project in the first place but finding places in the project to reduce the amount of work for a first time project is important.

 

Now a couple of questions you should ask yourself about this game.  What platforms will your game need to run on?  Windows, OS X, Linux, iPhone, Android, etc.  This will help you focus your code on the requirements of the project.  Does the assignment allow you to use a game engine or does it expect you to make one from scratch?  How long is the assignment?  1 week, 1 month?  The amount of time given for the assignment will give an idea of about how complex a game you can make.  If you have a couple of weeks then I would suggest keep the game fairly simple.

 

Keep building on your idea.  The more fun factor you can add to your game the more successful it will be.  Have fun and keep us posted!

Share this post


Link to post
Share on other sites

I have to agree with Alberth,  This post discusses breaking your project down into part that can be completed.  Knowing the type of game and the style of game play is important in the starting stages of your game.  To build a game idea you might start out old school and make a paper type game that is playable so you can test your idea before going forward into code.  Coding and building a game at the same time can get very complicated.  Using pen and paper can help you iterate the game design fairly quickly with out having to use your computer.  The more you can get planned before you start programming will help aid you in the development process.  With a working game you will have an idea of the data and game play structure this game will need.

 

Depending on the type of game you want to make Glut maybe overkill for it.  Since this is a first time game project I have to agree in the advice that keeping it simple will help you make a game.  Using a 2D graphics library will reduce the amount of data you will need to track and make the game easier to build.  Now don't think making a game is going to be easy!  This is a tough project in the first place but finding places in the project to reduce the amount of work for a first time project is important.

 

Now a couple of questions you should ask yourself about this game.  What platforms will your game need to run on?  Windows, OS X, Linux, iPhone, Android, etc.  This will help you focus your code on the requirements of the project.  Does the assignment allow you to use a game engine or does it expect you to make one from scratch?  How long is the assignment?  1 week, 1 month?  The amount of time given for the assignment will give an idea of about how complex a game you can make.  If you have a couple of weeks then I would suggest keep the game fairly simple.

 

Keep building on your idea.  The more fun factor you can add to your game the more successful it will be.  Have fun and keep us posted!

Sadly I only have this week, and he just restricted us to C language, I think that means that I can use game engines. 
I will right away start with the paper and pen right. But please tell me that using the engine will simplify the problem.

Share this post


Link to post
Share on other sites

An innovative game in one week... that's quite an assignment.
I'd say use GLUT and no engine. You'd probably spend days just getting to know the engine.

I don't think of GLUT as that complex, it's fairly minimal but should suffice for the task at hand.
Your traingame seems like a good idea for this assignment. Don't overdo stuff, if it works it's good enough.

From a quick think i'd say show a fixed,flat landscape top-down using tiles.
Maybe only use straight tracks, and no corners - only junctions. (Easier, less work, still fun because basically same gameplay)
User can halt or slow trains by clicking on them.
Every train that does not crash give points.

Story could be the signalling system broke down and the handy controller-guy from the station

saves the day by manually telling the trains when to stop.

 

good luck and have fun.

Share this post


Link to post
Share on other sites

An innovative game in one week... that's quite an assignment.
I'd say use GLUT and no engine. You'd probably spend days just getting to know the engine.

I don't think of GLUT as that complex, it's fairly minimal but should suffice for the task at hand.
Your traingame seems like a good idea for this assignment. Don't overdo stuff, if it works it's good enough.

From a quick think i'd say show a fixed,flat landscape top-down using tiles.
Maybe only use straight tracks, and no corners - only junctions. (Easier, less work, still fun because basically same gameplay)
User can halt or slow trains by clicking on them.
Every train that does not crash give points.

Story could be the signalling system broke down and the handy controller-guy from the station

saves the day by manually telling the trains when to stop.

 

good luck and have fun.

Thanks dude, but can you suggest me any good glut tutorials for c?
I found the zeusCMD one is it good, if not can you recommend any other?

Edited by Ehsan18

Share this post


Link to post
Share on other sites

I would say that if you are not too comfortable with array manipulation then something like GLUT will open a world of woe.

 

how graphical does you game need to be?

 

The train idea sounds ideal.. could you do it in ascii graphics? This would simplify it no end and left you focus on the actual game mechanics and gameplay over graphics which might slow you down a lot.

Share this post


Link to post
Share on other sites

I would say that if you are not too comfortable with array manipulation then something like GLUT will open a world of woe.

 

how graphical does you game need to be?

 

The train idea sounds ideal.. could you do it in ascii graphics? This would simplify it no end and left you focus on the actual game mechanics and gameplay over graphics which might slow you down a lot.

 

 

hm i think the tuts at lighthouse3d are quite usable:
http://www.lighthouse3d.com/tutorials/glut-tutorial/

 

also search for small examples, they may get you up to speed fast:
https://graphics.stanford.edu/courses/cs248-01/OpenGLHelpSession/code_example.html

http://www.mitchr.me/SS/exampleCode/glut.html

I got good news for you guys, my instructor took pity on me and extended the date of submission to next week's sunday.! Yahay!! I am now quite happy, so what should I go for Ascii or opengl?

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!