Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 01:51:08 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsVoxel Quest: RPG with emphasis on procedural storytelling
Pages: 1 [2] 3 4 ... 7
Print
Author Topic: Voxel Quest: RPG with emphasis on procedural storytelling  (Read 13282 times)
gavanw
Level 0
***



View Profile WWW
« Reply #20 on: March 10, 2015, 01:11:16 PM »

A few quick updates.  But first, some random warping effect I made:

(As noted, this effect is not screenspace - it is actually modifying the worldspace position of each voxel (you can see this when it reveals the sides of objects or behind objects).

preview:

video:
https://www.youtube.com/watch?v=3i49yNWWQy8&feature=youtu.be




Been working on the AI, wrote a small compiler for AI "scripts" - don't let this lead you to believe that the AI is "scripted" - i.e. hard coded.  The scripts only denote facts about the world, and allow you to pose queries about the state of the world.

The language I wrote is parsed from JSON (hence all the quotes) - and basically involved series of nested arrays, strings, and numbers.  It is similar to Prolog, but a subset of Prolog, much faster and more memory efficient (everything compiled to integer symbols).  Additionally, it will contain many things that are not in Prolog, which are designed to give it greater reasoning power (namely score maximization similar to A*).  On top of that, it is much more compact than prolog - currently weighs in at under 1000 lines of code, less if you take out whitespace and comments.

So what is the point of it? It allows the AI to make deductions. Here I have stated the rules that define what makes one person jealous of another person (if X loves Z, and Z loves Y, X is jealous of Y).  Additionally I define who loves who (Bob loves Sue, and Sue loves Steve).  I then ask the system who is jealous of who? i.e. fill in these variables for me: pJealous(vX,vY,vZ).  This system is able to deduce that Bob is jealous of Steve (as you can see by the trace output, it is not as simple as randomly plugging in variable values).  You can recursively nest logic like this an make multi-level deductions and proofs.  Basically, it allows the AI to reason about the state of the world and prove certain theories true or untrue.

The larger, more generic goal behind this is to make a "living, breathing world" - as the vague, commonly used expression goes. The goal is to make characters that don't just sit around but can logically reason about their environment, your actions, and the actions of other NPCs, and perform logically based on these circumstances.  Anyhow, I am producing a bigger update soon but I thought I would give a peek for now.



Logged

tjpalmer
Level 1
*



View Profile
« Reply #21 on: March 10, 2015, 05:42:08 PM »

Yeah, I guess I'm learning better what people can do with voxels. Cleverness on the deduction engine, too, but a large knowledge base probably takes a lot of work to set up, I imagine.
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #22 on: March 10, 2015, 07:28:11 PM »

Quote
...but a large knowledge base probably takes a lot of work to set up, I imagine

Yes - although it is somewhat linear in nature.  For example, I can specify that a sword has some properties (it can slash, stab, etc), and then apply these as basically a template (via deduction) - isSword(rapier), isSword(broadsword), etc.

Compare this with something like a naive behavior tree in which you must describe actions between every possible (relevant) state with a given situation, and the permutations multiply exponentially.
Logged

tjpalmer
Level 1
*



View Profile
« Reply #23 on: March 11, 2015, 02:40:59 AM »

Good point. Thanks for compare and contrast.
Logged

marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #24 on: March 11, 2015, 03:14:32 AM »

really like that warping effect, maybe it could be used for teleportation.

the AI approach is also very interesting. logical npc's would surely be nice to have, the question is how can you use it to make the game more fun. I can imagine that it could get very complex very fast. how large are you planning the world to get?
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #25 on: March 11, 2015, 03:22:05 AM »

really like that warping effect, maybe it could be used for teleportation.

the AI approach is also very interesting. logical npc's would surely be nice to have, the question is how can you use it to make the game more fun. I can imagine that it could get very complex very fast. how large are you planning the world to get?

Thanks! It indeed will get complex fast, and I am still uncertain what effect this might have on the "fun" aspect of the game. Nonetheless, people have been asking for this type of depth in RPGs for a long time, and I think someone still must successfully solve this problem before we can determine whether or not it is worthwhile to implement in games (that person may very well not be me, but I will definitely do my best and am off to a good start).

So, that said, how could it be fun? Well, imagine a world with real NPC reactions.  Imagine being able to simulate a dynamic plot with the complexity of something like Game of Thrones, where nothing is predefined but rather is generated as a result of circumstances.  Your enemies plot against you, your allies fight for your cause, and there are far more complex interactions than kill or be killed.

To clarfiy, I am trying to do these things at the most crude level - not interpreting english sentences or anything complex like that - just adding facts to a knowledge base and responding to them appropriately.
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #26 on: March 11, 2015, 04:30:36 AM »

Added in some animated NPCs and monsters (placeholder).  See video on twitter for extra lolz:
https://twitter.com/gavanw/status/575631985114095616


Logged

JobLeonard
Level 10
*****



View Profile
« Reply #27 on: March 11, 2015, 05:22:30 AM »

Because of the semitransparent blocks surrounding the voxel sprites, this kind of reminds me of the ring menus used in the Seiken Densetsu series (a.k.a. the ... of Mana games)

Might not be a bad in-game menu option!
Logged
RujiK
Level 2
**



View Profile
« Reply #28 on: March 11, 2015, 05:23:04 AM »

I gotta ask, how much space does a save file take up? With a voxel as small and detailed as what you have, it seems like a game sized world would be in the terabytes.

The game is so ambitious I'm a little skeptical it will ever be finished, but I sure hope you do finish it because it sounds incredible!
Logged

marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #29 on: March 11, 2015, 05:38:08 AM »

So, that said, how could it be fun? Well, imagine a world with real NPC reactions.  Imagine being able to simulate a dynamic plot with the complexity of something like Game of Thrones, where nothing is predefined but rather is generated as a result of circumstances.  Your enemies plot against you, your allies fight for your cause, and there are far more complex interactions than kill or be killed.
It sounds fantastic, I just don't believe it could be achieved by logic based on a current state. You would need a way to anticipate how other npc will react to a decision in the least, to allow scheming or other complex behaviour. just to get a kind of real feeling to it, you would have to have local actions only affect local npc's. they would then have to spread the word, maybe even by newspaper or something like that. its certainly a worth-while experiment though!
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #30 on: March 11, 2015, 05:38:38 AM »

Because of the semitransparent blocks surrounding the voxel sprites, this kind of reminds me of the ring menus used in the Seiken Densetsu series (a.k.a. the ... of Mana games)

Might not be a bad in-game menu option!

Yep they were just for debug purposes but look interesting nonetheless Smiley
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #31 on: March 11, 2015, 05:48:11 AM »

I gotta ask, how much space does a save file take up? With a voxel as small and detailed as what you have, it seems like a game sized world would be in the terabytes.

The game is so ambitious I'm a little skeptical it will ever be finished, but I sure hope you do finish it because it sounds incredible!

Thanks! Takes very little space, since everything is procedurally generated with higher-level functions.  For example, if I subtract some terrain, it need only store the position of the mouse click and radius of the brush.  If I did a million operations, it would only be a few megabytes uncompressed.  A house consists of some pieces of geometry, from which the voxel generator creates more detailed 3D "textures" algorithmically. See the "how does it work" post on voxelquest.com for more info.

I am constantly questioning myself, but so far progress has been relatively smooth for the past two years (five year estimated total timeline).  On the plus side I have enough funding and investment offers to last me indefinitely, on the downside I am doing all the work myself as a one man team so it takes a long time.
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #32 on: March 11, 2015, 05:52:24 AM »

It sounds fantastic, I just don't believe it could be achieved by logic based on a current state. You would need a way to anticipate how other npc will react to a decision in the least, to allow scheming or other complex behaviour. just to get a kind of real feeling to it, you would have to have local actions only affect local npc's. they would then have to spread the word, maybe even by newspaper or something like that. its certainly a worth-while experiment though!

Forgot if I mentioned it here, but it is not strictly logic programming - it includes planning and score maximization as well (basically I'm cobbling together a few tried and true AI methods that are not often used in games).  It is expensive but since this game is turn-based it is affordable (more over it is simulataneous turn based, so easy to multithread).  Prolog-like languages (i.e. logic programming languages) are fairly useless on their own for games.  Basically, I am allowing the computer to deduce things about the current state and potential consequences of state changes.  Also, Im keeping it simple as possible at first.  Every NPC will be omniscient to begin with (all feeding from one knowledge base).  In the future I may add selective knowledge, visibility, reconnaissance, etc. Smiley
Logged

MereMonkey
Level 2
**


Creator of Music


View Profile WWW
« Reply #33 on: March 11, 2015, 08:25:59 AM »

Purtty, can't wait to see more from you! WTF Hand Thumbs Up Right
Logged

My Site  -  My Twitter - *GASP* MY SPINACH PUFFS!
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #34 on: March 11, 2015, 11:40:25 AM »


Yawn.  Yawn

But the really exciting part (to me) is the procedural story telling. I am going above and beyond the typical hack/slash/grind formula of your modern RPG, which typically contains a prebaked story, and if you are lucky, a few extra branches as well.  Rather, I want to create a system that fosters stories as a result of NPC attributes, environmental circumstances, and dynamically determined NPC motivations. This is the so-called "holy grail" of game development, and has yet to be achieved (at least, it has not yet been done well). I may not succeed, but if I don't try who will?  Who, Me?

I am using a couple tried-and-true AI techniques to achieve this, which include pathfinding, score maximization, propositional logic, backward chaining, and a few other tricks.  As I have stated many times elsewhere, I am not striving to build a perfect system or an AI capable of parsing and understanding English, but rather a fairly crude system that focuses on dynamic/emergent behavior vs pre-defined behavior trees or similar mechanisms.

This has already been attempt, what are doing to avoid falling into the same trap where the world feel random because the player don't have enough information (see versu, radiant story pre dumb down or storybrick), there is no build in procedural information flows.
Storybricks






https://www.youtube.com/watch?v=vBglgiadAIc

they wents bankrupts BTW

Versu
https://emshort.wordpress.com/2013/02/14/introducing-versu/
https://emshort.wordpress.com/2013/02/26/versu-conversation-implementation/
https://emshort.wordpress.com/2013/02/22/versu-content-structure/
https://emshort.wordpress.com/2013/03/11/versu-and-jane-austen/
https://emshort.wordpress.com/2014/11/16/icids-the-future-of-interactive-storytelling-plus-some-versu-thoughts/
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #35 on: March 11, 2015, 02:17:38 PM »


This has already been attempt, what are doing to avoid falling into the same trap where the world feel random because the player don't have enough information (see versu, radiant story pre dumb down or storybrick), there is no build in procedural information flows.
Storybricks






https://www.youtube.com/watch?v=vBglgiadAIc

they wents bankrupts BTW

Versu
https://emshort.wordpress.com/2013/02/14/introducing-versu/
https://emshort.wordpress.com/2013/02/26/versu-conversation-implementation/
https://emshort.wordpress.com/2013/02/22/versu-content-structure/
https://emshort.wordpress.com/2013/03/11/versu-and-jane-austen/
https://emshort.wordpress.com/2014/11/16/icids-the-future-of-interactive-storytelling-plus-some-versu-thoughts/


Yes, I'm aware of past attempts, they are doing something different from me - not to say that I am not fallible, but that I think this is a solvable problem and someone will solve it, if not me.

I don't buy the "feeling random" argument - I've heard it many times.  Bad AI feels random because it more or less is (not accurate response to circumstances).  Good AI behaves logically.  I am also making the logic transparent to users (so they can see why the AI deduced some given decision).  Look at real life - things make sense because people behave logically.  It does not feel random.  There is no reason good AI should feel random.

As usual, past failure does not imply future failure.  In fact, with almost any breakthrough, it is preceded by thousands of failures. Smiley
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #36 on: March 11, 2015, 07:31:28 PM »

Well the reason why they feel random is documented, it's when the logical degree of separation of cause and consequence are too long and happen outside of player's perception. It's best explain by the chaos theory, flapping of a butterfly on one side of earth cause storm on the other side (the expression is not exactly true, it's more like contributed to the storm). It's a fact that is combated everytime people make games, so we have litterature and mesurement, it's not opinion by that point.

What I was trying to point at is the management of information flows, reality does not feel random because we have some idea of the system (for example weather) and also we have way more information channels (weather broadcast). We have experience of social setting with their implicit code to infer a lot unconsciously, we also have ritual and belief to fall back when we are clueless. In game we can never be sure and we have way less information channel and no ritual has been established. For example Halo series is known for smart character, the designer has told is that because they created vocal quip around behavior so the player know what's happening even though he doesn't see a character (also action is very focus on a scene, no consequence outside player's agency as the game is linear and discrete).

How do you solve that part

The example I provided was also good example of actual success Wink not failure (they frame change around the player's perception and avoid the simulation trap)
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #37 on: March 11, 2015, 07:47:04 PM »

Well the reason why they feel random is documented, it's when the logical degree of separation of cause and consequence are too long and happen outside of player's perception. It's best explain by the chaos theory, flapping of a butterfly on one side of earth cause storm on the other side (the expression is not exactly true, it's more like contributed to the storm). It's a fact that is combated everytime people make games, so we have litterature and mesurement, it's not opinion by that point.

What I was trying to point at is the management of information flows, reality does not feel random because we have some idea of the system (for example weather) and also we have way more information channels (weather broadcast). We have experience of social setting with their implicit code to infer a lot unconsciously, we also have ritual and belief to fall back when we are clueless. In game we can never be sure and we have way less information channel and no ritual has been established. For example Halo series is known for smart character, the designer has told is that because they created vocal quip around behavior so the player know what's happening even though he doesn't see a character (also action is very focus on a scene, no consequence outside player's agency as the game is linear and discrete).

How do you solve that part

The example I provided was also good example of actual success Wink not failure (they frame change around the player's perception and avoid the simulation trap)

All good points, you've clearly thought about this a bit Smiley

As I hinted at, I am making the whole deduction process transparent to the user.  They can drill down into any character motive, and all feed from the same knowledge base (no one has hidden knowledge, everyone is omniscient).  If I can get that working, I will attempt a more realistic model.  They can do this by actually examining a given character, looking at their motives, and how they arrived at those motives.  This should make it fairly obvious as to why they are doing a given action (even if it is a nonsensical deduction, as I suspect will happen often early on).

Even out of context, actions should ultimately make sense.  If they are completely nonsensical, the program has failed.

I'd argue that you actually don't need social clues to tap into motives.
In fact, humans are very good at hiding their emotions and motives.

This is what makes show-don't-tell storytelling good.  If you write a story where a character does too much exposition and says something like "Bob, I am going to get revenge on you because you wronged me in the past" it is bad writing.  What makes stories interesting is constantly trying to figure out motives and potential actions.

Ultimately, I think that both real life and traditional story telling mechanisms can be broken down mathematically - I firmly believe this or else I would not even be trying to do what I am.  Does not mean I am right here, this is just my theory.

I think that if you take a subset of real life logic, you should be able to simulate it.  Once players familiarize themselves with the rules of the world, things should make sense, or at least this is my hope.  We will soon see if any of this holds up Smiley

Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #38 on: March 11, 2015, 08:37:04 PM »

On the social clues, that was one example, the main idea was "information flows" is critical to the player (can be anything else, for example a bard telling story about event that happen outside player's event horizon, bird flying as you get close to an ambush, etc). On the actual argument I would say there is a whole mind game of guessing, but that's a whole new discussion.

I believe exactly like you, specifically my brand is structural formalism, aka I'm look for syntax, grammar and broke down element in function. For example basic function are hero, support and villain, I extend on that, When I use the bard as an exemple, it's a function of "information and direction" but also I constrain the world into "situation" or "stake" where the system as literally the equivalent of the dreaded hand of the author, you know when something should happen but its delayed for no reason but build suspense and happening at the worst moment possible lol. It's less about simulating the world than simulating logic of a story. I work on this when I was in the industry once.

BTW the reason I drop these link is that if you are stuck, you have some reference that are fairly close to what you want to do, have been proven, so you can perfect on your own system, if you get stuck. The goal is to encourage you as people give up this kind of work very often when unforeseen obstacle happen.

However I hope you the best!
Logged

gavanw
Level 0
***



View Profile WWW
« Reply #39 on: March 12, 2015, 01:35:56 AM »

New update on voxelquest.com.

Full update here:
http://www.voxelquest.com/news/update-03-11-2015

Video here:


Logged

Pages: 1 [2] 3 4 ... 7
Print
Jump to:  

Theme orange-lt created by panic