FAIL (the browser should render some flash content, not this).

Search the site

FAIL (the browser should render some flash content, not this).

Main Menu

Pontent Cipeline more like it! PDF Print E-mail
Written by DrMistry   
Friday, 21 January 2011 00:37
Ough, what a shocking couple of days!  I decided to finally bite the bullett and write a content pipeline extension to let me directly import maps from my weapon-of-choice tile editor (Tiled, and it's really nice thanks for asking) in to the engine.  Now it's just standard XML with some string-string property items, but I had one hell of a time, mainly because I just jumped in and started coding before reading all the AppHub examples and MSDN pages.  But now I'm there - I can import tile layers and object layers, including some fiddled objects for lights and doors.  This means that the entire level layout design can be done outside the Visual Studio environment.  That's excellent as far as I'm concerned.  It also means that the two most esoteric parts of XNA work - shaders and the content pipeline - are now MINE!

I won't go in to too much detail, but for those non-programmers out there the Content Pipeline lets you take a file (could be from anywhere or of any type - image files, models, level data, music in various formats) and convert it in to data that you can work with in your game.  "So what?" you may think, but it's a really important tool which makes it easier to add rich content to your projects.  It means that artists, designers, musicians and coders can all work together without treading on each other's toes.  The programmer provides the means to get "creative work" in to the game, and the creatives can focus on making the finest content they can without worrying about how they save it.  In my case, I can design entire levels of the game in a nice Windows app, save it as XML, and import it in to the YoYoYo project.  Up until now I was taking the saved files and fiddling with them in WordPad before having the game load them in at runtime.  That was OK - pretty fast, no garbage - but it's so much better to just be able to save a file from your favorite creation apps and have it work in-game with no additional work.  That's what the content pipeline gives you, and if like me you've been putting off implementing a pipeline extension, stop what you're doing and go write one.  Check out the AppHub education catalog and do it now.  I'm determined to write a .MID file importer with a VST-style audio engine before the year is out, and if I can have it import presets from a selection of PC-based VST instruments then I'll be all the happier.  Even better - have it able to import Cubase files, with audio and all, and I'll be selling that baby on!  Without the content pipeline such ideas would be much harder to implement, if not impossible.

So now I'm at the point where I need to spend a day just designing maps and tiles.  I've got a few ideas for the layout, and I'm also starting to wonder if maybe I should go for a "normal" platformer before I try to get really down and dirty and complex with the RPG elements I have planned for YoYoYo.  I'm really enjoying the flexibility that the current engine is giving me.  I'm going to add functionality to the pipeline extension to placeAI characters in the map tomorrow, and once I've got a few character types, I think I might struggle to resist the idea of making a fun, knockabout platformer without the RPG elements (and probably without the yoyo mechanic).  We'll see what the day brings tomorrow, but if I work things out right I might just be able to get the RPG and story scripting functions in anyway - it's really just a matter of working out "core" behaviour and function, coding that in, and then adding in any "exceptional" functionality.  Flexilbility and reusablility in code are wonderful things, and I always strive to make code that way.  Why write a particle engine over for each game, when you can just tweak the existing one and re-use it?

Anyway, time's rolling on and I'm knackered out.  Poker didn't go as well as I'd hoped tonight - I played tight but didn't really get any hands.  When it's like that and a few players go out before you, the blinds go up steep and you're in a corner, playing Qd 10h all in and hoping for the best Cry  Well, c'est la vie!  Pip pip, and before I go a hearty thank-you to @AceyBongos, producer for Xbox LIVE Europe, for giving Xenocide a little puff on twitter.  It's really heartening whenever I know anyone's had a play and enjoyed it, but to have someone who works the game business say something I've written is fun has charged me up something rotten!  And if you haven't played the game yet, why not go get it Lycos?

Add this page to your favorite Social Bookmarking websites