• 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!

Discussion: Would a web-based OT be welcome?

B

Boy67

Guest
Hello all,

As a web developer, I've been working on a hobby project building an OT using web technologies. We all probably used/tried Cipsoft's flash client in the past and some would probably say it was a failure, mainly due to the upcoming doom of Flash. I kinda liked it so I decided to build my own.

I have made everything from scratch. The server is built using Node.js, and the main client is built using HTML5 canvas with websockets. A little PHP, JS and accompanying HTML5, CSS etc.

So the real question is, would there be a demand for it? The web browser is forever becoming more and more supportive and developed. We are seeing a lot of games being built in HTML5.

You can checkout a vid of my current project here:
(Some lag due to near death of my useless mac)

Thanks,
Boy67
 
Last edited by a moderator:
Very nice project!
I don't know if people would play it, but I'd like to see it working..

If you stop this project (or if you are humble enough), would you please share the sources (node / html)? I've ever wondered how would be a nodejs based server.
Good luck bro
 
Yes.
This has been my blocker for half a decade.

tenor.gif


Edit: genuinely still using the flash client until a web client is released:
yep.png
 
Last edited:
@Leo32
Unfortunately, wouldn't be able to connect to existing OT distros. However, I would release both client/server as a package if I did discontinue work on it!
 
A Node based server sounds pretty cool. I would like to see it released as well, if you are inclined to do so.
 
@Sam Drost Yeah, everything is async, I am trying to streamline everything as much as possible, but I am still uncertain on how stable it would be if say there were 100+ people online.

Added NPC video to the start post.
 
Last edited by a moderator:
@Sam Drost Oh thats cool! Yeah I've tested it with 5 friends, I am from UK, a few of them are from Sweden and they had no lag or bad playing experience so for your purpose it would work great!
 
Cool project! I've been dabbling in web development for quite some time with smaller projects. I'm very curious as to what something of this caliber looks like under the hood, and the potential performance with a couple hundred players :)

Keep it up! This little piece of the internet needs more innovators!
 
Yes, (for a web based client), under a few conditions.

1. No nodejs
  • Sockets can be loaded independently
  • Graphical rendering can be done with something like this: PixiJS (https://www.pixijs.com/)
  • Alternatively look into Unity web deployment
2. Work with the tibia protocol, compatible with existing OT distributions.
* Make it an actual OT client, not a pretentious clone that just looks like tibia and can only be used on special servers.

RSA/xtea encryption/decryption is very painful in javascript, and as far as I know javascript clients don't support direct tcpstream connections. But a solution might be to use a websockets <-> tibia protocol proxy. For this I have POTCP - headless OT client library in PHP. It opens up the possibility to connect natively to any OT server through the tibia protocol, and convert the signals into websockets/json for a javascript frontend client.
 
Last edited:
@MikeOT
Thanks for your comment. I have rewritten both client and server in the past due to failure/naivety of calculating the size/complexity of this project.

@Znote
I was hoping for a comment like this. I would love to see a full web OT client but there are several limitations as you have already mentioned. I have looked over your POTCP library and it is impressive. I hope one day yourself or another member will create a web client. Unfortunately, I myself, have no spare time to start over and I am purely working on my own Node.js server for personal fun. Thanks for your input!
 
Yes, (for a web based client), under a few conditions.

1. No nodejs
  • Sockets can be loaded independently
  • Graphical rendering can be done with something like this: PixiJS (https://www.pixijs.com/)
  • Alternatively look into Unity web deployment
2. Work with the tibia protocol, compatible with existing OT distributions.
* Make it an actual OT client, not a pretentious clone that just looks like tibia and can only be used on special servers.

RSA/xtea encryption/decryption is very painful in javascript, and as far as I know javascript clients don't support direct tcpstream connections. But a solution might be to use a websockets <-> tibia protocol proxy. For this I have POTCP - headless OT client library in PHP. It opens up the possibility to connect natively to any OT server through the tibia protocol, and convert the signals into websockets/json for a javascript frontend client.

How hard would it be to encapsulate the protocol in a class, then create a class that works with websockets, and another class that works with the standard clients. As long as the shape of the class is the same, the server shouldn't care which type of client is connecting. Then both types of clients would be supported by the server. The web client would be limited to servers that support websockets, but that would be the only difference. That would eliminate the need to have a middleman to translate websockets to the standard protocol.
 
How hard would it be to encapsulate the protocol in a class, then create a class that works with websockets, and another class that works with the standard clients. As long as the shape of the class is the same, the server shouldn't care which type of client is connecting. Then both types of clients would be supported by the server. The web client would be limited to servers that support websockets, but that would be the only difference. That would eliminate the need to have a middleman to translate websockets to the standard protocol.

Its a performance thing, and C++ hasn't had a super good http protocol support until recently, and our source code isn't the best when it comes to multi-threading.

HOWEVER, this should at least be possible with this: Asynchronous HTTP API with lua bindings by djarek · Pull Request #2010 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/2010)
So pray to the god Djarek that it will be finished and implemented!

You would still need to implement websockets after boost/beast is added, but should be doable. WebSocket ★ - 1.70.0 (https://www.boost.org/doc/libs/1_70_0/libs/beast/doc/html/beast/using_websocket.html)

I would consider a middleman to translate websockets to the standard protocol in a language such as Golang on a separate server just to offload that performance hit away from the server. The standard protocol is pretty damn fast and efficient, and probably why we are able to hit 1000+ players concurrent without too much of an issue.
 
Last edited:
Nice to see someone else is also doing a web project. I have my own but it only looks like Tibia, everything else is different, mine still requires a lot of work to be playable, I worked for more than 1 year but I started again from scratch. I use Phaser for canvas and Svelte for dom

And I know the pain of implementing a minimap in web xD
 
Last edited:
Hey guys,

It's been a while since I posted on this thread. So I thought I would post some updates on this project. Just to reiterate, this has no real affiliation with OT other than the graphic set. (Mods, if this is now an irrelevant sub-forum, can you move this or shall I make a new thread? Thanks :) )

I have added a lot of features both on the client and server.

Server side additions include loot generation; improvements on creature AI and logic; creature summons; creature respawning; private messaging; Friend/VIP system; Raids; Day/Night System and more...

I have also done a lot of rewriting of the client since the initial video I posted on Youtube. Brand new UI, all customisable, you can show/hide, resize and position any container in any way you like. The containers also snap to each other for easy alignment.

(Please dont judge my mapping skills, I suck at mapping xD)

s1.png
s2.png

s3.png

I have also implemented a lighting system which players will only benefit from during night time. Colours from spells or lighting objects blend together. (Not 100% perfect yet, a lot more work still needs to be done)

s4.png

Map Editor changes:

Added brush palettes; eyedropper tool; spawn tool;

I completely redesigned the map editor to maximise the mapping window. All tool windows are now moveable and with visibility toggling. I have also added the ability to integrate new spritesheets in one click of a button, and re-arranging the order of the sheets.

I have also integrated a sprite data tool to easily edit sprite data and attribute, such as non walkable tiles/objects or ground tiles.

s6.png

Let me know what you think guys!

Thanks,
Boy67
Post automatically merged:

-- Placeholder for more screenshots --

s5.png
 
Last edited by a moderator:
the good thing about developing something from scratch is that you can embedded it all together. I was hoping we could achieve something near your idea in current distros: a client/server that talks the same language and benefits from same libraries, embedded map editor in the client and so on.

I think it has potential, web based games are becoming more common each year. If you can replace the graphics and call it other game,a lot of people would be interested in it. I've liked the UI
 
Back
Top