2012-07-23

New page

= Canvas Next =

This is a stream of consciousness of what doesn’t work with ''Wesnoth'' today, where technology and gaming has been going, and where ''Wesnoth'' should be in the future.

== Where ''Wesnoth'' is Today ==

''Wesnoth'' is a successful open-source strategy game for most PC and some mobile platforms. It is a community-driven project, featuring contributions from hundreds of artists and developers. Although it isn’t quite mainstream, it is one of few quality games which is generally “free to play,” has functional, multiplayer capability, and has been active for nearly a decade.

That being said, ''Wesnoth'' faces a series of troubles, which I will identify in detail. Afterward, I will provide some solutions, as well as my own goal with some specifics on how to accomplish them.

== How Technology of Gaming Has Changed in a Decade ==

Back in 2003, we had a very different landscape. Windows primarily dominated the non-console gaming space. Macs and UNIX-flavored PCs contributed to approximately 5% of the market. Macromedia (and later Adobe) Flash dominated the interactive portion of the web, spawning a number of indie Flash games. A push for web standards had begun, but development on many web browsers had stagnated.

Fast forward to today: we now have 10-15% of consumer devices run OS X or some variety of UNIX aside from Windows; many of the same computers run a combination of the three. However, a new market has appeared: smartphones. Our cellular phones, popularized only in the last 15 years, This segment is largely dominated by iOS and Android, with minor players, including Windows OS, trying to push themselves into relevancy.

But wait! In the last three years alone we've seen the catapult of a new class of devices: tablets. More and more games and game developers have flocked to the new devices, porting their games from console or PC. Never before have we seen new platforms rise so quickly in popularity. Additionally, we're seen a renaissance of sorts on the web, with renewed interest in browser technologies. AJAX has allowed instant modification of web pages without page reloading. W3C’s embrace of HTML5, Apple’s promotion of <canvas>, and web apps being developed through a multitude of new frameworks such as Ruby on Rails, and libraries like jQuery to simplify web development.

Currently, ''Wesnoth'' is only available and actively developed for Windows, UNIX and Linux and OS X.

== Licensing ==

There are thorny issues with licensing which are still unresolved.

Dave White, creator of Wesnoth, released his project under the GPL. It was one of the best and permissible licenses which protected Wesnoth from not being attributed and kept the content freely available. It also easily invited new programmers to the project. Today, we have newer licenses which didn’t exist back then, which better protect rights for artists.

The biggest issue we have is with art and music assets. Plain and simple, GPL was not written for art. “Source code” is awfully hard to define for such works, and describing how the GPL fits for these is difficult at best. For this reason, Creative Commons was established as a way of protecting an artist, giving some power to how much freedom they want to afford, and not requiring sticky redistribution restrictions (providing source code, identifying all changes if not needed, etc.)

Additionally, we get licensing issues with the Wesnoth project as a whole. Part of the GPL states that the project cannot be restricted with its distribution. The Apple iOS App Store policy violates this clause of the GPL. But who knows what future platforms Wesnoth may be available (various Android-compatible marketplaces, Steam, OUYA, etc.)

== WML ==

WML was created originally as a description format. It was meant for minor preprocessing and describing unit stats. Over time, more and more things got added to WML to the point where it blends in as a programming language. Due to this tacked-on nature, many commands and syntax lack consistency. On top of this, Python scripting was introduced, then, when security issues found their way in, it was phased out in favor of Lua. But not all of Lua works, only parts of it. This kind of headscratching can be difficult, especially for the newcomer.

So what is WML? And what ''isn’t'' WML? If WML is going to be a markup language it should end there. It’s ineffective trying to have two goals with one language. There’s little need to re-invent better formats and languages which already exist.

== Multiplayer Games ==

Despite more and more people being online nearly all day, every day, invariably people are still going to get disconnected. On top of that, for more casual players, Wesnoth isn’t a game you can finish in 10 minutes. Sometimes we don’t have several hours at a time to dedicate to a game such as ''Wesnoth.'' Also, we may be on different devices during the day — a mobile phone during the morning, a tablet during lunch, a computer in the evening.

Games need to be always on the server and available on as many platforms as possible. And they need to be updated as the game is updated, and taken over if a person decides to stop work on its development.

== What’s Next? ==

So here’s my goals:

* '''Create an HTML5 + <canvas> + JavaScript web client and web server.''' Because ''Wesnoth'' is a 2D game without high graphics demands, this shouldn’t be too taxing on most hardware. There may be some pieces which won’t work right away, as, admittedly, HTML5 and many of its APIs are still being worked on.

* '''Redesign the engine and game data format using a clearer structure.''' Since I would be rewriting ''Wesnoth'' in JavaScript, you can expect some of this may be necessary. JSON affords a well-defined syntax and works natively with JavaScript; it’s a natural fit.

* '''Let this implementation use the same data files.''' If this web version stands any chance of success, it’s going to need to run by reading the current data files.

* '''Start lean, write clean, be mean.''' Keep out the cruft. Do things the right way. If it means some features don’t get implemented right away, or at all, then so be it.

There are some possibilities down the road. Canvas Next could be adapted to a desktop client through a wrapper using existing tools. Or, Webkit can be built for most operating systems into an app, specifically stripped down simply for Canvas Next.

Show more