• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

EmuLinker X v2.0!

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
Update - EmuLinker X v2.0.2 has been released! (Check releases & fixes section)
Preface
Greetings everyone, it is I, Agent 21, back from the dead. You may recognize my name as the name because you see it everytime you host any chat/game on EmuLinker. I realize that some of you may be wondering, where have I been? Am I even still alive? Do I even care about smash and the smash community anymore? The answer is yes, very much so. Over the past few years my life has been changed drastically, I moved to an entirely new state and I'm now a sophomore in college at MTSU. What does this mean to you? Well, I'm older now and I'm more ambitious than I've ever been in my life. While feeding on this ambition I realized that I had not touched the EmuLinker code in nearly 5 years (I'm 19 years old now, you do the math on my age then) and after just one night dedicated to programming, I present to you (Drum rolls please). EmuLinker X version 2.0.

Releases & Fixes (per version)
v.2.0.2 - Download (github)
  • /unscramble bot fixed
  • Code is now completely cleaned up.

v.2.0.1 - Download (.jar only) / Download (github)
  • Excess garbage from source has been removed from .jar file and source.​
  • Code has been cleaned and optimized (Only about 3-4% of decompiled code remains in the source), this should fix the weird issues some users faced like excessive time outs when idling in the server, and other strange things that occurred.​
  • File size reduced (from 492kb to 315kb)​

v2.0 - Download (Mediafire)
EmuLinker X version 2.0 addresses the problems discussed in this forum post. These fixes include:
  • Random DS's that require drop/restart of game constantly fixed
  • Automatic desynch after 18.2 minutes on LAN connections fixed - all credit goes to firo for the code
  • /unsilence command fixed

EmuLinker Server starter package
v2.0 - Download here (release coming soon!)
The EmuLinker X v2.0 server starter package contains all the necessary files and updates you need to get your own stable server started. This include the server files AND the admin client.

Source

Want to build your OWN version of EmuLinker? Don't worry, you can now download the source code to EmuLinker X and it's Admin Client! To download via MediaFire, simply select all of the files in the folder and click download, MediaFire will automatically download a zipped version of the file for you. The source should automatically load up in the latest version of Eclipse. If you prefer not to use an IDE, all of the source code is in the org folder (I advise using Eclipse so that you can instantly see compile errors).

EmuLinker X v2.0.2 source code - github (github)

EmuLinker X v2.0.1 source code - Download (Mediafire) / github

EmuLinker X v2.0 source code - Download (Mediafire)

EmuLinker X v1.2 original source code - Download (Mediafire)

Emulinker X Admin Client v1.2 source code Download here (release coming soon!)
To-Do list
These are all the features that the smash community would like to add to EmuLinker sometime down the road. Have a cool idea for a feature? Leave a post below and we will add it!

  • Fix /unscramble bot
  • Fix /swap command

Faq
Why?
The purpose of EmuLinker X v2.0 is to finally fix all of the annoying bugs (/Unsilnece command, Frequent DS, trivia bot etc.) present in the current version of the program being used by Kaillera servers worldwide.

How?
After pulling an all nighter, downloading every single Java decompiler known to man and tirelessly editing, I finally managed to get a working, compilable source of EmuLinker X v1.2.

What does this mean?
This means that not only can every bug be ironed out by us programmers in the smash community, but this now opens the door for development on "Kaillera 2.0". By having a working source of a server (EmuLinker X), client (n0p2p, EmuLinker Admin Client), solid emulator (Mupen64Plus). One could theoretically study the source of all of these and write a new program based on these sources.

Why 2.0?
Although the changes proposed for this version are barely worthy of the version name v1.3, it HAS been 5 years since any work has been done to this project and I feel this is a necessary step.

Will I be able to get my hands on the source code?
Yes! This time around I will personally make sure that the source code to all of our files (Server AND Admin client) are available to the public so that any programmer or enthusiast may take a shot at this.

Why is the program labeled "alpha"?
Simple, because it doesn't work. In the past we considered this pile of **** (EmuLinker X) a working server. But truth be told, it's not. Therefore this version will remain in alpha until it is at the least stable, from then on it will move into beta phase in which any tune ups can be performed. Once all this is done then we'll have a final version of EmuLinker X v2.0.

What can I do to help?
Test/Donate! As a college student, my time is ridiculously limited and tremendously valuable. Obviously, I want to work on this project and I will for free. But if you would like to donate and help take some of the daily pressures of my life off, that would be awesome! In addition, if you have a dedicated host please and would like to help ease contact me to help test new builds of the server! Send your donations here!
 
Last edited:

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
Reserved

- EmuLinker X v2.0 will be released later on today (2/11/15)

- EmuLinker X v2.0 and v1.2 server source code has been uploaded for download. EmuLinker v2.0 has been pushed back for further testing. Sorry for the delay! (2/11/15)

- Emulinker X v2.0 has been released, cheers! (2/12/15)

- EmuLinker X v2.0.1 has been released. (2/15/15)

- EmuLinker X v2.0.2 has been released. (2/17/15)
 
Last edited:

Madao

Moderator
Moderator
Joined
Jun 27, 2013
Messages
873

This means that not only can every bug be ironed out by us programmers in the smash community, but this now opens the door for development on "Kaillera 2.0". By having a working source of a server (EmuLinker X), client (n0p2p, EmuLinker Admin Client), solid emulator (Mupen64Plus). One could theoretically study the source of all of these and write a new program based on these sources.
Please don't use Mupen64Plus ;/ . It's not a suitable emulator for Windows OS. So unless you / people you know, are willing to fix it up, you're better off using a different emulator.

What can I do to help?
Test/Donate! As a college student, my time is ridiculously limited and tremendously valuable. Obviously, I want to work on this project and I will for free. But if you would like to donate and help take some of the daily pressures of my life off, that would be awesome! Next, please do download this server and help test out any new implementations we add!
If you could help me figure out how debug / test on local host with eclipse, I may end up helping a bit. I'm not proficient at Java, but I'm decent at C/C++. I'll be preoccupied for a while so no rush, but in a few weeks, I may be interested in testing it out.
 

MrMarbles

Smash Lord
Joined
Apr 4, 2013
Messages
1,381
Location
Orlando, FL
Preface
Greetings everyone, it is I, Agent 21, back from the dead. You may recognize my name as the name because you see it everytime you host any chat/game on EmuLinker. I realize that some of you may be wondering, where have I been? Am I even still alive? Do I even care about smash and the smash community anymore? The answer is yes, very much so. Over the past few years my life has been changed drastically, I moved to an entirely new state and I'm now a sophomore in college at MTSU. What does this mean to you? Well, I'm older now and I'm more ambitious than I've ever been in my life. While feeding on this ambition I realized that I had not touched the EmuLinker code in nearly 5 years (I'm 19 years old now, you do the math on my age then) and after just one night dedicated to programming, I present to you (Drum rolls please). EmuLinker X version 2.0.

Fixes (per version)

v2.0 - Download Here (release coming soon!)
EmuLinker X version 2.0 will (hopefully) address the problems discussed in this forum post. These fixes include:
  • Random ds's that require drop/restart of game constantly
  • Time limit ds on LAN/EXC that freezes entire client
as quoted by EpicDonk (If it works, do I still get $100!?).
Any commands added or currently present that do not work will be removed from program for now to help promote stability and will be fixed and added again in later versions.

EmuLinker Server starter package

v2.0 - Download here (release coming soon!)
The EmuLinker X v2.0 server starter package contains all the necessary files and updates you need to get your own stable server started. This include the server files AND the admin client.

Misc.

Source

Want to build your OWN version of EmuLinker? Don't worry, you can now download the source code to EmuLinker X and it's Admin Client! To download via MediaFire, simply select all of the files in the folder and click download, MediaFire will automatically download a zipped version of the file for you. The source should automatically load up in the latest version of Eclipse. If you prefer not to use an IDE, all of the source code is in the org folder (I advise using Eclipse so that you can instantly see compile errors).

EmuLinker X v2.0 source code - Download

EmuLinker X v1.2 original source code - Download
Emulinker X Admin Client v1.3 source code Download here (release coming soon!)

To-Do list

These are all the features that the smash community would like to add to EmuLinker sometime down the road. Have a cool idea for a feature? Leave a post below and we will add it!
Faq
Why?
The purpose of EmuLinker X v2.0 is to finally fix all of the annoying bugs (/Unsilnece command, Frequent DS, trivia bot etc.) present in the current version of the program being used by Kaillera servers worldwide.

How?
After pulling an all nighter, downloading every single Java decompiler known to man and tirelessly editing, I finally managed to get a working, compilable source of EmuLinker X v1.2.

What does this mean?
This means that not only can every bug be ironed out by us programmers in the smash community, but this now opens the door for development on "Kaillera 2.0". By having a working source of a server (EmuLinker X), client (n0p2p, EmuLinker Admin Client), solid emulator (Mupen64Plus). One could theoretically study the source of all of these and write a new program based on these sources.

Why 2.0?
Although the changes proposed for this version are barely worthy of the version name v1.3, it HAS been 5 years since any work has been done to this project and I feel this is a necessary step.

Will I be able to get my hands on the source code?
Yes! This time around I will personally make sure that the source code to all of our files (Server AND Admin client) are available to the public so that any programmer or enthusiast may take a shot at this.

Why is the program labeled "alpha"?
Simple, because it doesn't work. In the past we considered this pile of **** (EmuLinker X) is a working server. But truth be told, it's not. Therefore this version will remain in alpha until it is at the least stable, from then on it will move into beta phase in which any tune ups can be performed. Once all this is done then we'll have a final version of EmuLinker X v2.0.

What can I do to help?
Test/Donate! As a college student, my time is ridiculously limited and tremendously valuable. Obviously, I want to work on this project and I will for free. But if you would like to donate and help take some of the daily pressures of my life off, that would be awesome! Next, please do download this server and help test out any new implementations we add!
this is amazing news if you fixed the ds issues. Thank you! i will donate if this ends up working out
 

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
Please don't use Mupen64Plus ;/ . It's not a suitable emulator for Windows OS. So unless you / people you know, are willing to fix it up, you're better off using a different emulator.
If you could help me figure out how debug / test on local host with eclipse, I may end up helping a bit. I'm not proficient at Java, but I'm decent at C/C++. I'll be preoccupied for a while so no rush, but in a few weeks, I may be interested in testing it out.
What emulator would you recommend? And sure I'll help you get eclipse set up.
 

Madao

Moderator
Moderator
Joined
Jun 27, 2013
Messages
873
What emulator would you recommend?
Lol, I forgot that there's no polished open source Kaillera emulator. 1964 1.1 has a good netplay implementation (much less desync). However, it wasn't designed to use the current version of kaillera you guys use. Some people don't like the emulator, but imo it's very good. Especially for Super Smash Bros.

So while there's no open source emulator that works perfectly with Kaillera, the easiest way to go would be to tweak 1964 (this can easily be taken care of). Out of the box it may not be suitable to use, but most of its flaws can be fixed in a short amount of time.

The amazing thing about 1964 is that not only do save files get synced, but even emulator options! It also has gameshark support and activator codes work.

Some people may want to use Mupen64Plus because it's more portable, but you're going to have to do a lot more work. Not to mention windows users will suffer because Mupen64Plus is not a favorable emulator to use on Windows.
And sure I'll help you get eclipse set up.
Alright thanks.
 

KnitePhox

Smash Lord
Joined
Oct 17, 2005
Messages
1,838
Location
Chicago, IL
o **** i didnt know that about 1964, activator + syncing

might be a good replacement for pj considering that gameshark works too OMG


gj mad-a-o
 

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
Lol, I forgot that there's no polished open source Kaillera emulator. 1964 1.1 has a good netplay implementation (much less desync). However, it wasn't designed to use the current version of kaillera you guys use. Some people don't like the emulator, but imo it's very good. Especially for Super Smash Bros.

So while there's no open source emulator that works perfectly with Kaillera, the easiest way to go would be to tweak 1964 (this can easily be taken care of). Out of the box it may not be suitable to use, but most of its flaws can be fixed in a short amount of time.

The amazing thing about 1964 is that not only do save files get synced, but even emulator options! It also has gameshark support and activator codes work.

Some people may want to use Mupen64Plus because it's more portable, but you're going to have to do a lot more work. Not to mention windows users will suffer because Mupen64Plus is not a favorable emulator to use on Windows.Alright thanks.
In this case im gonna need your help on figuring out what needs to be done to the 1964 source because im terrible with C/C++.
 

Madao

Moderator
Moderator
Joined
Jun 27, 2013
Messages
873
In this case im gonna need your help on figuring out what needs to be done to the 1964 source because im terrible with C/C++.
You can count on me :grin:! I just need to find a reference for using the current version of Kaillera. Right now, 1964 only seems to work based on the frame delay you manually select. I've never tested it on server (probably not a good idea yet), but for p2p after modifying source it's very good. Too bad Kaillera's p2p is only 1 v 1 ;/ .

So what I need to do is figure out how to integrate the latest Kaillera, so that frame delay & other things are taken care of by Kaillera.

Another great thing about 1964 is that it's even faster than Pj64, so toasters will run better. I might as well include a DX9 version of Rice Video (hands down best plugin for toasters). For now I wouldn't recommend using that overclock version for 1964, it's not really important for Super Smash Bros. So what I can do (already done some of it already), is use the official source as a base and port some good changes from other forks, as well as some of my own work.
 

KnitePhox

Smash Lord
Joined
Oct 17, 2005
Messages
1,838
Location
Chicago, IL
yo when some god level patches come out, be ready for some ca$h, got dontations from me (on confirmed major fixes : ) )
 

KnitePhox

Smash Lord
Joined
Oct 17, 2005
Messages
1,838
Location
Chicago, IL
[6:06:27 PM] KnitePhox: alright kids, emulinker 2.0 is live on Smash FU NY
[6:06:32 PM] KnitePhox: need people to come test
 

KnitePhox

Smash Lord
Joined
Oct 17, 2005
Messages
1,838
Location
Chicago, IL
[6:10 PM] A-21: My fingers are crossed on this one. The main 3 fixes are 18 time limit DS, excessive desynching and the /unsilence command. To ensure that these fixes actually work. I recommend everyone use the version of project64KVE (that you linked me last night). Please relay this message to everyone testing the server.

http://www.mediafire.com/download/i9yc10klgghgzhh/Project64kVE.zip

okay first test resulted in 32mintue 1v1 ssb session, had to end cuz of food
WHERE'S THE DONATE LINK
 
Last edited:

firo

Smash Ace
Joined
Jul 27, 2008
Messages
600
Location
Champaign, Illinois
It would be a real shame if all this work was put into a Windows-only emulator that hasn't been touched in 3 years.

Mupen64plus works just fine on Windows. Sure, it might lack a built-in fancy UI for selecting a game, but there are plenty of options that make it work just as well as any other emulator. It would be less work to get it working than many other solutions. It supports gameshark and has for years. I also doubt that the new graphics plugin is going to be compatible with 1964. There's a project now trying to get Mupen64plus working at full speed on a second generation Raspberry Pi ($35): https://www.youtube.com/watch?v=tP-i6oM2vnQ so I don't think the toaster argument holds weight. Not to mention that any android phone made in the last two years can at least run 1v1 smash at full speed.

Take a look at dolphin's netplay implementation
(NetplayClient and NetplayServer) : https://github.com/dolphin-emu/dolp...045e39d0c2a2ff34ec06bb8c3634/Source/Core/Core

and port to Mupen64plus. Use miniupnp to connect directly to p2p through routers, as they did. This is the same code that developers use to connect PS4s, Xboxes and Wiis to each other. Using SFML can help with this cross-platform. No need for any lobbies, chatting, etc. We have the ladder website to do this now. We'd have the performance of p2p smash without needing to forward any ports.

Doing this once will get make it easy for Mac, Linux, Windows, Android, and others to get online.

I'm not sure what I need to do to convince others that this is the solution, but I feel very strongly about it.

Also, what exactly did you do to fix desync issues?
 
Last edited:

Madao

Moderator
Moderator
Joined
Jun 27, 2013
Messages
873
I understand that portability is important to some people. In order to achieve portability while maintaining quality, it requires a lot of work. So while moving to 1964 might not be 100% ideal, it requires less work to get done, and will be more convenient for some people.

If you're talking about GlideN64, there will be a zilmar spec version so it will work on 1964. Also that plugin will not work on older hardware. Imo, supporting older hardware is important. Last time I checked, Mupen64Plus was slower than PJ64, but if they are able to further improve it, then that's great news. Mupen64Plus does have some good features. I just am strongly disappointed about certain aspects. I don't have the time to be able to fix all the things I don't like about Mupen64Plus. At best, I'd be able to improve maybe 1 or 2 things.

Maybe if multiple people here were willing to contribute code towards Mupen64Plus, I would consider helping out. For now I will put this 1964 idea on hold, especially since people here seem to be satisfied with PJ64k. I got some things I need to decide, and I need to learn more about how Kaillera works and netcode in general.

One thing I'm curious about is how well that net code you referenced works, compared to Kaillera. Imo Kaillera does a great job with syncing. My main issue with it, is that audio is compromised (more crackling). I can live with it though, since syncing is very important.
 

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
It would be a real shame if all this work was put into a Windows-only emulator that hasn't been touched in 3 years.

Mupen64plus works just fine on Windows. Sure, it might lack a built-in fancy UI for selecting a game, but there are plenty of options that make it work just as well as any other emulator. It would be less work to get it working than many other solutions. It supports gameshark and has for years. I also doubt that the new graphics plugin is going to be compatible with 1964. There's a project now trying to get Mupen64plus working at full speed on a second generation Raspberry Pi ($35): https://www.youtube.com/watch?v=tP-i6oM2vnQ so I don't think the toaster argument holds weight. Not to mention that any android phone made in the last two years can at least run 1v1 smash at full speed.

Take a look at dolphin's netplay implementation
(NetplayClient and NetplayServer) : https://github.com/dolphin-emu/dolp...045e39d0c2a2ff34ec06bb8c3634/Source/Core/Core

and port to Mupen64plus. Use miniupnp to connect directly to p2p through routers, as they did. This is the same code that developers use to connect PS4s, Xboxes and Wiis to each other. Using SFML can help with this cross-platform. No need for any lobbies, chatting, etc. We have the ladder website to do this now. We'd have the performance of p2p smash without needing to forward any ports.

Doing this once will get make it easy for Mac, Linux, Windows, Android, and others to get online.

I'm not sure what I need to do to convince others that this is the solution, but I feel very strongly about it.

Also, what exactly did you do to fix desync issues?
Hmm, intriguing. How hard would it be to port dolphin's netplay to mupen?

And about the desynch issues, I copy pasta'd your wonderful changes to the code to stop the 18 minute DS (All credit goes to Firo for the 18 minute DS fix). However there were still excessive desynchs, so I went back and looked at the emulinker server 1.0.2 code and A/B'd what my compilers got and replaced any code that my decompilers struggled with.

TL;DR

I copy/pasted from the most stable and compilable version of emulinker to emulinker x. Work smarter, not harder.
 

firo

Smash Ace
Joined
Jul 27, 2008
Messages
600
Location
Champaign, Illinois
Hmm, intriguing. How hard would it be to port dolphin's netplay to mupen?

And about the desynch issues, I copy pasta'd your wonderful changes to the code to stop the 18 minute DS (All credit goes to Firo for the 18 minute DS fix). However there were still excessive desynchs, so I went back and looked at the emulinker server 1.0.2 code and A/B'd what my compilers got and replaced any code that my decompilers struggled with.

TL;DR

I copy/pasted from the most stable and compilable version of emulinker to emulinker x. Work smarter, not harder.
By "port", it might not make the best sense to try and go line by line (or maybe it will, I haven't taken that close of a look at the code), but if you glance at it, the whole thing is done with less than 2500 lines. At the very least, it is a great way to see how something like this is done fairly easily in a cross-platform environment. The code is fairly easy to read.

It basically does this:

1. User selects netplay on the menu
2. miniupnp is used to directly connect (no need to forward ports) to the other players via TCP
3. each gamecube pad is assigned a buffer
4. SFML is used to send a "packet" with an id number which is sent telling the other users what's happening (game chosen, game started, etc)
5. Each frame, input is sent to other players through an SFML packet, and the controller state for the other players is replaced with the keypresses they have sent, which is stored in that pad's buffer.

What isn't clear from a quick runthrough is how it handles delay, but I'd need to look at the code more. I suspect it handles it similarly to kaillera p2p.

Mupen64plus has a plugin architecture, which means that mupen will call a function every frame, something like getInput(), and all youd need to do is implement that function (along with an init() function to establish the connection) as an input plugin. It works in a very similar way to dolphin. Technically it wouldn't require modifying the main mupen64plus code as the plugin is all you need. https://github.com/mupen64plus/mupen64plus-core/wiki/Mupen64Plus-v2.0-Plugin-API#Input_Plugin_API

The best option here would probably be to extend or encapsulate one of the existing mupen input plugins, and then supplement the init and getKeys() methods.

I'm happy to go more in depth of any of this, if people are interested. We can have a voice call or something.
 
Last edited:

Agent 21 iXi

Smash Rookie
Joined
Dec 6, 2013
Messages
22
Location
Tennessee
By "port", it might not make the best sense to try and go line by line (or maybe it will, I haven't taken that close of a look at the code), but if you glance at it, the whole thing is done with less than 2500 lines. At the very least, it is a great way to see how something like this is done fairly easily in a cross-platform environment. The code is fairly easy to read.

It basically does this:

1. User selects netplay on the menu
2. miniupnp is used to directly connect (no need to forward ports) to the other players via TCP
3. each gamecube pad is assigned a buffer
4. SFML is used to send a "packet" with an id number which is sent telling the other users what's happening (game chosen, game started, etc)
5. Each frame, input is sent to other players through an SFML packet, and the controller state for the other players is replaced with the keypresses they have sent, which is stored in that pad's buffer.

What isn't clear from a quick runthrough is how it handles delay, but I'd need to look at the code more. I suspect it handles it similarly to kaillera p2p.

Mupen64plus has a plugin architecture, which means that mupen will call a function every frame, something like getInput(), and all youd need to do is implement that function (along with an init() function to establish the connection) as an input plugin. It works in a very similar way to dolphin. Technically it wouldn't require modifying the main mupen64plus code as the plugin is all you need. https://github.com/mupen64plus/mupen64plus-core/wiki/Mupen64Plus-v2.0-Plugin-API#Input_Plugin_API

The best option here would probably be to extend or encapsulate one of the existing mupen input plugins, and then supplement the init and getKeys() methods.

I'm happy to go more in depth of any of this, if people are interested. We can have a voice call or something.
@ firo firo Count me in, if you have skype let's talk more on there. My username is agent21ixi (no capital letters or spacing), I'll make a group with some people who are serious about working on this so we can get this done in a quick and timely manner. This sounds like a job that shouldn't take very long to do.
 

KnitePhox

Smash Lord
Joined
Oct 17, 2005
Messages
1,838
Location
Chicago, IL
2.0.1 now live on Smash FU NY

EDIT: unfortunately, Smash FU Chi cannot use emulinker x 2.0 or 2.0.1 for the moment and is still using 1.2; apologies from the Smash FU staff. this issue should be resolved soon.
 
Last edited:

felipe_9595

Smash Lord
Joined
Apr 9, 2010
Messages
1,431
Location
Chile
For the love of anything thats sane, dont ever use Buffer system with Smash 64 like in Dolphin. It could have less desynchs, but the ammount of delay it adds makes it impossible for international gameplay. I can play 5-7 frames P2P matches with the states, but i can never go below 20 buffer in dolphin against the same people (Roughly 10 frames).
 
Top Bottom