Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Arcturus] WebCore plugin (Websocket-server)

Status
Not open for further replies.
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Keiz - [Arcturus] WebCore plugin (Websocket-server) - RaGEZONE Forums
Hi yall,
today I'd like to share my current project.

Around 8 months ago I said when Arcturus would be done, it might be my turning point from C# to Java. ( I really did )
I'm still using C#, yet here we are.

I am working on yet another plugin for Arcturus. It's goal is to bring clients to the next level.
The plugin will have a seperate websockets server, and a js (jQuery) client besides your .swf client.Websockets are more often used, especially by RP hotels. It allows for the client to receive data in javascript, and send data back to the server.

The plugin is planned to eventually be used as an API, so your hotel's custom plugin(s) can rely on WebCore for your websockets-needs.
As this is a development-thread, the plugin is far from done. Only the basics are done.

Snippet
Server-side ( authenticating the websocketconnection )


Example use
I dislike Habbo's Youtube playlist UI, the WebCore plugin gives you the ability to add custom UI's (in HTML), while interacting with the emulator.


( The gif recorder is like -1fps, just assume it works really smoothly :blushing: )


That's it for now!
Tell me what you think, :love:
Keiz

The entire websockets-server is inside of the plugin, I did not edit the Arcturus source whatsoever, nor was the emulator made by me.
 
Last edited:
Joined
Aug 10, 2011
Messages
7,401
Reaction score
3,299
I was quite confused what this was and the last line of your post explained it.

Well I like this and hope you will make it in a modular way so its easy to use.

I have always been a big fan of cool overlays but I havent really seen many hotels using it aside from a bar at the top or something.

Goodluck and if you need certain plugin events added just let me know by making an issue on the bitbucket.



Also the gif gives me a 403 error. Maybe use gyazo. They got a decent desktop client and support recoding as mp4 type and gif.
 
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Also the gif gives me a 403 error. Maybe use gyazo. They got a decent desktop client and support recoding as mp4 type and gif.

Re-uploaded it on imgur, should work now
 
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Another example use:

(I'm using it for an experimental RP plugin, but you could do whatever you think of with it)
 
Last edited:
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Make the trax editor :p

Any updates :D?

In fact I'm currently re-writing the basics, making it more modular and very API-like.
I've written an OOP JS client too ( yes OOP JS exists ).

The "WebMessage", as I call websocket packets, are much like Arcturus' standard, easy to understand and to add custom WebMessageComposers&Parsers.

The websockets now work with a byte-protocol like Habbo's, in stead of a string. This is because it would be to easy to send custom packets if it would accept strings, bytes are obviously easy too, but not as much for the average user.

I've made a javascript byte encoder much like Habbo client's.
Snippet of some fine javascript OOP.
(Note I use for "Class"es, very handy library)


I will post more screens on ideas this API will allow you to do, and yes I actually was thinking of trax! :)
 
Banned
Banned
Joined
Aug 25, 2009
Messages
431
Reaction score
190
The project looks nice and I believe you know what you're doing with this.

My only concerns are:

  • Security - I used websockets on my RP (through C#) and technical players found it easy to modify and log the packets. I suggest encrypting the data to make it harder.
  • SSO hash - I'm not sure if using the SSO hash which flash uses is a good idea.. it just doesn't feel right to me.
  • I'm not a fan of using frameworks and external libraries. My suggestion is creating it in 100% JavaScript. I don't see why you need frameworks for this. The developers should use their own preferred frameworks when they want to add features.
 
C# / Java Programmer
Joined
Jan 1, 2007
Messages
346
Reaction score
177
The project looks nice and I believe you know what you're doing with this.

My only concerns are:

  • Security - I used websockets on my RP (through C#) and technical players found it easy to modify and log the packets. I suggest encrypting the data to make it harder.
  • SSO hash - I'm not sure if using the SSO hash which flash uses is a good idea.. it just doesn't feel right to me.
  • I'm not a fan of using frameworks and external libraries. My suggestion is creating it in 100% JavaScript. I don't see why you need frameworks for this. The developers should use their own preferred frameworks when they want to add features.

Encryption would be pointless, it's communicating through some JavaScript on the website, so you could just extract the crypto function, or use it through the browser console. Just make whatever functions this thing is gonna perform secure on the server side.

SSO hash is fine, it's expired as soon as you use it to login anyways.

I agree about the framework, there's really no reason to be using JQuery here. I'm sure it's useful for implementing features in the client but you don't need it for just the websocket handling.
 
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
The project looks nice and I believe you know what you're doing with this.

My only concerns are:

  • Security - I used websockets on my RP (through C#) and technical players found it easy to modify and log the packets. I suggest encrypting the data to make it harder.
  • SSO hash - I'm not sure if using the SSO hash which flash uses is a good idea.. it just doesn't feel right to me.
  • I'm not a fan of using frameworks and external libraries. My suggestion is creating it in 100% JavaScript. I don't see why you need frameworks for this. The developers should use their own preferred frameworks when they want to add features.
As I said it's not a string-based communication, I made my own byte-based communication which is much like Habbo's. Not as easy modifyable.

The SSO hash is really fine

I am using jQuery just for some custom features, the base is in clean javascript, and for the JSFace framework, it's just for simplified use of the client API. It allows me to easily create classes with static functions, ofcourse this is do-able in clean javascript and I might convert it.
Thanks for your critics
 
Junior Spellweaver
Joined
Feb 6, 2013
Messages
196
Reaction score
25
Can't wait to use this for my hotel, good luck.
 
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
Assuming you follow the code structure of your snippets you're wasting javascript potential. You're trying to achieve what would be a class with methods by using the class keyword. However, you make all of your classes a predefined objects with variables assigned to anonymous functions.

The whole point of prototyping (what class in js is meant to beautify) is to not create the same method twice. If you use variables with anonymous functions as methods in your classes it will just waste memory if you instansiate more than one of that class. The prototype methods on the other hand are only stored once and will be shared between all objects of that class.

Code:
var Dog = function() {
  this.name = "Bob"; // public
  var age = 3; // private

  this.getAge = function() {
    return age; // getter for privates
  }


  function speak() {
    console.log("woof"); // private method
  }


  return this;
}

Dog.prototype.walk = function() {
  // public function, only stored once in memory for all dog objects
}

When using the class keyword you can achieve the same prototyping with

Code:
class Dog {
  walk() {
    // Creates a prototype function, but looks pretty
  }
}
Doing this:

Code:
class Dog {
  walk: function() {
    }
}
will store the walk method in memory for every single object of that class.
 
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
@Konquer I guess you're right. In all honesty this is my first time using javascript. I'm really more of a back-end developer. I will look into that, thanks
 
Elite Diviner
Joined
Apr 5, 2014
Messages
464
Reaction score
223
@Konquer I guess you're right. In all honesty this is my first time using javascript. I'm really more of a back-end developer. I will look into that, thanks

If you want to, you can look into using a modular library such as requirejs, browserify or my personal recommendation webpack. These will allow you to write modules much like in node.js and share them between one another.

It would also be great for a project like this because all of those mentioned above support bundling js, css and html into one single file when production ready. So when you end up releasing this, all someone would need to do is add one js file to their client instead of 10 separate ones including html and css.

Keep going with this plugin of yours. I have always been a big fan of incorporating custom features into the client through websockets and it's nice to see others doing the same thing :)
 

pel

Skilled Illusionist
Joined
Jan 27, 2012
Messages
382
Reaction score
343
It's not recommended to use ES6 Features clientside since not every browser is supporting them.
 
Status
Not open for further replies.
Back
Top