It is currently Wed Aug 23, 2017 6:52 am

All times are UTC - 5 hours




 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject:
PostPosted: Mon Oct 22, 2007 10:23 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
In this VMK I show you how to work with ascii (text) files to read data in and write data out to a file. I show you how to setup Visual Studio and how to read in a bunch of data into one variable, or parse input into individual variables like integers, strings or floating point numbers.


Offline
 Profile  
 
 Post subject: A tutorial for advanced reading?
PostPosted: Sat Mar 29, 2008 1:58 am 

Joined: Fri Nov 23, 2007 1:00 am
Posts: 52
Location: Your PC
Well I know that looking at your model loading script would not be a bad idea, but what about a sequel to file reading?

I would like to know how to read a file in a complexed way then just reading it line by line. Example of storing your own data from your program if you where to be making your own map editor lets say.

BOX{
3.3223 4343.334 -4343.443 -56.464
54 453 432
543 4353 3445
}


Line by line:
Create a box model!
Faces Scaled Position
Location.
Rotatation

Thats something that kinda bugs me since your dealing with a lot of info of a level or model you made in a text format or maybe if you where wanting to make your own mini scripting language for your game like Unreal Script.


Offline
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 2:01 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
You can do this with the file loader just by changing your logic when you recognize a keyword. Instead of looking for all the values on one line, read in data from multiple lines until you see the closing brace }. Now you can parse the loaded data.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 9:15 pm 

Joined: Fri Nov 23, 2007 1:00 am
Posts: 52
Location: Your PC
I see how to do it thanks! :D


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron