Thread: Can you make games without drawing in OpenGL?

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    47

    Can you make games without drawing in OpenGL?

    Is it possible to make games (In a C language preferrably) without drawing lines and vectors with opengl - but instead use sprites with images that have been drawn in photoshop?

    Because many 2D games (e.g. Fieldrunners for iPhone: http://osxreality.com/wp-content/upl...drunners-2.jpg... seem to have graphics that would require a "super professor who thinks in opengl" to be able to draw in code. Look at the icons at the bottom right, surely they can't have been coded from scratch? (Ok, I know everything in a computer comes down to code, but is it really that hard that every developer that wants to make games has to draw using a graphics API?)

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    84
    try allegro..it is easy to follow and handles sprites pretty well..and it was written in c!..so its fully compatible with it, and c++.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Yeah you can use DirectX and make use of point sprites. Textures are made in Photoshop or some other image editor, vertices are created in a modeller and the entire thing comes together in code.

    You would not want to embed textures or vertex data in engine code.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    You can use OpenGL... I do. It's fairly easy to get effects like the bottom right, just use alpha blending to make the icons "non square". But I've heard DirectX is better for such 2D things.

  5. #5
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by Jake.c View Post
    Because many 2D games (e.g. Fieldrunners for iPhone: http://osxreality.com/wp-content/upl...drunners-2.jpg... seem to have graphics that would require a "super professor who thinks in opengl" to be able to draw in code. Look at the icons at the bottom right, surely they can't have been coded from scratch? (Ok, I know everything in a computer comes down to code, but is it really that hard that every developer that wants to make games has to draw using a graphics API?)
    Coded from scratch? No they use libraries available for the platform that ease development. However unless you use a tool like Game Maker you'll have to learn to use an API. Personally I would recommend SDL since it does the job nicely and supports a decent range of platforms. Also using OpenGL for 2D graphics is really much easier than using it for 3D. There is a really simple tutorial on GPWiki that shows how to use OpenGL with SDL.

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    ...but is it really that hard that every developer that wants to make games has to draw using a graphics API?)
    In the world of protected mode programming yes it is.

  7. #7
    I believe every response has missed the point of the OP? I believe the answer you are looking for is yes, it is possible to load images such as bitmaps and jpegs for use as sprites. In fact, this is the standard way of creating graphics, not by using lines and such as you imply.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  8. #8
    Registered User
    Join Date
    Sep 2008
    Posts
    47
    Quote Originally Posted by lightatdawn View Post
    I believe every response has missed the point of the OP? I believe the answer you are looking for is yes, it is possible to load images such as bitmaps and jpegs for use as sprites. In fact, this is the standard way of creating graphics, not by using lines and such as you imply.
    So there is a light... That was just the answer I was looking for.

    Instead of spamming up the section with a new thread, while we are on topic - are there any books that really stand out in OpenGL game programming? Before learning C I was adamant that applications were my calling, but learning seems to have opened up a whole new part of me that wants to know how games are made. So I know there are normally books or resources that stand out in a topic, is there such for OpenGL?

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I believe every response has missed the point of the OP? I believe the answer you are looking for is yes, it is possible to load images such as bitmaps and jpegs for use as sprites. In fact, this is the standard way of creating graphics, not by using lines and such as you imply.
    Yeah you can use DirectX and make use of point sprites. Textures are made in Photoshop or some other image editor, vertices are created in a modeller and the entire thing comes together in code.
    I think I answered it just fine.

  10. #10
    Registered User
    Join Date
    Sep 2008
    Posts
    47
    Thanks, missed that response for some reason

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multithread pthread with OpenGL
    By parad0x13 in forum C++ Programming
    Replies: 8
    Last Post: 07-24-2008, 03:04 PM
  2. OpenGL: How to make surface shiny
    By ting in forum Game Programming
    Replies: 6
    Last Post: 06-18-2008, 05:09 PM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. Pause in OpenGL, but don't stop drawing... ?
    By Arker in forum Game Programming
    Replies: 4
    Last Post: 10-16-2003, 10:34 PM
  5. OpenGL question
    By Malek in forum Windows Programming
    Replies: 1
    Last Post: 09-10-2001, 12:00 PM