//psuedocode
Level mylevel;
mylevel = (Level)stream.read(Csharpobject, whereveritslocatedinthefile);
If you don't understand what I mean I'll try to make it clearer.
Thanks.
//psuedocode
Level mylevel;
mylevel = (Level)stream.read(Csharpobject, whereveritslocatedinthefile);
We have that all the time. Many tools are in C#, game code is in C++.
As mentioned you can use XML, which is certainly fine if you don't mind the load time.
Generally we write our tools to output the final data structure as used in memory. Rather than writing out a file format that needs to be parsed and memory allocated, you can write out exactly the memory format needed in the game; that allows us to just load the data directly into the final location and use it without any unpacking or extra load time. You can just read it from disk and continue.
We have that all the time. Many tools are in C#, game code is in C++.
As mentioned you can use XML, which is certainly fine if you don't mind the load time.
Generally we write our tools to output the final data structure as used in memory. Rather than writing out a file format that needs to be parsed and memory allocated, you can write out exactly the memory format needed in the game; that allows us to just load the data directly into the final location and use it without any unpacking or extra load time. You can just read it from disk and continue.
Is there a link or name for this way of saving/loading that I can look up? For this small project I could use xml but your method seems like it would be easier/faster. Easier in the sense of loading and saving.
We have that all the time. Many tools are in C#, game code is in C++.
As mentioned you can use XML, which is certainly fine if you don't mind the load time.
Generally we write our tools to output the final data structure as used in memory. Rather than writing out a file format that needs to be parsed and memory allocated, you can write out exactly the memory format needed in the game; that allows us to just load the data directly into the final location and use it without any unpacking or extra load time. You can just read it from disk and continue.
[quote name='frob' timestamp='1325479542' post='4898855']
We have that all the time. Many tools are in C#, game code is in C++.
As mentioned you can use XML, which is certainly fine if you don't mind the load time.
Generally we write our tools to output the final data structure as used in memory. Rather than writing out a file format that needs to be parsed and memory allocated, you can write out exactly the memory format needed in the game; that allows us to just load the data directly into the final location and use it without any unpacking or extra load time. You can just read it from disk and continue.
You do not change the formats very often if you think well about them first.
... file format that contains a version number which makes it easier to support older versions and convert them on the fly...