C++ game programming

This is a discussion on C++ game programming within the Game Programming forums, part of the General Programming Boards category; As the title suggests, I'm interested in game programming. I've looked at openGL, but turned away when i found it ...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    11

    C++ game programming

    As the title suggests, I'm interested in game programming. I've looked at openGL, but turned away when i found it was only for 3d projects. I looked at allegro, but was discouraged when i found that text isn't really it's forte(imagine the accent over that 'e' for me, if you would...). Could there be one library to cover 2d graphics and text output, or should I use allegro in conjunction with some other library for text? I guess the real question is, does anyone know a solid set of libraries to use to get into game programming in C++? I don't really care if anyone else can play the games, I just want to make them...

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    OpenGL *can* be used for 2D projects as can DirectX. You may want to look at SDL though.

  3. #3
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    SDL can be really nice. It may be just what you're looking for!

    http://www.libsdl.org/
    What is C++?

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    11
    looks good, i'll give it a shot.

    thanks.

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    Note that if you want truetype text output, I recommend SDL_ttf, an additional library for the SDL that lets you load and display text with standard text files, like COUR.TTF (Courier) and FreeSans.ttf (a Linux font).

    Or you can use sfont or SDL_gfx for bitmap fonts. Bitmap fonts are pretty easy to implement and use -- I have a simple implementation if you want to look at it -- but they don't look very nice.

    Once you have a bit of experience, you can check out SDL_image, which lets you load images besides BMP ones. (PNG, JPEG, basically every format you can think of.) SDL_gfx or SGE are essential as well if you want to rotate or scale images.

    I highly recommend the SDL. It's very portable and quite easy to use. You'll probably need extra libraries to do more advanced stuff, however, like the ones I mentioned.

    You can download libraries from the SDL website by searching for them by name here: http://libsdl.org/libraries.php

    Finally, you absolutely must check out these tutorials. http://lazyfoo.net/SDL_tutorials/index.php
    They're fantastic. And no, I didn't write them.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. 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
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21