Thursday, 19 March 2015

Ease of Unity

This is my first project at really using Unity, and in the game development community there is a saying that you don't need to know coding that well to make a game using it. It seems that is actually the case... to a certain extent.

It seems that although you COULD technically use only the built in libraries for Unity, and how it handles cameras, assets, and rendering; to make a game using 100% code, it is entirely possible to use just assets, and use the settings provided with each asset with a few scripts here and there to glue things together.

One plus side of Unity is that the community is really big, and if you need a certain asset, what you're looking for will probably be in the store. Even if you need a certain functionality with it, you could potentially find that also. Making changes in the game to be event driven is also taken care of nicely in the engine itself, and is able to be set through simple dropdown boxes when you add it to a certain scene. Even if you do need to write code for certain events, the libraries handle a large component of the groundwork already.

So for anyone with cool ideas for games, or is even an aspiring game developer. Unity is a great engine to experiment with, even if you're not from a coding background.

Wednesday, 18 March 2015

Unity 5 + Progress + Planning

Unity 5 was released recently, and so we decided to go ahead and move the project to that.
It seems to contain many updates to the high-end graphical and animation side of things, which this project may not touch, but there's not much reason to continue developing for an older version.

The conversion process was straightforward. All that was necessary was to open the project in the new editor, and the upgrade was automatic. It did take a surprisingly long time, and seemed to hang, but others have reported encountering this problem.

Anyways, I've been working on the rules side of the game. Essence of Glory is a table-top game for two players. It features dice, orders tokens, models, and a grid to play on. But there is also that portion of the game that exists only within the player's heads. They need to keep track of what turn it is, who has to play, and what they're doing at this juncture. And it is that non-physical side of the game that I have been tackling recently.

The game engine needs to know what turn it is, what phase it is, and what's happening, and it needs to present this information to the player in a convenient way. It also needs to account for the different ways of playing the game. Players may face off against the AI, or they may play with their friends over the internet, or around the table. I've been spending time thinking about how to handle all this, and started putting those ideas into action.

Since there aren't any illustrative screenshots to show off yet, maybe it might be fun to try to figure out my notes? Find them below the fold.

Tuesday, 17 March 2015

Dreaming Man Update 7

I've come up with a new flowchart and decided that I'll add as I write more. I've also come up with a bunch of key turning points where the player has options that affect the outcome of the story (standard VN dialogue options).

This is written pretty bare-bones for simplicity, as Matt and I will be the ones mainly using it. It's going to be added to as more is written and decided.

One of the options:

Protag Dialogue Choice
Asuka?
Good morning.
??? – Asuka… Who’s that? Were you dreaming about someone, or are you still asleep? You must mean your wife, Amelia. [put her name in bold]





How’s breakfast coming along?
....
Amelia – Almost done!
Amelia – Breakfast is almost done!

To do: Actually rite moar

Thursday, 12 March 2015

Dreaming Man Update 6

Not much to post about this week. I'm currently just in the process of writing dialogue.

I believe Matt is looking into the aforementioned functions from the last post.

Wednesday, 4 March 2015

Events in Unity

Events are a useful tool for communicating between game objects, especially when you don't know which objects will be communicating with each other.

Say we have a Button. When the user clicks on the button, we want another Thing to do task X. Maybe the code would look like this:

void OnClick(){
     Thing.doX();
}

All very well. But what if we decide that actually, there's going to be a whole bunch of different Things in this scene, and they should all do X? What if those Things need more information to do X? What if the set of Things that should perform the task X is constantly changing?

If any of that is true, that means we'll have to change our code for the Button in order to change what and how Things do X. And all the while the button hasn't changed. It's still there, doing its thing, getting clicked by the user. So why should we have to change the Button, if the responsibilities of other objects have changed?

The answer is that we don't, if we use Events.

Events are a really handy construct. They can be thought of as a one-to-many relationship, where one object publishes or broadcasts events and a set of others receive and act on them. Just like a radio broadcaster doesn't know how many people are tuned in at any given time, the Event broadcaster doesn't know what objects are subscribed or even if any of them are.

So our button code would be changed to look something like this:


//This defines a delegate which is a little like a function pointer.
//It defines the kind of function that is needed to handle the event.
//In this case, a void function that takes an object is needed
//to properly handle this event. 
public delegate void ClickEventHandler(Object sender);

//This goes inside the Button class, and defines a delegate member of the ClicEventHandler type for that button.
//This is the event that other classes will listen to.
public event ClickEventHandler clickEvent;

 void OnClick(){
     //Now, when the button is clicked, all of the delegates subscribed to the event will trigger
    clickEvent(this);
}

public class Thing{
    public void handleButtonClick(Object sender){
        doX();
    }
}


Now, we can change the behaviour of the Thing without changing the button at all.

In Essence of Glory, events are used to update parts of the game engine about changes in other parts of it. For example, when a ship is moved in the Model, an event is raised that is received by the View, which then updates where that ship is displayed on the screen. Events can also be used for special effects that trigger under certain conditions.

More information about Events in C# can be found here and in Unity here.

Monday, 2 March 2015

Dreaming Man Update 5

This week I wrote out outlines of what is happening in the first two dreams of the game, as well as some dialogue for the first dream.

I also came up with some concepts to shoot through Matt regarding the system of the game. I was thinking of an elementary inventory system, as well as some stuff regarding the implementation of the dialogue that I write up.

Inventory

The idea on the table is of a basic inventory system that modifies the chance of failure with options later in the game. This way this system would work is more similar to old RPGs or Point-and-Clicks, in that there are descriptions of each item (assuming no illustration), and they can only really be used situationally, either saving the player with an easy-out, or modifying percentage chances. This would just be a Boolean value associated with certain dialogues. E.g. Player can choose: Option 1, Option 2, and (if "Tent" is True) Option 3.

Dialogue 

Legend:
Thoughts
Either brackets, or italics (italics preferred)
Speaking
Person speaking’s name + colour
Narration
No name + plain uncoloured text
Sound Effects
Goes between asterisks *bang*

Assuming text is colour coded by character, in my opinion it would be nice to add a property to each ‘character’ which holds the colour of their text for purposes of easily distinguishable dialogue. And if this were the case, I feel it would be a nice touch to allow the player to pick the colour of the protagonist’s text, as well as his name.


Things to do: Dialogue for dream 1 and 2.