Video Game XML schema and JSON serialization
In honor of the recent uptake in video games designed on the web completely using open web technologies (i.e. HTML5, CSS3, JavaScript2), I decided it might possibly be useful to someone out there someday if I share a generic XML schema for describing levels, characters and secrets in games. This schema is data-focused, not transaction or interaction-focused; as such you might consider it incomplete, as it is missing the requisite timing information, animations, transitions, object drawings & renderings, etc… all admittedly required to put together a complete game.
That information is what I consider implementation-specific though, as there’s not a single foolproof/clean way to markup interactivity or logic information for a very wide array of games, screens, operating systems and devices. There are a number of initiatives already under way to model some aspects of the interactivity problem though, started by people much brighter than myself. See VRML, WebGL, and SMIL + SVG, Canvas/Javascript or even just plain old Flash/Actionscript for some interesting approaches in this area of interactivity and animation modeling.
What’s wrong with Video Games nowadays?
One of the biggest problems in the Gaming and related industries nowadays is not the lack of hardware or software capabilities, but rather, keeping up with the increasing capabilities in terms of processing power and new technology possibilities. In addition, margins are getting arguably thinner on games, with teams required to be bigger and bigger to ship products out the door on time. The point is though, is that there is always a better way than multiple groups of people separately beating their collective heads against a wall trying to keep up with innovation. The answer lies in open standards.
Who stands to gain from standardization?
Everyone from the consumer down to the MMORPG companies (i.e. Linden with SecondLife, or Blizzard with WoW) to Educators (i.e. Northern Ontario School of Medicine with OpenLabyrinth or the millitary with their infamous adoption of SCORM in desperation to reach a standard for training simulations) to the Game Designers, Creatives & Developers whose jobs would be made easier, to the big-time game production shops (i.e. EA, LucasArts, HB Studios) who could collaborate with their audiences directly to churn out hits at an even faster rate, we’re even talking right down to the console manufacturers themselves (i.e. Sony, Nintendo, Microsoft) would be interested in a standardized solution that enabled them to boast a larger number of titles and higher sales. But the problem is they haven’t the time nor resources to get together and really focus on hashing out the standard (or multiple standards) that would be required to solve the problem(s) they face, and most importantly even agreeing on what their biggest (common) problems are. Hence there remains a lot of waste across each of these industries, and the best we have to look to will continue to be collaborative groups like the W3C, which certainly does have the time to develop interoperable standards to support collaboration. What does this mean?
The platform will eventually be the web, its practically inevitable. This may sound odd at first, but especially when one considers that processing power continues to increase across the board. Heck, I never thought I’d admit it but even Microsoft’s continually improving adherance to such open standards is starting to shine through with their impressive GPU-accelerated HTML5 demos for IE9 Beta.
This should be considered a major win though for the open web in general; what it shows is that the big guys are willing to play with cool new open standards, they just might not necessarily waste all their time and R&D Budget with a risk of winding up on the bleeding edge of a new technology rather than on the “cutting edge”. So its an eternal cat & mouse game, as they try to divide up the larger piece of cheeze amongst themselves and their proprietary consoles. With the right guidance, leadership and grassroots demand they can and will realize the benefits or sharing a lot more of the cheeze in the name of drastically increasing the number of people who incorporate cheeze consuming and making into their daily diets (so much they’d be happy to help bake more, or, at least pay for someone else to make more for them).
A modest proposal
With that lengthy premise out of the way, keep in mind, the following schema is just a first kick at the can for fun, so let’s see what we end up with. What I’d ultimately like it to be is a way of unlocking the complex and seemingly cryptic/exclusive world of game development, for the common man with an idea and some spare time/energy.
This is why I also created a prototype for a new HTML5 online game development studio to go with the new formats.
View an Example XML below:
Press & Hold A + Start buttons after getting back to the start screen. If you touch the flagpole of any level with either 1, 3, or 6 seconds left on the ones place of the timer, you will get that amount of fireworks. For example, if you touch the flagpole with 126 seconds left on the time, you will get six fireworks! If you just walk along the sea floor, Bloopers will never be able to kill you because they are forced back up just before they hit the floor(or you). Jump (or swim, in two levels) Jump (or swim, in two levels) Control Pad Left/Right: Move Control Pad Down: Enter a pipe while standing on it - not all work, thoughd Jump (or swim, in two levels) Choose between one- (Mario) and two-player (Luigi) games on opening screen
If you prefer a different flavour of data format, there’s also an equivalent JSON serialization you can try on for size (though debatable if its much more useful than XML, except that it can probably work more efficiently and easily with thin-client JavaScript webapps):
{
"videoGames": {
"videoGame": {
"@attributes": {
"guid": "B000TUZCQI",
"title": "Super Mario Bros.",
"description": "Super Mario Bros. is a platform video game developed by Nintendo in late 1985.",
"plot": "All is not well in the Mushroom Kingdom!",
"maxPlayers": "2",
"URL": "http://www.bcmoney-mobiletv.com/widgets/videogames/",
"audio": "http://www.vgmusic.com/music/console/nintendo/nes/index-sz.html#Super_Mario_Bros",
"video": "http://www.gamefaqs.com/nes/525243-super-mario-bros/videos/gs_video-6275779",
"rating": "E",
"userRating": "9.0/10",
"admin": "MarioTeam",
"adminEmail": "supermario@nintendo.com",
"releaseDate": "1985-10-18",
"last_accessed": "2010-05-17T03:49:45"
},
"stages": {
"stage": [
"levels": {
"level": [
]
}
]
}
}
}
}
Now, without any further adieu, here’s the classic 8-bit Nintendo game Super Mario Bros. as glorious HTML5 (not coded by myself, but borrowed here from its MIT license over at Nihilogic);
Then, just check out the code for yourself:
Remember, I’m acknowledging in advance that this is incomplete and experimental. In any case, its something that would be really nice to have according to my brief work with clients in the gaming industry (and from feedback from those who’ve put in many more years there) it would also be a nice way to store game timelines and edit them quickly & collaboratively, encouraging reuse of components and potentially streamlining game development.
Prototyping this concept is all I was going for this time around… I hope someone with more experience could suggest some improvements, but imagine the power of a fully-RDF based representation of a game, which pulls in new data based on the flow of the gameplay from the World Wide Graph (aka Web 3.0 for the marketing aficionados out there). This could be the personal agent-driven learning and entertainment experiences which have long been touted as an advantage of the Semantic Web, and certainly worth a re-visit sometime soon… until then!
Leave a Reply
No trackbacks yet.
No post with similar tags yet.
Posts in similar categories
BC$ = Behavior, Content, Money
The goal of the BC$ project is to raise awareness and make changes with respect to the three pillars of information freedom - Behavior (pursuit of interests and passions), Content (sharing/exchanging ideas in various formats), Money (fairness and accessibility) - bringing to light the fact that:
1. We regularly hand over our browser histories, search histories and daily online activities to companies that want our money, or, to benefit from our use of their services with lucrative ad deals or sales of personal information.
2. We create and/or consume interesting content on their services, but we aren't adequately rewarded for our creative efforts or loyalty.
3. We pay money to be connected online (and possibly also over mobile), yet we lose both time and money by allowing companies to market to us with unsolicited advertisements, irrelevant product offers and unfairly structured service pricing plans.


A very special welcome today goes out to Owen Ryuto Copeland, the newest and youngest memb...
Virtual
PaySwarm | BitCoin | OpenTransactions
Donation
Flattr | Pledgie
Lending
K...
Cami Hadley and the team over at Cable.tv have created an excellent infographic that summarizes the state of Reality TV singing competitions:
Created by www.Cable.tv
While this does an excellent job of showing the behind-the-scenes absurdity of big budget Reality TV shows, a better question is why is these types of shows are such big-budget events? People...
Here's an opposite take on the excellent "11 ways to be unremarkably average" comic by Gavin Aung Than (aka ZenPencils), which was itself inspired by and borrows from a quote by Chris Guillebeau. The funny thing is, if you reverse these warnings and follow the opposite of the steps outlined in that Guillebeau quote, hidden within...
With the real, true and unbiased news inevitably moving online towards the so-called "Alternative Media" (which really is almost reaching the point where it is not alternative so much as the first go-to source), its a good idea to start replicating some of the most useful elements from Television, Print and Radio (aka. the rest...
Since the February confirmation of the Facebook IPO, Facebook has continued to stagnate in user-base yet as an organization it holds no punches as it attempts to grow internationally, and its stock price continues to soar as Class A shares finally open up to the average person (major investment firms had first dibs at the...
The Royal Canadian Mint(RCM) has sponsored the MintChip Challenge 2012 in an effort to attract developers to the idea of developing software for the MintChip and giving away their best financial application ideas, basically, for free (on the long-shot that you are one of the few who win).
Starting April 1st, 2012, they began mailing out...
Popcorn.js is an incredibly useful framework for adding timing-based events and/to Semantic metadata to rich content.
According to Mozilla: "Popcorn makes video work like the web. We create tools and programs to help developers and authors create interactive pages that supplement video and audio with rich web content, allowing your creations to live and grow online."
With...
Social media has taken over the web (for now) and the name of the game is sharing, something legislation like SOPA and PIPA just didn't seem to understand. Rather than figuring out a new economic model based on the reality of sharing on the web, that rewards this type of activity (which is essentially just...
iScroll 4 is the latest version and release of an excellent content slider-type JavaScript component by Matteo Spinelli. While one may argue that content sliders are a dime a dozen, iScroll differs in the fact that it has full support for all the main WebKit for iOS gestures including pinch/zoom, pull-up/pull-down, smooth scrolling and screen...
Well, I've decided to give this one away in the title, since the good folks over at ChalkGaming helped me out quite a bit while consulting with a big client who wanted to integrate Sports Stats into their Online Newspaper properties.
Requirement
Create a sports widget to display quality sports data (including: schedules, box scores, standings, betting...
For a long time now, I've been a paying customer of SchedulesDirect, and by that token their parent company Zap2it (now a Tribune Media Services company).
Recently, I've started publishing my own personal Electronic Programming Guide (EPG) here on BCmoney MobileTV in an accessible format:
BC$ EPG
One of the secondary goals of my MobileTV project has...
UPDATE: After writing this, I’ve found tons of amazing examples of HTML5 and/or CSS3 powered gaming experiences. Here is a complete NES & SNES emulator with several games:
jSNES