Sign in to follow this  

Game Buttons

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am coding up a simple first version of a rpg game. I am looking around for some code that will allow me to on a 2D game background 1) when you click on a particular point on the image a menu is opened or information revealed like an info bubble. Like if you click on menu a casscase or list appears. 2) have a button (some design) in the foreground. that way when clicked it also clicks. this may mean using a sprite, but for now I was hoping to add the buttons into the background game image. What I want to do is have a human body in animated form, if you click on the head a brain appears. on the edge of the background image which include the body there are options u click on an option and for example, if the option is file, you click on it and more options appear like Save, load etc. If anyone has a site that I could be pointed towards a code example in text or a pdf whatever I would really appreciate it. I am still looking around the internet. I have good programming skillz. but this is one of my first graphics related endevours so hitting a few stumbling blocks. any help would be much appreciated

Share this post


Link to post
Share on other sites
You could take a look at SDL. You can create windows, render graphics, play sounds, ..., with it.
If you have never done graphics before I would recommend to practice it with some examples. There is a good tutorial here: Lazy Foo Tutorial
It's quite easy to use. The only problem is that SDL doesn't have a GUI by default (there are some libraries, but I never used them). You will probably have to write you own routines to handle buttons.

You could also try to use the Windows API (tutorial here), but this could be a bit complicated if you never used it.

Have also a look at the libraries page.

Hope this helps
Regards

Share this post


Link to post
Share on other sites
i tried working with SDL but I kept running into a bit of trouble, errors and that, finally i decided to use Dark GDK.

i should of mentioned that. i was looking into the coordinate type buttons, coz this is the first version and i need it to work first before i build onto it

Share this post


Link to post
Share on other sites
You could have asked for help getting SDL to work - you ended up asking a question anyway, so what's the difference? Also, if you do manage to get SDL working, you won't have to spend as much time reinventing the wheel, and it's easier to find help with SDL than with more obscure libraries.

Share this post


Link to post
Share on other sites

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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