Jump to content
  • Advertisement
Sign in to follow this  
Reegan

A game programmer to be ( C )

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

[Introduction] Hi, before i start asking questions i would like to introduce myself. The names Reegan and ever since i can remember ive loved playing games, and have always wondered how they were made. Almost two years ago i downloaded a program called Gamemaker 6.0 i got quite good at it and was a regular on the forums. About a week ago i decided i wanted more so i decided to program in C. Game programming is my most favorite hobby, i cant think of anything better than seeing a program i wrote from scratch, working. When i first started programming games i never thought about getting into the games industry, just as a hobby really. Im starting a course on game design next year in South East Essex college(the guy who made tombraider series studied there :D ). [Question (sort of)] So basicly what i want to know is where should i start? i want to get started on a simple program really like moving a ball left to right or something i already know alot about functions, variables, arrays ect.. (the basics) what i want to know is how you implement graphics and retrieve keyboard input (arrow keys) from a user ive searched through alot of tutorials over the net but its to much information for me to handle all at once. I need it bit-by-bit and perhaps some working source code would be nice. anything you feel i should know would be nice also. Thanks to for those who reply ~Reegan~ OS: Win XP home IDE: Dev - C++ Lang: C

Share this post


Link to post
Share on other sites
Advertisement
C isn't a good beginners language. I would recommend you start with Python or C#. The Python website has all you'll need for Python -- tools, documentation, et cetera. For C# you can download Visual C# Express from MSDN and use the learning resources on MSDN or on the C# Workshop here on the forums.

Share this post


Link to post
Share on other sites
I also don't see much in the way of a specific reason to start learning with C. Python is an excellent beginners' environment and you sacrifice little to no performance that you wouldn't already be losing from newbiehood.

What's more important than performance is that it gets the concepts across easier.

Share this post


Link to post
Share on other sites
The simplest solution would be to use an external library to handle graphics and input. I recommend SDL since you are using C. SDL can handle input, graphics and sound abstractly without having to worry about any low level platform code. Tutorials can be found here from Lazyfoo.

Share this post


Link to post
Share on other sites
Quote:

So basicly what i want to know is where should i start? i want to get started on a simple program really like moving a ball left to right or something

i already know alot about functions, variables, arrays ect.. (the basics)
what i want to know is how you implement graphics and retrieve keyboard input (arrow keys) from a user ive searched through alot of tutorials over the net but its to much information for me to handle all at once. I need it bit-by-bit and perhaps some working source code would be nice.


For handling stuff like graphics,audio,input,physics and such you have to use libraries. Libraries are nothing more than a collection of functions and classes that you can use from inside your program. Google names like OpenGL,DirectX,SDL,Ogre3D,Torque,Irrlicht,Newton Game Dynamics,ODE,PyGame,XNA,OpenAL,FMod. Those are just some of them.


Just my opinion now: It's all your choise, but I would advise against using C. It's a primitive language, and you will get involved with a lot of unnecessary low-level stuff. Higher-level languages like C#(using XNA) or Python(using PyGame) would be better. If you insist for a C-like language, at least use C++ that comes with the C++ Standard Library, which will help you a lot.

Now, for a sample, this is how a "bouncing ball" demo looks like in Python+PyGame. It's about the simplest you can get, in other languages you will probably need more code to do something like this:

PyGame Tutorial

Share this post


Link to post
Share on other sites
I'm quite new to this game programming too.
My advice would be that you chose C++ instead of C. It's quite nice, and it can do what C can + more :) I started using some SDL and have just moved on to OpenGL doing some basic-stuff. I have just made a snake game in OpenGL.

C++ was my first real language - though I have been playing around with Delphi before. I can recommend the book called "C++ Primer Plus 5th Ed.". It's a bit dry in the start, but it's VERY NICE!

God speed and welcome :)

Share this post


Link to post
Share on other sites
Quote:
Original post by madsravn
C++ was my first real language - though I have been playing around with Delphi before.


...huh?

Share this post


Link to post
Share on other sites
This is great! Thanks for your replies.

Let me explain why i chose C.
I chose C because it looks more familiar to me from my first newbie programming language the way its layed out if you know what i mean.

I didnt just decide that i was going to code in C at first i spent a whole day reading different languages and looking at source code for different languages.
Since C seemed more familiar and i got a hold of the basics quickly
it felt like the right choice to make for my "real programming language."

When i looked at C++ and others they all seemed like a totally new language's an i figure it would take me a while before i got very far.

Now i regret choosing C because ive spent a week looking over a lot of tutorials and reading books from the college library.
It just seems a shame to me to not finish something i started is all.


If you strongly suggest i try a higher level language then i guess i could try but i would rather not if possible.

Share this post


Link to post
Share on other sites
C is a poor choice for a beginner. You're much better off starting out with Python or C#.

Emphasis on "starting out". You can (and should) always learn more languages at some point, but Python or C# will help you concentrate on programming rather than on fighting the language every step of the way. C is not an easy language to get right, especially for a beginner.

Share this post


Link to post
Share on other sites
Ok thanks, you've twisted my arm, i'm going to choose C#.

One more question, Which IDE should i use for C#?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!