Thread: Windows GDI

  1. #16
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Have you ever used GDI before? (don't take offence, I'm just desperate to prove my point )
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #17
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I've only used GDI in VB, and I made a few good games with it. I'll probably start using it again when i get more into Windows programming.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #18
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    which no company is ever going to use (well, maybe if you're self-employed).
    Some major game companies have used the SDL in porting
    their games to linux. Everybody can read and change
    the source code to allegro and sdl. Also I like to play fullscreen
    games and the gdi doesn't really have any support for this I
    think.

  4. #19
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    That's why you make 2D windowed games with GDI and skip Allegro/SDL and use DirectX/OpenGL for 3D fullscreen apps.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  5. #20
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    Well, I know how go program with the Windows API, and I must say I feel better about myself using that rather than Allegro. BUT, I think it is better to use Allegro first, to get a feel for how to program games. Then, use the Windows API where you get a little more in-depth.

    If you know what sequences and series are, using the Windows API as a FIRST graphics API is like trying to learn series before sequences. Doesn't work well.....

    I am currently making a game with Allegro. Once I am done I will do nothing more with Allegro. Next thing will be remaking the game with the Windows API, then DirectX. You can't go from Allegro to DirectX, not a good idea at all. In Allegro you don't even use the same type of main loop as with Windows API! It is MUCH different.

  6. #21
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    Hunter why don't you make a tutorial and a demo game for all the newbies on here? That'll show 'em.

  7. #22
    now I agree with this argument, I'm doing like Leeman, I'm making my finale` project in Allegro, and then I'm starting Win32 API, then GDI, then DirectX. I can use Win32 API, well I used to, but It's been so long I forgot. That's one reason I'm tossing out allegro, is the fact that it makes the whole program revolve around allegro, instead of the OS you are using!

    PS: Any intermediate programmer that doesn't know what GDI is needs to be shot. In fact, anyone who knows much about computers should know what GDI is.

  8. #23
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    using the Windows API as a FIRST graphics API is like trying to learn series before sequences. Doesn't work well.....
    Heh, looks like I did things the hard way

    Hunter why don't you make a tutorial and a demo game for all the newbies on here?
    lol, I'll have to think about the tutorial, but the demo's ready if you want
    Try my latest game, Space Shooterz!
    http://www.geocities.com/hunterguy_2/downloads.html
    I think Theseus and the Minotaur is also made with GDI... same site.
    Last edited by Hunter2; 11-03-2002 at 05:16 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  9. #24
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    Hi

    I think you shouldn't use GDI to program games. If you want to create games, use DirectX or openGL. OpenGL is great, becouse it's platform independent and has integrated client server mode.
    And it's not hard to learn (mais, it takes time )

    mfg n_h

  10. #25
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Yes, OpenGL is probably a lot better for making games. But, on the other hand, GDI is still very good for simple Windows apps -and it can be used to make relatively simple windowed 2D games.

    One of the main benefits is that it takes very little code to do simple tasks. For example, for a graph-plotting program, you could have an edit box for input, then have a "Plot" button. When the message handler gets the IDC_PLOT (or whatever) message, it calls GraphIt(), which:
    (a) figures out the points to plot
    (b) calls GetDC() or CreateCompatibleDC() or something to get an HDC to draw to
    (c) draws the axes using MoveToEx() then LineTo()
    (d) plots the points on the screen using SetPixelV().


    As you can see, it takes: 1 call to get the drawing surface, 4 calls to draw the axes, and 1 for loop to plot the points (each iteration of the for loop only makes one call to set a pixel).

    With DirectX or OpenGL (from my limited knowledge), it might take up to 3X the graphics code just to set the graphics up. And in this case, GDI's limited speed probably would not be very important, since the display wouldn't have to be continually updated.
    Last edited by Hunter2; 11-03-2002 at 05:15 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #26
    Registered User Kirdra's Avatar
    Join Date
    Aug 2002
    Posts
    105
    #1 GDI does have fullscreen capabilities
    #2 You should learn GDI
    #3 GDI isn't just for "crappy" programs

    Windows is based on GDI, every Icon, Scroll Bar, Button, etc... That Windows uses is made using The Graphics Device Interface. You wouldn't be able to use the tools you use to create your little pokey games without it.

    DirectX was created to persuade Game Programmers to develop for windows instead of DOS. GDI doesn't have direct access to all the hardware.

  12. #27
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Wow, Kirdra Weren't you just arguing for the other side a second ago?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  13. #28
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Java is probaby even better to develop games with.

    90% of the games created by newbies-intermediate programmers doesn't require extremly much processor power (board games, platform games, etc.)

    Two days ago, I hadn't written a single line of Java code, ever. After reading how the syntax works and a little about the standard library (~two hours) I was able to make a telnet server capable of running multiple connections at the same time, using different threads.

    Games developed in Java is platform-independent and can easily be converted to web-page applets, if desired.
    Correct me if I'm wrong, but I think Java supports full-screen mode as well as simple 3d rendering libraries.
    And I'm certain that Java is easier to learn than GDI.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  14. #29
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Yes, but C++ doesn't support Java
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  15. #30
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Is C++ required?
    The Java compiler from Sun is free.
    But I guess C/C++/C# is assumed to be the language of choice here.
    Come to think about it, is it allowed to post game programming topics in any language in this Game Programming forum?
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  2. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  4. Windows GDI Flickering
    By bartybasher in forum Windows Programming
    Replies: 10
    Last Post: 08-25-2003, 02:43 PM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM