Wednesday 28 January 2015

Unity Project Check-In

Not much to report this week. A few minor changes were made to the project. The two most notable being a rudimentary camera control suitable for testing, and some placeholder art for ships. Hopefully, by next week we'll be able to have those ships moving around according to the game's rules.

Thursday 22 January 2015

More on visual novel tookit

This week I've been looking into more features of the VN toolkit. Mainly basic functionality to get a working modern visual novel.

Using existing crop-outs of art we had, I made a little scenario with our characters studying with each other.

I managed to get the basics of a VN covered this week. Dialogue, choices, characters popping in and out, voices, and a BGM. They were easy enough to put in the game, but a problem that might occur later is organizing all the different scenes and dialogues.

What we may want in the future is to have a flowchart like narrative, with decisions or actions in the game splitting into different paths, or multiple paths to have a common convergence point. Throughout the next week I'll probably be taking a look at how to make a neat way to organize all the different scenes we have. Currently the tookit has a tree-like structure for organizing splits in decisions; what I may code in the future is to add flags to certain points to make figuring out what events occur at what times easier.

We might not have a story as convoluted as this one, but even if it's simpler it'd still be nice something to make it easier to manage.

Wednesday 21 January 2015

Visual Novel Toolkit

This week I've been working with a module for Unity referred to me by Tyler, called Visual Novel Toolkit.
It's a pretty neat little program, that allows you to make VN styled games at the drop of a hat, although of course, for the more complicated parts of a game such as math and combat, you'd need to do that by yourself.
Working with the module in Unity
The actual interface inside of the module's pretty easy to work with, and there's a few tutorial videos online made by the creators of the module, as well as community content, so it's not too hard to learn.
The view inside of Visual Novel Toolkit
The UI inside of the game needs to be worked with, and the sprites are a little clipped, but this is only something to do preliminary testing on, so that's not too bad. 

I'm using sprites and dialogue given to me from the other project, shout out to whoever made them, because the art  and dialogue for The Dreaming Man aren't entirely up to snuff yet, so this allows me to do some practice before they're ready.


Anyways, it's a decent little program, and this weeks project. Next week I'll look into some of the code-side stuff, and investigate what more can be done with Unity.

Model-View-Controller Design with Unity

This article will discuss the overall design architecture that will be used to create Essence of Glory in Unity. Since Essence of Glory is a tabletop game, we can compare it to other such games and think about how they would be designed in Unity.


Let's say you were going to implement a game like Jenga in Unity. How would you do it? Well, objects in Unity are modeled with GameObjects. These follow the Composite design pattern; every GameObject is a collection of GameObjects, and/or MonoBehaviors. If you are familiar with Entity-Component systems, you can think of GameObjects as Entitites and MonoBehaviors as Components.

Coming back to Jenga, you would probably have each block as a GameObject and attach the right MonoBehaviours to it to give it meshes, textures, shaders, physics collision and so on. Furthermore, you'd want to know when a block hit the ground. So you could add script, in the form of a MonoBehaviour, to each block that would trigger when it collides with the ground.

But Essence of Glory is not a game like Jenga. A better comparison might be chess.


What happens when, in a game of chess, a piece falls over? Unlike in Jenga, this occurrence has no bearing on the rules. You would simply pick up the piece and replace it.

But hold on, I just posted a picture of a game of chess, but that isn't what chess looks like.

This is a game of chess:
And so is this:
 Or even this:
"1. e4 c5 2. Nf3 d6 3. Bb5+ Bd7 4. Bxd7+ Qxd7 5. c4 Nc6 6. Nc3 Nf6 7. 0-0 g6 8. d4 cxd4 9. Nxd4 Bg7 10. Nde2 Qe6!? 11. Nd5 Qxe4 12. Nc7+ Kd7 13. Nxa8 Qxc4 14. Nb6+ axb6 15. Nc3 Ra8 16. a4 Ne4 17. Nxe4 Qxe4 18. Qb3 f5 19. Bg5 Qb4 20. Qf7 Be5 21. h3 Rxa4 22. Rxa4 Qxa4 23. Qxh7 Bxb2 24. Qxg6 Qe4 25. Qf7 Bd4 26. Qb3 f4 27. Qf7 Be5 28. h4 b5 29. h5 Qc4 30. Qf5+ Qe6 31. Qxe6+ Kxe6  32. g3 fxg3 33. fxg3 b4  34. Bf4 Bd4+ 35. Kh1! b3 36. g4 Kd5 37. g5 e6 38. h6 Ne7 39. Rd1 e5 40. Be3 Kc4 41. Bxd4 exd4 42. Kg2 b2 43. Kf3 Kc3 44. h7 Ng6 45. Ke4 Kc2 46. Rh1 d3  47. Kf5 b1=Q 48. Rxb1 Kxb1 49. Kxg6 d2 50. h8=Q d1=Q 51. Qh7 b5?! 52. Kf6+ Kb2 53. Qh2+ Ka1 54. Qf4 b4? 55. Qxb4 Qf3+ 56. Kg7 d5 57. Qd4+ Kb1 58. g6 Qe4 59. Qg1+ Kb2 60. Qf2+ Kc1 61. Kf6 d4 62. g7 1–0"
In fact, some people play chess blind-folded, or via mail.

What does this tell us? That the way a game of chess is visually represented is distinct from what constitutes the actual game. The game of chess is an abstract rules construct which is merely represented in some form or another to players. This is in contrast to the earlier example of Jenga, in which the pieces that players manipulate are also significant to the rules.

Furthermore, this indicates that chess (and Essence of Glory) is a good fit for the Model-View-Controller (MVC) software architecture pattern. In MVC, the software is divided into three areas of concern:

  1. The Model - simulates the state of the system. For a game like ours, this would involve tracking the position of pieces, resolving the outcome of moves, rolling dice, and determining if a player has won. This can be implemented with plain-old-C# classes and need not involve Unity at all.
  2. The View - represents the state of the system to the user. Everything that the user sees is part of the View, this includes any buttons or other interface elements. As such, the View will mostly be made up of Unity GameObjects. It is updated based on information received from either the Controller or directly from the Model.
  3. The Controller - updates the Model based on user input. May also be responsible for updating the View based on changes in the Model. Often implements the Observer pattern with UI elements.
This provides separation of concerns. Each part can be updated relatively independently of the others. It doesn't matter if a ship being moved is being represented by temporary place-holder art or a finalized and polished high-def model, the state contained in the Model and the command issued by the Controller will be the same.

This also helps for input. Only the Controller is concerned about where input comes from. Whether a command is received from mouse, keyboard, touch, over the network or generated by the A.I., the change in the Model will be the same and so will its effect on the View.

Model-View-Controller does not seem to be common in Unity, this article was the only real source I found after a quick search. It's an informative read, though it references the no-longer-used NGUI library. The example project linked in the above article is a very good example of how MVC can work.

Tuesday 20 January 2015

Morgan's Weekly Update 2: What Needs to Happen in a Scene

Whenever I write a scene, there are a number of questions I have to ask about it. Questions like: are the characters relatable enough? Are they even believable? Is the setting clear enough? Am I getting across what I want to be? The most important questions (and i may revisit the previous questions in later posts) are things like: Am I teaching the player what they want/need to know? Are they even enjoying it? These two questions are hands down the most important to a game like this, after all a large chunk of the game will be dialogue. My early scenes were pretty lackluster exposition dumps with each character droning on about how they feel about the "Federation" only inserting a modicum of character simply based on;

"I come from X background, thus I feel Y" 
"Ah character 1; I am different for, I am character 2 from background A and therefore, think B"

No fun for anyone.

GO FOR THE EYES BOO!
I then went back to my role playing background and realized characters aren't necessarily remembered for their contribution to the story, more likely we remember their quirks and the interaction with the player. Minsc isn't ingrained in RPG culture because of his relationship with Dynaheir, we remember and love Minsc because he was a burly barbarian who carried around a cute little hamster named Boo. Going forward These are the sorts of things I really need in my characters, not more dry stock characters droning. 

I have the structure laid out, now it's just a matter of filling it with enough life to keep the player interested and teaching them along the way. One of the things that needs to be overcome is the unorthodox nature of our game. There aren't many large scale naval combat games out there, let alone ones with the systems we're including. My goal then is to ease the player in to these things through the dialogue. One of my fears is players looking at the systems we've made an wondering why things are the way they are, why does a vee beat a line formation in assault? My hope is they'll have some of these questions but the dialogue will dispel some of that, especially if they choose to have those conversations with characters, and keep it interesting. 

Lot of work on the horizon for me, check back next week for more of my exciting adventures in writing.

Monday 19 January 2015

Dreaming Man Update: 2015-01-19

We were planning on getting a lot of the writing and drawings done this weekend, but a friend of mine from Peterborough drove over here to run a Pathfinder campaign which absorbed most of the weekend.

Regarding the progress we did make, Jake currently has reference photos for the protagonist as well as a description to create the sprite for him. Matt figured out how to use text with different options, backgrounds, and sprites in Unity, and I laid out the general shell for each scene to make it easier for Matt and Jake to read what's happening with dialogue.

I intend on writing some scenarios and possibly creating a Morrow Project ongoing to inspire some ideas.


The work we intend to get done in coming days is thus:
- Write dialogue and determine backgrounds for the beginning scene.
- Determine a (narrowed-down) set cast for Jake to draw.
- Determine a (narrowed-down) list of backgrounds for Jake to draw.
- Create some dialogue and organization of backgrounds, sprites, and scenes for Matt to import into Unity.

The overall goal at this point is to have a simplistic working prototype. ^ㅈ^

Thursday 15 January 2015

Visual novels and tabletop games

No game's complete without some sort of narrative, and for Essence of Glory we decided to take an interesting route to deliver that.

Since we're using the Unity engine to develop the project, we have the benefit of being able to use many tools for development. What we're doing at the moment is messing around with the Visual novel toolkit by Sol-tribe.

Using a visual novel interface will be very easy to have our characters interact with each other. The end goal is to modify the interface provided by our friends at Sol-tribe, so that eventually we will have a tool suitable for our game that is visually appealing and easy to maintain.

I'm just playing around with this at the moment, trying to see how many things are editable in the free version (since we might not want to fully commit to this yet). This tool seems to be able to recreate most modern visual novels, but there are some options we don't need for Essence of Glory; such as the save and load button provided with this toolkit.

All of the other options are very nice, including special effect and scripting options. It seems pretty picky about the textures that's used for characters, it must be cropped and specifically sized for the toolkit.

There doesn't seem to be more interesting features about the free version of the toolkit, it seems this week is a good time to lurk on forums to see features for the full version. But other than removing features, this seems like a good way to accomplish what we eventually want to deliver the story.

Wednesday 14 January 2015

First Steps with Unity - Hexagons

This is the first in a series of posts about the development of the electronic incarnation of Essence of Glory.

We are just beginning work on this game, and we're using the Unity engine. We chose Unity for its availability, ease-of-use, and wide variety of deployment platforms.

This week's post will mostly be about hexagons.

What's so great about hexagons? Well, as the logo at the top of the page may suggest they are a pretty significant part of a lot of tabletop and wargames. They provide a more accurate and natural way of moving game pieces around than a square grid. However, they are a little trickier to draw than a grid of squares.

Unity measures the position of game entities with a three-dimensional vector. Our game board will mostly be flat, so we can ignore the height dimension for now. That leaves us to consider position on a two-dimensional plane, like a cartesian co-ordinate plane.

Remember math class?
As you might imagine, it's rather easy to draw squares on such a grid. The grid is already based on squares! Just draw a square at every position (x,y) and there you have it.

But how do you draw a grid of hexagons?






Well, it might help to imagine them as a grid of squares where every second column (or row, depending on your perspective) is offset a little.

Notice how each tile has 6 neighbours touching it.
What we want is a way of numbering hexagon tiles so that we can easily determine where to draw them.

Seeing as a hexagon grid is analogous to a square grid with offset rows, it may be tempting to try to number it like a square grid. Depending on how this is done, the results may not be helpful.

If you try to keep the axes at 90 degrees to each other, you may end up with something like this.

x-axis in red, y-axis in blue
As you can see, the y-axis is really ugly. Converting from these co-ordinates to Unity's world co-ordinates is not too difficult, but the reverse is a bit of a pain. What we want is axes like this:

axes as above
Much better. Converting from these hex co-ordinates to world co-ordinates and back will use the same formula at every position.

Now, to implement this in Unity, I followed the approach described here. As a programmer, I am much more comfortable with creating and modifying game objects from scripts rather than using Unity's drag and drop features. I won't go into detail here, but I first created a HexManager script, which spawns new game objects and attaches the HexModel script to them. Ideally, I would like to create a prefab out of the hexagon objects, as the game board will likely be the same in every level, but this is a useful construct and will do for now.

So, we have a way of drawing hexagons where we want them, and a logical way of describing where that is. Next week, we will be working on adding some interactivity to this video game, getting something to happen when you click on these hexagons.

In addition the article linked above, I also found 'Hexagon grid: Generating the Grid' and 'Hexagon grids: coordinate systems and distance calculations' to be of the greatest help.

Tuesday 13 January 2015

Painted Panzer-Grenadiers for our Upcoming Flames of War Tournament

Here's a big ol dump of the stuff I've been working on for the upcoming Late-war tournament but it's still only a very small part of my army. I'll be playing a Gerpanzerte PanzerGrenadierKompanie which basically means a mechanized force, that runs around in half-tracks, outmaneuvering the enemy. This doctrine is very similar to the doctrine used by our Vanguard faction in Essence of Glory, which will likely receive a post of their own soon.

Making an army for a tournament is interesting and relevant because it's really about building a balanced force that can handle any threat and minimize losses. In essence of glory taking casualties is inevitable but minimizing your own while inflicting more on your enemies is key and looking at systems that also emphasizes those kind of trade offs.













Morgan's Progress Report 1: Old School Romantic Edition

It's been an interesting week, four and a half hours of which was spent watching Gettysburg with Martin Sheen and Tom Berenger, why? Besides the fact it's an awesome film it also has some amazing romantic writing and examples of relationships between corps commanders, and generals. This is really the kind of tone I'm trying to strike; a corp commander comes to you and explains his failure or success, it's up to you how to react depending on who it is and how you think they'll react. This type of interaction will really affect their performance and the story going forward.

Next week I hope to put more of this dynamic in to the scenes but work wise, this week was focused on learning how to use unity and a visual novel engine. It didn't go amazingly well but now with a better grasp of the system I can hopefully have something more concrete next week as well as some examples of some old school romantic style admiral, commander dialogue.

Monday 12 January 2015

Dev Update: (Working Title) 'The Dreaming Man'

 A general outline for the introduction is written.
 A rough storyboard is in place to match the introduction.
 The general outline for the stages is in place, however more detail is to be written on the setting.

Protagonist
The protagonist ('The Dreaming Man') is decided to be a white male programmer in Japan. He works for Sony as a programmer (details of such are to be decided, such as how we can't use "Sony"). The reason for this is for the protagonist to be relatable, and for the intrigue of the adversity of being a white person in Japan.

Rough Storyboard for the Introduction.
Introduction Stage
The game begins with opening logo "Blue House Games". It gives an option to start the game, which will then begin an animation of zooming in and entering the "blue house" in the logo.

The introduction will be frame by frame, of different drawings. This is illustrated in the story board (right); in each individual frame it is merely the protagonist being drawn in a different position on the same background.

The beginning introduction shows the Protagonist entering a crowded subway station after leaving work.
He checks the time just as it hits 5:30 and he boards the train home.
He walks in the front door and puts on the kettle to make some tea.
As he's relaxing with his tea, he receives a text.
   >anon, I'm not happy with the way things are going
   >I don't think I want to be with you anymore
   >It's not that I don't love you...
   >I just don't feel the same way as I used to.
   >Please don't reply...
Anon puts down his phone and rests his head on his hands.
The next scene is anon going to sleep.

End of intro; fade in game Title.
Begin Dream 1 stage.

Dream 1 Stage
This takes place a reasonable amount of time after the end of the world. Enough so that most people have forgotten about the world before. The location of this dream takes place in the prairies of Saskatchewan on a farm with a barn for cows and pigs, and fields upon fields of grain.
Cast: Father; Mother; Son; Daughter

Players’ viewpoint is from The Father. The Father wakes up and looks over at his wife. She is exaggeratedly loving so to represent the Dreaming Man's sad loss. They go through a pleasant morning until The Father goes outside to work. At this point the home is attacked, and the wife is inevitably taken away, completely beyond the Father's control.

At this point, Dreaming Man wakes, and begins his day yet again. This is to be written.
Neo-Hwarang wielding a Geom (검).

Dream 2 Stage
This is currently unwritten, however the setting itself is written. This will take place in a neo-Korea, approximately 250 years after the end of the world. The dream's cast will consist of a group of neo-Hwarangs, riding motorcycles, and using pistols with sword sidearm. This is a setting heavily influenced by the Three Kingdoms Era in Korea ('삼국시대'). Three countries have emerged in former Pyeongyang, Jinju, and Pohang.


Things to be Drawn (as of now)
Full Screen Images/Backgrounds:
- Stylized "Blue House" opening logo. House has door and window(s). This allows for the zoom into the door upon starting the game.
- "Dreaming Man" waking up in his bed from an intense dream. A "nightmare" per se.

Dream 1:
- The inside of a relaxed one-bedroom farm house during sunrise. The house has a double bed for the father and mother, and two single beds for the children, as well as basic necessities. It is the equivalent of an 1800's farmhouse without power, and with animals and hand tools for crops.
- Exterior of said house. Containing a barn for the animals (pigs, cows) and tools. Surrounded by differing crops for as far as the eye can see.



Club Roleplaying: The Morrow Project 4th Edition

Although unrelated to the dev project, this game gave me some inspiration, and is definitely worth looking at. The Morrow Project takes place in a post-apocalyptic world where members of a trained group of volunteer civilians form The Morrow Project, a group dedicated to rebuilding the world after nuclear war. I have a copy of the core book, and would be glad to show some people at the Friday club meets. If enough people express interest then I will consider running a module.
^ㅈ^*
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ

You open your eyes to darkness and consistent beeping. It takes you a moment to realize that this is the sound they told you about in training; the cryotubes must have run out of power. If the tubes ran out, then exactly how long has it been? You were supposed to receive a wake-up call, but it must have never come.

Project Personnel in Standard Uniform (by
Natehale1971
http://forum.juhlin.com/member.php?u=166)
It feels like you entered the tubes just a moment ago, and now you’re here. After sitting up and taking a moment to stretch, you look around the bolt-hole. Looks like it survived nuclear war.
There is a consistent hiss as the pure nitrogen of the room is replaced with breathable air. Due to this, the equipment appears unscathed by time. Looking across from you, you see the V-150. It looks similar to an APC, with four tires and a turret on top. Fully amphibious; enough room for six; gear to last for weeks; and to top it off, the RH 202 extends about one metre out of the turret: a 20mm machine cannon with armour-piercing ammunition.

Around the MPV are crates containing various supplies to last for months: rations, weapons, clothing et cetera, as well as items of recreation, such as cards, a bag of marbles, some tennis balls, and a chess set.

To your left and right, you see that your fellow team-members are just regaining their bearings. You hop out of your tube onto stiff legs and count them up. Kim Joon-su; Big Stue; Tyler Mitchell; and Morgan Richards.

There’s a table with some benches nearby, and on it sits a document bearing the Recon Team insignia, with, “MORROW INDUSTRIES, CONTROLLED DOCUMENT. CONFIDENTIAL”, written in bold lettering along the bottom. As team leader, you open the document. It reads,

Recon Team Insignia
                “Recon Team YR-A27, this document herein contains the details regarding your tasks upon waking from cryosleep. You are to assess the needs and problems of the local population in the Ottawa metropolitan area and region, and to determine what action may be taken by which team to bring the peoples of this area to a point of self-sustainability. Beyond this, take whatever actions possible in your immediate scope to aid the population in rebuilding and securing basic necessities. From that point on, you are to communicate with the other teams in the region, to create a detailed solution for this community.” From this point on the document goes into more detail regarding specific tasks, and how to use all the equipment provided, as well as how to deal with certain problems that may arise. It also gives coordinates to navigate to the Ottawa area.

You spend the next few hours sorting and gathering your equipment to load into the V-150. You insert your Morrow Personnel ID Card into the console and input the coordinates, placing a dot on the V-150’s map. With the flip of a switch, hydraulic lifts push open the large door revealing natural lighting. The V-150 rumbles to life after a number of years of sitting dormant in this concrete hole. You can feel it accelerate up the slope to the outside, but just as you reach the crest of the slope, you think about how long it must have been, and one question remains in your mind:

Where was the wake-up call?


Sunday 11 January 2015

Some pics from Friday night gaming



Many Blue House contributors, including myself, are part of the Carleton Tabletop gaming club and the Carleton PC gaming clubs. It's where many of us met and where we still meet, collaborate and crush each other in 15mm scale and digital combat. Being active in the gaming community helps us by exposing us to many different gaming systems and ideas, as well as giving us access to a pool of beta testers. 



Examining the battlefield 



The colossal king tigers lumber toward the Soviet position 



Determining the perfect distance needed to destroy the enemy.



American tank hunters get the drop on the Tigers 



Canadian armoured recon surveys the German position



The fearsome Tiger tanks have met their match



British commandos get in to position, supported by Canadian shermans



The Soviet defenses 



Hetzers wait to pounce on a Soviet advance



A hellcat ambushing advancing tigers



German Grenadiers hold the line



          American self propelled artillery gets the drop on some panzers

Wednesday 7 January 2015

(Working Title) The Dreaming Man

Pitch:
Man dreams of the future apocalypse and watches it unfold through his dreams and his daily life.

The game is meant to feel grim, but with hope for the future. Although it centers around the world ending and the apocalypse, it also should show hope for the future and a chance to restart. Hence the problems with the dreaming man's life, and not all of his dreams should be terrible or frightening.


Overall Arc:
A man experiences dreams that take have similar themes to what happens in his life. The main thing that connects these dreams however, is that they all take place in a post-apocalyptic future, and they all chronicle the lives and hardships of those living there.

The role the players would take is in the characters in these dreams. They would slowly learn what the end of the world is like through the man's dreams, and they would learn how it came to happen through the man's life.

As the game goes on, signs of approaching war become more apparent in the news. Conflict between the world's major powers starts slowly escalating until eventually the dreaming man sees the world's demise through his own eyes, and he is torn apart.

He experiences a flashback in the moments before his death where he sees the characters of his dreams. And at that moment, the scene cuts from him to the people he saw in his dream, who are deep underground scrambling to get into their cryotubes.

After an unknown amount of time, they awaken to a changed world. The same one seen through the dreams.


Flow:
The game takes place in two main streams: One is through the life of a main character, "the dreaming man"; one is through the characters chronicled throughout his dreams.

This allows for many tales to be expanded on, because although he is dreaming, these are actual events that happen, and the way the players deal with the different "stages" affects what the world in the aftermath is like.


Function as a VN:
For this to function as a VN, but still have invigorating combat, it would be a good idea to break gameplay into two sections: Normal mode (functioning like a normal VN), and Combat mode (over the top turn-based strategy). This could likely be implemented in 2D with Unity (this is expanded on in Mechanics).


Mechanics:
The original system I intended to be used with this idea is a percentile based system with detailed hit locations for combat, and degrees of success and failure based on how close the rolled number is to the target number (between 1 and 100).

Changing this to work as a VN switches the focus moreso to the story and the actual choices made, rather than action. Because of this, an overhead-view combat mode could be implemented to keep the game exciting. It could use a computerized version of the system originally intended.

To summarize, the system uses initiative and actions for turns. Players have between two and four actions, and their turns are organized by what they roll for initiative. Their actions are merely a counter of how many things they can do in a turn, and they can spend these actions at any point on their turn, or on people's turns below theirs (holding actions). They can reserve actions to use in retaliation to other people, such as dodging out of the way, or parrying a blow, or throwing back a grenade.

Attacking uses only the attackers skill and outside factors, and damage is determined by specific locations (ie right ankle, neck, left shoulder etc.).

The system originally intended for this game is immensely detailed, and I (Reilly) can demo this at one of the meets if anyone is interested in how it works. Either a meeting for this specifically, or a club meeting. This wouldn't be a true demo with story, but rather a utilitarian demo of only the system and how it works.