![]() |
|
[SVN]File structure - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html) +--- Forum: Development (https://forum.sa-mp.nl/forum-16.html) +--- Thread: [SVN]File structure (/thread-23207.html) |
[SVN]File structure - Fireburn - 04-25-2010 We should have a more clear file structure within our trunk folder, which makes it easier to find stuff. This sorting can go on for as far as you can imagine, but by having seperate files for each function the time of searching for something dramaticly increases. We need to find a good balance. My suggestion is that we create some main files (vars.pwn, lvp.pwn, defines.pwn etc.), like we already have now, but then a less amount of files, and that we move all handlers to a handler folder. Commands should all be in the commands folder, but should be sorted again, since not all commands are in the corresponding file. Ideally we wouldn't need the maps and races folder anymore, because the best thing would be to have them in a DB to allow creating on the fly. Callbacks will be in their own folder, but other stuff like the anticheat handler should be in the handlers folder. We should only have critical files with only the most critical things in the main folder, and sort the rest in other folders. Ideas/suggestions? PS: These changes are due for May 2 2010, and have their own milestone on the trac. Milestone 1. Re: [SVN]File structure - Jay - 04-25-2010 meh It would be better to remove the Handlers/ file completely imo because it's kinda screwed. It has random handlers for completely different stuff in one folder ![]() See http://ww3samp.com/jay/LVP/cleanup/LVP/Vehicles/ That's a cleanup of the vehicle files I done a while ago. Shame it doesn't compile :x Re: [SVN]File structure - Fireburn - 04-25-2010 We could place your folder in a /handlers/ map, so that each handler has it's own callbacks in the handlers/specifichandler/callbacks folder. This is the same for functions and all. We could have the following folders: /handlers/vehicles/ (vehicle related stuff) /handlers/player/ (disconnect, connect) /handlers/minigames/ (all minigame related stuff and handlers go in here) / (main folder with lvp.pwn and stuff like vars, defines) /callbacks/ (all general non-player-related callbacks) /commands/ (for all command related files) Problem is that it's hard to place everything in specific folders, I can't find a folder for for example the propertyhandler. Anyone has some ideas? We just need to make it usable for us, so let's find a logical and simple structure. Re: [SVN]File structure - thiaZ - 04-26-2010 I already created the callback folder some days ago, I think Fireburns idea is a good one: 4 Folders >
Re: [SVN]File structure - Jay - 04-27-2010 I've made a possible start on the vehicles: Elements/Vehicles/core.pwn contains stuff which is yet to be organised from the old vehiclehandle.rpwn Structure: Elements/Vehicles/ core.pwn vehicleLayout.pwn Handlers/vehicleRandomSpawn.pwn Handlers/vehicleSpeedo.pwn Handlers/vehicleHealth.pwn (still needs to be done) Callbacks and stuff still need to be done. I've also done part of the interface. |