Skip to main content

Posts

Showing posts from 2017

My first blueprint

A couple of days ago I managed to make my first working Blueprint script. Well, it is not finished, because I took the wrong approach, but at least I found how to handle input and react to key press/release events. Not too difficult, it just takes some time to watch the official tutorials.

In the end,  a Blueprint class and a C++ class are almost the same. You can put together some components and code, that's all. Blueprint tries to help by being context sensitive and it is supposed to allow quick prototyping, if you are an expert, of course.

One of the problems I found, besides my lack of patience, was that unlike Unity3D, where you start a project from scratch, Unreal Engine tries to provide you some base template to start. That requires changing some stuff in the GameMode class if you want to change how the camera is managed, for example. It is possible to avoid using the game framework, but I'm still far from that skill level.

So, I'm quite pleased with my progress, b…

Some fixes to AI

The prototype is under a storm of changes lately. Yesterday I spent some time trying to figure out the origin of some bugs in the AI code. Lot of time actually, because I lost one hour looking at the wrong line. But now, after moving some code to the Awake() function, and unifying some initializations that were repeated, I fixed a lot of weird errors I had. Also, I found some logical errors, preventing the NPC from properly getting into weapon's range.

Today I plan to implement separate functions to deal with each combat mode, to unclutter the Combat state. Also, I have to study the new Pluggable AI videos posted in Unity's Youtube channel. Maybe I can get some ideas to implement some way to differentiate the AI for each NPC.

The other bunch of changes deal with the process of building character mesh and equip/unequip items like armors. Currently it is a hughe mess with weird problems like incomplete characters, or complete ones that become incomplete if I close and the open …

Fixing old mistakes

This weekend I made another offensive to my item equip code. It depends on the mesh assembly code, which deals with building a model from several meshes, if they share the same skeleton. To be equipped, the  item must have the same skeleton too, of course, and the widely (and only) documented method is to copy the bone info from the base skeleton to the other meshes. Simple items like weapons does not need this, as they can be attached to a bone and that's all.

But my first approach had major flaws. It required a list of prefabs that were assembled into a a model and then to a list of GameObjects, the NPCs were not visible in the map, and just recently found that destroying the switched part left me without the original part to restore it when the item was removed.

So, I sat and put my brain in afterburner mode. It didn't worked... until yesterday, when at last I figured out how to get rid of the lists of original prefabs, the resulting GameObjects, etc, and put that in a si…

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…

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.

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.

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?

The Road to Eternity, Obsidian documentary

A bit late, but here is it:



I have been trying to post this since I found it two weeks ago, but some connection problems prevented me from doing it. Enjoy!

From 2d to 3d

I had to switch my Maze of Knowledge remake from 2D to 3D. Last saturday I migrated most of the relevant code and reusable assets to complete a working prototype. Why did I do that? Because seems that it is going to be easier to find a 3d modeller than a pixel artist. Weird, isn't it?

After several months with the project sitting there waiting for animated sprites, I decided to go back to my original idea. First, I wanted to make a 3d remake of an old 2d game. Then I wanted to do it as close to the original as possible, and that would have the benefit of requiring only 2d art, easier to produce. Big mistake. In this city, where game developers are scarce, and 2d artists are more interested in drawing manga, finding somebody to create and animate an sprite was impossible.

Please, also consider that we are almost disconnected. No local forums, or things like that. I have to find people the old way: tlaking to friends, who perhaps knows a friend who knows someone else who can draw/m…

A cuban writer, nominated to Phillip K. Dick award

A couple of days ago I received news about my friend Yoss: he is nominated to Phillip K. Dick award! I c&p from the official site:

The Philip K. Dick Award is presented annually with the support of the Philip K. Dick Trust for distinguished science fiction published in paperback original form in the United States during the previous calendar year. The award is sponsored by the Philadelphia Science Fiction Society and the Philip K. Dick Trust and the award ceremony is sponsored by the Northwest Science Fiction Society.
 I wish him luck, but just being nominated is a great achievement (one more in his curriculum), for him and for cuban science fiction.

Revisiting the game story

I have been reworking the game storyline, taking into consideration some ideas from a friend, who worked as second writer in the early stages of the project. I'm not happy at all with my current work. Although I set some important points in terms of plot twists and emotion, it lacks the required depth and fails to offer a living world, with several factions.

I focused too much in providing choice, in the form of having a way to join one or another faction, instead of providing a couple of them that will be always unreachable, or simply opposed from the beginning. After all, a villain is always needed! And the storyline was too much a line. Too linear. Now I have to open the choices available to the player after the brief introductory quest.

Of course, the final storyline should be tweaked by at least one more writer. An open world RPG is too big to be written by one man.

Minimap!

Yep, we have minimap, actually, it is more like a satellite view. I made a quick proof of concept yesterday, while watching Dallas Cowboys vs Green Bay Packers game. I had the overall idea, but with the help of a nice tutorial, I completed the blank spaces, which were related to redirecting the Render to Texture to an UI element (a Raw Image) and how to place markers (use an specific layer, cull that layer in normal camera, and all layers but that one in minimap camera).

Still have a few issues to solve (what happens if the marker is inside a building or covered by something?), but eventually I will solve them. First I have to spend some time to deal with the coroutine hell that became the AI, and implement some way to tune the behavior of each entity, other than writing a custom script for each one.

Anyway, Iḿ  quite happy with the progress so far. Considering I'm not a great programmer, I have achieved some interesting things, and others are pending until I can get the required…

I have finished Deus Ex: Mankind divided

One of the problems that comes with being a writer, is that you start analyzing everything you read. Sometimes you think you would have written it in a different way, or simply you see a pattern: this guy is going to die, or this is going to end this way.

Yesterday I finished Deus Ex: Mankind divided, one of the titles I wanted to play last year. Took me a bit to get it, just to find that my hardware is not enough and I had to avoid using weapons: impossible to aim with only 15-18 frames per second. I urgently need a better video card, and a PSU to feed it. The game itself is not bad, the only complaint I have is about the story.

Deus Ex felt like a bit short to me, with a quite basic plot. Except for a couple of decisions (do this or that, not both), the dialogs are mostly useless cinematics that provide information at the cost of wasting gameplay time, and do not add any complexities to the storyline.

And why do I expected a better story? Well, because Deus Ex is an RPG, despite be…

New year, lot of work

Same as December, January started with an offensive to my 5th novel. I'm very close to finishing it and not too soon, as the next ideas are pushing to get out. Perhaps my next book will play a bit with old style mystery novels and new weird, although I also have a more traditional fantasy plot in mind.

Then I switched to programming for a couple of days. The prototype received some interesting features like working conditionals in dialog branches, my very own AI/sensory system and trading. The base for the quest system is already there, but may require lot of work to be functional.

Currently, the protoype is just a lot of subsystems, like a workbench where I test ideas. It wasn't supposed to be, but my previous project had too many issues to be corrected and I discarded it. The work I'm doing is aimed to improve a couple of details, and presenting a video in a conference about game development next saturday. Maybe I will share it here too.

Put a Linux in your life

Last monday, after the year's end/new year torment finished, I went to visit a friend. For paying the due congratulations and such, but mostly to see if I could put my hands on latest Deus Ex game.

I had to remove the hard drive from my PC, but the game worth the risk and I was extra careful while carrying it. We copied and even tested the game from my drive, before I took it home. And then I found that there were no signs of the game in the hard disk. I even had the same 90Gb free.

Ok, if you copy 75 gigabytes to a drive, use those in some way, and they they dissapear, there is somethign really wrong with your disk or OS. I forced Windows to do a drive scan, just to find that I had 75 gigabytes lost, without any way to find where.

But, no panic. I had Linux Mint. After booting to Linux, I found the lost files, which were hidden for Windows. Of course, the game was useless, but at least I could recover 75 Gb without formatting the disk.

It is good to have a serious OS for emerge…