New Files Question

I don’t think I encountered a response to this question anywhere, so I’ll just ask it here. What exactly is another file in a project used/useful for? And how do you get it to run in the main/first file you use in a project? Thanks.

@Perscirious When you refer to a file, do you mean a file that’s read using file io or something that uses readLocalData or readGlobalData.

I’m thinking he means another tab. They are used for classes mostly I believe. Classes allow you to store the information for a certain object that will be used multiple times, like an enemy in a game. You can call that class to be used in the main tab. The main benefit is making your code easy to read, because everything is sorted in its own tab. I’m still new to classes, so there is probably a lot more to them than that.

There are 2 great tutorials about classes written by @Ignatz over on his website called coolcodea, along with a couple hundred other amazing tutorials for Codea also written by Ignatz.

Actually, tabs are just kind of used to make your code prettier and easier to go through. Would you rather have a project with 20 classes all in one massive tab, or 20 tabs, where you can select each tab to easily navigate through them?

Ok, I understand now. I sorta knew what the classes were for, but not exactly the new files. Thanks!

New file is basically a new class, minus the template. I think it’s intended for pasting code in