otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.6k stars 1.06k forks source link

Integrate with the Flash Client #1570

Closed Leo32onGIT closed 7 years ago

Leo32onGIT commented 9 years ago

This isn't anything new and has been achieved by past OT Developers; But I believe the OT community would benefit from having the TFS project support the Flash Client.

Like the Original Client, I would never expect the Flash Client files to be part of this solution; Merely the TFS project officially support and handle incoming data from the flash client.

An already working example can be found here. Core proof-of-concept functionality has been achieved in just under 100 lines of code.

The discussion that prompted this request started here.

I'll start this with a $50 bounty to get the ball rolling. Bountysource

WibbenZ commented 9 years ago

The main problem is leechers and that it requires alot of time to update it. We spent about 2 months and had just gotten to a "lets start finding bugs" ~checklist.

Even if we were to release the latest code most if not all users would spam us about updating it and since none of us want or have time for that we did not release it.

The files you have are pretty old they have alot of bugs when you start to try them out. It's limites to 1078 without the files for 1080 etc

We spent months (2-3 pretty experienced users) to get things rolling and we got pretty far but the todo list is still huge and atleast 2 of us felt like nvm this.

Before you open things like this try to get more information on it insted of some files you got working.

All you will do by pushing the files here is create 40 new issues each client update since they can't just update definitions.h.

We got offerd alot of money for when we had it fully working (I can show you some screens with the "buyers" name removed) but there is a reason we dident sell it. It would cause spam for us, maybe like now someone releases flash files that will cause spam.

As I just said before you try continue this try to get it fully working, update the protocol etc.

If you can do that ill talk with the guys about releasing the latest files and you write the tutorials etc on how to update.

This is also not rly a tfs issue contact me on otland if you wish to talk.

Leo32onGIT commented 9 years ago

Posting about how you've already done it, isn't doing anything to benefit the ticket. Bounty > individual purchase, this is for the community - not indivual gain. The "spam" excuse is petty.

If you need someone to do documentation, I am happy to volunteer time.

To any interested parties; "What sort of bounty # would peak your interests?"

WibbenZ commented 9 years ago

Well we all said no to offers around 600-700 eur mainly due to that we would just keep getting asking to update it. And there is no step tutorial since you have to know how TFS works with packages aswell as cipsoft.

I don't really think you understand what you are asking for, trust me we would have released it along time ago if it was easy. This is not easy, if you don't trust me write to Syntax on OTLand (one of the creators of the ox server).

But please before you keep spending time on this, please try to learn more.

If we 3 had the time I guess we could have opened a repo with the files and accept bug reports, but the main problem is still that we don't have time and don't want the spam each new version. When I have time I spend it here since it helps more people and I don't get spammed to fix / update things.

But hey let's do this, get enough people involved and showing that they care and ill talk to the guys and ill see what they have to say. But if if you try to learn the flash coding you will quickly realize my points and why im trying to get you off this. You will most likely just waste your time or get lucky and quickly learn things and get it fully working in a couple of months.

marksamman commented 9 years ago

@WibbenZ your attitude is not welcome here, please refrain from commenting if you aren't here to collaborate.

HeavenIsLost commented 9 years ago

@WibbenZ don't pretend you are a super hero or such, there is few errors dealing with flash client(its more sensible than normal client) but its not a monumental work. @Leo32onGIT Your IOLoginData flash implementation look like a naive implementation from milice.

WibbenZ commented 9 years ago

@HeavenIsLost The thing you don't seem to remember is that flash does actually require alot more work. I am in no way saying that, more or less the other way around I did maybe 20-30% of the work we did. Just ask Syntax, Milice or Mokerhamer if you don't trust me.

Ill try to write it out, if you think I have a bad attitue just stop reading here. A reason to why this will be more or less a waste of time is because Cipsoft will discontinue the flash client in the end of -15 or start of -16 (will be replaced with the new steam client from my understanding).

So unless TFS wishes to stay with (my guess) 10.9? There is no reason at all to actually do these updates (unless we can some how make it posible for us to use the steam client).

What everyone seems to forget is that flash does require alot of work and unless alot of people would wanna help out it will end up with spam about updating it.

If someone wishes to start this again and enough users help out (unlike the thread we had about it) ill help out. But im feeling that this will just end up with more spam about updating then the 10.76 update (mainly since it's hard, accept it or not) to update it correctly.

As I said if this gets enough support and enough users that knows what they are doing (mainly so there aren't 50 leachers and 2 ppl doing something about it).

About the IOLoginData "hack" yes, looks like the one milice did in the beginning and that is what I ment with alot of the code that has to be rewritten aswell as other things in the protocol that might have to make flash work 100%.

Since alot of people get emailed when we write here then send me a pm if you wish to discuss it more / try to convice me about this. Im open for a discussion

HeavenIsLost commented 9 years ago

I just want to make one more point, you just are hiting in the bush and not naming the problems that arises with flash client, you are just saying its hard and such. I do agree with leecher subject, few things must be private for those that worked on it(everything good being open is not good, there is no room for your own merit/custom work to shine).

Leo32onGIT commented 9 years ago

@HeavenIsLost The code was not written by myself and is quite primitive.

But then again, that's kind of the point of this request; to generate interest in those who have the skill-set to make the magic happen.

The core philosophy of this request, is the dream of consolidating your entire project into your website.

It just seems to be the next logical step in OT progression and just opens up so many more doors when it comes to accessibility.

WibbenZ commented 9 years ago

Leo if I may just throw in kind of a reality point here. We felt the exact same way but ask yourself is it worth it for 3 months or would you stay at the last flash version?

The points are great and we had the same ones but since they will kill flash we either have to stay at the last version (we are fucked if the client fails, the code is so messy that ye... :p) or remove flash in 3 months because we want the newer versions.

Also note that flash is still buggy, there is a reason flash does not listen to the actual version number. It gas it's own version numbers mainly since it can get up to 100 updates while the standalone goes from 1080 to 1081.

marksamman commented 9 years ago

What are the current protocol incompatibilities with the flash client? Is authentication different? Do we need to send any additional data? Can you provide a diff of the changes that need to be made, based on our master branch?

WibbenZ commented 9 years ago

If you are talking to me I can't fully respond to that, since we did not even finish. I THINK that Moker continued but im not sure..

Flash only uses 7172, login is checked via a session key that can be changed (is not added in the files he has), so the protocollogin is not used for it.

There are plenty of changes that are needed to make it work, if you want more then the ability to login. We found some, you can just use winmerge on the protocolgame file to see some of them but as ive said a couple of times, there are plenty of things that diden't get fixed aswell as things we haven't found yet.

Towards the end we started integrating the flash socket in TFS for more scalability insted of the PHP socket his files uses.

If this should be added we use use definition if statments, since in a couple of months that could will MOST LIKELY be useless depending on the new client.

If you want I can send you the same pm I did to heaven, it contains abit more details but there is plenty of things to write about here, just check the discussion thread and you will notice how much standalone and flash differs, we all probbly hoped that we just had to add a session key system.

And we should not use the system he uses, we should skip the account \n password and actually send the session key, that way we can use the same data for both flash and standalone.

Leo32onGIT commented 9 years ago

Current incompatibilities are.. console messages? https://github.com/otland/forgottenserver/blob/master/src/const.h#L195-L197

Dirty work-around: https://github.com/Leo32onGIT/TFS-Flash/blob/master/server/src/commands.cpp#L250-L269

I think that's the only blatant incompatibility... All other current TFS code functions with no issue (so far).

Auth uses a session key: https://github.com/Leo32onGIT/TFS-Flash/blob/master/html/classes/website.php#L231-L255 https://github.com/Leo32onGIT/TFS-Flash/blob/master/server/src/iologindata.cpp#L94-L113

Don't know enough to give you an exact list of what is needed. Code compare on iologindata and protocolgame would be the best starting point.

WibbenZ commented 9 years ago

If I remember correctly all pretty much all with the same STATUS was bugged, but they seem to exist in the flash src code, so might be that we send the wrong colors or something? Not sure.

Once again not sure, but alot of the reloads got bugged, can't remember if I solved it by just changing out the colors... But I kinda wanna say that it's with all things that can be changed, ex. npcs changing outfits etc?

The code you have in iologindata and protocolgame is a good base as you say, but it should all be rewritten and still note that we would need alot of users / 5-10 servers with alot of players to test this out. Otherwise flash will most likely be dropped before we have found and fixed all the bugs.

totolol123 commented 9 years ago

@WibbenZ CipSoft said some time ago that they new client it's not a priority and shouldn't happen anytime soon, but i agree that keeping they "flash client" is a waste of time, working for adapt the OTC in a Web Client looks more reliable for me.

WibbenZ commented 9 years ago

Id say to maybe optimize the protocol for OTC? That way we could have a better ground to work on and at the same time not having more things that could make it easier to get sued.

But also as I said above, we could have some fun for a couple of months by adding flash but that would mean we have to stick to the last flash version or remove it in a future update. Problem will be that unless TFS wishes to stick to that last version we won't have enough time to find all the bugs etc. Even Cipsoft has admitted that the flash project was a fail, and that one of the main reasons why they will scrap both the standalone client aswell as the flash client. And if that is the case and we have no way to modify the steam client then we will end up staying at the last client anyways.

djarek commented 9 years ago

As for the flash client - I think it's pointless to even consider adding support for it because browser vendors (at least Google and Mozilla) are slowly withdrawing support for Flash and Adobe doesn't seem to care much about it anyway, so this effort is an "evolutionary dead-end" for us. I do, however, like the idea of detaching ourselves from the CipSoft client completely at some point (though this should be a gradual effort). The biggest problem is that the only viable alternative - OTC - has a lot of problems. IMO it's main advantage - generality and flexibility of its codebase - has also become its biggest drawback as it has horrible performance and the codebase is quite hard to work with in some places because of it.

The standardization of WebAssembly created a new, interesting platform alternative - we could have a decent performing client running in the browser and we wouldn't be constrained by the choice of programming languages. The problem is that we would have to start from scratch (or "draw inspiration" from OTC) and the tooling for this platform is still in its infancy (AFAIK for now only JavaScript can target WebAsm).

IMO this discussion should be taken into a broader forum, because this an important decision the community has to make. The old Tibia client is limiting us at this point and we should probably try to get the entire "stack" independent of 3rd-party proprietary software. Too bad most of the OT community only care about leeching and hardly ever contribute anything upstream, except for the odd insult for the contributors.

WibbenZ commented 9 years ago

You have a good point, forgot about that aswell. If you ask me we should in that case use OTC as a starting point, just like we did with 0.2 and 1.x. Start by cleaning up the code to use the same code style we use here, then start fixing bugs so we can easily fix and find them. This should not be a problem if the owners agrees to OTLand taking over that project or us forking it.

Thats a big drawback with all the leechers and has been (0.4 not so much since you had to pay / risk getting banned if you released the files) to get them. Maybe try to speak to the owners of OTC about going forward with it, try to leave the standalone client behind us.

I don't see any problems in it as long as we use the same code style. Aslong as we have an active admin that has knowledge about both OTC and TFS - hopefully one of the OTC owners would wanna take this position.

Let's hope Mark or someone else closes this and opens a thread on OTLand insted.

Nu77 commented 9 years ago

OTC could be poor in terms of performance, but is for sure a good start, a new client at this point will be only a waste of time. If you guys are open to start a new discussion about it, surely i'll contribute.

Leo32onGIT commented 9 years ago

@djarek Remember the discontinuation of flash support is very specific and targeted at mobile devices and auto-play video, this is already in effect.

Shouldn't dissuade you from seeing it as a viable alternative as it its unrelated to the way the flash client operates.

Also, keep in mind the benefits of the flash client, is that it can be completely decompiled. We don't need to reinvent the wheel or play catch up - and customization is right there at our finger-tips.

OTC is still a deployed solution and has to play catch up to every release reverse engineering new core functionality. With the Flash Client, any new functionality is right there, in action script; ready to go.

HeavenIsLost commented 9 years ago

I agree with @djarek , but i need to add something else. If we want to move from current tibia c++ client, we should work on OTC. OTC can really improve if we(developers) start working on it. Actually, OTC doens't have any active discussion about how to improve performance and such, we can start a new one(of course, in otclient gihub repo or in OTC forum in otland).

@iryont and others that did improve OTC for their own servers just don't speak/let us know which things they have done to improve performance. So, lack of developers + people hiding/not sharing knowledge have made the OTC being at the state it is right now.

@Leo32onGIT Always remember about Custom Servers. OTC is power and freedom for these servers. Not everyone that is caring about TFS/Game Client is developing RLMAP servers.

Leo32onGIT commented 9 years ago

@HeavenIsLost RLMAP servers are not something I care for. They are so popular due to the instability with OT servers, IMO.

Hosters close down daily and players start from scratch on a bi-weekly basis. RLMAPS have a consistent map players can grasp onto, considering that they're having to create new characters every other week.

I have such enthusiasm for a web-based solution, simply because of the potential to attract an external player-base, which is something custom projects are failing to do.

Our player-base is so niche. Gamers -> MMO Players -> Tibia - > OpenTibia

Custom servers take this further, filtering the OpenTibia players down to those who want a custom RPG experience.

Take a look at the flash assets and you will find the entire interface graphical assets can be edited very easily - I dropped OTC once I saw how flexible and customizable the flash client could be, just needs a little backing.

In the end, what I'm getting at is; A true custom server, is one that can attract outside players; and I think a web-based client, specifically the flash client - is the best way to achieve that.

EDIT: This is kind of turning into a general discussion, we should probably take this elsewhere. I'll update the bounty with a considerable chunk of motivation mid October when I get some disposable income.

WibbenZ commented 9 years ago

@Leo32onGIT

I dropped OTC once I saw how flexible and customizable the flash client could be, just needs a little backing.
A true custom server, is one that can attract outside players; and I think a web-based client, specifically the flash client - is the best way to achieve that.

Please remember that the code that you get when you decompile is rarely fully complete, atleast when you try to modify the code. One compiler (cant remember the name) had a green / red light. Even changing out a message from Options to Tools or w/e (in the menu) could "crash" the code.

About the phone service etc, have you tried it on a phone? It would be imposible to play. Better try to write thing to a website where you can interact with pm's etc etc

Take a look at the flash assets and you will find the entire interface graphical assets can be edited very easily

Not very easily at all, when you decompile (any code) it becomes messy and often lacks things. It's not with all programs you can get a 100% code back. We should still be able to use the flash to find out the changes with the animations (one major problem with OTC). But it would take plenty of time since the code is so messy. OTC is a breeze to work with compared to flash :p

totolol123 commented 9 years ago

OTClient have a branch which support android, mobile devices is not fully supported but is something you can have fun it xD I don't see how Flash Client could be a good thing for working on, since Cip recognized it was a fail step in Tibia.

Leo32onGIT commented 9 years ago

Bumped with a new bounty. Hopefully this peaks some interests...

Znote commented 9 years ago

@WibbenZ Could you link me the source where cipsoft explains they intend to discontinue the flash client in favor of steam client?

And is the steam client a new client, or just the regular tibia client ported to work with Steam?

WibbenZ commented 9 years ago

@Znote Just google cipsoft flash green light and you will most likely find it. Was a while sicne I read it, but from what I remember it had something to do with "it being a fail from the start", might be because of the messy code it uses or that you can easily modify it like some have. I would do the same since who wants someone to freely modify the client without any major problems? And maybe you have read something else? From my understanding they will discontinue both flash and standalone in favour of the new steam client.

Most likely a totally new one, otherwise it would already be up. So to my understanding we might be stuck at the last version in OT servers unless we can find a way to modify the connection etc

So ... IMO we should wait and see before we spend time in things like this, we have the standalone client that most if not all players prefer.

Znote commented 9 years ago

Quote cipsoft 23. September 2015:

Dear Tibians!

Sorry for the lack of status updates on this project! We really appreciate your interest in a Tibia release on Steam. Unfortunately, we do not have real news at the moment. We are still aiming to release Tibia on Steam and we will continue to work towards this goal. However, a Steam release is closely linked to the development of a new Tibia client - a time-intensive, long term project on which we have been working for quite some time already. At the moment, we are still in a development stage where we cannot provide concrete, reliable information about this project. This also means that we cannot provide an ETA concerning a Tibia release on Steam yet or an estimation as to when we will be able to share more details with you. Of course, we will let you know as soon as we have news about this.

Thank you for your patience and for your continued support!

See you in Tibia!

https://steamcommunity.com/sharedfiles/filedetails/updates/257622182/1443010138

Yeah, it appears they are working on a 3rd client. Glad I'm not a cipsoft developer. :p To bad there is no ETA.

WibbenZ commented 9 years ago

Ye haha Well I would bet it will come mid or late 2016, and I guess flash and standalone will be killd about a year later. That or they kill them at the launch date = might have changed everything in the protocol.

Time will tell.

WibbenZ commented 8 years ago

Might be time to bump this, should we create a thread on OTLand to make a poll, choosing if we should try to make a move to a "new" OTC, cleaned code and with maybe a few new developers who joins that project(I can sign myself up if the code style is changed to the one we use here).

Should not be that hard getting things fixed since we have the flash source(eg. the idle state animated), new developers aswell as the things people already have reported on the github page.

If we start up soon we might not have any downtime when they discontinue the old clients. Maybe @marksamman can give his input on this, seeing as he oversees TFS.

marksamman commented 8 years ago

My input on this is that you shouldn't care what some company does. We have OTClient. It's good enough in my opinion. If you know ways to improve it, they're probably open to pull requests, or you could just maintain a fork. If you want to develop a new client, go ahead, but please do as you said and create a thread on OTLand if you want to discuss it further as this issue is not appropriate for that. This issue is simply about server compatibility with a currently unsupported client, not about developing an entirely new client.

WibbenZ commented 8 years ago

First of all why so grumpy? We are talking about a thing that might put us off course for quite a while, if they tomorow announce the new client.

Never said I knew anything about OTC, id say I would be ready to learn if there was an OTC that used the same code style as we do. Also never said we should develop a new client, more or less that we should use OTC as a starting point, so when standalone goes away we still have a way of implementing the new features.

Yes you are correct, this issue was never ment (I suppose) to discuss OTC, but flash is going away and so is the standalone client as you can read above. But ill move this on to OTLand and see what the others have to say.

Nu77 commented 8 years ago

Flash Client will be deprecated in a near future, why we should kept with it? Makes no sense for me.

ranisalt commented 8 years ago

I like the idea of a new browser client (but purge Flash for f*ck sake) and, as Javascript developer, am willing to help wherever possible.

Leo32onGIT commented 8 years ago

http://haxeflixel.com/

Been going through the documentation, sample code and documentation; HTML5 - Seems like the way to go.

augustorajas commented 7 years ago

Please implement this system in TFS, we OT_ADMS will be very grateful!!!

Mkalo commented 7 years ago

@AugustoRajas Flash client is dying soon, it would only be a waste of time. We already have enough features to implement for TFS 1.3 and 2.0.

ranisalt commented 7 years ago

No point implementing for a deprecated, soon to be removed thing anymore