Text based Rpg

Started by
16 comments, last by com 21 years, 7 months ago
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
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]
-- Ivyn --
hmm, why dont you just output your text onto a console ?

Its my duty, to please that booty ! - John Shaft
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?
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
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?)
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 --
-- Ivyn --
F-16 and a catipillar, that is a classic, I''m gonna write it down!
is anyone up for the task of actually answerign my question so i can make a menu with buttons and finish this dam game....
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
thank you very mutch for that, thats goign to definatly help me out alot!

This topic is closed to new replies.

Advertisement