ekolis / FrEee

An open source clone of the classic 4X game Space Empires IV.
http://edkolis.com/freee
48 stars 12 forks source link

Playing this game in a web browser? #54

Open willwoodlief opened 4 years ago

willwoodlief commented 4 years ago

What do you want to see? I would like to see this game be compiled to Web Assembly using Blazor; and allow the AI to be optionally additionally augmented by javascript, as well as c# scripts

How would it help players? It would make this game truly platform independent; would make it easier for websites to host this as a multiplayer game, and with a little tweaking would allow modding development in the browser window

Alternatives There may be other ways to compile this to javascript, other than Blazor

Screenshots and mockups None yet

Things to consider Posting this idea to see how feasible it may be. I don't know if there is any complications from doing it

ekolis commented 4 years ago

Hmm, that sounds cool, but I've never used Blazor before. So I guess the game host would have to set up a website to host the game or something, and install any necessary mods/shipsets there? And then everyone would connect to it in a browser?

willwoodlief commented 4 years ago

I will look more into Blazor.

Perhaps the hypothetical game host could have multiplayer and single player ability.

In the multiplayer, each account could control/install the mods/shipsets for their current network game. When the game host ran the turn, it would load in the modlist and run the game using headless chrome

As for single player mode, a user could run each turn themselves, in the browser, and load the mods they wanted directly in the webpage, so the game site would not have to track/build all of that. But, the host could keep a list of current mods that the user has on a favorite or installed list, and alert the players when something has been updated ( New AAA-Shipset version 1.3 released!) for example

On Sun, Jan 19, 2020 at 12:55 PM Ed Kolis notifications@github.com wrote:

Hmm, that sounds coo, but I've never used Blazor before. So I guess the game host would have to set up a website to host the game or something, and install any necessary mods/shipsets there? And then everyone would connect to it in a browser?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekolis/FrEee/issues/54?email_source=notifications&email_token=AAFRGA5ITBTIG6HLACJPHIDQ6SO35A5CNFSM4KI2XXL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJKZQVY#issuecomment-576034903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFRGAZDK5M4J632X63S3HTQ6SO35ANCNFSM4KI2XXLQ .

thegreatpl commented 4 years ago

A client might be possible. I'm not sure about the server even in single player. There are a lot of code that I think might not be compatitble with Blazor.

If we were going to build a webclient, I would suggest something more along the lines of Unity than Blazor, as we could replace the winforms and wpf clients at the same time with the same code base.

willwoodlief commented 4 years ago

Okay, that is what I was wondering -- if an automatic, extra, build step could have been made that would have compiled the entire project to js. So there would have been a js version as well as the regular version. I did not know if some code changes had to be made, to make it possible, or if this would be too many changes. Sounds like a web client would be a new sub project !

On Sun, Jan 19, 2020 at 3:44 PM thegreatpl notifications@github.com wrote:

A client might be possible. I'm not sure about the server even in single player. There are a lot of code that I think might not be compatitble with Blazor.

If we were going to build a webclient, I would suggest something more along the lines of Unity than Blazor, as we could replace the winforms and wpf clients at the same time with the same code base.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekolis/FrEee/issues/54?email_source=notifications&email_token=AAFRGA55JNJ6HJXL6MZB5VLQ6TCTJA5CNFSM4KI2XXL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJK5MTI#issuecomment-576050765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFRGAYI5IRYQPDHFQ7NUMLQ6TCTJANCNFSM4KI2XXLQ .

thegreatpl commented 4 years ago

Nope. The current client uses IO pretty heavily. Every turn, it saves to disk (might not in single player). That alone would screw up most web conversions to my knowledge.

On the subject of AI in javascript, that might be possible using ClearScript, but in that case, the AI would have to be entirely written in javascript (it has to be entirely written in Python or C# currently, and cannot mix).