Pokazywanie postów oznaczonych etykietą design. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą design. Pokaż wszystkie posty

piątek, 11 grudnia 2015

Hard testing.

Ok, I resurrected my PC! Then I improved my Astah plugin to export even more data from diagrams. Now I can control dialogues, passages (doors closed/open) and initial location of NPC. I also finished corrections of chapter one dialogues. After exporting it to JSON it takes me 143kB of definitions. A little to much to handle it manually. So I decided to write Java application which can load all this and work as a NPC speak engine. So now you can check how it will behave in this same way as it would in game. This step allowed me to verify exported data structures. And as usual I discovered several bugs. Sometimes I was exporting nulls, other times conditions wasn't good. I also discovered few things which need to be covered in Unreal. Now it's time to send this to my beloved testers, and start to convert it into unreal. 
When I polish my tools a little more I'll upload sources to it. Maybe someone finds it useful.

czwartek, 26 listopada 2015

RPG? It's easy we will do something like Baldur Gates! (but better)

Well, I heard a lot of sentences like title of this post. Probably in every game forum, some young programmers are searching for team members to finish some epic RPG project. Well before you start this, maybe you will be interested in scale of dialogues with NPC. Below one picture which is tree of dialogue with one NPC in firstof episode... About 3.5 hour of continuous work. So only 14 other NPC left to finish first chapter...

BTW.
If you are interested in polish history, and some materials which help me while creating my game here is link and another one.

piątek, 20 listopada 2015

Why I hear only one voice?

Once upon a time developer created some engine to do dialogues. He was happy and started to create data to this engine. But suddenly he realised that there is something wrong in his idea... Well we have this situation now. In the first concept I believed dialogue Player <-> NPC is enough. In most cases yes, and it should be ok for my project. But... where is the challenge?! Yesterday while creating some game content I realised that I'm unable to create situation when player speak with two other NPC at this same time. More over if we have room, and in this room there are two Persons and player want to start chat with both of them by selecting any NPC... Well, this situation is not covered by my engine :( So I need to upgrade it. I've few ideas but need to check which one is better. So expect in few days some more boring stuff about how to improve my last ideas. In meantime I would like to finish content for first chapter of my game.

wtorek, 17 listopada 2015

Let them speak!

This is actually old subject, but I spent some time to do it so, maybe somebody finds this useful. Like always if you do games there are several ways to achieve your goal. For example making tree of dialogues can be done manually (greetings Zuber ;p) so every possible path of speech has it own condition. But this approach takes massive amount of work. It's even worse if you decide to change some talks. So I didn't like it. Besides I'm lazy old fat guy who don't like to write too much. So I thought about some engine which allows me to do the hard work. After digging internet I found nothing useful or free. Damn! So I analysed what I need in game:

  • dialogues in form of graph.
  • some answers (choices) for player are available if some condition is meet
    • If you done something in past
    • If you have some spells
    • If your stats are at least at some level 
  • Some answers will open/close passages
  • Some answers will change state of your player (for example you might be liked more or less by other NPC)
Ok how to achieve this? Since there is no Hashmap/fancy structures in UDK blueprint I designed something which work for linear container like list. It's not super efficient but it doesn't matter, since about of data is so small that algorithm might be very non optimal. SO my structure describing dialogue is as follow:
  • NPCName: String - engine friendly name used when you press some NPC to discover dialogues for him
  • SequenceIndex: int - used to create tree of dialogues. If some option is visible on screen (NPC said something) then I use this field to discover options for player. It's connected with next field...
  • moveToSequenceIndex: int - Informs which dialogues are available in next step. This points to SequenceIndex.
  • Text: String - actual text to be shown on screen
  • NPCDialog: bool - if true this is something what NPC will say, false otherwise.
  • condition: string[] - boolean condition in human readable form which need to be meet to have this dialogue available.
  • execSequence:string[] - encoded sequence of things which will happen if this dialogue is selected.
I decided to use list of pairs Key-Value (String-int) to store state of player. So my player have list named state and in this list can be stored pairs which holds current state of game. What this give me? Well I can encode execSequence with just 4 operations. For simplicity of blueprints I used prefixes to encode operation. And we have:
  • >doorName - it's tell engine to open some passage/door for example ">DoorToKitchen"
  • !DoorName - it's tell engine to close some passage/door for example "!DoorToKitchen"
  • +variable - adds one to Key-Value with name 'variable'. If pair with given key doesn't exists then it's created, for example "+goldenKey"
  • -variable -  subtracts one from Key-Value with name 'variable'. If pair with given key doesn't exists then it's created, for example "-goldenKey"
Similar easy approach was used for condition array. This is what I plan to do (since I don't have this part done yet). 
  • each string will start with & or | operator which tells how to apply those condition to previous value.
  • then will be variable from list of Key-Value, if variable doesn't exists then this part of condition is false.
  • then operator in form of >, <, <=, >=, =
  • then value
example of condition: 
[0] |key>1
[1] &marryLikeMe > 10
which mean I need key and mary need to like me for at least 10 points. Ok. This is all for today, hope somebody understands me :)

środa, 11 listopada 2015

Help of a Wizard - concept.

Ok so I want to create game. Good. What's now? I needed to answer first question:

Am I expecting to get money with this?

Well, it will be nice, but be honest with yourself. Do you really want to put all needed effort to finish it? Do you have marketing strategy, do you have funds for it? Do you really want to search investors?
Well... not really, since I'm bored programmer I don't want to do all those things. I want to create a game, and don't really care about making cash on it. If I earn something, great! I can buy more beer. So if you answered this question this gives you some capabilities. For example I don't need to analyse market, other competitors, do research what sells and what is expected to be in game. Great! I don't care :) So I can do game exactly what I want, without worrying that majority of players will be not interested. Then we move to next question:

What genre of game? 

What a stupid question: RPG of course! Blah... really? No, lets be realistic. I created several years ago RPG manual and we played few months with friends. Believe me this is not so easy as it looks. There is a lot of complexity, a lot of rules which need to be met, and even more playing and testing and balancing. This is something for experienced team, not a single looser. So if I strip all character development, and all fighting system... and maybe items (but I'm not quite sure about this) whats left? Hmmm... point & click? Good enough :)
So I know that I want to create some very simple game, because I know shit about usage of UDK, and I want to create something what I'm capable rather than put some impossible to met vision and burnout after few weeks. And I think point & click is great for this.
In the beginning I choose to do it as a standard top view 2D game. But after several attempts to do it in UDK I changed my mind. So I go for full 3d. And there are few reasons behind this decision:
  • UDK is crap for 2D, a lot of problems with very simple things. Like path finding. Sprites also doesn't work to well.
  • It consumes massive amount of time to search tutorials which shows you how to do something in 2D.
  • Why to use cannon like UDK to create so simple 2D game? It's pointless there is plenty of other frameworks/editors which are created purely for those games. And I didn't want to use them, because it lock my learning skill. I go for some dedicated solution rather then learning universal engine.
  • I didn't want to write code at all. I'm totally not interested in programming at evenings after full day of doing this in work. So UDK and this blueprints system was perfect solution for me.

After few more beers I created briefly concept of my game:
  • Point & click in 3d. With camera pointing main character. You can rotate & zoom in/out camera but this it.
  • Small location. Since I've nobody who will help me, then it's no pointing to do large game world. I searched for some old buildings plans. And finally chose a quite large residence (2 floors) for some Polish feudal lord.
  • Main plot should be progressing through talks with different persons in locations. That's why I decided to have ~15 NPC's. A lot, but not all need to be present all the time.
  • Since this is game for adults, there need to by naked womans! I liked idea of Achievement cards from Whicher 1 with naked ladies. I decided to make this as a main goal for my game.
  • I like fantasy worlds with magic... so main character will be a wizard. You can choose several spells which give you some more options in dialogs & actions. I based this on idea from very old game 'Vampires the masquerade".


So lets summary my concept:
You are wizard invited by some rich guy, which want to impress few guest which will came to his villa. Your role is to entertain by conversations and maybe by some magic tricks, guests and home owner. Since there are women at residence, why not to undress them? Or maybe even more... That's it. Let's the work begin.