Skip to content

Is it possible to create multiple data/code files to store game data? #121

Answered by ThePix
FloridaChristopher asked this question in Q&A
Discussion options

You must be logged in to vote

It depends...

If you are splitting up an existing file, put it in that order. First chunk in first file, second chunk in second file, etc.

You cannot refer to anything in a later file from an earlier file. So "code" needs to go first if it has functions you use elsewhere. But if it refers to objects defined in other files, that has to go at the end. You may want to have a "functions" file first, and another later. That said, objects are usually referenced by string, and if you do that, you can references them before you create them.

I hope that makes sense?

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@FloridaChristopher
Comment options

Comment options

You must be logged in to vote
2 replies
@FloridaChristopher
Comment options

@FloridaChristopher
Comment options

Answer selected by FloridaChristopher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants