Friday, 24 February 2012

Back to University

I know I've been a little scarce the past couple of days especially after the last couple of months of frequent updates. University started two weeks ago so I've been busy with that. Had a little time every now and then to focus on a couple of my projects putting some time into them.

With regards to the Grand Strategy I have been mostly working on more planning and designing of the various systems and the interaction between them. So, it may appear to have been no progress but most of it is behind the scenes.

I also put some time into the Console System and started working on the ability to select GameObjects and call commands on them. Currently that is working but using BroadCastMessage, essentially they could run any command that is on a GameObject. This new feature is easy to disable or enable via a bool.

I am hoping to get a nice interaction with the console system with selectable objects that will only allow certain methods to be executed, but we will have to see how that goes.

Regards,
Garth

Friday, 17 February 2012

JukeBox - Pro Version 1.5

Version 1.5 of Jukebox Pro has been approved and is now available on the Asset Store.

This version is the biggest update that we have done for JukeBox and makes the differences between the Pro and Free version more noticeable. I will shortly update the free version with some of the features of the new features.

New Features:
  • Multiple playlists
  • User loaded songs get loaded into a User playlist
  • Many small bug fixes and updates
  • Improved inspector to handle the new features
  • An improved example of the system in the form of a Music Player
  • Updated to use events instead of callbacks, which are very similar. This allows multiple scripts to hook into the jukebox to get song changes.
  • Seek through songs is now possible
  • Pausing is now possible too
  • Price is now $5
New Inspector
Regards,
Garth

Sunday, 12 February 2012

Grand Strategy - Test Build #1


I've decided to release some test builds as each system gets close to or completed. This is the first build of hopefully many that will eventually end in a complete game.

This build uses an example map that I've been using since I first started this project, it is simple in design but will allow me to check and ensure that all features are working. Currently you can simply right-click on sectors(outlined in black) and the bottom of the screen should update and say the sector name and capital.

There are various menu options and so on, however these do not work at the moment. All that has been implemented is the Start button and the Exit buttons. To move around either use the arrow keys, WSAD or the mouse.

Build 1 - 6.78MB

Regards,
Garth

Tuesday, 7 February 2012

This Begs the Question, Am I Mad?

This year one man will attempt what no other has attempted before him and many will post on forums about attempting it after. One man will attempt to create a grand strategy engine/game with Unity that will allow modding and multi-player. And he will attempt to accomplish this in just one year.

That man, is me.

This is the first post in hopefully many that will follow the journey and struggles of attempting such a enormous undertaking. This journey has already started, in fact it was started on the 25th of January. The first thing that I did was write up a design document (the first of its kind for me for games), having gotten the general idea ad layout for the various systems and subsystems to be contained within game. I started work on what I believe will be one of the most essential requirements.

I started on the map system.

I decided that in order to make the game highly moddable and extendible with possible DLCs and so on, I needed to be able to load the map from file. The height map, the splat map, the sector map and the map details must all be loaded from file. Now I tell you this now, that is no easy task. I toyed with the idea of including a map editor within the game and am still toying with the idea. However, when you are still working on getting the map to load correctly, perhaps this is not the right time to be worrying about being able to edit and then save that map.

Truth be told, loading and saving go very much hand in hand. Once you know the layout of what you loading it is easy to be able to convert that into providing the data needed to save.

What is done, you ask?

Well I have managed to bend Unity's Terrain system to my will and the loading of height maps and splat maps is complete. I have also completed the ability to select sectors (in-game sections that will belong to different nations, think provinces/states) via clicking on the map. Obviously, these features are in no way complete and nor do I think they will be for quite some time.
World Map using the Map System

Schedule and Future

Most of the systems have been given a date to be completed by, at least in a usable state. The following is the current schedule mapping, the dates provided are the due dates.
  • 01 March 2012 - Map System (loading, saving and full performance improvements)
  • 01 April 2012 - Nation System (loading, saving, editing of nations)
  • 01 May 2012 - Combat System (Recruiting, disbanding, auto-combat, healing, improvements, full performance improvements)
  • 01 June 2012 - Economy System (Trading, sector improvements (thus production), investment opportunities)
  • 01 July 2012 - Diplomacy System (Alliances, enemies, relations, trade agreements, vassals)
  • 01 August 2012 - Nation AI (Functional non-player nations)
  • 01 September 2012 - Sub-Nation AI (Functional AI controlled systems within a player nation)
  • 01 November 2012 - Multi-player (Functional 2-4 player multi-player)
  • 01 December 2012 - Code Clean-up (Ensure code is clean and every attempt has been made to document all class and systems to prove their usefulness to the system)
  • 26 January 2013 - Completed Grand Strategy game/framework for sale.
Regards,
Garth

Monday, 6 February 2012

.NET Message Boxes in Unity

While browsing the answer.unity3d.com site I came across a question on how to make a message box in Unity, so I set about recreating as much of the message box functionality as possible in Unity's standard GUI system. Having just implemented a very similar system in order to display Debug messages to the screen it proved rather simple.

Without further ado I present to you MessageBox, a Unity MessageBox implementation of the .NET MessageBox. Complete with selectable buttons and icons. It uses Callbacks instead of the inline way that the .NET version does, however it is similar in every other way.


Runtime
Supports almost every overloaded method of MessageBox.Show(), it does not support any of the IWin32Window or Help methods.

.NET Example:
var result = MessageBox.Show("This is the text", "This is the Title", MessageBoxButtons.YesNo);
if(result == DialogResult.Yes)
{
   Console.Write("Yes");
}
else
{
   Console.Write("No");
}

Unity Example:
void Start()
{
   MessageBox.Show(HandleMessage,"This is the text", "This is the Title", MessageBoxButtons.YesNo);
}

void HandleMessage(DialogResult result)
{
   if(result == DialogResult.Yes)
   {
      Console.Write("Yes");
   }
   else
   {
      Console.Write("No");
   }
}
Which is very similar with the only change being the callback in the beginning (HandleMessage) which can be any method as long as it accepts a DialogResult parameter.

Version: 1.0
Unity Version: 3.4.1 Free
Price: $2
Asset Store Link: http://u3d.as/content/corrupted-smile-studio/message-box/2Eo
Web Player Demo.

Regards,
Garth

Spawner - Roadmap

Over the past couple of days I have focused quite a bit of my time into updating Spawner after Path-o-Logical's Rafes suggested I look into providing support for their Pool Manager system. After receiving a copy of Pool Manager to aid with testing the system I set about coding in support for Pool Manager while still allowing those without the system to still be able to use the system. This turned out to not be too difficult to implement and was pretty straight forward with some minor changes to existing code in order for everything to work smoothly together.

I pushed that version (1.5) to the Asset Store on Saturday (4th Feb) and it is still currently awaiting review. Sunday (5th Feb) I woke up and decided to work on a new update that changes the way the main Spawner class handles the spawning. It currently uses Update() which is inefficient for what the system does, so I set about changing it to a coroutine with a small amount of seemingly strange errors I got it working correctly with all the Spawn Modes.

So, I am currently waiting for version 1.5 to be approved on the Asset Store and then I am going to upload version 1.6 which also happens to include improved documentation which could be found on Docs.zip. This contains some better descriptions of classes and a installation guide and so on.

So to sum it all up, it looks like there is going to be a whole bunch of performance improvements coming to Spawner in the coming week and all of this for free. If you use Spawner and like it, if you would consider purchasing one of my other assets that would be awesome.

Regards,
Garth

Wednesday, 1 February 2012

Console System for Unity


This is a Console system similar to those available in Skyrim, Fallout and others. It allows you to call various methods that have been set up (at compile time) at runtime. Supports a couple default methods (Exit, Help, SetFov) which can be switched off at creation.

The current feature set is:
  • Works with Unity Free
  • Supports non-parameter methods
  • Supports single string (conversion to the correct datatype must be done by the method) parameter methods
  • Supports history of previously entered commands
  • Integrates into Unity's Debug system.
  • Supports 3 default methods (Help, Exit, SetFov)
  • Help method automatically displays all available commands and whether they require parameters
Version: 1.0
Source Code: C#
Unity Version: 3.4.1 Free
Price: $ 10
Asset Store Link

Inspector
In-game screen
Regards,
Garth