• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Moving towards OTC

What should we do


  • Total voters
    57
  • Poll closed .
Status
Not open for further replies.

WibbenZ

Global Moderator
Staff member
Global Moderator
Joined
Oct 16, 2008
Messages
6,374
Solutions
229
Reaction score
1,503
Location
Sweden
Hi, before you read below or respond please take a look at this issue: https://github.com/otland/forgottenserver/issues/1570

As you now know im going to talk about the future with OTs, seeing as both client active right now will be discontinued.
The best move on our part would be to use OTC, mainly since it seems to work pretty good and has most of the things we are after already implemented.

I propose that we contact the owners of OTC about updating the code style to match TFS, with this making it easier for developers to jump from project to project.
That more of us try to be more active with OTC, helping with both bugs aswell as finding bugs(something everyone can do).
Aswell as trying to keep the protocol as updated as posible, see it as doing something while we can. Prepare yourself that we might not be able to get the new protocols as easy as we can right now when the new client arries.

I will be adding a poll, mainly to see what others think.
We could just wait it out, with hope that they won't discontinue the standalone and or flash client.

Or we can move on to something else, while still keeping the support ofc(as OTC is right now) this way we still have the posibility to move back if we wish, this way allowing users to still use the older clients if they want and still are made.

But please leave a comment of what you think.

--

Edit:
To clarify; OTC is a C++ / Lua written client, you can compare it to the tibia standalone client.
It is usable right now, but it does have bugs both minor and major ones - so it is not a thing we can fully compare to the standalone client.

Another thing to note is that we could make it easy to change things that some want added / removed; ex animated text, cooldown system(actually remove the bars) - simply we can control both the server and client.
You can find the code here: https://github.com/edubart/otclient
 
Last edited:
cant we do both i mean like cant we do it all at same time or :eek:
 
OMG! If you make this I will help. I waited for someone to make something like this.. I love TFS Codings Style, its very easy to read for my eyes :), but OTCLIENT is really stupid!

EXAMPLE:
using namespace std;
if(true) {
cout << "WibbenZ codestyle is the best" << endl;
} else
cout << "OTClient codestyle is the best" << endl;


I study computer game programming for 4 years in the University Of Wyoming (exchanged student, my origin from Angola)... I join OTLAND 7 years and you made me write my first post only to gratulate you on this idea and to offer you full support. This is the future. OTCLIENT WITH EASY TO READ SOURCE AND EASY FOR EVERYONE TO EDIT. This have good opportunitys: 1. Easy to fix BUGS 2. Faster to fix BUGS 3. More easy to add New Features 4. We can fix all bugs 5. Good Code Style 7. More easy for new DEVS to join project

When you make The Code Style changes I will work with you in pull request, I can make OTCLIENT much faster and more easy to adjust, I learn in the school OPTIMIZATION STRATEGY to solve NP-hard constraints of Games to maximize flow to GPU. if i can read the code easy, its easy to put this too, we can make from 30 fps (lagged otclient) to 3000 fps (fastest otclient)

If you make repo now in GIThub i will connect with you and help when you make the Code Style good, and i think many more share my Mindset. send me PM when you fixed the code style, its very important before i start my work, because Last time i have tried to do this, the code style it messed my brain and i removed the code

keep it up!!!

ALSO one more idea, if you think the DEVS of OTCLIENT support better Code Style, you can send to thems repository the changes ;) Work together its better than alone!
 
cant we do both i mean like cant we do it all at same time or :eek:

Well that is the point I wrote about, if we use OTC we can do both, even if we decide 2 years from now to mainly use Cipsofts client we can still move back, np.
So by using OTC we still use the same protocol (we could ofc make it better, but then we can't go back by just using another client).

So if you vote for OTC you also vote that we still keep support for the older client(s), and at the same time making OTC better, so when the day comes there will be np "leaving" the standalone clients - since we have a hopefully great working client of our own.
See it as getting more focus to OTC, not only by making the code cleaner and better but also having a backup plan for when they discontinue the old clients.


-- Edit

OMG! If you make this I will help. I waited for someone to make something like this.. I love TFS Codings Style, its very easy to read for my eyes :), but OTCLIENT is really stupid!

EXAMPLE:
using namespace std;
if(true) {
cout << "WibbenZ codestyle is the best" << endl;
} else
cout << "OTClient codestyle is the best" << endl;


I study computer game programming for 4 years in the University Of Wyoming (exchanged student, my origin from Angola)... I join OTLAND 7 years and you made me write my first post only to gratulate you on this idea and to offer you full support. This is the future. OTCLIENT WITH EASY TO READ SOURCE AND EASY FOR EVERYONE TO EDIT. This have good opportunitys: 1. Easy to fix BUGS 2. Faster to fix BUGS 3. More easy to add New Features 4. We can fix all bugs 5. Good Code Style 7. More easy for new DEVS to join project

When you make The Code Style changes I will work with you in pull request, I can make OTCLIENT much faster and more easy to adjust, I learn in the school OPTIMIZATION STRATEGY to solve NP-hard constraints of Games to maximize flow to GPU. if i can read the code easy, its easy to put this too, we can make from 30 fps (lagged otclient) to 3000 fps (fastest otclient)

If you make repo now in GIThub i will connect with you and help when you make the Code Style good, and i think many more share my Mindset. send me PM when you fixed the code style, its very important before i start my work, because Last time i have tried to do this, the code style it messed my brain and i removed the code

keep it up!!!

ALSO one more idea, if you think the DEVS of OTCLIENT support better Code Style, you can send to thems repository the changes ;) Work together its better than alone!

Great input and ive been thinking about this for a long time, but as you said the code style blocked me.
I tried a while ago fixing the code style, mainly using notepad++'s find and replace function but since they use both tabs and spaces it makes it harder, so I restarted then I kept finding more and more issues.

If even just 3-4 users who knows how to tab scripts work on it we can quickly swap it out.
But doing it to long will make you bored and mistakes will happen.

About contacting the owners, that is what I plan to do and when I do I hope to have a couple of devs behind me ready to start once the code is clean.
Hopefully they agree, but at the same time they accepted those PR's and might prefer that code style(for some reason).
If they are not happy with the ides we can still fork it and go from there, but would be good to have support from them aswell.
 
Last edited:
What is the difference between OTC and Flash Client expect that 1 is directly on the website and other needs to be installed first?

Anyway, its too early for me to jump into OTC codes yet and learn as much as possible about it. But then again I don't want to miss it if ball starts to roll.

At current state if I look the OTC source my head explodes. It will take me weeks if not months to figure out what does this or that do and how they are organized. And I'm not even talking about adding anything new.
I propose that we contact the owners of OTC about updating the code style to match TFS, with this making it easier for developers to jump from project to project.
What do you mean by code style?

I think, first thing to do is: Documentation.
Because before we can move, add or fix anything, we should know where to do it and how to do it.
Currently there seems to be only handful of people who know how to do it and even less who know where to do it.
New breed like me wouldn't even know where to start.

I would like to be part of the documentation process because if see it all documented from start to beginning. I believe I will have enough knowledge to help along with the client use, performance and quality.
The client updating would be long term process, but the end goal for me would be similar client to League Of Legends with all the useful features what a good custom RPG game should have. Put I will help to build the client so that, who don't want such a new looking client can disable features his not interested in.

I know that main purpose for OTC is to read the tibia.otb files and make similar copy of tibia game. But why not go beyond?
 
Last edited:
What is the difference between OTC and Flash Client expect that 1 is directly on the website and other needs to be installed first?

Anyway, its too early for me to jump into OTC codes yet and learn as much as possible about it. But then again I don't want to miss it if ball starts to roll.

At current state if I look the OTC source my head explodes. It will take me weeks if not months to figure out what does this or that do and how they are organized. And I'm not even talking about adding anything new.

What do you mean by code style?

I think, first thing to do is: Documentation.
Because before we can move, add or fix anything, we should know where to do it and how to do it.
Currently there seems to be only handful of people who know how to do it and even less who know where to do it.
New breed like me wouldn't even know where to start.

I would like to be part of the documentation process because if see it all documented from start to beginning. I believe I will have enough knowledge to help along with the client use, performance and quality.
The client updating would be long term process, but the end goal for me would be similar client to League Of Legends with all the useful features what a good custom RPG game should have. Put I will help to build the client so that, who don't want such a new looking client can disable features his not interested.

I know that main purpose for OTC is to read the tibia.otb files and make similar copy of tibia game. But why not go beyond?

OTC is better to be compared to the standalone client Cipsoft uses, OTC is not a flash client.
Code style is what you are talking about, ex.
Code:
if (..) {
    ...
} else 
    ....
someOtherFunction()

Just a small example, there are alot of things that makes the code of OTC look ugly and hard to read, im saying we should use the same one that TFS uses.

Docs:
Same goes for TFS, there isen't alot but it kinda isen't needed, just give it some time.
But ofc it should be added, just like it should with TFS.

Either im not understanding you or you haven't read up on OTC :p
OTC is a tibia client, just like the normal standalone client Cipsoft has been using since they started.
OTC was created to avoid getting sued (I suppose) since we are not changing the software Cipsoft has rights on(what we do when we use ipchangers etc).

So you can kinda say I want us to start mainly focusing on OTC insted of the standalone client, but still having compatability with the standalone client(server side).

About layouts / skins they might already have it but if you ask me it would be good to have a posibility to use diffrent skins, to ease the move for users who have used the standalone client all these years.
 
I agree that Otclient has lots of potential, sadly not many users have contributed to the project up until now.
Pull requests are always welcome, especially since most of the features of newer protocol version are not implemented.

If you have suggestions regarding code style you should map those out and maybe @edubart or @Baxnie can then comment on it and give some feedback.

I tried a while ago fixing the code style, mainly using notepad++'s find and replace function but since they use both tabs and spaces it makes it harder, so I restarted then I kept finding more and more issues.
I was looking for tabs mixed into the code, but I only found few occurrences of tabs and fixed those here.
Have I missed any?
 
I agree that Otclient has lots of potential, sadly not many users have contributed to the project up until now.
Pull requests are always welcome, especially since most of the features of newer protocol version are not implemented.

If you have suggestions regarding code style you should map those out and maybe @edubart or @Baxnie can then comment on it and give some feedback.


I was looking for tabs mixed into the code, but I only found few occurrences of tabs and fixed those here.
Have I missed any?

Great to see someone that is active with OTC respond! :)

Oh I can't say right now about the tabs, it was atleast 1-3 months since I tried to update it.
You should pretty easily be able to find what most of us are talking about by reading the code (since you do both TFS and OTC).

Just to name a few;
If statment etc that use the curly brackets rarely use the brackets (eg. one line if statments) - like here; https://github.com/edubart/otclient...518b#diff-5c352764fc73c77c65687116fc6b97c0R65

4 spaces are used insted of using a tab, there are pros and cons of this and im not gonna argue about it, but it's a thing that differs.

One liner if statments; https://github.com/edubart/otclient/blob/master/src/client/animator.cpp#L76

In the Lua files another code style is used, this time it's 2 spaces that makes the code look even harder to read; https://github.com/edubart/otclient/blob/master/modules/client/client.lua

New lines are missing in alot of places; https://github.com/edubart/otclient/blob/master/modules/game_market/market.lua#L178

Strange indendation / none existing rules just compare these 2 + 2;
https://github.com/edubart/otclient/blob/master/modules/gamelib/const.lua#L117
https://github.com/edubart/otclient/blob/master/modules/gamelib/const.lua#L152

https://github.com/edubart/otclient/blob/master/modules/game_questlog/questlog.lua#L8
https://github.com/edubart/otclient/blob/master/modules/game_questlog/questlog.lua#L10


Just opened up a couple of files, there are probbly alot more things.
All of these things compiled makes it really hard to read the code and that is the reason why (IMO) the activity is so low with OTC - not alot of ppl can handle the code.
Not gonna say "change this and everyone will help" but as you can see with just the few who have responded say; the code is way to messy.
But atleast I think it can help get atleast a couple of more devs over to OTC, atleast if the owners are active when it comes to issues / PRs.

--
Edit;
@Summ just now noticed that none of them have been active for a while, do they have new accounts or have they left the OT community?
 
Of course there are a lot of differences, I know that.

The one-liner if statements are for sure controversial and changing that would most likely improve the code quality.
Spaces instead of tabs are no problem in my opinion and I actually like 2 spaces in lua a lot.

The missing blank line you found is probably an oversight as I see no reason why there should not be one and it's also not written down why there should not be one as "coding style".
The "strange" indentation is not really strange as line 117 defines a global constant and line 152 defines a field in a global table, it is however discussable whether game features should be defined in a table as well (but that is not coding style related)

Regarding the questlog example:
Most connect / disconnect calls are indented like that so you can easily distinguishwhich fields are connected whereas line 8 is just any other function call where structure is not really important.
 
Of course there are a lot of differences, I know that.

The one-liner if statements are for sure controversial and changing that would most likely improve the code quality.
Spaces instead of tabs are no problem in my opinion and I actually like 2 spaces in lua a lot.

The missing blank line you found is probably an oversight as I see no reason why there should not be one and it's also not written down why there should not be one as "coding style".
The "strange" indentation is not really strange as line 117 defines a global constant and line 152 defines a field in a global table, it is however discussable whether game features should be defined in a table as well (but that is not coding style related)

Regarding the questlog example:
Most connect / disconnect calls are indented like that so you can easily distinguishwhich fields are connected whereas line 8 is just any other function call where structure is not really important.

I get the feeling that you like the way it is right now and I can understand that, same with me prefering parenteses around if statments.
But all of these things makes it hard for others to join in, if OTC from the start had went with the one TFS uses I think alot more users would be active and have fun coding it, even reading and trying to understand the OTC code is hell to me atleast :p
 
I have no problem reading the code, idk what you mean by code style...
 
I have no problem reading the code, idk what you mean by code style...

https://en.wikipedia.org/wiki/Programming_style

Great to see someone that is active with OTC respond! :)

Oh I can't say right now about the tabs, it was atleast 1-3 months since I tried to update it.
You should pretty easily be able to find what most of us are talking about by reading the code (since you do both TFS and OTC).

Just to name a few;
If statment etc that use the curly brackets rarely use the brackets (eg. one line if statments) - like here; https://github.com/edubart/otclient...518b#diff-5c352764fc73c77c65687116fc6b97c0R65

4 spaces are used insted of using a tab, there are pros and cons of this and im not gonna argue about it, but it's a thing that differs.

One liner if statments; https://github.com/edubart/otclient/blob/master/src/client/animator.cpp#L76

In the Lua files another code style is used, this time it's 2 spaces that makes the code look even harder to read; https://github.com/edubart/otclient/blob/master/modules/client/client.lua

New lines are missing in alot of places; https://github.com/edubart/otclient/blob/master/modules/game_market/market.lua#L178

Strange indendation / none existing rules just compare these 2 + 2;
https://github.com/edubart/otclient/blob/master/modules/gamelib/const.lua#L117
https://github.com/edubart/otclient/blob/master/modules/gamelib/const.lua#L152

https://github.com/edubart/otclient/blob/master/modules/game_questlog/questlog.lua#L8
https://github.com/edubart/otclient/blob/master/modules/game_questlog/questlog.lua#L10


Just opened up a couple of files, there are probbly alot more things.
All of these things compiled makes it really hard to read the code and that is the reason why (IMO) the activity is so low with OTC - not alot of ppl can handle the code.
Not gonna say "change this and everyone will help" but as you can see with just the few who have responded say; the code is way to messy.
But atleast I think it can help get atleast a couple of more devs over to OTC, atleast if the owners are active when it comes to issues / PRs.

--
Edit;
@Summ just now noticed that none of them have been active for a while, do they have new accounts or have they left the OT community?
 
Sorry but im not in topic but may i know diffrence between flash client and normal client?
 
Keep in mind that OTC is not TFS and they use a own style, but i agree that we can keep the same style for both projects.
Maybe you should create a issue on the repo and ask @edubart and @Baxnie what they think about it.
Anyway i like your purposes, if i can help for sure i'll contribute.
 
What is the difference between OTC and Flash Client expect that 1 is directly on the website and other needs to be installed first?

The main difference is the code to OTC is open source, the flash client is not technically.
OTC could potentially run in the browser. Although not trivial, Emscripten could be used to port OTC to HTML5.
It wouldn't be easy, and would require a few workarounds (such as a TCP/Websocket bridge, streaming assets, etc).

My current concern with OTC is performance. It's not noticeable on decent machines, but it's definitely less performant than the standalone client.
I can see many players not wanting to switch because of this.
 
Sorry but im not in topic but may i know diffrence between flash client and normal client?

Flash is written in AS3, you can connect via your browser(chrome, mozilla etc) and there are pros and cons compared to the standalone client(even if flash is alot newer).
The standalone client is the old client that tibia has been using from start(the exe you download from the website - written in C++).

You can find alot of info by googling them, as I said there are pros and cons with both of them.

Keep in mind that OTC is not TFS and they use a own style, but i agree that we can keep the same style for both projects.
Maybe you should create a issue on the repo and ask @edubart and @Baxnie what they think about it.
Anyway i like your purposes, if i can help for sure i'll contribute.

Yes you are correct, it is not linked to TFS and because of that has a diffrent code style, but what im saying is that we kinda try to merge them, to make it easier to write code for OTC one second and the next TFS.
I will do that when I got more to come with, I wanna know what others think before, but looks like they are inactive and in that case ill go through Summ etc that are active with OTC and might have a way to contact them.
Good to hear! :)

My current concern with OTC is performance. It's not noticeable on decent machines, but it's definitely less performant than the standalone client.
I can see many players not wanting to switch because of this.

And as you can read above some seem to be ready to help with that and as I said above, a skin system(if it dosen't exist already) where you can switch to something like what the standalone uses would be good to move players over.
And as long as the standalone client is still in use we can use both, when they discontinue the standalone client we have OTC ready to take over and it might be better then the standalone client is/was at the last day in service.
But I do get your concern and that is why I want to highlight OTC - so we can get started and have a backup plan.
 
I dont see how single if-statements or different brackets positions, or even spaces instead of tabs make it harder for someone to understand or create code.
 
when they will "descontinue" the stand alone ? and, if they start a new client, better, why the "comunity" not use the new client too ?
 
@WibbenZ if/when the new client is released, my first attempt will be to try to adapt it for OT use.
However, I doubt they will make it so easy this next time around.
If for some reason the client is so secure it can't easily be changed it'll be a major decision to either freeze the protocol of the server and use the existing clients, or switch to OTC and mimic updates..

Personally I will opt for existing clients with a protocol freeze until something else comes to light.
 
I dont see how single if-statements or different brackets positions, or even spaces instead of tabs make it harder for someone to understand or create code.

Well it's hard to explain, but I think you get the point, otherwise just google around and you will notice.
Im not saying "this way is the best" - but seeing as TFS uses it and has alot more activity my guess is that people prefer it.
OTC can go really far, but has due to some reason kinda died, atleast if you look at the activity by others then Summ etc

when they will "descontinue" the stand alone ? and, if they start a new client, better, why the "comunity" not use the new client too ?

They got a green light from steam, meaning steam will support them. You will most likely only be able to use / get the client from steam.

@WibbenZ if/when the new client is released, my first attempt will be to try to adapt it for OT use.
However, I doubt they will make it so easy this next time around.
If for some reason the client is so secure it can't easily be changed it'll be a major decision to either freeze the protocol of the server and use the existing clients, or switch to OTC and mimic updates..

Personally I will opt for existing clients with a protocol freeze until something else comes to light.

Correct, and I highly doubt they will do it so easy, then all of this will be for nothing and it's good that you and others will attempt to adapt it, but we need a backup plan in case it does not work.
And that is what I wanna try and avoid, freezing the protocol is not a good way out, would be better to use OTC to still try and mimic it as much as posible, and if we start now we will should be able to get it fully running before they discontinue them.
 
Status
Not open for further replies.
Back
Top