1 Replies - 733 Views - Last Post: 07 November 2012 - 05:37 AM Rate Topic: -----

#1 sanghai45   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 20-November 11

Help in Reading level file of game in modular way ?

Posted 06 November 2012 - 08:44 PM

I am trying to implement program in modular way or you can say that OOPS way .. This is begining so wish to get help to implement it

My problem is I can think of modules but then I am not able to convert it in to coding

Firstly I have habit of writing hardcode positions value so I thought of reading it from xml/text files. I have classes that reads the text file .. but now how to use it in modular way I need help in that

What my idea is ,

I have GamePlay class where I want to do everything loading level , creating elements .. So while creating elements I need positions which I thought to get it from Class name LevelElements

Now this is my paper work but how do I put it in to coding

I guess I have to make singleton for the class GamePlay so all the member variables of gamePlay can be access in LevelElements class where I have to read all the position by calling functions in class ReadFile.cpp

Now can anyone please give me the basic structure of this idea it will be very helpful...

Is This A Good Question/Topic? 0
  • +

Replies To: Help in Reading level file of game in modular way ?

#2 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Help in Reading level file of game in modular way ?

Posted 07 November 2012 - 05:37 AM

Have a read through my SDL tutorials linked in my signature. They should get you started with this.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1