Thread: 2D Graphics In Game

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Question 2D Graphics In Game

    I want to make a game with 2D graphics using c++. What is simple source code for inputing graphics?

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    don't cross-post

  3. #3
    What OS / Compiler are u using?

    Also, what resolution, and graphic quality do you want to have? I have a tutorial on Mode 13h, which uses 320x200x256 resolution. It's at www.brackeen.com

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Exclamation Borland

    I'm using borland.

  5. #5
    ‡ †hë Ö†hÈr sîÐè ‡ Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    If I was going to do 2d graphics. i would set up a 3d draw sceen and just use some texture mapping.
    This medthod works in fullscreen, window, OpenGL, and DirectX
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

  6. #6
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Question Question

    Thats not my question... My question was "what is the source code to include graphics in programs"... Because I want to make a game...

  7. #7
    ‡ †hë Ö†hÈr sîÐè ‡ Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    nehe.gamedev.net
    This site should help. Its offers some good lessons
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

  8. #8
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    "what is the source code to include graphics in programs",


    this isn't a valid question, because there are about a million ways of doing it.

    use a graphics library such as OpenGL, Direct-X, Allegro, or something.

    check these links for info

    for OpenGL:
    http://www.opengl.org

    for Direct-X:
    http://www.microsoft.com/Directx

    for General Gaming "Making" Info:
    http://www.gamedev.net

    for General Graphics(and more) Programming Info:
    http://www.flipcode.com

    im not sure for Allegro...
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  9. #9
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Question Reply

    Than just give me one form of source code to post graphics...

  10. #10
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > Than just give me one form of source code to post graphics...

    Jesus, lazy.... There's some in FAQ... There's plenty at the links no-one posted... Too busy to follow them?

  11. #11
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    >Than just give me one form of source code to post graphics...

    all the stuff i write is too large to post(eg. it uses Win32).

    here,

    has a bunch of GL examples
    http://nehe.gamedev.net

    has a bunch of direct-x examples
    http://nexe.gamedev.net

    and as govt. said all the links i gave previously have plenty of example source.
    Last edited by no-one; 02-06-2002 at 06:21 PM.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  12. #12
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Exclamation Reply

    Again I am using Borland not visual c++. And to what that other guy said about being to busy you have no... idea.

  13. #13
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Exclamation Rephrase

    Here let me rephrase my question. How do you include an image that has already been made. In Borland. Specifically, how would you load a .bmp or .gif?

  14. #14
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    read the format specification, and read the data accordingly, or get a lib to do it for you.

    http://openil.sourceforge.net/
    DevIL is one thats pretty good, and handles a lot of image types, i think the source is public or was anyway.

    http://www.wotsit.org has a lot of Formats you can read through and use to write a loader.

    ::edit:: http://www.cprogramming.com/boardfaq.html#pic the FAQ has a loader.
    Last edited by no-one; 02-06-2002 at 06:55 PM.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  15. #15
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Originally posted by no-one
    im not sure for Allegro...
    http://www.allegro.cc

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-08-2010, 12:08 AM
  2. 2D Game project requires extra C++ programmers, new or experienced
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-16-2007, 10:46 AM
  3. Best Graphics Library for 2d RTS?
    By arew264 in forum Game Programming
    Replies: 4
    Last Post: 04-18-2007, 12:05 PM
  4. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  5. 2D OpenGL Strategy game
    By Shakti in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 12-15-2005, 12:16 PM