Retaliation 3.0 | Node.js | Roleplaying Solution

Status
Not open for further replies.

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
YQo2ZyP.png

Background
Retaliation was a project which originated from the lack of releases towards the roleplay scene. Various developers were taking keen abuse to this, and profiting by selling older and less stable rev edits to make a quick buck. This led me to create a new project to revolutionize and change the role-playing scene as we know it.

Retaliation 3.0
Previous version were built upon Laravel, which is a PHP framework, but is quite bulky and many users had difficult times adjusting to Laravel. To make up for the mistakes within the last two versions, I now introduce you to the third version of Retaliation.

Numerous changes have occurred since you last seen this project in action, the primary being the switch of languages to Node. Not only does this give a faster overall speed, but it's more reliable in the sense installation is easier, upkeep, and many other things. We use various modules to ensure complete reliability ranging from Express as a HTTP server to the usage of MYSQL pools for reliability.

Updates (June 28, 2016)
Angular has officially been added
Socket has officially been added
A command system has officially been added into the console

Future Plans
A UI may be created for our console


Screenshots
B8eJ68h.jpg

Code Snippets

app/http/user/retrieve.js
Code:
module.exports = function(app) {
  routes = routes + 1;

  app.get('/api/users/request/:who/:token', function(req, res)
  {
    if (req.params.token == 'jaden-was-molested-by-his-dad-and-josh-rear-ended-him')
    {
      pool.getConnection(function(err, connection)
      {
        if (err) console.log('      [Error] Database connection failed');
        connection.query('SELECT id, username, motto, look, credits, activity_points FROM users WHERE username = ? LIMIT 1', [req.params.who], function(err, result)
        {
          if (err) console.log('      [Error] Failed to retrieve cms_settings');

          res.setHeader('Content-Type', 'application/json');
          res.send(JSON.stringify(result[0]));
        });
        connection.release();
      });
    } else {
      res.send('Authorization denied');
    }
  });
}

Completed Code :
LINK REMOVED
 
Last edited by a moderator:

griimnak

You're a slave to the money then you die
Jul 20, 2013
955
794
That template fits an rp retro quite nicely, i must say.

nit-picking;
screenshot-2016-01-02-03-56-02-png.4746

You should try changing the bg color from black to #d5d5d5 and change that grey/white bar under the header image to the color of the bg (the black)
 

Jaden

not so active
Aug 24, 2014
886
263
Multiple database connections? Are you using a connection pool?
And if so, why are you using a connection pool for a CMS? You need to realize that opening a connection is an expensive and time reducing operation, and not at all suitable for a website.

Opening 1 persistent connection on the page load and re-using it per transaction would be the more sensible approach because of the fact that you'd be handling 1 clients request at a time, so it'd be redundant to use a connection pool because no 2 connections would every be busy at the same time.

This will vary based on the web server you'd be using, but that's also highly unlikely.

And if you're not distributing information across web servers then I highly recommend you take a look at APC, which is rumored to be much faster than memcached.
 
Last edited:

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
Multiple database connections? Are you using a connection pool?
And if so, why are you using a connection pool for a CMS? You need to realize that opening a connection is an expensive and time reducing operation, and not at all suitable for a website.

Opening 1 persistent connection on the page load and re-using it per transaction would be the more sensible approach because of the fact that you'd be handling 1 clients request at a time, so it'd be redundant to use a connection pool because no 2 connections would every be busy at the same time.

This will vary based on the web server you'd be using, but that's also highly unlikely.

And if you're not distributing information across web servers then I highly recommend you take a look at APC, which is rumored to be much faster than memcached.
The perks of using Laravel, Mr Code Copier is that you can adjust anything you want via one change of an environment variable. You don't like the CMS and emulator tables being separated? Change it in the .env.

Update
-Fixed bug causing user statistics to not display properly
-Added primary eloquent models to the Laravel Global Fascade section
-Switched to APC for view caching
-Possible switch to APC for session caching
-Possible integration of databases @jadenthenoob

Looks a bit ugly
Thank god people owning hotels should know how to use HTML, and CSS.
 
Last edited:

Jaden

not so active
Aug 24, 2014
886
263
The perks of using Laravel, Mr Code Copier is that you can adjust anything you want via one change of an environment variable. You don't like the CMS and emulator tables being separated? Change it in the .env.

Update
-Fixed bug causing user statistics to not display properly
-Added primary eloquent models to the Laravel Global Fascade section
-Switched to APC for view caching
-Possible switch to APC for session caching
-Possible integration of databases @jadenthenoob


Thank god people owning hotels should know how to use HTML, and CSS.
Can you even read Mr. IDontCodeMyOwnShit? How does that have anything to do with my question? I should've thought twice before bringing up topics far beyond your comprehension and expecting an intelligent reply.

Don't try to educate me on Laravel, I'm pretty sure I've been using frameworks before you even knew what a framework was.

Sometimes you just make yourself look like an idiot, but I fail to correct you out of the kindness of my heart.
 
Last edited:

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
Can you even read Mr. IDontCodeMyOwnShit? How does that have anything to do with my question? I should've thought twice before bringing up topics far beyond your comprehension and expecting an intelligent reply.
I believe you were talking about the database connections, and also making references to the caching system? I apologize, knowing the only experience you have with code is a literal copy and past, with a variable change and don't understand the fundamentals of frameworks. Laravel has a nice beautiful system, so if you wanted to change your caching class, session handler, or even how databases are ran it's a quick change in your env settings.
Code:
APP_ENV=local
APP_DEBUG=true
APP_KEY=RfE7q3i6DYRuhPUCgQ12X6sM3DhZv2wk

DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=roleplay

RP_HOST=localhost
RP_USERNAME=root
RP_PASSWORD=
RP_DATABASE=rage emulator

SITE_NAME=World of Habbo
SITE_DESC=Where your dreams come true!
SITE_URL=http://localhost

EMU_IP=127.0.0.1

CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_DRIVER=sync
Oh? Dont want to use Redis, just switch to APC. Just be sure you can modify your php.ini to allow for APC support :) :)
 
That template fits an rp retro quite nicely, i must say.

nit-picking;
screenshot-2016-01-02-03-56-02-png.4746

You should try changing the bg color from black to #d5d5d5 and change that grey/white bar under the header image to the color of the bg (the black)

Not quite sure if I prefer this or not
You must be registered for see images attach
You must be registered for see images attach
 

Jaden

not so active
Aug 24, 2014
886
263
I believe you were talking about the database connections, and also making references to the caching system? I apologize, knowing the only experience you have with code is a literal copy and past, with a variable change and don't understand the fundamentals of frameworks. Laravel has a nice beautiful system, so if you wanted to change your caching class, session handler, or even how databases are ran it's a quick change in your env settings.
Code:
APP_ENV=local
APP_DEBUG=true
APP_KEY=RfE7q3i6DYRuhPUCgQ12X6sM3DhZv2wk

DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=roleplay

RP_HOST=localhost
RP_USERNAME=root
RP_PASSWORD=
RP_DATABASE=rage emulator

SITE_NAME=World of Habbo
SITE_DESC=Where your dreams come true!
SITE_URL=http://localhost

EMU_IP=127.0.0.1

CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_DRIVER=sync
Oh? Dont want to use Redis, just switch to APC. Just be sure you can modify your php.ini to allow for APC support :) :)
Are you fucking illiterate or are you just choosing not to read my comments?

1. I recommended the switch to APC
2. You clearly don't understand a database enough to reply to what I was talking about, because that was also helpful
3. Redis is/was as redundant as memcached, go with APC
4. You call me names and fail to realize I am trying to help you improve
5. My experience is far beyond yours.

And stop dickriding Laravel, because your CMS will be as shitty as you make it.
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
Are you fucking illiterate or are you just choosing not to read my comments?

1. I recommended the switch to APC
2. You clearly don't understand a database enough to reply to what I was talking about, because that was also helpful
3. Redis is/was as redundant as memcached, go with APC
4. You call me names and fail to realize I am trying to help you improve
5. My experience is far beyond yours.
This whole game where you're playing "My experience is far behind yours", proves most of your experience is from Google quotes, and you're still researching MVC based architectures, meanwhile Imagine was already built on one. I switched to Redis to see how I liked it, and if you understood this database engine once more, you could very fucking easily switch to using only one persisent connection by even going into /config/database.php or would you not know that? I'm doing the double connections at the moment to help keep it organized as ying's database is a horrible mess.

As @eckostylez said in the shoutbox, using APC or another method is a waste considering PHP 5.6 has opcode support, and installing APC or even memcached adds another step for installation. So, caching has been put to the default "file" for Laravel and using opcode is recommended
 

Jaden

not so active
Aug 24, 2014
886
263
This whole game where you're playing "My experience is far behind yours", proves most of your experience is from Google quotes, and you're still researching MVC based architectures, meanwhile Imagine was already built on one. I switched to Redis to see how I liked it, and if you understood this database engine once more, you could very fucking easily switch to using only one persisent connection by even going into /config/database.php or would you not know that? I'm doing the double connections at the moment to help keep it organized as ying's database is a horrible mess.
I don't even know what you mean by that "Google Quotes" bullshit you tried buzzing.
But still researching MVC based architecture? I've conquered MVC in ASP.NET, and that's "far beyond your experience". I've constructed servers using architectural designs you no nothing about, that's for sure.

And your whole organizing database connections idea was good at first, until you said something about the reason being the actual database structure, and because of the fact that your CMS was built in PHP.

And once again, stop dickriding Laravel, I don't even know why I'm showing you this because I doubt you're going to comprehend it.


You'll stop using that bullshit one day, and you'll look back and realize that good ol' uncle Moonshine was right about everything.
 


Although I would agree on ecko with that statement but now it would be all about preference.
Another installation step -> The cost for a speedy caching system.

Just look at how @DogRapist222 uses quite a lot of third party frameworks which lengthens the installation process, but that's the price to pay for
  • High performance and Scalable code
  • Clean and managed code, maintained by professionals
  • Etc
Sounds kinda like a framework, no?
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
I don't even know what you mean by that "Google Quotes" bullshit you tried buzzing.
But still researching MVC based architecture? I've conquered MVC in ASP.NET, and that's "far beyond your experience". I've constructed servers using architectural designs you no nothing about, that's for sure.

And your whole organizing database connections idea was good at first, until you said something about the reason being the actual database structure, and because of the fact that your CMS was built in PHP.

And once again, stop dickriding Laravel, I don't even know why I'm showing you this because I doubt you're going to comprehend it.


You'll stop using that bullshit one day, and you'll look back and realize that good ol' uncle Moonshine was right about everything.
I'm using Laravel because it's organized, and easy to build upon. I don't care if other developers find it bad, as this is only a simple Habbo project. You're spewing bullshit pulling up sources once again via Google, and acting King Cool Shit as if you're some god? "I conquered MVC in ASP.NET", oh another language? Sorry, if I haven't looked into it yet, but that's not far beyond my experience, just a different coding structure overall so please shut the fuck up, quit giving me bullshit about your experience, and provide some nice ideas without a whole background story on your life and how you came across copying code.
 

Jaden

not so active
Aug 24, 2014
886
263
I'm using Laravel because it's organized, and easy to build upon. I don't care if other developers find it bad, as this is only a simple Habbo project. You're spewing bullshit pulling up sources once again via Google, and acting King Cool Shit as if you're some god? "I conquered MVC in ASP.NET", oh another language? Sorry, if I haven't looked into it yet, but that's not far beyond my experience, just a different coding structure overall so please shut the fuck up, quit giving me bullshit about your experience, and provide some nice ideas without a whole background story on your life and how you came across copying code.
Jealousy will get you no where son.
Just take my advice and use it to improve your shitty fucking project.

And I wasn't the one sprewing bullshit, I was giving constructive criticism, when you came in with the insults is when this turned to hell.
Don't bother replying, I don't have time to school you in an argument.
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
Jealousy will get you no where son.
Just take my advice and use it to improve your shitty fucking project.

And I wasn't the one sprewing bullshit, I was giving constructive criticism, when you came in with the insults is when this turned to hell.
Don't bother replying, I don't have time to school you in an argument.
What is there to be jealous of, I can understand how you would want to seem superior among other users with your "Habbo Legend" title :lol::lol: Very jealous rn
 

Jaden

not so active
Aug 24, 2014
886
263
What is there to be jealous of, I can understand how you would want to seem superior among other users with your "Habbo Legend" title :lol::lol: Very jealous rn
yes, very intimidating, very purposely.
 

BIOS

ಠ‿ಠ
Apr 25, 2012
906
247
You say Laravel is a beautiful and flexible system, some would disagree I guess it's down to the experience of the developer. Either way you're not even utilizing it correctly if you think the following are good practice, multiple connections etc.

You said it's blazing fast yet you're using Eloquent and multiple database connections for pretty much the same jobs. Most ORM's especially Eloquent are known to have performance impacts and for what to make it easier so you only have to type a few words in return? Multiple connections are unnecessary and with the use of an ORM it will further impact performance, plus Laravel just gets in the way of actual development.
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,725
1,306
You say Laravel is a beautiful and flexible system, some would disagree I guess it's down to the experience of the developer. Either way you're not even utilizing it correctly if you think the following are good practice, multiple connections etc.

You said it's blazing fast yet you're using Eloquent and multiple database connections for pretty much the same jobs. Most ORM's especially Eloquent are known to have performance impacts and for what to make it easier so you only have to type a few words in return? Multiple connections are unnecessary and with the use of an ORM it will further impact performance, plus Laravel just gets in the way of actual development.
Despite Laravel being built to handle multiple connections extremely well
Also, why in the fuck is this some stupid fucking crying thread for fucking people like you to complain about frameworks and how developers utilize them. For crying out fucking loud, this is better than a RevCMS edit, and if you don't like the damn thing, go do it yourself. I'm building this for the community, not as a major advanced fucking CMS
 
Status
Not open for further replies.

Users who are viewing this thread

Top