Skip to main content

Posts

Some ramblings about ScriptableObjects

First, I have finished the beta for my2D project. I'm now looking for serious beta testers, and hope I can have a more complete demo soon. Now, lets get into matter. Lately, I have found a couple of interesting materials about ScriptableObjects. I used one to implement the AI system, but then found this second: This guy uses ScriptableObjects like a swiss knife, for an amazing variety of tasks, some of them you wouldn't believe. I recommend you to watch the video. I was really interested in seeing how can they be used to replace Singleton based game manager class, but he didn't covered that topic (or I did not understood when he did). In my case, I plan to explore ScriptableObjects in the new iteration of my RPG project for AI (already have a working proof of concept) and for items/inventory system. Then I will see if there is some way I can used them to improve the dialog system. Seems that Unity is trying to address the lack of information about ScriptableObje...

Polishing the AI system

Well, the AI system is done. I figured out the way it works enough to be able to extend it a bit and implement a couple of different behaviors and situations. I'm working to polish the demo and then I will probably release the code on Github. It is very basic, and will include player vs 1, player vs group, player group vs group, and some other stuff like reaction to player, warnings, attack after warning and follow the player. Also, I will include some needed subsystem, like items and abilities. This is not in any way a 100% reliable tutorial, it is just me throwing code to see if it works. Expect more news on this later this week or next.

Pluggable AI via ScriptableObjects in Unity3d

I mentioned before that I was studying the pluggable AI tutorials, and still am. Can't say I fully get the idea, but yesterday I managed to assemble a little test, modify the original code, and improve it. I strongly recommend that you watch this conference (and the tutorials): The tutorial uses an StateManager class which deals with updating the states (states are ScriptableObjects, which lacks the Update() method) and also serves as a repository to keep information. ScriptableObjects should not keep entity related info, as all the entities would be sharing the same object and thus, that would be a problem. Any data needed in states, decisions or actions should be provided by the state manager, so, each entity has one. An state has an action and a decision. Depending of the decision being true or false, it can transition to other two states. That's all... mostly. The main advantage is modularity. I can write specific states and actions for each NPC, but of course, th...

Divinity: Original Sin 2

Got this game a couple of days ago and have been playing like 10-11 hours. Not gonna make a full review here, because there are people who does much better and earlier than me, these are some ramblings about disperse topics. I don't have complains so far about the game. It is a really good RPG, and I would have done some things different, but thats all. As a writer, I tend to think the same about some books. For example, the first stage seems a bit long to me. I started in Classic mode, which is the second difficult level, and most fights are hard to win. As the game progresses, the only way I found to win was to outnumber the enemy. Then, I had to switch to Explorer mode, which is the easier level. Read here my opinions about how the first quests of an RPG should be designed. In some cases, the information about the quests is not clear enough: I had to risk crossing a fortress in stealth mode because I had no idea about what other path there were. Not a big problem, this gam...

Pluggable AI

This weekend I spent some time revisiting the Unity Pluggable AI videotutorials , which illustrates the use of ScriptableObjects to build an AI system. This work is based on a conference by one Obsidian developer in some GDC (can't remember if was this year or the previous one). My opinions on ScriptableObjects are still... vague, to say something. I'm trying to define if they are an essential tool or something that can be replaced by XML/JSON and one day I think they are the best and the next I think that I have to throw it to the recycle bin and go back to use XML. The opinions I have read on forums doesn't help me to decide. But, how good is pluggable AI compared with my first approach to AI, based on coroutines? Well, it is much more modular, in first place. Not clearer, at least, not yet, because I'm still working to understand the basics. Maybe I can even get something good from this. Right now I am in the stage of improving the code and integrating it into...

The Witcher videogame history

Found this interesting documentary on YT, that every Witcher fan should see. They go back to the pre-CD Projekt attempt to make a Witcher videogame, how did it fail, and the evolution of The Witcher 1.