Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

com

Text based Rpg

This topic is 5745 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 have started programming my first game but i have hit a big problem; when the game starts up it displays 2 options, 1 is use old character and the other is create a new character, when you go to create new character u have to select a character image but i dont know how to *display* all the images in my window and let the *user select one*. anyone know of any tutorials on this, preferably in open gl? thx in advance

Share this post


Link to post
Share on other sites
Advertisement
*ahem* Why are you using OpenGL to create a text-based game? With all due respect that's like dispatching an F-16 to take out a caterpillar... get the picture?

Besides, I don't think there are any tutorials (at least that I know of) of doing exactly that and by no means in OpenGL.

If I were creating a text game I'd just set up a simple form with some rich text boxes (for color text), and have some areas for displaying images.
It'd be really easy to do in something like Visual Basic or Delphi (well I don't know much c++ anyways but it's surely possible of course using windows api or MFC or something...)

-- Ivyn --

[edited by - Ivyn on August 28, 2002 1:02:05 AM]

Share this post


Link to post
Share on other sites
hmm, why dont you just output your text onto a console ?

Its my duty, to please that booty ! - John Shaft

Share this post


Link to post
Share on other sites
I think if you read the post he mentions PICTURES, which means that even though it is text based, he does use some graphics in the game.

As for the problem, it sounds like you just need to get a list of the images available and display them next to each other. As to how you would specifically do that, perhaps seeing your code will allow us to modify it?

Share this post


Link to post
Share on other sites
I have sort of figured it out, all i really should have mentioned was the word buttons becasue thats what im trying to create here...
ive got my images to display but the problem is do i use standard windows reading mouse or direct input or somthign like that. and if i use standard windows reading mouse then whats the command to c if a pic has been clicked on? (wm_down?)

Share this post


Link to post
Share on other sites
quote:
I think if you read the post he mentions PICTURES, which means that even though it is text based, he does use some graphics in the game.


And if you had read my post you would have seen I mentioned some areas for displaying images.

-- Ivyn --

Share this post


Link to post
Share on other sites
is anyone up for the task of actually answerign my question so i can make a menu with buttons and finish this dam game....

Share this post


Link to post
Share on other sites
First, never underestimate The Caterpillar.

As for the original question, you need to do something like:
Display the pictures side by side, and store the rectangle that defines the border of each in an array.
When you get a mouse down event (Windows: WM_LBUTTONDOWN, WM_LBUTTONUP), determine where the user clicked (Windows: WM_MOUSEMOVE) and compare it to your border array.
Once you figure out which border the click falls within, you know which picture to use.

I don''t speak OpenGL. Sorry.

For extra credit, highlite the border of the pic, as the user WM_MOUSEMOVEs over it.
-c

Share this post


Link to post
Share on other sites
thank you very mutch for that, thats goign to definatly help me out alot!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!