Hello There, Guest! Login or Register


Code cleanup
#1
What was just quickly discussed was a major cleanup of the code. This means that most of the code in lvp.pwn would be organized into their own files, old broken code removed, things done more efficiently. This would probably mean we'd find more crap which can be removed, and we'd be working in a much more organized manner. Bring on more classes, and less messy code!

P.S. I'm alright for contributing largely to this -- it'll be time consuming.
Reply
#2
Great, I'm up for helping too. It will get this stuff organized once and for all. Nothing beats a good, clean, indented code. Like you said though in .dev though, lets get the current tickets finished first. Today I finished two off, and right now for that matter I'm working on one of them (the capture the breif one <3). With the race builder, I have only got that hard bits too do. (Saving/loading of races) the rest of it is 100% finished, tested, and so far bug free (more tests will be required though)


Anyway, A good code cleanup will be really nice. However since I am in college all this week and have some work to do, I can't put as much work in as normal, but I'll still help :D (This is my last week in college anyway for like, 5 weeks again)


Lol, your signature even gets me excited <3
Reply
#3
Aye. We should try and convert a lot of systems into their own classes, would make things much tidier and cleaner.

And err, if you need a hand with that race handler save/load stuff, I'm alright to help. Best idea I think is saving them under their own file, and then saving the ID into their userfile.

We could even use an SA-MP database (SQLite), would be pretty fast. Did a system of saving IPs into a database along with the user's name once for the B&A server, so I have *some* experience with that.

Oh and while I remember.. should we remove the language handler stuff? I've always found it annoying, and seeing as though the rest of the gamemode is in English changing the language to Dutch in the future would be a nuisance, as there are way too many strings which are in English.

Would clear up clutter. :)
Reply
#4
I always find that annoying to, but probably best leaving it in, it must have been done for a reason and it probably took a while to do anyway. Infact why is it disabled? A lot of LVP players are dutch, so maybe we could allow them to choose there language ingame? Offcourse however, since neither of us speak dutch, it would only support the things that are in it now, but there are over 300 strings for each language IIRC. However the only downfall of doing so is it might encourage other languages to be spoken in the chatbox aswell, so if it is to be disabled management approval will probably be required. If it really bugs you that much though, we could always just remove it, and if it's needed in future it'll be in the sandbox folder.  B)

Anyway, about the race saving, I have absoloutely no idea about the squlite stuff. That was my idea as you said though, saving each race to an independant file, although, I havn't even started the handler for it yet. About the user stuff, lets just get the basic builder saver/loader done for now, then worry about that later. Adding stuff like /my race invite and support for players to build there own only takes a few minutes tbh, I think we just need the builder to work first of all, bug free.

Anyway when I get home tonight I'll test out the /breif minigame fully, and once thats done get back to business on the race builder. Still the issue with minigames not properly ending also, we could build a whole new deathmatch handler since LVP dosn't really have one in comparison to the race/derby anyway, but lets keep that at low prio for now, get the assigned tickets done, and clean the code up  8). Will take a while to clean it up, but there is absolutely no rush or pressure or anything to get it done  :z
Reply
#5
There aren't enough strings for users to be able to pick Dutch as their language -- it'd just be confusing.

Also, if you can commit a build with the race handler working apart from the saving/loading, I'll build the SQLite database and stuff, no problem. It could hold a lot of data, and once that's done I'll commit again so you can build in the loading part (i.e. getting the data from the load function into the gamemode ready to race).
Reply
#6
Alright cool ;) I already did commit it a few days back (Handlers/RaceBuilder.pwn) if you get stuck or anything, I could always just do the file saving  8). And there are quite a few strings in there, You sure it wouldn't be enough? I guess I can't really look from in college, meh. In that case we can trash it when where cleaning it up, and fix the GetString statements ;)

Anywho, lunch break over, /me back to work.
Reply