Thread: Graphics using C?

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    5

    Graphics using C?

    im taking an intro to C programming class at college, and well we now have to come up with ideas for our semester project.

    A friend and I wanted to try our hand at graphics using C. like make a board game etc. we have no idea where to start though. so we're basically looking for direction. we seriously doubt we'll be able handle 3D stuff so thats out i suppose.


    in our own class we've covered, the basics, loops, arrays, (strings next week) and such.


    thank you.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Well to do graphics, you need to use a graphics API. You can use OpenGL, or Direct3D for instance. Another option is to use the windows GDI functions, but I've always found OpenGL or Direct3D to be easier to use. A google search should give you a bunch of sites that have tutorials, but one site I can suggest is nehe.gamedev.net for OpenGL tutorials.

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    5
    what about ASCI graphics?

    (i could be uttering nonsense at any given time concerning programming, please forgive me lol)

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    You might want to check out SDL. You can also use that as a window manager for OpenGL if you ever decide to use that. http://www.libsdl.org

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    3
    work hard guy.The road of making games is too long and too hard.You must learn more and more knowledge and have some inimitable idea of games.Good luck.

  6. #6
    Registered User
    Join Date
    Mar 2005
    Posts
    5
    Quote Originally Posted by Frobozz
    You might want to check out SDL. You can also use that as a window manager for OpenGL if you ever decide to use that. http://www.libsdl.org

    ok i downloaded a sample code off libsdl.org and it requires "SDL.h" and "SDL_ttf.h". are these libraries? where do i install them?

    i downloaded SDL_ttf and it unzips to give me .dll. where does that go?

    im using Bloodshed Dev C++ btw.


    thanks

  7. #7
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Dude, don't go the OpenGL / DirectX route. That's shooting yourself in the foot for 2D games.

    Use the built in Windows GDI, where you can find tutorials here for what you're trying to do.

  8. #8
    Registered User
    Join Date
    Sep 2003
    Posts
    224
    If you really want make quick graphical games, get into Game Boy Advance programming. Once you get past learning the hardware, it is quite easy. A lot of things like sprite management and background scrolling is done by hardware. I would have to say that it is much easier than OpenGL programming on the PC.

  9. #9
    Registered User
    Join Date
    Mar 2005
    Posts
    5
    Quote Originally Posted by Lithorien
    Dude, don't go the OpenGL / DirectX route. That's shooting yourself in the foot for 2D games.

    Use the built in Windows GDI, where you can find tutorials here for what you're trying to do.

    yeah we really want to keep this simple. its just an intro class to C, not even C++. Besides we're not computer science majors, so this is just a term project for a side course. Which we thought we'd make interesting my doing something "visual". just basic 2D.

    thanks for links, i'll go through em and almost certainly check back with the problems we face. :P

    btw yasir where ya from yar?

  10. #10
    Registered User
    Join Date
    Sep 2003
    Posts
    224
    Quote Originally Posted by CapnK
    btw yasir where ya from yar?
    I'm sorry, but this is not comprehensible.

    The GBA is meant for 2D visuals.

  11. #11
    The C-er
    Join Date
    Mar 2004
    Posts
    192
    Lithorien is right. All you other guys - the OP is just doing a basic C programming course. I don't think

    1. DirectX
    2. OpenGL
    3. GBA

    have any place in this post.

    I would definitely start with the windows API (If you're doing windows). There's plenty of good stuff to get started on in there.

    what about ASCI graphics?
    Well that's kind of limited, but can be useful to test basic principles. I did some myself recently. I ran a bitmapped display in DOS with 80x50 resolution using the extended ascii characters (for my life program). To demonstrate a board game it could be o.k. though.

    In fact "conways game of life" could be a good project for you. Do a search on google.

    www.bitstorm.org/gameoflife/ has a little java applet to play with.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turtle Graphics, how does it work?
    By freddyvorhees in forum C++ Programming
    Replies: 15
    Last Post: 08-28-2009, 09:57 AM
  2. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  3. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  4. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM