CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2006
    Posts
    3

    Question Adding Graphics to a game... Im a n00b

    I want to know how to add graphics into a game. If anyone here knows about the game called "Hit the Ball", thats the type of game I want to create, and I want to know how to make something like it. Hit the Ball is basically just a sprite of a ball and some walls, and I want to know how to make it so the ball bounces off the walls and if you click on the ball, your score goes up by 1. All help is appreciated, thanks in advance all that help.

  2. #2
    Join Date
    Feb 2006
    Location
    Croatia - Zagreb
    Posts
    459

    Re: Adding Graphics to a game... Im a n00b

    You just divided by zero, didn't you?

  3. #3
    Join Date
    Apr 2006
    Posts
    3

    Re: Adding Graphics to a game... Im a n00b

    What does that site have on it?

  4. #4
    Join Date
    Oct 2005
    Location
    Bangalore
    Posts
    1,051

    Re: Adding Graphics to a game... Im a n00b

    Quote Originally Posted by =Braxus=
    What does that site have on it?
    Check it out
    its a site about game development. here's some more

    Flipcode - game development
    steps on How to develop a game
    - Sreehari
    "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
    " Everybody is sent to Earth on a purpose. I am so Lagging behind that i won't die." – Calvin

  5. #5
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: Adding Graphics to a game... Im a n00b

    Hi,
    Adding graphics is OS dependent, so if for example you use MS-Windows you can use graphics libraries such as Win32 or MFC. Or you may use DirectX or OpenGL(the latter is also supposed to be platform independent). You may want to check the articles in www.codeguru.com and www.codeproject.com.

    Panayotis
    Extreme situations require extreme measures

  6. #6
    Join Date
    Oct 2005
    Posts
    166

    Re: Adding Graphics to a game... Im a n00b

    I recommend to start simple, GDI for example, try "Hit the Ball" in a MFC dialog-based application and draw everything with GDI calls.

  7. #7
    Join Date
    Apr 2006
    Posts
    3

    Re: Adding Graphics to a game... Im a n00b

    Lol, like I said, im a total noob, and yes, i want to start very simple, so what are GDI calls?

  8. #8
    Join Date
    Feb 2006
    Location
    Croatia - Zagreb
    Posts
    459

    Re: Adding Graphics to a game... Im a n00b

    GDI stands for Grafics Device Interface, it's a set of function calls that windows use to draw it's well windows. but since you are complite noob I recomend that you don't use that, but take a look at this site www.talula.demon.co.uk/allegro/ , it's one of the better library out there. It's really easy to use, and comes with about 30-40 examples on how to do everything, from drawing balls, and lines, to mixing it with DirectX to provide 3D grafics.
    You just divided by zero, didn't you?

  9. #9
    Join Date
    Aug 2005
    Location
    Netherlands, The
    Posts
    2,184

    Re: Adding Graphics to a game... Im a n00b

    allegro, in my opinion is bad.

    starting as a newbie and learning stuff with simple libs wont get you anywhere.

    isuggest you first look at a WinAPI tutorial to understand how making a window works. than i suggest you either take a look at DirectDraw or if you really want to start 3D immediatly i suggest OpenGL. OpenGL is not that hard! Direct3D or DirectGraphics are just a pain in the ***. and opengl also appears to be faster.

    also i suggest NOT to use MFC!! escpecialy for when creating games, stay away from it, its just a WinAPI wrapper and only teaches how to use mfc and not winapi itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured