Monday, March 20, 2017

First quest

Yesterday I managed to implement the first quest of the prototype, and a couple of hours later, the second. I can't say I have a proper quest system (if such thing exists), it depends on loosely related stuff.

The first quest implement involves recovering an stolen item, which requires fighting some weird guys. It is like an introduction to combat. The guy drops the stolen item, or more precise, you get it from his corpse. When you talk to the quest NPC, if you have the item with you, a new option appears in the dialog that allows to deliver the item, receive XP and set the quest as completed.

The second quest is to talk with a guy to receive another quest, the one that triggers the main storyline of the game. Pretty easy. And now that I mention the storyline, I made some work on it this weekend.

The key word when writing the plot for an open world is branching, which is easier to say, but not that easy to achieve. It means that almost every quest or NPC should be the entry point for more quests. Lets say that somebody told you that Williams know somebody who craft excellent weapons. But Williams won't simply send you with the crafter, instead he will ask a favor or something. Take a look at the previous RPG games you have played and you will see this concept in action. In The Witcher 3, virtually every NPC you go to ask somethings, requires completing one or more quests before giving what you need. As I said, sounds easy, but it is not for a single writer.

I also included in the story an old friend of mine, who passed away last year. Like me, gamer since the MS-DOS age, with lots of friends who are now scattered through the world. I'm still thinking how to improve his participation in the story and make it more important.

Thursday, March 9, 2017

Mi novel available in Amazon

In case you are proficient enough in spanish, or at least, enough to read, I remind you that I keep a blog in that language too. Also, I'm happy to announce that my  book is already available in Amazon.


I put a lot of effort to make this my best book, and as usual, I ended up not quite sure about if I made it. Probably the next will be better.

Tuesday, March 7, 2017

The best tutorial to implement a node based editor

I had lost all hope to find a good tutorial on creating a node based editor in Unity for my dialogs. Something like Mecanim, with squares and connections. So, it waslike a shoot in the dark when I made the same search again a week ago. And guess what, I found this.

I spend the friday night following it and got a small prototype working. Not just that, I also know how to customize it and add stuff. The bad news are that I forgot most of the little I knew about old Unity UI system.

This is the best tutorial I have found about this: simple and effective.

Friday, March 3, 2017

Implementing interactions

I had a big mistake in my AI behaviour system. I added in basic bahaviours one to make the NPC approach the player and engage dialog, until I found that such idea is not very wise. Sending the NPC to mindlessly talk with the player any time it is visible doesn't works. Let's suppose the NPC has a quest to assign, what happens when such quest is completed, or in case you reject the quest? The NPC will continue to harass the player, starting a dialog in every occasion.

In this case, my approach is to use a trigger collider. I set up a GameObject with a box collider, and attach an script that makes the required verifications: does the player has the quest already? what's the status? This can be used to trigger attacks that requires prerequisites, like raiders that attack you only if your level is below some value, or if you belong to some faction.

By the way, am I the only one who is not impressed at all with the Unity GDC keynote?