2D Rendering

This is a discussion on 2D Rendering within the Game Programming forums, part of the General Programming Boards category; For a 2D game, would it be smarter to use OpenGL for lack of DirectX's Directdraw?...

  1. #1
    Wes
    Wes is offline
    Registered User
    Join Date
    Aug 2004
    Posts
    14

    2D Rendering

    For a 2D game, would it be smarter to use OpenGL for lack of DirectX's Directdraw?

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,812
    No it would be smarter to use SDL or Allegro both are awesome
    Woop?

  3. #3
    Wes
    Wes is offline
    Registered User
    Join Date
    Aug 2004
    Posts
    14
    Do I need the OpenGL library for SDL?

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Who said DirectX lacks DirectDraw?
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    You just need to get a pointer to the back buffer surface and then draw directly on the buffer surface. You must specify certain parameters in order for this to work with no flicker, but it is extremely fast and the buffer only needs to be locked and unlocked once per frame.

  6. #6
    Registered User LiNk's Avatar
    Join Date
    Jul 2004
    Posts
    7
    I like openGL so i would use openGL if I was you

  7. #7
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    For me, doing 2D in openGL just seems like a headache. It just seems like a "fake" 2D. But I really suggest Allegro or SDL.

    EDIT: Dont get me wrong, I love OpenGL, I just suggest allegro or SDL for 2D

  8. #8
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by LiNk
    I like openGL so i would use openGL if I was you
    Just because you like it doesn't mean it is well suited for that purpose. SDL goes a lot of the work for you like setting up the window, loading various image formats, etc. One other thing of note is that OpenGL can be added with minimal effort for extra power.
    Last edited by Frobozz; 08-27-2004 at 04:08 PM.

  9. #9
    Wes
    Wes is offline
    Registered User
    Join Date
    Aug 2004
    Posts
    14
    Quote Originally Posted by MrWizard
    Who said DirectX lacks DirectDraw?
    I heard that since version 8 they've removed it.

  10. #10
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    If doing 2D in DX, use textured quads instead of direct draw. See www.gamedev.net for tutorials.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  11. #11
    Wes
    Wes is offline
    Registered User
    Join Date
    Aug 2004
    Posts
    14
    Ohh..alright

    Does anyone know a good sprite program, what do you use to make them?

  12. #12
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    I use PSP (paint shop pro) and usually the PNG format since it has lossless compression and supports alpha channels. There are prolly lots of other (also free) image programs out there.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  13. #13
    Wes
    Wes is offline
    Registered User
    Join Date
    Aug 2004
    Posts
    14
    Say I was using an engine that could run Zelda: A link to the past, how would my artist go about making the sprites? We cant find anything on the topic.

  14. #14
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Programs like GIMP and iDraw are free and are good for this sort of thing. That is if I am understanding correctly.

    Do you mean a game "like" Zelda, or are we talking about emulation?

  15. #15
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Paint would probably be good for sprites since it can do zooming with a grid and supports PNGs (or at least the XP one does).

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D in directX
    By fighter92 in forum Game Programming
    Replies: 6
    Last Post: 01-25-2009, 11:23 AM
  2. Replies: 16
    Last Post: 09-22-2006, 04:39 PM
  3. scene graph rendering techniques
    By ichijoji in forum Game Programming
    Replies: 7
    Last Post: 03-19-2006, 12:17 AM
  4. Creating a 2D GUI using Direct3D
    By codec in forum Game Programming
    Replies: 8
    Last Post: 09-23-2004, 12:57 PM
  5. voxel based rendering
    By Silvercord in forum Game Programming
    Replies: 1
    Last Post: 03-20-2003, 05:14 PM

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