FWD: "BYOND, the web, and you: a love story"

General SS13 Chat
Post Reply
User avatar
JJRcop
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

FWD: "BYOND, the web, and you: a love story"

Post by JJRcop » #23081

You may have noticed this in your alerts when you logged into BYOND. Tom, the main BYOND developer, posted this on Friday. It can be found at: http://www.byond.com/forum/?post=1643547

For your convenience, I have provided the text below, enjoy!
Tom wrote:A few months ago, I made a post describing how we were finally moving forward with the BYOND web port. This is almost ready for primetime (testing) so I wanted to whet your appetite with a glimpse into both the past and the possible future of this project.


A history of the web client


As many of you know, we initially attempted to create this client in AS3/Flash quite a few years ago. Some even pointed out that this was not the best direction, since even then Flash was being given the death sentence as a technology. However, the alternative HTML5 option wasn't looking too hot back then, as a number of things we wanted to do were only supported with different degrees of difficulty on the different popular browsers. So we ended up going with the Flash and had a bare-bones client basically working, but I was never very happy with it. The client wasn't extensible, was limited to only the map and a hard-coded interface, and didn't have a future among the wide world of apps that have taken the Internet by storm. Introducing a web client would bring about a new wave of feature creep and headaches and I didn't want to go forward with this unless what we had was worth supporting. So that's why all but a few users ever saw that client.

When I revisited the notion of the web client early this year, I saw that HTML5 was indeed in much better shape. Although support isn't ubiquitous, it is acceptable, particularly since Google Chrome has become the dominant browser. So we opted to give it a shot. Porting the existing Flash code was fairly easy since we already had a good chunk of the project-- a simplified protocol to relay the data from the server to the client-- developed from the prior effort. So within a short time we had our basic client written in javascript (courtesy of Google Dart), complete with hard-coded interface, macro, and map support. But this is where we were with the Flash client that left me unfulfilled. So what next?

This-- not the somewhat premature reports of Flash's demise-- is where the HTML5 option really shines. Because, by doing things in javascript, we realized that we could open up the interface to the developers in a manner that is not only more powerful than the previous web client, but far superior to the existing software client. When we successfully tested this approach, the moment was revolutionary... like Edison and his lightbulb, or Graham and his phone, or Reese and his peanut-butter cup. We are in the big time now, ladies & gents!


How does it work?


Just like the BYOND icon format is "PNG+", the new BYOND interface format is "HTML5+". You write the interface in HTML/javascript, but can take advantage of a predefined template system to use existing controls and function calls to the BYOND infrastructure. Theoretically, you should even be able to track and query BYOND elements via javascript to implement client-side effects-- a long desired feature. The idea is to make this as powerful as you need. Novices or people who only need a basic interface (the vast majority), need only write a simple wrapper to define their layout, and even a rudimentary knowledge of HTML will suffice. Power-users can write their own controls using javascript. They can even export those to a library so other users can reuse these controls.

For example, here is a very simple interface that displays the map and output controls.

Image

The 'id' is used to reference the control from within the winset, output, etc. statements in your code, as well as from within the HTML for style properties and javascript access. The 'byondclass' is to point to a template that defines what the control does and how it interfaces with the server. We have provided a number of default controls to mimic most of the existing DMF system. As mentioned, power-users can create their own-- and we're really looking forward to see how people use (and abuse) this! An explanation of the control format is beyond the scope of this preview, but we'll cover that in more ground with the beta release, and, of course, the code of the existing controls will be available to peruse and modify.

You define these interfaces, as well as supporting styles and macros, in DMS files. You oldbies may recall DMS being used primarily for macros prior to BYOND 4.0, and we are going back to that system. You may define as many DMS files as you need, since each new or imported component requires one.

To try to preserve backwards-compatibility, the DMF system also works-- to a degree. We've ported many of the components and properties over to the HTML5 system so that old games will work, but we encourage users not to use this for future projects since it limits the flexibility of the system and won't be supported down the line. Also, some existing DMF components (such as the grid control) do not exist as of this writing, but perhaps one of you geniuses out there can port them for us!


Next steps


Although the bulk of the system works currently, there is a lot left to be done. We will strive to get it into beta testing fairly soon (will the goal of late next week) with the caveat that some stuff won't work and performance likely won't be optimal. That's the point of beta-testing, after all.

Right now, the main limitation of this system is that there is no standalone client-server for testing or single-player mode. However, we are working on a port using the Chrome Embedded Framework (CEF) to support this. We will see if that makes it into the first beta or not.

Surprisingly, most client-side features work or should work by beta-time. You can use the winset/winget/etc system to interact with your interface from the server. Features like maptext and animate() work-- even better in some cases. The rendering uses WebGL and, on my machine at least, doesn't seem to suffer from the same issues we have in DreamSeeker. Audio works well on most browsers, although not all due to different standards, but we can likely come up with a system to load different filetypes as needed. I'm sure that after a few painful weeks of testing, we can get this system into a very complete and stable state.


Distribution of multi- and single-player games


One of the main goals of this project is to provide a way for users to create games which can be competitive with other offerings on the web. While I'm sure many disagree, I've never believed that the BYOND technology (eg the sluggishness of the network) has been the bottleneck from making a good, even a great game. Rather, it is the distribution and, perhaps to a lesser degree, the stigma associated with using BYOND (or any game-making toolkit).

With this in mind, we have two means of distribution in the early pipeline; this will surely adapt as needed.

For multiplayer games, DreamDaemon will output a link and an embed tag that may be used on an outside site. These point to pages on BYOND.com to handle the login/signup, but this is all inline and, with the embed, somewhat transparent to the user. This also allows us to play an infrequent pre-game ad, which is the only way we can make money when games are off-site. I realize that some percentage of you object to this, but I hope you understand that this is the cost of doing business when offering a freeware product (and BYOND will always be free). We will also continue to work with developers should they want to opt-out of ads in return for the commission we'd otherwise earn. We're pretty laid back about this but realize that we have to eat too!

My hope is that several games will really explode in traffic with this opportunity, and we can move BYOND away from being a social network (an exciting but somewhat failed experiment) and rather an engine earning off-site commissions.

For single-player games, our plan is to provide a simple system to allow the user to create their own executable, free of both charge and commission. Ideally, we could do this with very little configuration from the developer-- somewhat like the old "Make EXE" but with a better end result (an actual EXE). We already have the infrastructure to do this on Windows due to our work with BYONDexe, but that project is somewhat complex since it interfaces with the login/key system. A true single-player game need only log the user in as a "Guest" (more complex account management can be handled by the game) since it is intended to work offline anyway; as such, it would have no interaction with the hub and could survive long after BYOND is gone. Essentially, this would just be a wrapper around the CEF technology used to run games from the compiler.


The pitfalls of cross-platform


Of course, one of the biggest benefits of the web-client is that it is cross-platform. No longer do we have to deal with the ten emails a week about people wondering why we can't get our heads out of our asses and make a Mac version!

But, that said, so far, we have only ported the client. If this is successful, this introduces a problem, because many of our tools are Windows-only. The server and compiler both work on unix platforms, but there is no interface. More importantly, there isn't a map-editor, which is actually necessary for most games. So aside from being clunky-- "you have to develop your games on Windows but you can deploy them anywhere"-- this is genuinely inconvenient.

Rather than porting map-editor and other tools, the better tact to me seems to be to redefine our formats in such a way that the tools can themselves be written in DM, using the aforementioned standalone system. So we'd provide native hooks to read/write DMI and DMM, and we open-source this aspect of the code or outsource to our users here to develop editors. Not only would this be cross-platform, but it would be more powerful, since anyone could build in whatever features they've wanted for these things over the years.

Now one problem with this approach-- aside from just the manpower and scope of the project-- is that we wouldn't have a unified system, as we do currently. I think one of the real appeals of BYOND vs other toolkits is that it has a very low introductory learning curve. You can download the toolkit and can immediately dive in since all of the tools are there for you. Under the proposal, you might have to download a separate program like Eclipse to do the code-editing and then integrate it with these third-party editors for everything else. So hopefully there is a middle-ground here where we can provide the flexibility of third-party tools with the convenience of a single, straightforward configuration.


Fin


If you've read this far, you can see that there is a lot going on here both in actual development and future project consideration. BYOND is in an exciting place, but the technology is really only half the battle. Sadly, we continue to make very little from month to month and it is the sobering reality that the state of our finances directly affects the future of this project; that is, how many of the proposals will become a reality. Still, I can't help but be touched by the generosity of so many users here, and I thank you for believing in this project and continuing to support it. I hope that those of you who can do the same will keep that in mind as we move forward here.

Thanks for reading!
I lurk quite often...
User avatar
paprika
Rarely plays
Joined: Fri Apr 18, 2014 10:20 pm
Byond Username: Paprka
Location: in down bad

Re: FWD: "BYOND, the web, and you: a love story"

Post by paprika » #23086

>we will never have iphone byond
Oldman Robustin wrote:It's an established meme that coders don't play this game.
User avatar
Kraso
Joined: Thu Apr 17, 2014 3:46 pm
Byond Username: S0ldi3rKr4s0
Github Username: Kraseo

Re: FWD: "BYOND, the web, and you: a love story"

Post by Kraso » #23152

>tfw no byond for android
Image
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: FWD: "BYOND, the web, and you: a love story"

Post by Miauw » #23191

>map editor written in DM
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
User avatar
Reimoo
Joined: Wed Apr 23, 2014 2:58 pm
Byond Username: Reimoo

Re: FWD: "BYOND, the web, and you: a love story"

Post by Reimoo » #23194

TL;DR

Is my spacemens going to continue to be laggy or not?
User avatar
Kraso
Joined: Thu Apr 17, 2014 3:46 pm
Byond Username: S0ldi3rKr4s0
Github Username: Kraseo

Re: FWD: "BYOND, the web, and you: a love story"

Post by Kraso » #23203

Reimoo wrote:TL;DR

Is my spacemens going to continue to be laggy or not?
depends
Image
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: FWD: "BYOND, the web, and you: a love story"

Post by MisterPerson » #23208

Reimoo wrote:TL;DR

Is my spacemens going to continue to be laggy or not?
I'm going to assume yes until proven otherwise.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
JJRcop
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

Re: FWD: "BYOND, the web, and you: a love story"

Post by JJRcop » #23251

Reimoo wrote:TL;DR

Is my spacemens going to continue to be laggy or not?
Tom wrote:I've never believed that the BYOND technology (eg the sluggishness of the network) has been the bottleneck from making a good, even a great game.
There is no hope.

Oh and for that TL;DR, we're getting an HTML5 web client, which will mean you can play spessmens on your fridge as long as it supports HTML5. (And directly off of the tgstation13.org website if we get it set up, because it will be embeddable)
I lurk quite often...
callanrockslol
Joined: Thu Apr 24, 2014 1:47 pm
Byond Username: Callanrockslol

Re: FWD: "BYOND, the web, and you: a love story"

Post by callanrockslol » #24504

Maybe one day byond will support multiple cores and this stupidly demanding 2d game will finally run well.
The most excessive signature on /tg/station13.

Still not even at the limit after 8 fucking years.
Spoiler:
Urist Boatmurdered [Security] asks, "Why does Zol have a captain-level ID?"
Zol Interbottom [Security] says, "because"

Sergie Borris lives on in our hearts

Zaros (No id) [145.9] says, "WITH MY SUPER WIZARD POWERS I CAN TELL CALLAN IS MAD."
Anderson Conagher wrote:Callan is sense.
Errorage wrote:When I see the win vista, win 7 and win 8 hourglass cursor, it makes me happy
Cause it's a circle spinning around
I smile and make circular motions with my finger to imiatate it
petethegoat wrote:slap a comment on it and call it a feature
MisterPerson wrote:>playing
Do you think this is a game?
Gun Hog wrote:Untested code baby
oranges wrote:for some reason all our hosts turn into bohemia software communities after they implode
Malkevin wrote:I was the only one that voted for you Callan.
Miggles wrote:>centration development
>trucking
ill believe it when snakes grow arms and strangle me with them

OOC: Aranclanos: that sounds like ooc in ooc related to ic to be ooc and confuse the ic
OOC: Dionysus24779: We're nearing a deep philosophical extistential level

Admin PM from-Jordie0608: 33-Jan-2552| Warned: Is a giraffe dork ~tony abbott

OOC: Saegrimr: That wasn't a call to pray right now callan jesus christ you're fast.

OOC: Eaglendia: Glad I got to see the rise, fall, rise, and fall of Zol

OOC: Armhulenn: CALLAN
OOC: Armhulenn: YOU MELTED MY FUCKING REVOLVER
OOC: Armhulenn: AND THEN
OOC: Armhulenn: GAVE ME MELTING MELONS
OOC: Armhulenn: GOD FUCKING BLESS YOU
OOC: Armhulenn: you know what's hilarious though
OOC: Armhulenn: I melted ANOTHER TRAITOR'S REVOLVER AFTER THAT

7/8/2016 never forget
Armhulen wrote:
John_Oxford wrote:>implying im not always right
all we're saying is that you're not crag son
bandit wrote:we already have a punishment for using our code for your game, it's called using our code for your game
The evil holoparasite user I can't believe its not DIO and his holoparasite I can't believe its not Skub have been defeated by the Spacedust Crusaders, but what has been taken from the station can never be returned.

OOC: TheGel: Literally a guy in a suit with a shuttle full of xenos. That's a doozy
Post Reply

Who is online

Users browsing this forum: SpaceManiac