Let's move freeorion from C to HTML5/JS/Canvas/WebSockets
Moderator: Committer
Let's move freeorion from C to HTML5/JS/Canvas/WebSockets
So, why not?
I clearly see numerous advantages of this:
1) no need to compile, just download and play
2) freeorion client can be ran from external webserver, so no need to even download
3) crossplatformity/portability guaranteed by browsers
4) FPS increase (canvas is really fast in modern browsers, unlike current UI)
5) no need to have ugly python scripts and having to parse them in C - loading js script by js engine is dead simple
6) development speed increase (js is simpler language, also no need to recompile = huge boost)
7) no memory bugs will be possible anymore (only if there's bug in browser, but it will be fixed by browser maintainers anyway)
easier to participate in development for newcomers (js is easier to use)
Disadvantages?
1) some initial effort needed to migrate
So, let's discuss.
I clearly see numerous advantages of this:
1) no need to compile, just download and play
2) freeorion client can be ran from external webserver, so no need to even download
3) crossplatformity/portability guaranteed by browsers
4) FPS increase (canvas is really fast in modern browsers, unlike current UI)
5) no need to have ugly python scripts and having to parse them in C - loading js script by js engine is dead simple
6) development speed increase (js is simpler language, also no need to recompile = huge boost)
7) no memory bugs will be possible anymore (only if there's bug in browser, but it will be fixed by browser maintainers anyway)
easier to participate in development for newcomers (js is easier to use)
Disadvantages?
1) some initial effort needed to migrate
So, let's discuss.
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
Good joke // fuck off.afwbkbc wrote:4) FPS increase (canvas is really fast in modern browsers, unlike current UI)
6) development speed increase (js is simpler language, also no need to recompile = huge boost)
Team S.M.A.C.: play multiplayer with us!
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
Please be constructive.L29Ah wrote:Good joke // fuck off.afwbkbc wrote:4) FPS increase (canvas is really fast in modern browsers, unlike current UI)
6) development speed increase (js is simpler language, also no need to recompile = huge boost)
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
You are welcome to implement it.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
There is no point to implement it until core developers agree to move this path. If freeorion-js will have to be constantly patched to match updates in C or python scripts (forever) - maintenance overhead will easily outweight the benefits. So, I need developers' assurance that they will consider continuing development in js (and drop C/python) after its implemented initially.o01eg wrote:You are welcome to implement it.
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
The lack of any comments by said core devs should already give an indication about how seriously they take this proposal.afwbkbc wrote:There is no point to implement it until core developers agree to move this path.
Without going into detail wrt to all the points you see as advantages (judging by your past ideas and the following discussions you very obviously assess things very differently than the rest of us does), I'm only going to refer to this: you practically ask us to throw out the entire codebase and reimplement everything from scratch in another programming language. The effort of which you assume to be:
Which, IMHO, is so far out of touch with reality it isn't funny anymore. Some initial effort - seriously???afwbkbc wrote:some initial effort needed to migrate
So, to spare you wasting your time: not going to happen. Sorry.
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
Not really. Existing codebase already have all algorithms and game logic ready, we just need to copy these algorithms and logic to js (so no need to invent or design anything). Well, maybe there are some exceptions, but overall copying existing product is far easier than creating something out of nothing.you practically ask us to throw out the entire codebase and reimplement everything from scratch
And there are lots of C++ to JS compilers available which we can use for initial migration.
And we can also reuse all existing art and sounds, which saves TONS of time.
Well, maybe a week.Some initial effort - seriously???
Let's imagine I do it, will we continue developing (new features, etc) on JS after that?
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
You essentially want to convert FO into a browser game. Implementation something as a browser app is, let's say, somewhat different from implementing the same thing as a traditional C program. So "just need to copy these algorithms and logic to js" probably isn't going to cut it - at all.afwbkbc wrote:Existing codebase already have all algorithms and game logic ready, we just need to copy these algorithms and logic to js
I expect you to diagree on that assessment, but I guess we'll have to settle for agreeing to disagree at this point.
I don't think they'll work for a program as complex as FO.And there are lots of C++ to JS compilers available which we can use for initial migration.
Even if we had to, these would be the least of my concerns.And we can also reuse all existing art and sounds, which saves TONS of time.
A week. You seriously expect we could turn FO into a browser game within a week. Don't be offended, but... to me that sounds utterly insane.Well, maybe a week.
To put it more mildly: I think your estimation to be far off the mark.
Well, a long answer would require discussing the various points you list in favor of such a change, and seeing how far different our assessments are on already quite simple things I don't have the time and nerves to go through that with you. I already know the outcome: we'll have to agree to disagree. So I'm just giving the short answer: no. If anyone of the core devs disagrees with my decision, they may speak up. Not that I expect any of them to actually do that...Let's imagine I do it, will we continue developing (new features, etc) on JS after that?
Just a simple question, out of curiosity: you do know that there are a lot of applications/programs out there (actually, AFAIK, it's the majority), which are not implemented as browser apps in HTML5/JS, right? If you believe JS to be so universally superior, have you ever wondered why...?
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
Have to agree with Vezzra that there has to be a consensus among core developers to migrate the project. But I agree with you that JS has a lower leaning curve than C and maybe more developers can contribute to the project. However, just because a language is inherently easier does not make it inherently good.
~ life of code ~ Range microwaves discussion
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
There are possible to write web-server-2-freeorion-client proxy same way it done in freeciv-web.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
I dont think it makes sense to reimplement freeorion server in js.
That said it would be a nice project for somebody learning programming the web stack to implement a freeorion client in html/js.
(I also understand that none of the current devs would work on it.)
The main project maybe would need to work on the communication protocol between client and server, but that probably would be a good thing.
One could start without graphics but giving only a minimal or textual representation.
@afwbkbc are you interesting in learning programming? (or you know someone who is?) you could team up with one of your buddys and start this as a project. I/we could help with the connection to the server and you might find a local hacker space or programming meetup for guidance.
That said it would be a nice project for somebody learning programming the web stack to implement a freeorion client in html/js.
(I also understand that none of the current devs would work on it.)
The main project maybe would need to work on the communication protocol between client and server, but that probably would be a good thing.
One could start without graphics but giving only a minimal or textual representation.
- connect with freeorion server
- get the client gamestate and show some info (or other empire wide info like PP/RP)
- show the research queue
- list the systems and their planets and their info
- add some actions
- make it complete
@afwbkbc are you interesting in learning programming? (or you know someone who is?) you could team up with one of your buddys and start this as a project. I/we could help with the connection to the server and you might find a local hacker space or programming meetup for guidance.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
- The Silent One
- Graphics
- Posts: 1129
- Joined: Tue Jul 01, 2003 8:27 pm
Re: Let's move freeorion from C to HTML5/JS/Canvas/WebSocket
afw... is a troll who was banned afaik. He only made mock proposals and never contributed anything of value. Don't waste your time on himOphiuchus wrote:@afwbkbc are you interesting in learning programming? (or you know someone who is?) you could team up with one of your buddys and start this as a project. I/we could help with the connection to the server and you might find a local hacker space or programming meetup for guidance.
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.