| Blockland Forums > General Discussion |
| When you are making add-ons, how do you divide it? |
| << < (3/3) |
| elm:
For Land of blocks i use different .cs files for dufferent things. |
| Headcrab Zombie:
For larger projects I break things into several files. For example, in an RPG I might have one file for core functionality (such as tick function), another file for the profile saving/loading, another for class system, etc. For a typical gun or vehicle or something, you shouldn't need more than one file for the datablock definitions, and if it has a large amount of script to go with it, maybe another support_ file (thought I usually just throw my script after the datablocks) On a related note, one thing that annoys me: server.cs files that contain nothing but one exec call to exec another file that has all the add-ons code in it. |
| RaR:
--- Quote from: RagnaTheBroedge on July 23, 2013, 06:26:58 AM ---everything in one line --- End quote --- a new file for every line |
| otto-san:
Depends on the size of the project. For small projects, just the basic server/client scripts will do. For medium-sized projects, I'll have multiple .cs files dedicated to certain aspects of the mod, and maybe a subfolder for any data files (e.g. .dts shapes, .blb files, sounds, etc.). With large projects I go for an organised subfolder approach. For example: GameMode_buttsworld |-server.cs |-resources |-|-bigbutts.dts |-|-fantastic.wav |-scripts |-|-dependency |-|-|-player.cs |-|-|-client.cs and so on |
| Navigation |
| Message Index |
| Previous page |