Hello There, Guest! Login or Register


[SVN]File structure
#1
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.
#2
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
#3
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.
#4
I already created the callback folder some days ago, I think Fireburns idea is a good one:

4 Folders >
  • trunk/Core (For things like var.pwn, defines.pwn, lvp.pwn)
  • trunk/Handlers (For such things as minigames, and other handlers)
  • trunk/Callbacks (The one as it is now)
  • trunk/Commands (For all the CommandText stuff)
#5
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.