Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Drawing a maze from a text file on sfml 2.1  (Read 2496 times)

0 Members and 1 Guest are viewing this topic.

ozwurld

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Drawing a maze from a text file on sfml 2.1
« on: August 27, 2014, 03:42:19 pm »
Good day all,

I need to draw a really complex maze for a game that im making and would like to find out if it is possible to draw the maze based on a mapping that i have in a .txt file

-Thanks!

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Drawing a maze from a text file on sfml 2.1
« Reply #1 on: August 27, 2014, 05:19:56 pm »
Of course it is possible, as for how to do it? Well that is your job as a programmer to figure out. We welcome specific questions about SFML here, but generic how to solve XXX problems we will not help with. Especially when you have shown no initiative that you have already attempted to solve the problem you are asking about.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Drawing a maze from a text file on sfml 2.1
« Reply #2 on: August 27, 2014, 06:38:14 pm »
In the SFML tutorials, there is an example for displaying mapped tiles. As for parsing the text file, you may have to customise your own loader if it's in your own custom format.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Drawing a maze from a text file on sfml 2.1
« Reply #3 on: August 27, 2014, 06:41:57 pm »
Or instead of parsing text files you could use Tiled and one of the loaders that exist for its format (search the forum).

ozwurld

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Drawing a maze from a text file on sfml 2.1
« Reply #4 on: August 28, 2014, 12:34:25 am »
Thanks for the hint, I really appreciate it everyone.  :)

 

anything