Sign in to follow this  
llamaSong

2DGraphics

Recommended Posts

llamaSong    126
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?

Share this post


Link to post
Share on other sites
JWindebank    156
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. :)

Share this post


Link to post
Share on other sites
Binomine    611
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.

Share this post


Link to post
Share on other sites
TheRealMAN11    142
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.

Share this post


Link to post
Share on other sites
Rob Loach    1504
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:


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this