Thread: Need some help to get started with C game coding

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Need some help to get started with C game coding

    What I'd like to accomplish is actually the very simplest form of it all. I just want to have an animated C program. I'd like to be the author of as much stuff as is possible, regardless of how stupid/pointless the interactive animation at the end might be.

    The few things I want to stick to are:
    C programming (This whole project is all about widening my knowledge of the C language)
    Make use of a basic library which will allow me to render my animations.
    Have some basic baby-steps of getting my first animated stuff showing and how to manipulate them.

    Would appreciate any help/guidance available on acquiring the above.

  2. #2
    Banned
    Join Date
    Jan 2011
    Posts
    5
    You'll need to learn how to program with a GUI or such, like Windows API or a low-level graphics library such as Allegro or OpenGL.


    It's the only way you can upload images and manipulate animations and such.

    Unless you find some sort of file that can do the same as the above can, then you're good.

    PS: I know some Windows API, so I can give advice.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    7
    Quote Originally Posted by spoonlicker View Post
    PS: I know some Windows API, so I can give advice.
    Thanks for the reply, and please do! :P

    Edit: I actually did try OpenGL already, but it felt way too puffed up to simply get some basic shapes going. I ain't saying I don't want to use a system like that at all, but ideally I wouldn't have to learn more library than C language and game-coding concepts.
    Last edited by Lonehwolf; 01-28-2011 at 01:47 AM.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    ...but ideally I wouldn't have to learn more library than C language and game-coding concepts.
    Not possible. ANSI C/C++ does not have any native graphics support.

  5. #5
    Registered User
    Join Date
    Jan 2011
    Location
    Venezuela
    Posts
    6
    It depends a lot on the operating system you are using. As Bubba said, ANSI C is meant to be portable, so most of the graphics functions either need to be called using inline assembly like the stuff in Cprogramming.com - Tutorials: C++ Made Easy

    That stuff won't work however in Windows protected-mode, so you have to use the Win32 GDI code, DirectX or OpenGL. There are many useful wrappers like SDL which will make your life easier. Imho, avoid GDI if possible since it's deprecated. Graphics in Windows are meant to be done using Direct2D starting with Windows 7 or an up-to-date Windows Vista.

    I suggest you focus on making console applications that uses C functions since most of the graphics code will end up taking you away from C standard data types and basic functions like printf or cout. Think of console applications for batch processing stuff and you will have code that teaches you programming and can prove to be useful.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  2. my upcoming UNO card game :)
    By Hussain Hani in forum Game Programming
    Replies: 5
    Last Post: 01-24-2008, 01:19 AM
  3. New Project, text game, design stage.
    By Shamino in forum Game Programming
    Replies: 9
    Last Post: 05-23-2007, 06:39 AM
  4. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  5. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 09:17 PM