3 Replies - 5422 Views - Last Post: 07 August 2011 - 03:48 AM Rate Topic: -----

#1 C_Dingo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-December 08

Incorporating graphics into a text based game

Posted 06 August 2011 - 09:07 AM

Recently I've been working on a simple text based game in C++. I have a battle system implemented (much like a standard turn-based RPGs), as well as a small map using an array (the player moves a character around and starts a battle once it tries to enter a position occupied by an enemy). The game itself plays fine, though I need to go back in and clean up the code. My main question, however, is if there is a way I can take what I have and incorporate some type of graphics for just the map itself? I've dabbled with Allegro a bit, and I know I can display graphics using an array, but I'm not sure I can display graphics and text at the same time. I'd like the map to display constantly, and when a player enters a battle, the text would appear below the map until either the player or enemy has been defeated. Any help or a point in the right direction is much appreciated. Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Incorporating graphics into a text based game

#2 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Incorporating graphics into a text based game

Posted 06 August 2011 - 11:12 AM

Every graphics library/SDK is capable of displaying both text and graphics, with the text most likely either being a graphics element or overlay to other graphical elements.

I have never used Allegro for instance, but you can research its text handling capabilities and take it from there from what you have learned already with it. :)
Was This Post Helpful? 0
  • +
  • -

#3 C_Dingo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-December 08

Re: Incorporating graphics into a text based game

Posted 06 August 2011 - 08:40 PM

Thanks for the reply :). I'll definitely look into it. I was just wanting to make sure that it is something I can do, and incorporate into my existing code, without too much trouble. Thanks again.
Was This Post Helpful? 0
  • +
  • -

#4 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Incorporating graphics into a text based game

Posted 07 August 2011 - 03:48 AM

No problem. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1