Sign in to follow this  
shaileemehta

writing program in c

Recommended Posts

shaileemehta    106
Hi I am a first year b.tech student and we have a project on making an E-learning game for which we r supposed to code in C but we have no idea as to how to do it..how to add graphcs and open files using C. I need help! [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img]

Share this post


Link to post
Share on other sites
jbadams    25712
To input or output graphics you'll need a library such as [url="http://www.libsdl.org/"]SDL[/url] or [url="http://alleg.sourceforge.net/"]Allegro[/url]. For opening files, try [url="http://www.cprogramming.com/tutorial/cfileio.html"]this tutorial[/url].

It sounds like you might need to spend a little more time on the basics of programming with C before you tackle your game project. If you really have no idea how to start you should talk to your teacher and see if you can get more help.

Share this post


Link to post
Share on other sites
LennyLen    5717
[quote name='jbadams' timestamp='1353217414' post='5001969']
If you really have no idea how to start you should talk to your teacher and see if you can get more help.
[/quote]

Especially with regards to the library to use. I would ask if they have a recommended library, as if you use one that they are not familiar with, it could make it harder for them to understand your code.

Share this post


Link to post
Share on other sites
I wrote a tetris game in C, using SDL, OpenGL and GLEW. You can find the source-code here: https://github.com/goranm/wtetris

Although, I would still echo what others have said: If you don't really have a good base of C experience under your belt, you're going to have an extremely difficult time writing an actual game in C (no matter how conceptually trivial, and no matter what libraries you decide to use).

Share this post


Link to post
Share on other sites
shaileemehta    106
I know i need to learn more but my teacher isn't available now and i know the basics , basics but the graphics things confuse me i saw a few programs on programmingsimplified.com but they are written all in C++.
Anyways thnx for the suggestions ;)

Share this post


Link to post
Share on other sites

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