Making a browser version of wesnoth?

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

enclave
Posts: 801
Joined: December 15th, 2007, 8:52 am

Re: Making a browser version of wesnoth?

Post by enclave » July 4th, 2018, 7:05 am

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.
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.

User avatar
ForestDragon
Forum Regular
Posts: 1474
Joined: March 6th, 2014, 1:32 pm

Re: Making a browser version of wesnoth?

Post by ForestDragon » July 4th, 2018, 7:09 am

enclave wrote:
July 4th, 2018, 7:05 am
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.
ok.
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned) and The Golden Age (1.12/1.13, temporarily abandoned again),XP Bank (now on 1.14),Alliances Mod(1.12, unplayable)
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

dagnelies
Posts: 8
Joined: June 2nd, 2018, 7:47 am

Re: Making a browser version of wesnoth?

Post by dagnelies » 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.

enclave
Posts: 801
Joined: December 15th, 2007, 8:52 am

Re: Making a browser version of wesnoth?

Post by enclave » July 8th, 2018, 11:51 am

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 :D

User avatar
Pentarctagon
Forum Administrator
Posts: 3455
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Making a browser version of wesnoth?

Post by Pentarctagon » July 8th, 2018, 2:29 pm

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

gfgtdf
Developer
Posts: 1001
Joined: February 10th, 2013, 2:25 pm

Re: Making a browser version of wesnoth?

Post by gfgtdf » July 8th, 2018, 5:01 pm

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.
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.
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.

shevegen
Posts: 158
Joined: June 3rd, 2004, 4:35 pm

Re: Making a browser version of wesnoth?

Post by shevegen » July 8th, 2018, 10:08 pm

> 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.

dagnelies
Posts: 8
Joined: June 2nd, 2018, 7:47 am

Re: Making a browser version of wesnoth?

Post by dagnelies » Yesterday, 7:14 pm

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):

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]
Couldn't this have simply be declared as a one liner?

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"
This is just one example of many, but there are traces of verbose things that could be simple all over the place.

Tad_Carlucci
Developer
Posts: 278
Joined: April 24th, 2016, 4:18 pm

Re: Making a browser version of wesnoth?

Post by Tad_Carlucci » Yesterday, 10:29 pm

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.
I forked real life and now I'm getting merge conflicts.

enclave
Posts: 801
Joined: December 15th, 2007, 8:52 am

Re: Making a browser version of wesnoth?

Post by enclave » Today, 11:38 am

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.

Post Reply