XNA UK User Group

A helping hand for bedroom coders throughout the land.
in

This Blog

Syndication

Twitters

RandomChaos

September 2008 - Posts

  • ReMix 08 - Demo Source Code

    Some of you that have come to this blog after going to the ReMix 08 conference are probably wondering, "Where is that source code Paul said would be here!?" Well, most of it is here, it's just smashed across a lot of posts.

    But, it's not all under one project ready for you to run and play a game with, so that's what I am putting up here in this post. In the following zip is my GSM (Game State Manager) which I have posted before, this version has a few changes in it that I think improve on it a little. Also, and this is a first for my blog, a cut down version of my physics engine, I have removed a lot from it as it is just not used in the demo, but you will see the basic principles of what I am working on. I wont even start to explain the physics engine here. Also, you will remember in the demo my volumetric cloud system, I have removed it from the demo as I want to post this in it's own right again, as I want to explain what I am doing with it.

    Well I hope you liked the demo and get something from this source code. I am also including *.ccgame files that can be used to install (I use the word very loosely) on your PC or XBox 360. To be able to use any of the source you will need XNA 2.0 as well as the latest DirectX9c, to install the *.ccgame files on your XBox 360 or deploy the source to your XBox 360 you will need a Creators Club account as well as an XBox Live account (Silver will do). Don't forget to build the GSM and custom content pipeline before the ReMix08 project the first time you build.

    Downloads:

    ReMix08 Source, with demos (includes PC & XBox 360 projects)

    ReMix08-Windows.ccgame

    ReMix08-Xbox360.ccgame

    For both the ccgame files I had to give them a .zip extension so they could be downloaded, please remove the .zip extension befoer executing thr ccgame files.

  • Sora World - A Dream Build Play Entry for 2008

    Before I start this post here is a description of what we intend Sora to be:

    Ideally a two player networked game where you choose to be either a Pilot or a Navigator. The game will be story driven but have a complex progress tree and so resulting in different endings. As a Pilot you will need to master the controls of the craft(s) and there weaponry so you can make your way through the world safely, avoiding or flying through storms, fighting off attackers. The Navigator has a more RTS roll to play, Navigators having the knowledge of where places are in Sora. A good navigator will have a large map (each time a navigator visits a new pace it's added to his map). Also some craft will come with strategic weapons that only a Navigator can use. In flight the navigator will be able to direct the pilot to there destination and away from hazards. So A good pilot, with lots of kills, or fast ship will be sort after by Navigators in the network lobby and a Navigator with lots of destinations on his/her map will be sought after by Pilots in the lobby.

    Here are some excerpts from one of the design documents (rough draft):

    "Everything in Sora originates from the Source, the brilliant cloud of immeasurable energy that anybody foolish to venture to has never returned from. Truth be told, the people of Sora don’t really know exactly how their world works, but it is clear the Source and Sora are intertwined, entangled and inseparable."

    "The south is home to the floating city of Mina and considered the industrial end of Sora. With a more plentiful cloud supply it is the natural home of the water reservoir. Raincrafts hover around rain crowds, collecting and returning water to the reservoir. Cloud Scrapers weave between cumulus clouds extracting their energy, and capturing the essence of the cloud itself. Surrounding Mina are several scattered villages and even single island houses, a reminder of the old nomadic days of Sora.

    The north has clouds but no Raincrafts. The rain is allowed to naturally fall under the farming islands, the primary source of food for Sora. Kita is the residential and agricultural region, heavily protected by the nearby Union Air Force (UAF) base."

    "In that age, the Source shone brightly and the people of Sora lived in harmony with it, scattered among villages throughout the skies, taking only what they needed."

    There is still more to it than this, but this gives you an idea...


    OK, I got contacted about 2 months ago by a team (Zenna Tavares) building a game for the DBP competition as they wanted to use my clouds in their game and wondered if I would be interested in helping them out. So I replied saying that I was willing to help out, but was not sure how much help I could be other than the cloud system as I am busy at work, writing my blog posts and spending time with my family (not in that order) and that it only gave us 2 months  to get an entry in (not enough time in my book!). Zenna was fine with this and so the journey began....

    So we went about building an engine for Sora (Japanese for Heavens), we got a concept artist on board, then a 3D artist and it was all looking good. We took a few other components from my blog here as well as my (still fledgling) physics engine and started putting a few technical demos together. Then I got asked to do the ReMix08 demo, which kind of took a little time from it, but there was another dev who was also working on components so was no real issue, but then we lost the 3D artist, time was drawing near for the DBP deadline, we had no assets, no consolidated engine, just bits and pieces of demos and some great ideas...  

    Thankfully Zenna got another two 3D artists on board and they started work on converting the concept art to models. We also were joined by a Musician and it was all looking good....until I looked at the calendar....

    We had literally a week and a bit to get an entry in, I was working on getting my GSM into the entry sorting out some kind of flight physics, the other developer (Ken Lau) was sorting out the networking side of the game and some asset management bits to. Then came a bomb shell, Ken, our other developer had to drop out at this late stage with about a week and a bit before the dead line (Thankfully we still have Ken, he just had too much on at the time).

    So, I guess it fell on me to put the entry together :( So I have been stealing time from the land of sleep where and when I can to get what we have now. This meant dropping 90% of what we wanted the entry to be, the networking, weapon systems, plot and story...lol

    Even with the extension I can't see what I/we could add in the next 2 days (that would = 6 hours development for me).

    Well these are all just excuses really, we have done what we can and at least we have an entry.

    The team is:

    Zenna Tavares - Design and Production

    Michal Cho - Concept Art

    Damien Senior - 3D Art

    Trung Tran - 3D Art

    Martin Ahn - Music

    Ken Lau - Developer

    Me - Developer

    You can take a look at the concept work for Sora here. Here are some in game pics:

     

    And here is the now obligatory film clip that comes with almost every post of mine now :P

    http://www.youtube.com/v/_b5z9KlWVkc <p><a href="http://www.youtube.com/v/_b5z9KlWVkc">http://www.youtube.com/v/_b5z9KlWVkc</a></p>

    There is also a clip on soapbox.

    So, there is more to Sora World than the entry for DBP 08, this is just a taste of what Sora will be I guess, fingers crossed we might actually finish it, yet another long road I have started down...lol

  • ReMix 08 - In The Beginning There Was CornFlowerBlue

     

    The remit I got in mid August from Paul on this was "A simple flying game into which we could weave the important elements of the XNA game infrastructure". So my initial thoughts were some kind of Jet Pack type game where you can fly about shooting stuff. So I cranked up Express and created a new project. Now, I thought to my self, where do I start, and the GSM came to mind, so I started to create a GSM for the ReMix project, after a few minutes of me messing about and grabbing code from my existing GSM I thought, "What on earth are you doing, you have done all this before, use the GSM off the blog!!" and that is exactly what I have done.

    This was the start of a trend. At first I wanted to write the whole thing from the bottom up just for ReMix to show how quick you can get going with XNA, but I think this way also shows what can be done with the community components that are out there. I know it's mostly my stuff I am using here, elements of my blog, but my point is, that we have such a rich community you can get game components from all over the place. My post processing code for example is a modification of Kyle Hayward's (GraphicsRunner) post processing framework.  I also found a few bugs in some of my elements, my terrain class for example was creating the normals incorrectly, so I revisited Riemers site to see where I went wrong with it and found he has a new method of calculating them and so I have used this to fix my issue in the class.

    So, this was the first update I sent Paul, about 2 days later, remember I only get a few hours a day to work on my XNA stuff, my lunch break (if I get one) and in the evenings. So using my GSM, Kyle's modified post processing framework and my terrain class I had three screens, Initial screen, Main menu and a game screen.

    http://www.youtube.com/v/jGxv-fD69rA <p><a href="http://www.youtube.com/v/jGxv-fD69rA">http://www.youtube.com/v/jGxv-fD69rA</a></p>

     

    Next came the clouds, Paul actually mentioned in his remit the clouds, I have not just put them in to show them off, though I probably would have put them in any way :P So, this was about a day later (about an hours work) this next clip shows the dynamic sky sphere and clouds in the project.

    You will see in the clip the clouds are moving, I did this quite simply by just rotating the whole cloud manager so each cloud moves relative to it.

    http://www.youtube.com/v/Z-GqG-AmQRo <p><a href="http://www.youtube.com/v/Z-GqG-AmQRo">http://www.youtube.com/v/Z-GqG-AmQRo</a></p>

     

    In the same day, I got my physics engine in there. I stripped out a load of it as it's not finished and just left what was needed, it's still at a simple stage, but what the hell I have my own physics engine in XNA!! I also put in basic terrain collision, not yet taking the collision normal from the terrain just using Vector3.Up. No idea why I kept showing him the menu system...

    http://www.youtube.com/v/KesfhA6K_hI <p><a href="http://www.youtube.com/v/KesfhA6K_hI">http://www.youtube.com/v/KesfhA6K_hI</a></p>

     

    So, now came the particle system, about four days later, as you can see I still don't have a model for my "Jet Pack" so kept using the cube. I think at this point I was also getting the normal from the terrain for the collision normal. I have put three trails on the player, two engine trails, a smoke and a fire to give the impression of, well and jet engine and a third to give the sense of motion, with out the third it just felt a little odd to me.

    http://www.youtube.com/v/hYJ2_aSa_sQ <p><a href="http://www.youtube.com/v/hYJ2_aSa_sQ">http://www.youtube.com/v/hYJ2_aSa_sQ</a></p>

     

    Lacking a "Jet Pack" model a friend of mine (Chr0n1x) suggested using a model from the space war starter kit, so, got that in here, got the bullet collision written and put in a few bad guys (the blocks :P). In this clip, you will see how poor a shot I am, I have not improved.. The clip also shows the physics system working as the blocks are colliding and bouncing off each other, also the explosion code as the bullets collide with game objects. Oh, this is a day later...

    http://www.youtube.com/v/tWnbplNFZIA <p><a href="http://www.youtube.com/v/tWnbplNFZIA">http://www.youtube.com/v/tWnbplNFZIA</a></p>

     

    And this is where I was about a week ago (23rd of August to be exact), not bad eh. Bit of a HUD added, used better models (again space war) for the baddies, lives, score, energy and health...and a game has been written!! Only difference really between this clip and the one in my last post is a few bugs got ironed out and I added specular lighting to the ships. If my laptop had a decent sound card, I would record the in game sounds too, as ever Audio gives it that extra touch.

    http://www.youtube.com/v/PAiI6S2Ai7Y <p><a href="http://www.youtube.com/v/PAiI6S2Ai7Y">http://www.youtube.com/v/PAiI6S2Ai7Y</a></p>

     

    I do have a few issues, well not with the PC version, as I have not written a great deal for the 360 I guess I am quite a sloppy 360 developer. Just got to iron those out, create the demo projects that show the various elements that make up the game and all should be good on the day. Fingers crossed eh :P

    My next post will be on the particle system used in this demo, it's about the only thing that it not on this blog, well almost, the principles are the same as in my particle tutorials, but this will include a particle manager.

    Before I end this post, I would like to thank Paul for asking me to do this, it is a great honor in deed for me to be asked, and it's been fun too

  • ReMix08 - The Initial Shock...

    Well, would you believe I have been asked by Microsoft to give a talk at their ReMix 08 conference on XNA. The conference it's self is primarily concerning Web development but they are having an 'after hours' section on XNA.

    Now I know what you are thinking, "WOW! that's great!" and that was my initial reaction, but as I read on through the email from Paul Foster, a Microsoft Evangelist, a cold chill fell over my body, my palms began to sweat and I almost started to cry. They wanted me to talk for an hour in front of around 300 people. Any one who knows me, knows I am not the worlds greatest public speaker. In fact, that and wasps are the only things on earth that I fear, I will happily enter a pit of tigers, bears and mothers-in-law and wrestle them all to the death, but public speaking and wasps and I turn to jelly. I actually don't advocate the wresting of bears and tigers, they are endangered animals and this should not be a past time anyone should take part in. Mother-in-laws on the other hand are open sport but should only be wrestled when appropriate. I am gutted really, I would love to be able to do the talk, I am almost over my phobia of wasps, I have to be, I don't want my children to have the same silly fear I have of them so I just let them fly by, also I think it would look bad if my young daughters saw there dad screaming and running like an idiot just because an insect entered the room. Alas my other phobia is long off being cured, oh well one day eh..

    Thankfully Paul was very understanding when I said that I have an issue with speaking and has agreed to let me write the demo for him to present. I have actually finished the final game demo it's self and I am currently putting together the demo projects to show various elements of XNA and how the game comes together. I was surprised at how fast it all came together, I just took the components off my blog and put them together to create the demo game. I guess it took me about two weeks to write in all.

    I am going to retrospectively blog the progress of this demo game, and put up some code snippets from it, for example the particle system (much the same as I have posted here before). I guess to show how easy it was to come up with a game in XNA in such a short time. Now don't get me wrong, it's not a AAA game, but what do you expect from a hobbyist, and two weeks development, I think it's pretty cool, but then I would, I wrote it :)  In fact, I enjoyed writing it so much I am thinking of evolving it into a full game, adding networking and all sorts.

    Here is how it looks now, in my later blogs I will post clips of how it came together, hope you like the look of it.

    http://www.youtube.com/v/V8J0CsLhstw <p><a href="http://www.youtube.com/v/V8J0CsLhstw">http://www.youtube.com/v/V8J0CsLhstw</a></p>