Question:

How do i write the code for a game using c

by  |  earlier

0 LIKES UnLike

I would like to make a small game using c . all i need to know are the command line parameters and stuff like that, so if you have a link that says how to do that it would be great.

 Tags:

   Report

9 ANSWERS


  1. You can't make a game by just using command line parameters (unless you consider playing compiler pranks a game too).

    I can safely assume that you know nothing about programming, so you better first find out what that is. The question of which language is the better one depends on the target of your programming. Most games deal with many objects, so C++ is the better choice. But since it seems like you know nothing anyway, it's okay to start right away with C++ tutorial.

    Then again, not. Starters are not recommended to learn programming through C-like language (that applies to Java as well). I started game programming with Basic-like language, it was called BlitzBasic. Nowadays they are called Blitz3d and BlitzPlus. They offer a demo for download, give it a try!


  2. buy a book about writing code in c. there is more to games than just c. You will want to use C++ at some points since it is made for graphics. So you will need to learn c and c++. No one can really tell "hey this is how you make a game..." it would takes weeks or months you have to learn for yourself.  

  3. that's a loaded question dude. I'd learn C++ . It's more flexible and current.

    You should look into buying an book about the subject (game programming + c++) if you don't already have one. Look in Amazon.

    Don't let that ihatepets guy discourage you man. I hope you succeed dude!

  4. C++ would be better than C for most software. It is newer, supports object oriented programming (which can be very useful), and is also very widely used. What type of game are you trying to make? Games can quickly become very complex.... not the best thing for a beginner, unless the it is a simple game.

    When programming in C or C++ you will only use command line parameters when compiling. Those will vary, depending on what type of compiler you are using. You will do the actual programming in a program and save the code to a file with a .c or .cpp (depending on the type of code) extension.  The program you use can be as simple as a text editor, such as windows notepad, or a complex IDE (Integrated Development Environment) such as Visual Studio or Eclipse. If you use an IDE, you most likely won't even use the command line for compiling. If you are using windows, check the documentation that came with your compiler to see what parameters you need if you are compiling from a command prompt. If you are using Unix, Linux, or some other *nix, use the man command to get documentation on your compiler (it will probably be 'man gcc' or 'man g++' )

  5. For a basic game, you might be better off using C# or VB.NET in conjunction with Direct X. You can download the .NET Express IDEs for free from Microsoft, as well as the Direct X SDK.

    Furthermore, try picking up a copy of Managed Direct X Kick Start by Microsoft Press.

  6. Go back to flipping burgers.

  7. this book should give some answers to your questions

  8. Step 1) Learn C.

    Step 2) Learn game programming

    Step 0) Realize you can't do either through one post on Yahoo! Answers.

  9. You can start learning C++ with these video tutorials:

    http://xoax.net/comp/cpp/console/index.p...

    They are perfect for beginners. This one can get you started by showing you how to install a free compiler:

    http://xoax.net/comp/cpp/console/Lesson0...

    Here are some simple games with code downloads that you can use to get some ideas:

    http://xoax.net/comp/cpp/console/Lesson9...

    http://xoax.net/comp/cpp/console/Lesson2...

    http://xoax.net/comp/cpp/console/Lesson2...

    These tutorials can get you started with graphics programming in OpenGL:

    http://xoax.net/comp/cpp/opengl/index.ph...

    You can go through the tutorials and if you have questions on them or anything else in C++, please post to me here:

    http://xoax.net/forum/

    Best of luck!

Question Stats

Latest activity: earlier.
This question has 9 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.