Page 1 of 1

does game editor support file reading/writing

PostPosted: Tue Nov 13, 2007 3:25 am
by kicy
Basicly, I need to make a rpg engine that can load external files which contain the information to build a map (or level; which would be made with a level editor specificly for my game). Can game editor do this?

Re: does game editor support file reading/writing

PostPosted: Tue Nov 13, 2007 4:50 am
by Rux
Yes, but I don't know how. Ask SGT.Sparky.

Re: does game editor support file reading/writing

PostPosted: Tue Nov 13, 2007 5:42 am
by Fuzzy
Fuzzy speaks in his best SGT Sparky voice: "yes they can! now play my latest game and tell me what you think!"

You'll want to study fread, fwrite, fgets, fputs, and especially fgetc and fputc. to open files you will need fopen() and fclose(). once you understand them, go and study a simple file format like tga. There are lots of references to the format on the web.

Here is some definative reading: http://en.wikipedia.org/wiki/Fopen

Re: does game editor support file reading/writing

PostPosted: Tue Nov 13, 2007 7:46 am
by akhad
The basics of reading a text file are in this thread.
[urlhttp://game-editor.com/forum/viewtopic.php?t=1605&highlight=readlines[/url]

Writing to a file is a similar process using the commands Fuzzy mentioned.

Re: does game editor support file reading/writing

PostPosted: Tue Nov 13, 2007 9:28 pm
by kicy
k thanks alot, I was trying to decide what engine i should to make my rpg :)

Re: does game editor support file reading/writing

PostPosted: Wed Nov 14, 2007 12:11 am
by Fuzzy
Use the Game editor! its certainly got the best community.