Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411279 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 04:47:10 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Procedural NPC with local generation
Pages: [1]
Print
Author Topic: Procedural NPC with local generation  (Read 1389 times)
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« on: December 11, 2014, 08:31:42 PM »

I'm looking for a procedural way to fake dynamics NPC with local procedurality, complete with travel, genealogy, etc.

It's a thought experiment at that point, maybe I'll find some use in the future, current project don't allow it Sad

Ie Local mean if you evaluate a tile for generation you wouldn't need to look neighbor, or past state, to find the correct state, just solving with (x,y,z,t) with the global parameters.

For example let's look at how to do it to geography first. Let say you have a planet and it had x number of civilization randomly place on its surface. For each tiles you can solve its current event by computing the distance of the tiles to civilization weighted by time, so if the weight is below a certain threshold the tile is wild and have no civilization influences. By computing all the weights and using the filter and parameter of each civilization you can determine the exact events on a tile at moment t.

For example, let's you have a tile under influence from civilization A and condition are solved into a fortified town, Civilization B is war like and its influence grew on that tile, the formula solve it by creating an increasing siege to full war over time. Another example is a tile is wild, a Civilization influence grew on that tile, so you see explorer spawning on the tile then settlers, etc ... over time. It had the benefit that you have not only the illusion of dynamism but also time travel and dimension hopping come for free. The main concept was to convert cause relation into correlation.

But how that would translate to dynamic npc that travel, meet peoples, have adventures with them, without any need to bookkeeping?

The trick is to find a function from which we can infer those things. The difficulty is that generation is tile local and character, through travelling, are not, and also having relationship make it supposedly non local. So the function must take as input a tile in a certain time and infer a character that is non local :/ kind of defeat the point ? Well that's what I'm investigating, what if we ties character to a procedural list generated at a bigger hierarchical level and use time to index that least based on character and tile parameter? Another idea is not index character but parameters and those parameter index the character (ie instead of character owning parameter you have parameters owning characters) which make it easier to link tile state to character.

Another trick would be to separate time into frequencies, with lower frequencies state informing higher frequencies. Also character are kind of predictable, they need to sleep, eat and have some sort of occupations, all of that daily, they also age predictably in a fixed sequence, which give pattern for procedural solving. As environment impact character we can also infer his behavior and presence in a tile, and relation can be deduce from "collision" of character generation in the same tile (almost because we should be able to infer relationship without solving the tile, so relation is the hardest to solve with local procedurality).

I wonder if any people have idea to ameliorate the concept, the great thing with procedural generation is to see it as an implicit storage and virtual memory access.





I post this here because it might be more fit to technical mind than design people. It is also a great thought challenge, I have a feeling there is a solution, it's like it's on the tip of my tongue but I can't "see it" yet! It is mostly not trying to generate the character by itself but as a result of parameter (aka you don't fill an empty structure that describe the character, rather the character is the result of intersecting parameters).

The image that keep popping in my mind is two intersecting parallel helix with different rotation direction and chirality, with a glowing point at each intersection being a character, the helix is deformed by noise along parameter space to determine the final constitution of the character. THAT'S WEIRD I KNOW, but some people will get it ... Even though this does not account for genealogies which is the hard stuff I'm not sure is possible. But basically you take a spatial tile, look at his parameter, confront it to another algorythm who map it's property to a generated social space and define the character, something like that.

edit:
additional thought to the seventh pargraph

Quote

"Almost" because we should be able to infer relationship without solving the tile, so relation is the hardest to solve with local procedurality as they rely on past events,any formula must have this past implicitly like intersections of function. Maybe we should find formulas that tend to aggregate into similar (conceptual) space for some time. Or maybe those intersection is precisely what need to be generated and from which we derive character.
« Last Edit: December 11, 2014, 08:57:40 PM by Gimym JIMBERT » Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #1 on: December 13, 2014, 08:13:02 PM »

What you have to realize is that while it may be possible to do this deterministically, can you do it reasonably analytically?  I don't think lazy evaluation is the right way to deal with NPCs.  It may work for terrain and even dungeon generation to a certain extent but anything with a relatively complex set of relationships to other entities is going to be extremely difficult to simulate in anything other than "real time".

I would focus more on trimming the "off-screen" simulation down.  What can be generated trivially in a lazy manner?  What types of information is the player realistically going to expect to be persistent?  What information can be flyweighted?
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #2 on: December 13, 2014, 09:48:24 PM »

I think I have made some progress since last time, in fact I think teh key is that npc is the end result of parameters not the start, aka you don't start withe npc structure and fill its members, you start with a higher order structure, such as family, which give implicit relation to the generated npc as a member of family. That's how galaxy generation works, planet belong to solar system which belong to galaxy. However explaining this to you made me realize that the higher order structure I needed is a social circle! Thanks orbiting planets!

For travel it make sense now, if you generate the world such as you have planet >> civilisation >> population >> ... >> npc they can't travel between civilization because its the highest order they inherit from as member of population, however if population is higher than civilisation we can index civilisation as a paramater than can change through time, simulating traveling!

Also analytical is harder to maintain, you have to track a lot of data, even lazily. With procedural generation the procedural space act as an infinite memory to query for none of the cost, and it's a memory that store index time too so none of the computation needed!

« Last Edit: December 13, 2014, 09:54:23 PM by Gimym JIMBERT » Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic