Dave Posted June 22, 2024 Author Posted June 22, 2024 1 minute ago, Magictallguy said: So yeah, about having a place to send all these. The open-sourcing has renewed the soft spot for MCC I'm happy to include your Open Source modules in the core repository if you open a PR too, I'll probably open source my modules and include them over the following days. 3 Quote
Magictallguy Posted June 22, 2024 Posted June 22, 2024 12 hours ago, Dave said: I'm happy to include your Open Source modules in the core repository if you open a PR too, I'll probably open source my modules and include them over the following days. Oh, sick! Gimme a moment to update the cronless crons to use the new staff roles and I'll fire PRs 🙂 Branches merged, PR sent 1 Quote
Uridium Posted June 22, 2024 Posted June 22, 2024 On 6/20/2024 at 3:21 PM, Magictallguy said: This was fun. More, please! 😄 Ooh! Here's a potentially-horrifying idea. Lets go through and update all MCCv2 mods to be PHP8-compliant and release them under one mass repo (with author's permission if not considered abandonware, of course) >:D Ooooh! Can we do a module installer? plzplzplz I have a kinda working V3 i'll upload if ok to do so Quote
Magictallguy Posted June 23, 2024 Posted June 23, 2024 10 hours ago, Uridium said: I have a kinda working V3 i'll upload if ok to do so While that isn't my choice, I admit I'm curious! Semi-related; So, what about .. transactions? 2 method additions to the database class and we've got easy-enough transactions. I'm aware that MyISAM is a non-transactional storage engine, whereas InnoDB would support them fine (not to worry, MyISAM will just ignore the commit/rollback and run as "normal"). /** * @param string $name * @param array $arguments * @return void */ public function __call(string $name, array $arguments) { call_user_func_array([$this->connection_id, $name], $arguments); } /** * @param Closure $func * @return void */ public function try_transaction(Closure $func): void { try { $this->begin_transaction(); $func(); $this->commit(); } catch (mysqli_sql_exception $e) { $this->rollBack(); throw $e; } } Then, for usage, and using the new staff roles as example; /* BEFORE */ $this->db->query( 'DELETE FROM users_roles WHERE staff_role = ' . $role_id, ); $this->db->query( 'DELETE FROM staff_roles WHERE id = ' . $role_id, ); stafflog_add(ucfirst($log)); /* AFTER (where $role_id is the role's ID and $log is a string) */ $save = function () use ($role_id, $log) { $this->db->query( 'DELETE FROM users_roles WHERE staff_role = ' . $role_id, ); $this->db->query( 'DELETE FROM staff_roles WHERE id = ' . $role_id, ); stafflog_add(ucfirst($log)); }; $this->db->try_transaction($save); Do we want? Quote
ags_cs4 Posted June 23, 2024 Posted June 23, 2024 tbh its been ages since i did any work on v2 so its your call, if you see its good to the engine, count my vote in 😄 and i dont think any one will be against any work to mcc so just do whatever you want 🤣 Quote
Dave Posted June 23, 2024 Author Posted June 23, 2024 17 hours ago, Uridium said: I have a kinda working V3 i'll upload if ok to do so I have this too, I believe it’ll be the same one. I’ll be uploading it later today. @Magictallguy seems like a good addition. I’d love to see a good ORM and migrations too perhaps to help people learn modern practices. Not sure if jamming Eloquent in is a good idea 😂 Quote
Magictallguy Posted June 23, 2024 Posted June 23, 2024 1 hour ago, Dave said: I’d love to see a good ORM and migrations too perhaps to help people learn modern practices If nobody beats me to it, consider it done. I'm not as experienced with Eloquent as I'd like to be, so I'll be avoiding implementation. If the concept gains traction, I'll bite the bullet and blow off the dust, as it were. That being said, replacing an ORM with another on a project this arguably small would be a small feat. As for PDO (which @ags_cs4 mentioned), I quite like ParagonIE's EasyDB. Its performance - while I can't provide statistics right now - has been exactly what I'm looking for; easy to use, fast, (relatively) light on resources. .. which, thinking about it, also opens another question - do we want to rely on package managers (npm, composer, etc.) or ship it all in-house? Quote
tom39 Posted July 4, 2024 Posted July 4, 2024 wanted to install this on xampp but got this error code Installer If you bought this from anywhere else but MCCodes.com please click here . Thank you for choosing MCCodes.1. Diagnostics >> 2. Configuration >> 3. Installation & ExtrasAttempting DB connection... ... Successful. Writing game config file... Write Config... ... file written. Writing base database schema... ... done. Writing game configuration... Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' `display_pic`, `staffnotes`, `voted`, `user_notepad`) VALUES ('...' at line 6 in C:\xampp\htdocs\mccode\class\class_db_mysqli.php:119 Stack trace: #0 C:\xampp\htdocs\mccode\class\class_db_mysqli.php(119): mysqli_query(Object(mysqli), 'INSERT INTO `us...') #1 C:\xampp\htdocs\mccode\installer.php(465): database->query('INSERT INTO `us...') #2 C:\xampp\htdocs\mccode\installer.php(33): install() #3 {main} thrown in C:\xampp\htdocs\mccode\class\class_db_mysqli.php on line 119 Quote
JFOC Posted July 4, 2024 Posted July 4, 2024 (edited) 46 minutes ago, tom39 said: wanted to install this on xampp but got this error code Installer If you bought this from anywhere else but MCCodes.com please click here . Thank you for choosing MCCodes.1. Diagnostics >> 2. Configuration >> 3. Installation & ExtrasAttempting DB connection... ... Successful. Writing game config file... Write Config... ... file written. Writing base database schema... ... done. Writing game configuration... Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' `display_pic`, `staffnotes`, `voted`, `user_notepad`) VALUES ('...' at line 6 in C:\xampp\htdocs\mccode\class\class_db_mysqli.php:119 Stack trace: #0 C:\xampp\htdocs\mccode\class\class_db_mysqli.php(119): mysqli_query(Object(mysqli), 'INSERT INTO `us...') #1 C:\xampp\htdocs\mccode\installer.php(465): database->query('INSERT INTO `us...') #2 C:\xampp\htdocs\mccode\installer.php(33): install() #3 {main} thrown in C:\xampp\htdocs\mccode\class\class_db_mysqli.php on line 119 modify installer.php line 453 into: $db->query( "INSERT INTO `users` (`username`, `login_name`, `userpass`, `level`, `money`, `crystals`, `donatordays`, `user_level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `hp`, `maxhp`, `location`, `gender`, `signedup`, `email`, `bankmoney`, `lastip`, `lastip_signup`, `pass_salt`, `display_pic`, `staffnotes`, `voted`, `user_notepad`) VALUES ('{$ins_username}', '{$ins_username}', '{$e_encpsw}', 1, 100, 0, 0, 2, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$adm_gender}', " . time() . ", '{$ins_email}', -1, '$IP', '$IP', '{$e_salt}', '', '', '', '')" ); Edited July 4, 2024 by JFOC wrong data Quote
tom39 Posted July 4, 2024 Posted July 4, 2024 (edited) $db->query( "INSERT INTO `users` (`username`, `login_name`, `userpass`, `level`, `money`, `crystals`, `donatordays`, `user_level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `hp`, `maxhp`, `location`, `gender`, `signedup`, `email`, `bankmoney`, `lastip`, `lastip_signup`, `pass_salt`, , `display_pic`, `staffnotes`, `voted`, `user_notepad`) VALUES ('{$ins_username}', '{$ins_username}', '{$e_encpsw}', 1, 100, 0, 0, 2, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$adm_gender}', " . time() . ", '{$ins_email}', -1, '$IP', '$IP', '{$e_salt}', '', '', '', '')"); This is the one i have , the fold is `lastip_signup`, `pass_salt`, , `display_pic`, `staffnotes`, `voted`, `user_notepad`) it's a double `pass_salt`, , `display_pic Edited July 5, 2024 by tom39 Quote
Richard Posted July 15, 2024 Posted July 15, 2024 Maybe there's some life left in the old dog yet. 2 Quote
Mmomakers Posted July 15, 2024 Posted July 15, 2024 Open source? It’s been years was looking for a project to work on. Might convert to a more better tech stack mobile version. MERN? 1 Quote
Richard Posted July 16, 2024 Posted July 16, 2024 On 6/23/2024 at 7:45 AM, Dave said: I have this too, I believe it’ll be the same one. I’ll be uploading it later today. @Magictallguy seems like a good addition. I’d love to see a good ORM and migrations too perhaps to help people learn modern practices. Not sure if jamming Eloquent in is a good idea 😂 Has this been uploaded? Interested to see what they did. Quote
Uridium Posted July 16, 2024 Posted July 16, 2024 2 hours ago, Richard said: Has this been uploaded? Interested to see what they did. Not seen it Quote
BigDog2k Posted December 5, 2024 Posted December 5, 2024 It’s about time we stopped throwing band-aid updates at MCCodes and started thinking bigger. The framework has been stretched far beyond its limits. We’re long overdue for a complete rebuild from the ground up, and if that’s not feasible, then perhaps it’s time to let MCCodes retire gracefully. Given its open-source nature, those still using it can adapt it as they see fit. A fresh foundation wouldn’t just address the mounting legacy issues but would also pave the way for modern features, improved scalability, and better security. Continuing to patch outdated code is simply delaying the inevitable. Let’s do it right this time, or let it go entirely, it’s been 20 years without a truly meaningful update. Those who found success with MCCodes, like Torn, had to practically rewrite the entire framework to fix game-breaking bugs and address severe security flaws. Most sites still relying on MCCodes have customized it so heavily that they couldn’t adopt any updates even if they were released. This means further patching would likely be irrelevant to the majority of its user base. Instead, we should focus on rebuilding the platform or stepping aside to let others innovate and carry it forward. Am confident it is torn.com who was on mccodes until it become fully custom due to the complete rebuild however I maybe wrong I just know one of the big games a few years ago was mccodes at one point till a fully custom build came into play but it was done within mccodes. Quote
big_mike Posted December 6, 2024 Posted December 6, 2024 23 hours ago, BigDog2k said: It’s about time we stopped throwing band-aid updates at MCCodes and started thinking bigger. The framework has been stretched far beyond its limits. We’re long overdue for a complete rebuild from the ground up, and if that’s not feasible, then perhaps it’s time to let MCCodes retire gracefully. Given its open-source nature, those still using it can adapt it as they see fit. A fresh foundation wouldn’t just address the mounting legacy issues but would also pave the way for modern features, improved scalability, and better security. Continuing to patch outdated code is simply delaying the inevitable. Let’s do it right this time, or let it go entirely, it’s been 20 years without a truly meaningful update. Those who found success with MCCodes, like Torn, had to practically rewrite the entire framework to fix game-breaking bugs and address severe security flaws. Most sites still relying on MCCodes have customized it so heavily that they couldn’t adopt any updates even if they were released. This means further patching would likely be irrelevant to the majority of its user base. Instead, we should focus on rebuilding the platform or stepping aside to let others innovate and carry it forward. Am confident it is torn.com who was on mccodes until it become fully custom due to the complete rebuild however I maybe wrong I just know one of the big games a few years ago was mccodes at one point till a fully custom build came into play but it was done within mccodes. Torn isnt mccodes mccodes was designed around the design of torn from what i can remember anyway. Quote
Magictallguy Posted December 6, 2024 Posted December 6, 2024 A little MCC history - dabomstew was a Torn City player and wanted his own version, so he and ColdBlooded wrote MCC. Torn City came first and inspired MCC 2 Quote
Canjucks Posted December 8, 2024 Posted December 8, 2024 On 12/7/2024 at 5:41 AM, Magictallguy said: A little MCC history - dabomstew was a Torn City player and wanted his own version, so he and ColdBlooded wrote MCC. Torn City came first and inspired MCC That is interesting. I always thought it was Torn being MCC that made all the copycats come from around 2007 onwards once it got its initial base grounded. From memory Torn looked like a mcc game and begun at the same time in 2004. Quote
rockwood Posted December 13, 2024 Posted December 13, 2024 V2 is slightly better than V1, but it still needs significant improvements. However, it’s a good fresh start, and we need to work harder on it. Quote
peterisgb Posted December 18, 2024 Posted December 18, 2024 On 6/22/2024 at 7:29 PM, Uridium said: I have a kinda working V3 i'll upload if ok to do so Funny enough, I have a copy and tho not working, my last work on it i had it up and running barely lol. It's just a shame that i've had to step back from coding due to kids taking my time, but maybe one day when have the funds spare and the time i'd love to give it another crack 😄 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.