Thread: Can I program a game in 2-D?

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    49

    Can I program a game in 2-D?

    Also, can I take .bmp files and .gif files and program them into a game or should I be looking for a program that will do that for me.
    DJGPP-Complier
    Windows 98-(Shouldn't need to explain)

    I like plants.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    Re: Can I program a game in 2-D?

    >>Can I program a game in 2-D?
    I don't know if you, specifically, can, but it's most definitely possible.

    >>Also, can I take .bmp files and .gif files and program them into a game
    You can display any type of graphics file that you see displayed in another program in another program. It's a fairly complicated manner though - you have to get the file format and read everything into the correct structures and then display it with an API.

    >>or should I be looking for a program that will do that for me.
    You can get code that will read common file types into data structures for you. Search around. You'll have to learn an API like SDL, Allegro, OpenGL, DirectX, or WinAPI though. Search the boards for them for more info - it comes up a lot.
    Away.

  3. #3
    Registered User Bieh's Avatar
    Join Date
    Sep 2002
    Posts
    83
    Try using something like Allegro .

    It's easy to use, and you can make some nice 2D games with it
    "It always takes longer than you think, even when you take Hofstadter's Law into account."
    -Hofstadter's Law

    Bored? Try my game SpaceWars , made in Allegro and VC++
    or see my new game Redoubt , made in OpenGL and VC++

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    Originally posted by Bieh
    Try using something like Allegro .

    It's easy to use, and you can make some nice 2D games with it
    Yeah, Allegro kicks butt.
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

  5. #5
    I started with Allegro. I loved it. Then I eventually started to hate it because of its simplicity. Then I started learning DX and fell back in love with Allegro -- because of its simplicity!

    After you download Allegro, you should be able to make your first program with it in less than an hour. This includes compiling and reading the manual and compiling your own program.

  6. #6
    Registered User
    Join Date
    Jul 2003
    Posts
    17

    Another Suggestion SDL

    I found SDL also to be much easier than Direct X, after all it is a wrapper around OpenGL making coding games much easier. You should goto www.libsdl.org for more details.
    Last edited by Eric08; 07-21-2003 at 02:11 AM.

  7. #7
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    It's not a wrapper around DirectX. It's around OpenGL

    From the link you gave
    Simple DirectMedia Layer is a cross-platform multimedia library designed to provide level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
    Away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. Lottery game
    By geetard in forum C++ Programming
    Replies: 2
    Last Post: 12-20-2005, 12:50 AM
  4. I want to program a game, what do i need?
    By DarkViper in forum Game Programming
    Replies: 53
    Last Post: 11-19-2002, 05:39 PM