|
Post by MBitt on Feb 26, 2004 20:25:09 GMT -5
I have been using alot of graphics in a level and would like to know how to dump these graphics and upload another set for the next level. Can GameMaker call itself and pass variables. Then the second and proceeding levels would be independent programs, with game data being passed forward.
|
|
|
Post by AltiusBimm on Feb 27, 2004 1:14:19 GMT -5
What you say is not impossible…though I don’t know about passing variable in the way one passes variables to a DOS program at the command line…I do know how to do it with an external text file. Someone with more time can explain in detail. ;D
|
|
|
Post by IsmAvatar on Feb 27, 2004 13:02:00 GMT -5
you can use files to pass stuff between games. Ini files are a bit easier to handle, i think.
whatever you wanna pass off, just write it to a file ini_open("pass.ini"); _ts = ini_read_string("All","tileset",tileset); ini_write_string("All","tileset",tileset); ini_close(); tileset = _ts
|
|
|
Post by AltiusBimm on Feb 27, 2004 19:26:56 GMT -5
It is also perfectly effective to use a plain text file. As in file_open_write(filename); file_open_read(filename); file_write_string(string); VariableName = file_read_string();
etcetera.
(particularly if one is using pre-GM5.1, I should add)
|
|
|
Post by MBitt on Mar 10, 2004 23:01:17 GMT -5
Thanks for the info on data transfer between games. I will just have to find an alternative to the memory problem. RPGs need a vast world to explore with many new sites and locations to discover. I need a way to get it all in there without putting it all into memory until needed.
|
|
|
Post by IsmAvatar on Mar 11, 2004 17:35:00 GMT -5
Most games use something called swapfiles, i believe. in the middle of the game, when you reach a certain point, it will stop to load something for a moment. It is loading the swap files.
What swap files are, they are files (text or whatever, but most are binary) that store the data of various areas of the game until they are needed. this way, the game can free all the memory it needs, and you can move around without other parts of the game slowing it down. It's a very good idea to use swapfiles if you know how.
|
|
|
Post by MBitt on Mar 22, 2004 21:22:33 GMT -5
With a DLL file maybe, but doing memory read and writes is a little above GameMaker. Plus the potential of crashes is high. I thought maybe something of a combination of programs might work. Use the data storage and load routines to get info moved from and to the program and use another program to restart GameMaker with new data. Dos was very good at this when using bat files. DarkBasic and 3dGamemaker can restart a new progam, but they both handle memory very well and I have never found a need to start a 2nd program. Actually I think DarkBasic can start and run GameMaker. I will tinker with this Idea for awhile.
|
|
|
Post by IsmAvatar on Mar 22, 2004 21:57:53 GMT -5
You can make DOS batch files with gm.
/*finds the windows version using DOS batch files via GM. May have changed slightly through the different versions of GM and DOS*/ file_open_write("mybatch.bat") file_write_string("@ECHO OFF") file_writeln() file_write_string("version > versioner.txt") file_writeln() file_write_string("exit") file_close() execute_program("mybatch.bat",arguments,1) file_open_read("versioner.txt") file_readln() windows = file_read_string() file_close() file_delete("mybatch.bat") file_delete("versioner.txt") show_message("you are on " +windows)
|
|