Tuesday 29 May 2007

Picking and Bounding Boxes



Got the next essential small step of the project in today, picking, that is selecting an object that exists within a 3D world from a mouse click in the 2D world. Found some really good resources for this including the Hazy Mind site again and a new one I discovered by accident by Charles Humphrey. I had a little trouble at first with working out how to calculate a bounding box, but yet again the XNA community came to my rescue. Thanks to Andy and his blog I now have a custom content pipeline that generates a bounding box for my mesh automatically.

Now that you can select a unit on the map the next step will be to add the ability to add properties and *gulp* custom scripts!

Sunday 27 May 2007

Unit Placement

I have to be honest I haven't been working as hard as I could have recently on the TD project. The reason for this is that I have been trying to decide whether to progress with it atall. I believe it is an awesome project and will be successful, however each time I complete something in the project it adds to the complexity never subtracting from the amount of work remaining.

I finally however decided that I would stick it out as my mantra goes "Your success is only measured by your accomplishments". If I constantly keep starting new projects then I will never accomplish anything and therefore never be successful.

I had a long chat with my new friend Ebor Jan Folkertsma about different technical challenges associated with developing a tool and a game engine in tandem. The chat was extremely useful in the fact that it allowed me to take a more objective view of the project and split it down into simple tasks rather than getting swamped by the enormity of the project. It also made me feel like I wasn't sailing into uncharted waters, there were others out there that had run into similar problems and had come up with solutions to solve it. Basically Ebor gave me a big morale boost which encouraged me to stick with this project.

So onto the progress. Well as I said not a whole lot of visible progress has been made, I have mostly been re-organising the core of the project again to best suit my needs. I have however been adding more functionality allowing the user to place objects on the level in preparation for setting triggers and the like later down the road.



Next step in the project is picking so that the new objects on the map can be selected and have their properties modified and triggers added and the such :)

Tuesday 22 May 2007

TD Terrains

Well i havent updated in a while one the TD project, not because I wasnt working on anything but mainly because i have been struggling with the nuts and bolts of 3D RTS game development.

Normal game development is fine when you only expect ever to have your game to simply run. When you want to make it run as a game but also act as a tool at the same time you have problems. The way the TD project is structured we have a game "Engine" project that contains all the code to display our objects on the screen, then we have a "Tool" project that contains all the code for making maps, it creates an instance of the Engine so that it can render those objects. We also have a "Game" project that will be the actual game and will contain all the other game type logic like menu systems etc.

Getting all these to work nice and happily and in an efficient way is proving to be umm difficult. The problem is confounded by the fact that the tool requires multiple rendering windows to display things at once, causing me to redesign alot of the way the game works. When you only have one window open you can set classes to be static all over the place, but if you need those classes to interact in a non static way then you have to use managers to sort out how they should interact, introducing more complexity nightmares!

But anyways, enough of that. Time for pretty pictures:



As you can see Mr Graham 'Golden' Furner has been making good progress on his terrain generation algorithm for the project. Hopefully I will beable to get enough of the structure in place so we can begin to merge the two parts of the project together!

Monday 21 May 2007

Photo Update

Updated my photos on picassa again. Mainly photos from bens birthday and some from other nights out and some of just random things :D

Some highlights include:


Wednesday 9 May 2007

Docking Nightmares



The tool has to be functional, elegant and fun. For that I wanted a special UI for it. I loved what the team had done over at Blade3D and i wanted something similar. Unfortunately they paid at least $300 for thiers, and hence this wasnt realy an option for me just yet :P

So for now im stuck with an old 2005 style UI. To spice it up abit I decided to add docking panels. I had worked with docking panels before for my ChainReaction project in Java but hadnt done one in C# before. A quick search on sourceforge came up with DockPanel Suite.

It certainly wasn't as easy to pick up as when I did docking panels in Java, but I eventually got it. The toughest part which I still haven't sorted out 100% is rendering a XNA window into a docking panel. As XNA runs using a DirectX graphics device its very picky about loosing its rendering state. So if a user undocks the window and moves it about and then redocks it, it doesnt like it due to the loss of rendering state. For now the XNA window has been fixed so that it cant be undocked.

As you can see in the screenshot above I have added some visual properties to the BlueprintEditor so that you can affect how its rendered, its all working beautifully.

The next step is to get the blueprints being placed on the grid so that you can build the level.

Sunday 6 May 2007

TDProject BlueprintStore and BlueprintEditor



Today I added the BlueprintStore and the BlueprintEditor.

Firstly the BlueprintStore has two halfs to it. On the left hand side you have a list of "library blueprints" these are loaded from an XML document. Library blueprints can then be dragged over to the second half which is where all the blueprints that are used in the map are stored.

If you select a blueprint you can then click a button to open the BlueprintEditor. The editor is a separate window with a rotating view of the current model for the blueprint and on the right is a property grid that lets the user edit any number of properties a blueprint has.

So you can see that when a user creates a map they are going to require blueprints. Blueprints can be anything from creeps, towers, trees, houses, anything. Blueprints are the actual objects that that you place in the world and interact with.

Tomorrow will be more work on the blueprint editor me thinks :D

Mike

Saturday 5 May 2007

TowerDefence - A Slow Beginning



Just a quick update on the project, not much to show as of yet. Been working on getting a basic terrain in place with 3D picking so you can place towers on the map.

I realised once I had done this however I was jumping the gun abit, so the next bit im going to be working on is the BlueprintStore. The BlueprintStore lets you create tower blueprints that the player can then use in the game. There will also be a library of pre-built towers that you can just drag and drop and use.

Thursday 3 May 2007

New project started! TowerDefence

I always need something to be working on in my free time. All this year it has been my University projects that have been keeping me busy. But now all i have left is one exam I have been seeking a new project that I can undertake.

I was looking for a specific kind of project. It had to be something that I am passionate about (i work so much better when i enjoy the project). It preferably had to have something to do with tools and it had to have enough new things in it that I had never done before so that I could learn new stuff.

With that said it took alot of head scratching and many weeks passed. I watched many videos of up and coming games and watched several videos related to new PS3 games and in particular "little big planet". This is exactly the type of project I wanted to work on, its a tool but its a game at the same time. If you havent seen it then you can check it here. Basically all the content in the world is created in an interactive fun tool by the community which then gets uploaded and others can play.

I asked myself how can I take the idea of little big planet and game 3.0 and apply it to a project I want to do? Well it dawned on me while i was playing a Tower Defence (TD) on Warcraft 3, I can make this!

For those of you that dont know, TD's are mini games that happened by accident. When Blizzard released Warcraft 3 they also released their powerful map editor with it, soon the community were making their own maps and campaigns. Soon people started to notice other features of the map editor like the ability to link triggers together. Duke Wintermaull invented the first TD (i think), basically you and 7 other people have to stop waves of monsters that spawn at the top of the map from getting to the bottom of the map by placing defencive fortifications along the way. As you kill more monsters you get more gold so you can build more defences, simple concept but HIGHLY addictive :D

Soon there were hundreds then thousands of these different "mini-games" some were TD's others were completely different. Hundreds of thousands play these custom games every day even now some 5 years after its release.

So after all that, the new project! Well infact its not a new project at all, its taking the TD idea and expanding, elaborating and improving on it. Users will be given a friendly editor that they can use on thier Windows machine to build the levels in an easy, interactive and fun way. The levels can then be saved and exported out for use on the X-Box and PC.  Levels will be given high scores and multiplayer abilities (eventually) encouraging others to replay the levels to get better scores to become the "pro" at a certain TD.

Well thats the basics of the idea, I have a great many more ideas of ways to improve the way TDs work. But I will detail these in the weeks to come.

So the project has now started, I have enlisted the help of my flatmate and course mate Graham 'Golden' Furner for his specialisation in terrains. Expect to see some excellent work from him in the coming weeks.

I have been working on getting an engine up and working and the basics of the tool ready for furthur development. So far there isnt a whole lot to see, I have been working through Michael Schuld's exellent tutorials on 3D XNA games engines. And have now got a basic 3D engine up and running although it doesnt look much like a tool yet, but expect more very soon!