New technologies for browser based games

Every now and then it's important to pull ourselves out from whatever code-dungeons we work in and look around at the world of computing to see what we've missed during the last couple crunch cycles. When I do this, once in a while I am surprised by the appearance of a new technology that has potential to make big changes in the way we make games. I've had some downtime to do research lately, and I think I may have discovered what may be the most significant improvement to browser based gaming to come along since Javascript. By discovered, I really mean I finally noticed something that people out in the world beyond game development have done which is pretty cool and worth talking about.

While it's probably old news to people "in the know" about upcoming browser technologies, those of us in the game industry who don't follow the browser scene closely should probably take note of something called "Windows Presentation Foundation Everywhere", or "WPF/E" for short. This system from Microsoft is a collection of tools and APIs that aim to bring order to the world of Javascript development in the browser, with a significant amount of interactivity, media integration, and UI functionality being part of the package. The end result is an entirely new way to develop interactive content that is able to be used with Internet Explorer and Firefox on Windows in addition to Safari on the Mac. It's unfortunate they do not support Linux yet, but they suggested they might in the future. I hope they do.

At any rate, Microsoft has been working on WPE/E for a while now and in short, it works. It can deliver some pretty amazing Javascript/AJAX behavior in the browser, with communication to the server and all the stuff you'd normally use AJAX for but developed using tools that make it visibly easy to do. Drag & Drop WSIWYG. All kinds of good stuff. I won't attempt to explain it all, but I'll point out some good links on the subject:

WPF/E Dev Center where you can get the SDK and other downloads including the WPF/E SDK

A video about how WPF/E is used in a web page which shows how simple it is to use it.

Expression Blend is, for lack of a better way to describe it, much like Flash meets C# & Javascript. It's a GUI for making content that integrates seamlessly with DevStudio (if present). I'm just beginning to learn about this but it appears that with WPE/F content, you don't use C#; instead you just use the internal event handlers and animation features of XAML, which is enough functionality to enable a lot of creativity. As in, games.

So what does this mean to us game developers? Well, we can finally use a decent GUI for creating Javascript browser games in what is, as far as I can tell, the most streamlined approach to solving the extremely nasty problems routinely seen with making anything complicated with Javascript. In practice it appears to be very similar to creating Flash content, with better Javascript functionality where the WPF/E object can trigger Javascript functions and vice-versa. This is huge, and should at least be on the radar for anyone who makes games professionally. Flash and Java are no longer the only valid options for making browser content. If Microsoft ever provides even moderately functional 3D support within WPF/E, it is likely to be the first choice for making browser games.

Anything that makes it easier to make games better is a win in my book. Even more so when it helps to open the door to new audiences like people who only play browser games. I look forward to the upcoming years where people will undoubtably use this, and derivations of this, technology to make the online entertainment experience better than ever.

Comments

Hi i want to make a

Hi i want to make a browsergame based MMOG ,ex:travian but with my own Ideeas but i don't know were to start.If you know haw to begin coul you tell me please?i have a little experience with PHP and HTML. my mail adress is ntg_cody@yahoo.com

There are a lot of ways to

There are a lot of ways to approach the problem, there's no way to know which would work best for you - that's something you'll have to learn on your own. That said, you'll need to get your PHP skills up (if that's the backend you want to use) to a pretty good level. Depending on the type of game the next step could vary wildly. Until you know what you want to do, you can at least spend the energy getting core skills up. There are a number of books out there that should be helpful, you might want to try this one if you are thinking of an RPG type. Of course this book is about more typical MUD games, but it might help with some of the basic concepts about the way these kinds of games work. If you do use PHP, I recommend getting the zend debugger. Personally I would probably just use Microsoft C# Express instead of PHP, it's free and it's very forgiving to people new to programming. Once you get the basic ideas down you can migrate it to a server (with some work) but it's a heck of a lot easier to develop in that environment. In fact I use it myself; I've been putting off upgrading my license DevStudio Professional for a while and somehow manage to get what I want done with the express version (which continues to surprise the heck out of me). There are a few things I want, enough that I will upgrade to pro again at some point, just not yet. I might be able to hold out until Visual Studio 2007 :)
Good luck.

I'm so happy that you

I'm so happy that you respond me.I want to make a Browser Game based MMOG,like www.travian.com,but with my own ideeas,I don't want to creat a RPG type.But i don't know were to start from.I'vd searchd for information on google on building a browser game,but the result was not that bright.If you can guid me i will more than glad.I don't know how to write corectly:( sorry for my bad english.

Well, a key to being able to

Well, a key to being able to make games at all is to know how to program. Trying to make a game as your first goal is a good goal, but it needs to be something you are realistically able to create. One way that web based games are often designed is turn based which means that your server will need to let the "current player" do a webform post of data that the server then updates variables and the next person to hit the page will see the new state of the game. You'll need to learn about a number of things, including at least:
* Databases. Go for MySQL.
* Coding. You're already on the road with PHP, it's widely used and the Zend Studio Standard Edition is a pretty good PHP debugger. Knowing how to use a debugger for whatever language you use is ABSOLUTELY CRITICAL and I can't say it loud enough. It's the fastest way to get 10x productivity because without one, you will find yourself stuck wasting a lot of time debugging stuff that would be made obvious in the debugger.
* Cookies. Learn how they work, how you can use them to have your HTML request approved by the server so players can only send commands for things they control.

I recommend making the simplest two person game you can, each of them using a different web page. ie. yoursite.com/player1.php and yoursite.com/player2.php

Make some simple game, like checkers, that allows you to simply enter text that is the "start" cell and "end" cell for a checker. When you submit the page, the PHP code will check two thingsL
* It will check a single value in a table that says which player's turn it is. If the post came from a page that is not the current player, show a page saying it's not his/her turn.
* Check the posted text to make sure they are formatted like fromcell="C1" and tocell="D2".

Once the input is validated to be "real" spaces on the checkerboard, and it's the correct player's form doing the HTTP POST, do a database query to build a 2D array that is used to indicate what pieces are in what cell. Check the input against this array, make sure the player owns a piece at the "fromcell" and then do the more complicated logic of determining if the piece can move to the "tocell". If it can move, update the array accordingly. If there are side effects , like jumping and taking another piece, update the array accordingly. Once you are done with the "game logic" part of this, write the array back to the database.

Now I know this isn't exactly the kind of game going on at that site (hardly) but it has some of the basic concepts of turn based web page gaming. If you get this far you should be happy with your progress, it's more than most people would do. From here, you can learn about cookies so that you can use a single PHP page that is dynamically generated based on who is logged in. You can also learn about having a user database so people can log in with a password. Even further down the road is integrating AJAX so that you can play the game without having to do any page refreshes and by using the mouse to drag pieces around. You can go on and on, but if you get this far chances are good you won't need my help to discover what else needs to be done.

Have fun, that's what it's all about-

i need help

Like everyone els i wanna create a web based game kinda like www.thenina-rpg.com but i dont know where to start can anyone help me Please >.< add me to msn at Sifree19@hotmail.com

C# is what I recommend

Hi azaarie,

I recommend learning C#. It is a good language for new programmers, and can be used for making web based games using XBAP technology. Microsoft just released Visual C# Express 2008, which you can download here. It should be noted that the XBAP technology does require Internet Explorer under Windows, so you may be more interested in using Silverlight for better portability, which is what the WPF/E eventually turned into. My own interests lie more with XBAP however, so I can't comment on how easy it is to use Silverlight for making games. I suspect it is pretty good though :)

Once you get VC#E installed, then the real fun begins. Learning the language should come first, and then after that learning the basics of making games. I can appreciate any desires to just drop in and make games, but there is a lot to be said for hunkering down and getting to know your tools before trying to build something. Making software is a craft, and games are a particularly special type of software that you will benefit greatly from learning basic programming skills before even attempting to make an game. That said, you don't have to be an expert to have fun and make something people might have fun with. To start with though, you may want to try going to www.codeproject.com and reviewing all the beginner C# tutorials; there are many great examples of simple programs with detailed explanations of why something is done and why something is useful. After you saturate your skills with everything you can at the codeproject site, you will be in a much better position to think about actually writing a game. There are even a few simple game examples on there if I remember correctly.

I suppose if there is one thing to take away from this it is this: Learn how to write a game as a separate task from learning how to put a game on a web page. They are different problems that can be solved separately, and for newer programmers it is almost always a good idea to split any complicated problem into as many peices as possible to make it more likely that each bit will be completed.

-Eric Cosky

Might also be helpful to

Might also be helpful to check out DigitalPoint Forums. There are a lot of web-based MMORPG developers around there who regularly discuss starting up and even sell of their scripts/finished games. Best of luck!

Thanks for your Overview

tumblehome, so what if IE doesn't run on Linux? Linux uses other 'free' browsers, notably Firefox.
I couldn't give the slightest damn about corporate environments, they can all burn in hell IMHO but for home users, we can choose to use whichever one we want.You say "One interesting point: the default page will be a group of your nine most-visited pages..." as if you didn't know Opera has done this for a while. ;)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.