dat/ Directory Reorganization Proposal

For discussion of the code running behind the game

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

dat/ Directory Reorganization Proposal

Postby Roots » Thu Sep 25, 2014 5:13 am

I was having a look at our dat/ directory and it's kind of a mess. I want to propose the following set of changes to help keep all our data and script files more organized.

Top level directories:
lua/
lua/data/
lua/graphics/
lua/scripts/
lua/test/

dat/ was intended to be a 3 character shorthand for "data", but as we know there's more than just data here. In keeping with our three-letter top level directory convention, I want to rename it to lua/ to be more accurate about what the directory contains.

lua/data/ contains data files such as the stats for characters and enemies, inventory objects, tilesets, and maps.

lua/graphics/ will contain any files that define certain graphical effects such as lightning. We don't have a lot of these at the moment, but I expect our list of graphical effects will grow in the future.

lua/test/ is for holding any lua files that are strictly used for testing purposes and are never used during the standard execution of the game


Within each directory I will do some additional reorganization/changing (such as renaming dat/objects/ to lua/data/inventory) as well, but I don't want to go into every little detail here. The top level directory organization is what's most important, and I wanted to leave that open for discussion/debate at least. Of course, we can always rename things again later if there's disapproval over some of the changes I make.

lua/scripts/ will contain any files that define Lua code that changes the state of the game when it is executed. This includes the map scripting files, battle scripts, and so on.
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: dat/ Directory Reorganization Proposal

Postby nemesis » Tue Sep 30, 2014 7:23 am

The install script (Makefile) and the the txt/POTFILES needs to be corrected in terms of the new directories.

After make install, the game still only starts from the main directory, since everywhere else, all the lua/... files are missing.
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: dat/ Directory Reorganization Proposal

Postby Roots » Tue Sep 30, 2014 2:58 pm

Oops, thanks for catching that. I'll fix it later this week.
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: dat/ Directory Reorganization Proposal

Postby nemesis » Tue Sep 30, 2014 3:35 pm

Great. I was just wondering, why the program didn't start. :huh:
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: dat/ Directory Reorganization Proposal

Postby Roots » Tue Sep 30, 2014 5:18 pm

It's because I didn't test make install when I made these changes, and didn't realize that I had to update some information in the build system. It should work fine if you just build it with make and run it from the install directory.
Image

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests