Making a browser version of wesnoth?
Moderator: Forum Moderators
Re: Making a browser version of wesnoth?
it's not that bad better leave it, maybe somebody can pick it up and remake.. less work than making it from scratch, just make version 0.x.x to show it's not functional... my opinion. As far as I remember it's partly working, so it's at least fun to try.ForestDragon wrote: ↑July 3rd, 2018, 4:08 pm Do you mean the add-on? Yeah, that's actually a good idea. I suppose I might reupload it once it's not an unplayable mess.
- ForestDragon
- Posts: 1771
- Joined: March 6th, 2014, 1:32 pm
- Location: Ukraine
Re: Making a browser version of wesnoth?
ok.
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Re: Making a browser version of wesnoth?
Hey guys, take it easy! I wouldn't like this thread to derail into a fist fight. It would be nice to keep a courteous tone.
I'm clearly realizing rewriting Wesnoth is a herculean task. It's always difficult to assess such big projects, and for now it was just an idea I toyed with.
I made a mini prototype to read maps and display them, to parse the WML and transform it into JSON, etc. ...but, it's complex, there is no denying it. I also have the impression the WML is "overcomplexified" in many places, but is hard to change because of compatibility reasons.
Lastly, one key factor for undergoing such a project is also long term support. If I saw many dozens of posts like "Hey, yeah, we want that!", it would be more motivating. However, apparently, there is indeed very little interest.
I'm clearly realizing rewriting Wesnoth is a herculean task. It's always difficult to assess such big projects, and for now it was just an idea I toyed with.
I made a mini prototype to read maps and display them, to parse the WML and transform it into JSON, etc. ...but, it's complex, there is no denying it. I also have the impression the WML is "overcomplexified" in many places, but is hard to change because of compatibility reasons.
Lastly, one key factor for undergoing such a project is also long term support. If I saw many dozens of posts like "Hey, yeah, we want that!", it would be more motivating. However, apparently, there is indeed very little interest.
Re: Making a browser version of wesnoth?
yeah.. I dont think you would get much support for creating something that already exists in existing community.. It would only be useful for people who never tried wesnoth, and possibly you dont get a huge support from developers either because it will kind of be not their project and they will have none/few control over it.. Yeah it would benefit, but nobody will shout about it unfortunately.. just me whispering
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Making a browser version of wesnoth?
If something working and playable was eventually produced, I would sticky the thread for it here on the forums, at the least. And while I obviously can't speak for other developer support, I would say that it partially depends on if you make something that can be contributed into the Wesnoth Project itself or if you create it as something entirely separate.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Making a browser version of wesnoth?
I think you should not worry too much about compatibility, if you have an browser version of this game (even if it expects a different data format) , then that already a very good archivevent while on the other hand a compatibility converter for a game that does not exist doesn't really give you anything.dagnelies wrote: ↑July 7th, 2018, 7:40 pm Hey guys, take it easy! I wouldn't like this thread to derail into a fist fight. It would be nice to keep a courteous tone.
I'm clearly realizing rewriting Wesnoth is a herculean task. It's always difficult to assess such big projects, and for now it was just an idea I toyed with.
I made a mini prototype to read maps and display them, to parse the WML and transform it into JSON, etc. ...but, it's complex, there is no denying it. I also have the impression the WML is "overcomplexified" in many places, but is hard to change because of compatibility reasons.
Lastly, one key factor for undergoing such a project is also long term support. If I saw many dozens of posts like "Hey, yeah, we want that!", it would be more motivating. However, apparently, there is indeed very little interest.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Making a browser version of wesnoth?
> I also have the impression the WML is "overcomplexified" in many places, but is hard to change because of compatibility reasons.
I am glad to see that I am not the only one.
However had, deprecation does not necessarily have to happen in a brute way. For example, one could try to find an alternative
to WML, with less complexity, simpler syntax and so forth, and then slowly transition into it. Ideally to be even able to transition
all the campaigns into this.
The problem is trying to come up with a simpler syntax. In some ways lua is simpler; on the other hand, it's a real programming
language designed to be embeddable from the get go.
I've noticed quite a few interesting campaigns. The largest add-on campaign is probably the best of all times. But there are
a few bugs or rather, oddities ... in one scenario I got lua-warnings for example.
Changing all that towards any simpler format is difficult. Perhaps the easiest way would be to design an alternative, and
then go to use that as an ALTERNATIVE syntax, e. g. where developers can choose which variants to use slowly,
and transition towards that. Lots of things can be re-used, like images; code logic obviously can not too easily be
re-used (and using WML as a programming language is madness, IMO ... denoting if clauses in [] tags is a bad
idea). But I digress from the main topic at hand, so ...
Bottom line is: it would be great if we could find or design a simpler language for describing a campaign. But it should
not happen in an exclusive manner, IMO, but a co-supportive one.
I am glad to see that I am not the only one.
However had, deprecation does not necessarily have to happen in a brute way. For example, one could try to find an alternative
to WML, with less complexity, simpler syntax and so forth, and then slowly transition into it. Ideally to be even able to transition
all the campaigns into this.
The problem is trying to come up with a simpler syntax. In some ways lua is simpler; on the other hand, it's a real programming
language designed to be embeddable from the get go.
I've noticed quite a few interesting campaigns. The largest add-on campaign is probably the best of all times. But there are
a few bugs or rather, oddities ... in one scenario I got lua-warnings for example.
Changing all that towards any simpler format is difficult. Perhaps the easiest way would be to design an alternative, and
then go to use that as an ALTERNATIVE syntax, e. g. where developers can choose which variants to use slowly,
and transition towards that. Lots of things can be re-used, like images; code logic obviously can not too easily be
re-used (and using WML as a programming language is madness, IMO ... denoting if clauses in [] tags is a bad
idea). But I digress from the main topic at hand, so ...
Bottom line is: it would be great if we could find or design a simpler language for describing a campaign. But it should
not happen in an exclusive manner, IMO, but a co-supportive one.
Re: Making a browser version of wesnoth?
OMG, lua is way more complex! I don't want to interpret a whole programming language, I just want to parse some data!
I have no grudge with the WML format itself. The basics are even quite good IMHO. It's more that parts of the macros is abused. Like having macros in macros in macros. Then, you add named parameters, optional parameters, multi-line stuff, nested parentheses, fancy other pre-process flags, [+tags] to merge with the previous, etc.
It's not simply a "data format" anymore, the WML evolved into a fairly complex pre-processing machinery ...and most of the "advanced" stuff are used only in a few files for questionable benefits.
Additionally, some things look IMHO unnecessarily complex/fat in how WML is declared.
For example, the music of a scenario (example picked from HTTT/scenarios/01_The_Elves_Beseiged.cfg):
Couldn't this have simply be declared as a one liner?
This is just one example of many, but there are traces of verbose things that could be simple all over the place.
I have no grudge with the WML format itself. The basics are even quite good IMHO. It's more that parts of the macros is abused. Like having macros in macros in macros. Then, you add named parameters, optional parameters, multi-line stuff, nested parentheses, fancy other pre-process flags, [+tags] to merge with the previous, etc.
It's not simply a "data format" anymore, the WML evolved into a fairly complex pre-processing machinery ...and most of the "advanced" stuff are used only in a few files for questionable benefits.
Additionally, some things look IMHO unnecessarily complex/fat in how WML is declared.
For example, the music of a scenario (example picked from HTTT/scenarios/01_The_Elves_Beseiged.cfg):
Code: Select all
[scenario]
...
[music]
name="revelation.ogg"
[/music]
[event]
name=prestart
[music]
name="battle.ogg"
immediate=yes
ms_after=2000
[/music]
[/event]
[+event]
[music]
name="casualties_of_war.ogg"
append=yes
[/music]
[/event]
[+event]
[music]
name="knolls.ogg"
append=yes
[/music]
[/event]
[+event]
[music]
name="siege_of_laurelmor.ogg"
append=yes
[/music]
[/event]
[+event]
[music]
name="suspense.ogg"
append=yes
[/music]
[/event]
[+event]
[music]
name="the_city_falls.ogg"
append=yes
[/music]
[/event]
Code: Select all
[scenario]
...
music="revelation.ogg", "battle.ogg", "casualties_of_war.ogg", "knolls.ogg", "siege_of_laurelmor.ogg", "suspense.ogg", "the_city_falls.ogg"
-
- Inactive Developer
- Posts: 503
- Joined: April 24th, 2016, 4:18 pm
Re: Making a browser version of wesnoth?
Your replacement changed behavior by over-simplifying the problem.
You're trading maintainability and readability for a tiny improvement in parse/load time and file size.
That said, yes, WML is a mess. And, yes, Lua-only solution is better in some ways and worse in others.
The problem, as I see it, is that WML needs to be both a data-definition language (for cases like your example) and a Turing-complete procedural language. There are few, if any, examples of such languages.
You're trading maintainability and readability for a tiny improvement in parse/load time and file size.
That said, yes, WML is a mess. And, yes, Lua-only solution is better in some ways and worse in others.
The problem, as I see it, is that WML needs to be both a data-definition language (for cases like your example) and a Turing-complete procedural language. There are few, if any, examples of such languages.
I forked real life and now I'm getting merge conflicts.
Re: Making a browser version of wesnoth?
wml is too great for beginners.. wesnoth would have a lot less custom content if there was no WML... not many people are ready to programm straight into proper languages like lua.. most survivals etc would never happen.. well to be honest I probably wouldn't start making add-ons either (despite i was familiar with programming languages before). Well idk to be honest.. maybe if lua had great documentation and tons of examples then it would be a different story.
Re: Making a browser version of wesnoth?
...and why would we need a "Turing-complete procedural language"? I have the feeling that exactly this makes the WML needlessly complex. Every time I see for loops and such things in WML, I think it's something that should be inside the code, while instead providing a simple declarative tag for WML users.
That said, I understand there are times where you want to do something really specific, but it's also uncommon. Perhaps adding a simple tag like
[script]src=myscript.lua[/script]
would be more adequate for such cases. There, you could do fancy stuff, leveraging all programming constructs, while keeping the declarative WML simple & tidy.
That said, I understand there are times where you want to do something really specific, but it's also uncommon. Perhaps adding a simple tag like
[script]src=myscript.lua[/script]
would be more adequate for such cases. There, you could do fancy stuff, leveraging all programming constructs, while keeping the declarative WML simple & tidy.
-
- Inactive Developer
- Posts: 503
- Joined: April 24th, 2016, 4:18 pm
Re: Making a browser version of wesnoth?
Let me re-phrase your statement:
All this is, of course, a discussion for Wesnoth-NG because we can't drop what we now have unless we want to completely re-write all mainline campaigns and force all UMC to be completely re-written.
If you want to do a ground-up redesign of a browser-based Wesnoth-like game, have at it. But don't look to any Wesnoth assets for assistance. You might be able to scrape a few images but that's about it.
You need the Turing-complete language, like Lua, precisely because doing it in WML is such a pain. But, at the same time, you want that language to be a first-class citizen instead of an adopted child (like Javascript in a browser, or our use of Lua).Why do we need Javascript? This is exactly what make web programming needlessly complex. Every time I see something like for loops and such in a web page, I think it's something that should be inside the browser, instead, providing a simple declarative HTML tag for web designers.
All this is, of course, a discussion for Wesnoth-NG because we can't drop what we now have unless we want to completely re-write all mainline campaigns and force all UMC to be completely re-written.
If you want to do a ground-up redesign of a browser-based Wesnoth-like game, have at it. But don't look to any Wesnoth assets for assistance. You might be able to scrape a few images but that's about it.
I forked real life and now I'm getting merge conflicts.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Making a browser version of wesnoth?
I think this was more or less what wesnoth2 was effectively proposing. IIRC the anura engine's scripting has a much clearer separation between structural elements and logic, though I also only briefly looked into it back when it was first brought up, and wesnoth2 at least is abandoned.Tad_Carlucci wrote: ↑July 21st, 2018, 12:28 am All this is, of course, a discussion for Wesnoth-NG because we can't drop what we now have unless we want to completely re-write all mainline campaigns and force all UMC to be completely re-written.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Making a browser version of wesnoth?
I personally think that this would be a good idea. It would take a lot of effort but if it could be ported I believe I know quite a few people who would be interested in playing it.
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
Re: Making a browser version of wesnoth?
im not sure if there is a point to completely copy the WML into web version.. I think that's something that might be added with later development, after completely new web core is complete.
I understand it that making it fully identical means that you potentially could use all existing add-ons and maps/scenarios in web version without need to rewrite them, so by doing more work on cloning WML u could save work on rewriting scenarios.
But.. it will probably take ages and ages to copy WML into web as it is.. Maybe you could just do it semi-compatible? Like making a completely new web core, but keep basic WML tags (exclude the loops and macros at first and leave it for later development), this would probably make it work for most core maps/scenarios and maybe even some Campaigns since loops and macros are only used in advanced add-ons I think..
just my views
I understand it that making it fully identical means that you potentially could use all existing add-ons and maps/scenarios in web version without need to rewrite them, so by doing more work on cloning WML u could save work on rewriting scenarios.
But.. it will probably take ages and ages to copy WML into web as it is.. Maybe you could just do it semi-compatible? Like making a completely new web core, but keep basic WML tags (exclude the loops and macros at first and leave it for later development), this would probably make it work for most core maps/scenarios and maybe even some Campaigns since loops and macros are only used in advanced add-ons I think..
just my views