2DGraphics

Started by
5 comments, last by SKATIN_HARD 18 years, 10 months ago
Okay, I have been learning C++ for a while. Lets say I wanted to create something like Tic-Tac-Toe. Would I need to download and learn something like Opengl to be able to create a box and import TTT pictures and have clickable buttons?
Advertisement
I'm only a beginner myself, but you will need to use some sort of graphics library. OpenGL and DirectX are both a lot harder to grasp than something like SDL or Allegro. These are wrapper libraries that access the more advanced libraries.

There are heaps of resources here at GameDev that help with SDL, I'll point you to the ones I started out with:

Cone 3D SDL Tutorials

Good luck. :)
Quote:Original post by llamaSong
Okay, I have been learning C++ for a while. Lets say I wanted to create something like Tic-Tac-Toe. Would I need to download and learn something like Opengl to be able to create a box and import TTT pictures and have clickable buttons?
There are many ways to obtain what you're after.

Assume you're using Windows, the easiest would be Win32's CButton and CStatic.

you can use CButton to place your buttons and use CStatic to display X, O and blank.
Ok... here is what you need to do... Take the 9pm L train to 3rd street and see my man sparky, he has what you are looking for.

Ok... for real. I can assure you, you don't know as much as you think you do. Expect to be suprised. I would reccommend using SDL, although it is in C, so to use nifty c++ features you would need to write or use a small wrapper lib, but it's good to get all the crappy code out of your system. (I did :)...

So yeah, go ahead and look into SDL.
It is foolish for a wise man to be silent, but wise for a fool.
GUI is a pain to work with. Instead of having to create your own GUI system, I would recommend drawing them in your favourite paint program and then loading the image in through SDL. All you'd need are the board image, an X and an O. When it's O's turn you could have them click on the square they want and it would check where they clicked to determine what square they would like to move into.

Here's some programmer art I made up for you to get yourself started:


Rob Loach [Website] [Projects] [Contact]
Thanks alot guys.
Leet Artwork Rob!
I would say go with sdl too. There are some great tutorials over at Cone3D

This topic is closed to new replies.

Advertisement