VizionEck

Gaming => Gaming Community => Topic started by: Legend on Apr 20, 2019, 09:02 PM

Title: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 20, 2019, 09:02 PM
This is a new game concept I'm evaluating. Don't know when or if it'll be developed.


The medieval rpg is set in a fully simulated world. Every npc actively lives their life throughout all minutes of the day. Their jobs are real and their personality is based off their history. Every single item in the world can be tracked back to raw materials harvested from the earth. Kingdoms die and new ones take their place.

With this fully procedural world as a premise, actions have consequences.

Say a player goes on a killing spree in a small town. NPCs do not respawn and the town is abandoned forever. A young survivor might seek vengeance and train with a sword. In this fully dynamic world, this could start the survivor down a path that ends with them starting a rebellion against the corrupt king that let this happen.

Turn based combat and 2D graphics will keep this realistic to develop. Kinda more in line with a grand strategy game.


I think it should have an mmo style world where everyone can play together, and then people can generate their own private worlds to just play alone or with friends.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 22, 2019, 07:27 PM
Could be cool if each playthrough gave you 10 random citizens to choose from at the start. That way your character can be a real person in the world with pre-existing social connections. Alternatively a custom player could be made as an outsider that just shows up within the game world one day.

A cool mode would be permadeath where you continue playing as your child.

A cool option would be end game events that change the dynamics. Zombies invade from the north, sea levels rise, mechanical automatons discovered underground, etc. Kinda like the end game events in Stellaris.


Anyway, on to the nitty gritty details. How would this self functioning empire really be implemented?


NPC AI will be handled with "roles." These are basically positions within society that define how an NPC operates. Farmer, smuggler, king, thief, guard, assassin, merchant, etc. Some NPCs might have multiple roles at a time and roles can dynamically change as needed. Each role has its own unique AI code and parameters, instead of it being a one size fits all situations.

Communication between NPCs/players will be mostly handled by a negotiation screen. The 1st person selects things from a list that they want to happen, and then the 1st person selects reasons from a list for why they should happen. For example a simple exchange could be buying a pie for 10 gold while a more advanced exchange could be threatening to burn down a person's house if they don't stay silent. This "desires & reasons" approach uses the same design philosophy as the previously mentioned "roles." Each desire and each reason is individually coded and only cares about itself.

Crafting is the cornerstone of the economy. "Wells" are places in the game world that produce raw materials from nothing. Everything else is crafted and produced. Oceans, lakes, rivers, forests, mineral deposits, snow, and such are examples of wells. Wells can be created, modified, and destroyed depending on actions within the world. The only defining trait of a well is that its resources are calculated as an approximation instead of as individual entities. The world map has wells defined with a heat map of sorts for each resource.
(https://i.imgur.com/3n0ion4.jpg)

Extracting from wells is achieved with traditional crafting. When in the area, the well is inherently available as an input ingredient. These maps are also used when traveling and when new locations are founded (more on this later).



Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Apr 22, 2019, 08:11 PM
I feel like a lot of this stuff is what Todd Howard has been trying to do with Elder Scrolls.  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 22, 2019, 09:24 PM
I feel like a lot of this stuff is what Todd Howard has been trying to do with Elder Scrolls.  
Well I certainly won't have the production value or graphics quality of those games!

A difference (at least in my mind) is that this game has less structure and is designed to be played many times. Instead of it being Skyrim with a more dynamic background, it's Civilization/grand strategy in first-person. At the moment I'm not sure if the game should have quests or story content.


Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 23, 2019, 01:51 AM
I've started doing a little bit of coding just to block everything out.

The world logic runs on its own thread and is essentially a second application. All communication between the world and the player is abstracted and can be sent over a network if needed (so multiple people could play on the same game world).
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 23, 2019, 05:24 PM
Kinda making a nature survival sim lol. Everything alive needs food and water to stay alive. That way you could wage war by burning farms or damning rivers.

Not sure how I want to handle this though. I need a function that finds all objects that an animal is aware of. I guess I should just set it up to do it based on just visuals, and then again on just smell, and so on as needed.


I'm also thinking of using the inventory system for "everything." A backpack can hold a few pots just like a town can hold a few houses. Sorting things like that would make it easy to know stuff too.

If you are in a city, then you know of everything top level (unless it is hidden or small). There is no movement within a city or layout to a city. If a building is an open air cart, then you would also know what is in it.

The person is always either inside a specific building or outside without a specific location. Larger cities could have districts to split them up.


So either an item is inside nothing and has an xy position on the world map, or it is packed inside a parent object with zero information about the location inside.

(Some objects could have multiple places to store items, such as a human having a left hand and a right hand)


Inventory is mostly like the forum rpg. Containers have a max xyz per item and a total limit on weight. I think the amount of items should be limited in some way too. A hand can't hold 500 gold pieces for example. Putting gold in a bag should be encouraged.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 23, 2019, 11:18 PM
Ignoring the background sim, what should the game look like?

I'm thinking a 3d board game style overworld. A flat classic style map with 3D pieces for points of interest: castle, city, town, and outpost.

Icons on the map would show you and nearby people. Entering a point of interest could zoom in on the 3D icon and that would be it.

I guess it actually all should be a common hud.

Traveling out in the overworld and traveling within a poi are mostly the same. So the screens I need are:

Out and about. Show all nearby objects and show your current location.

Conversations. Have the fancy desire/reason screen.

Combat. All the combat specific screens.

Party management. Move items and restructure things.

They could be mixed around though. Conversations could happen mid combat (such as telling the enemy you yield or saying you will pay them to stop) and moving items could be whenever.


I think I'd have a generic "things that are relevant" menu that can dynamically reorganize and what not. So this menu would be the universal menu for showing every item/thing the player knows about.

This menu would include quick stats such as health, hunger, thirst, etc. for things that make sense. This way it is easy to see your whole party and what state everyone is in.

Clicking on a sentient object would let you open the dialogue screen. This window would show everything needed to construct a statement...

this is kinda just word soup.

I'm not sure how to structure these screens. Let me think about it some more.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 24, 2019, 06:35 AM
I'm reworking the conversation system to make it more accessible and simultaneously deeper.

It is now a more traditional conversation where the NPC gives you a text response and you have a few text options to respond with.


Code: [Select]

NPC "Hello traveller"

"It's nice to see a friendly face"
"Show me your wares"
"Anything I can help you with?"
CUSTOM



I might quickly abandon this idea but along with a few default options, I'm going with full on freeform conversations where you can say whatever you would like!!!

It's not as crazy as it sounds. The game uses an internal language for all communication. This language is essentially a programing language with how it is set up. Only very specific words can be used and the structure is rigidly defined.

This internal language can be translated to English with some flavour text thrown in depending on the speaker and the situation. It cannot translate from English to this language.

The above conversation in the internal language could look like:


Code: [Select]

NPC "Greeting"

"Greeting"
"Ask wares"
"Ask help"
CUSTOM



It's a very simple internal language. From the game's point of view, it is very easy to understand what is being said and how things should react.

As the player, it allows the game to be quick and traditional when it's acceptable and slow and methodological when specific things are desired.

Instead of clicking on a response and directly saying/executing it, the player can click to edit the response first. For example.

Code: [Select]

NPC "Here is all I have to sell"

"Buy apple for 10 gold"
"Buy bread for 15 gold"
CUSTOM


Code: [Select]

NPC "Response wares"

"You give me apple and I give you 10 gold"
"You give me bread and I give you 15 gold"
CUSTOM


The response could be edited to "You give me apple and I give you 9 gold" if the player wants to haggle for example. Then all the calculations behind the scenes can determine if the NPC accepts.

By writing a custom response from scratch, the player could say "You give me your shoes or else I cut your legs off" and take the conversation in a completely different direction. Once the internal language is set, it can be parsed into a less wordy representation in English.


I'm not sure how exactly the internal language should be written, but I'd probably go with drag and drop blocks. Verb will have one or two slots for subjects and they can be joined with logical connectives. Essentially it is ((clause && clause) || clause) > clause which the AI can evaluate without a problem.


Because this system makes dialogue such a powerful tool, a lot of actions can be handled exclusively through dialogue. Talk to party members to give them instructions, talk to yourself to do things or initiate an auto pilot of sorts, leave notes around the game world, etc.



Heck if you thought custom dialogue was crazy, I'm even thinking of having all communications go through messengers. If a king is killed, everyone does not instantly know. Instead messenger birds would need to be sent out. On that note, I should also program it so that communication can work across species. Simple commands could work with animals but more complicated ones would not (unless the speaker is speaking the animals language).

This game is so bloody over the top and yet I think I'm going forward with it lol.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 24, 2019, 11:39 PM
Animals and humans have a few survival stats.

Hunger
Thirst
Sickness

Health
Energy

The top three are stats that can be directly managed while the bottom two can only be improved by improving the others. If an animal is very sick then their health will decrease over time until they die.

When eating something, the item has 3 values to affect the first three stats and a third value that can hurt the eater. For example a beer would slightly decrease hunger, greatly decrease thirst, and super slightly increase sickness. A sword however would increase sickness and directly hurt the eater (why would you eat a sword lol).

Hunger and thirst can not go below zero. Sickness can go below zero and speed up recovery.


Items can be seen, smelled, or heard. Animals have a good sense of smell and can notice a pie in your backpack before they notice you.

Memory is something I'm not sure about. Things should be able to remember what they have seen in the past but I don't know a good way to program that. Simple method would be snapshots of the world with old information but that would use way too much data.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 25, 2019, 01:08 AM
I think I've figured out a knowledge system.

A central database of facts exist. These could be written in the internal language to make it pretty straightforward. A creature/human has a list referencing all of the facts that they know. Outdated/wrong facts are dereferenced as new information comes in and older facts can be dereferenced as they are forgotten. Once a fact is known by no one, it can be deleted from the central database.


This system is incredibly powerful and allows facts to truly spread through the game world conversation by conversation. For example say a king dies. That fact goes into the database and then the people near the king can spread it out. One person will tell another person until the whole city knows. Messenger birds and people can be sent to pass the fact to other cities. Traders could also spread the fact. Like a virus, the fact would spread out until almost every person knows.

For simpler facts it is just as useful. If the player sends an NPC companion off on a quest to assassinate someone, then that fact is stored in their memory. The player does not know what the NPC is up to until they learn an updated fact. If the player has no facts mentioning the NPC, then the player doesn't remember the NPC existing.

There are two unsolved problems though. The first is that this does not cover opinions and feelings towards other objects. I still need to have another data system for keeping track of who every NPC likes and dislikes. The second is that this system doesn't support lying. I might not want to support lying since that could be frustrating as a player, but at the same time it does increase the world possibilities. I think initially I will treat everyone as 100% honest. I can change this later on during development.


EDT: I think I will just use this system for likes and dislikes too. A person will remember their actions with another player so I can look through that data to generate an opinion when needed. This is the best approach because then it can work for people that have never met. Say the player does a good dead for someone. A person in another town might hear of it and offer better prices once the player gets there.
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Apr 25, 2019, 01:10 AM
A lot of this is stuff that I've thought about too.  ::(
Someday.  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 25, 2019, 01:38 AM
A lot of this is stuff that I've thought about too.  ::(
Someday.  
It's weird finally doing something with the forum rpg. I'm a bit nervous that this will crash and burn once I've sunk more time into it, but I'm excited to see how it turns out.

I'm not planning to have any growth mechanic with plants or nature, so I'd love to see how different your game could be!  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 25, 2019, 07:40 AM
The core "obstruction" system is implemented and so far it seems like a good approach.

(https://i.imgur.com/UjqQER8.png)

This is a snippet of code for calculating the obstruction between two objects. "Obstruction" has 4 internal values for sight, sound, smell, and touch. It is essentially a distance system that works with the game's unconventional layout and factors in the properties of materials.

I added an "isFocusedOutside" variable. Without this the obstruction between two objects was symmetrical: if you couldn't see a human, they couldn't see you under normal circumstances.

Now a sentient object can be focused on looking outside of whatever structure they are in. This could be looking outside the window of a castle or peaking out of a crate. It slightly makes the person more visible while greatly increasing their visibility of the outside world. The drawback is that it significantly decreases their visibility of things inside. For example a guard could be along a city wall looking out and wouldn't notice a thief sneaking around behind them. There will also be a slight time penalty when changing focus since it relates to physically moving too.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 27, 2019, 04:10 PM
My AI system and my dialogue system have merged.

Since the dialogue system is so advanced and can give complex orders, every NPC just has a voice in their head looking out for them. A bear would just be a bear sitting there with no brain, but then an inner voice would say "eat when hungry." The bear from that point on will have this job and try to not starve.

This pushes the development focus from making AI to making complex verbs for the language. AI gets solved either way but this greatly increases what can be done with the language system.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 28, 2019, 02:56 AM
Since I'm progressing with the game, I now need a progression system.

It's kinda hard since on one hand I'd like the game to be simulation focused where progress isn't a stat. Your friendships and your property are your progress.

At the same time, I'd like to let players enjoy the game like an Elder Scrolls rpg. If you want to become better than the people around you then that should be possible.

I think I'll go with an optional mechanic. You can play as a normal person, or you can be "blessed by a god." Normally stats do not change. A strong man is born with those genes and a weak man is not. Natural selection gets people where they need.

If blessed by a god however, a person has a simple xp system. Every level up they get to boost a stat. Eventually they can be a walking tank that kills dragons with ease.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Apr 28, 2019, 06:16 PM
Here are the skills.

Durability
Brawn
Dexterity
Fortitude
Perception
Persuasion

Durability is tracked for everything while the rest of the skills are only tracked for alive things.

Brawn is physical strength. Invest in this to carry more and hit harder.

Dexterity is physical control. Invest in this to hit better, hit faster, and stay hidden.

Fortitude is endurance and will power. Invest in this to stop hunger, pain, and persuasion from getting in the way.

Perception is intelligence and awareness. Invest in this to notice more things, know more about those things, and avoid being manipulated.

Persuasion is charm and diplomacy. Invest in this to be liked by default and convince others to do what you ask.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 02, 2019, 04:52 PM





Humans vs bear. Who will win?

Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 05, 2019, 06:05 PM
Now I'm working on implementing wells and environments.

(http://i.imgur.com/DJN6F3H.jpg)


I'm sticking to the forum RPG mostly. Ocean, large rivers, lakes, deserts, mountains, and forests. These stats are needed both to restrict movement and modify movement. A ship for example will just never be able to go on land.



Tiles can be salt water, fresh water, or land. Land tiles can be flat, low mountains, or high mountains. Land tiles can be no vegetation, light vegetation, or forest. Temperature can be hot, mild, or cold.

Forests are unique however because they can change during a game. Overfishing wasn't a thing in medieval times but deforestation definitely was.

The "travel map" thus has salt water, fresh water, dead flat land, dead low mountains, dead high mountains, normal flat land, normal low mountains, normal high mountains, forest flat land, forest low mountains, and forest high mountains. Temperature uses a different lower resolution map since the details are less important.

(https://i.imgur.com/SFekhzB.png)

For now I'm using a 512*512 tiling. Temperature will be 128*128 tiling and only be used to influence environments (no survival elements related to being too hot/cold or having a dry environment increase thirst). Every tile uses one byte to describe the tile and a second byte to give the tile a formation id. This way a river can be treated like a single item instead of a strand of pixels. Lower res tilings are used to define regions and multiple formations. Outside of the background sim, this combination allows places to have cool procedural names.




Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 07, 2019, 01:02 AM
(https://i.imgur.com/YviJjmD.png)

Made a few changes.

512x512 map with just salt water, fresh water, flat land, mountains, and forest. These are the states that directly affect things and are really visible when playing.

Additional 128x128 float arrays are used for biomass, treemass, temperature, and humidity. It's actually really important to simulate overfishing and what not since otherwise sharks would have hundreds of babies and rule the world  :P
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 07, 2019, 08:50 PM
(https://pbs.twimg.com/media/D5_gCvKV4AAXmiV.png:large)
Brighter pixels mean more plant life. Everything is being blown to the north west.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 08, 2019, 11:19 PM





Videos of my biomass simulation with different settings. It's really cool watching life spread around. Also made me realise that my "migration" system had an unintended side effect. Life moves faster in water than on land which resulted in coasts being dead zones.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 11, 2019, 11:57 PM
(https://pbs.twimg.com/media/D6UaZyEVUAACgDi.png:large)

Procedural world generation. I wasted too much time trying to replicate real world physics (made a cool plate tectonics simulator though  :P ) only to realise this type of detail negatively hurts the rpg. Just like how real random numbers are hardly ever used in video games, real world simulation can often produce undesired results.

Instead I'm now going with a controlled system. This way I have parameters that can control the procedural generation and players will always have a decent world.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 12, 2019, 05:53 AM
(https://i.imgur.com/NOCkBBM.png)

More or less here is the finished result for the coasts. I am really surprised just how well this turned out considering my method was a shot in the dark. Using the same random numbers, here is the result if just one continent is used.

(https://i.imgur.com/WgCJl9K.png)

Then 2 continents.
(https://i.imgur.com/O9XZyBa.png)

Then 3.
(https://i.imgur.com/55bKKQ8.png)

Original 4.
(https://i.imgur.com/NOCkBBM.png)

Then 5.
(https://i.imgur.com/hBsi5tM.png)

Then 6.
(https://i.imgur.com/kxDIBhD.png)

Then 7.
(https://i.imgur.com/CZ77uJO.png)

Then 8.
(https://i.imgur.com/jrVREs1.png)

The shapes of each continent are completely altered as additional land masses affect the procedural generation, but you can still see that they kinda stick to the same locations (colors are random).

My approach is to place "seeds" that then expand and grow out into the world. Every seed leads to its own continent, although the seeds commonly end up impacting each other. To demonstrate what types of shapes this approach produces, here are worlds with a single seed/continent placed in the exact center. Nothing is changed except the random numbers used behind the scenes.

(https://i.imgur.com/p89ZKj4.png)

(https://i.imgur.com/Z0iWJ9o.png)

(https://i.imgur.com/Sj4GFMb.png)

(https://i.imgur.com/GVoHBns.png)

(https://i.imgur.com/zl7ECZm.png)

(https://i.imgur.com/X5docFf.png)

(https://i.imgur.com/SCIk9sE.png)

Here are more examples of worlds with multiple seeds/continents.
(https://i.imgur.com/fq07XIH.png)

(https://i.imgur.com/AKoMXTL.png)

(https://i.imgur.com/Un5audS.png)

(https://i.imgur.com/sJQMSbe.png)

(https://i.imgur.com/sCuM00D.png)

(https://i.imgur.com/3gD1iZ9.png)

All of these samples were random and show both the good and bad of this approach. The method works by randomly picking ~100 locations to be sampling points. It then goes through every continent and picks a random point on that continent to expand from. The closest sampling point is then transitioned to that continent if it is close enough. This is repeated hundreds of times. Then ~10,000 new locations are randomly sampled and the process repeats. This time the points need to be even closer to be transitioned to the continent. This whole thing is repeated over and over and over again with exponentially more sampling points until the image has enough detail. Here are the results at each sampling stage.

(https://i.imgur.com/jfUYyRj.png)

(https://i.imgur.com/CKqkTv5.png)

(https://i.imgur.com/YNFlTze.png)

(https://i.imgur.com/LChnvFw.png)

(https://i.imgur.com/8TzxSSC.png)

(https://i.imgur.com/OLO7zlZ.png)

(https://i.imgur.com/NOCkBBM.png)


The big negative is all the holes/lakes inside of land masses. I can improve this by changing how I convert the vector points to an image but I think I'll mostly rely on just using a "paint bucket" image effect to mostly make the land solid. The coastlines are the parts that I'm really interested in. I also plan to do additional processing to smooth some of the coasts and add mountains, major rivers, and island chains. The images above are a billion times better than perlin noise but there is still a lot I can do to improve them. Here is a photoshopped example of the land with most of the lakes removed.

(https://i.imgur.com/gxVnDc5.png)
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 13, 2019, 06:16 AM
(https://i.imgur.com/d1rC0ib.png)

Mountains and rivers. Mountains look bad but are mostly fine since they just indicate "this pixel is mountainous."

Rivers look bad because they are bad. I need them to actually look like rivers.

EDT:

(https://i.imgur.com/jHInIsy.png)

Well it's kinda better...
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on May 13, 2019, 01:20 PM
*God grabs a ruler*
"These rivers should be perfectly straight!"
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 13, 2019, 08:47 PM
*God grabs a ruler*
"These rivers should be perfectly straight!"
I was generating the rivers by randomly placing dots and flowing them downhill using a basic heightmap. I improved the heightmap and tried adding random noise to create good river bends but it didn't work.


(https://i.imgur.com/sHizzBg.png)

New approach is to use this improved method but not draw the river as I'm tracing it to the sea. Instead I use this info to just get start points and end points.

I then use a 2D version of Cube Royale's lightning to fill in the pixels between the two end points.

I really love how the rivers generally flow into bays and sections of the sea that push inward. That's a cool effect caused by my simple heightmaps which I did not expect. The things I need to do now are improve the thickness of rivers (sometimes pixels are skipped even) and cut off rivers that cross each other.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 15, 2019, 04:36 PM
(https://i.imgur.com/mvyKlJP.png)

Wind generation. Basically a 1 to 1 simulation of how wind works on Earth. Air pressure and the coriolis effect are the driving elements.

(https://i.imgur.com/w2NQJzI.png)(https://i.imgur.com/syJxsL8.png)

Humidity/rainfall map. Uses wind generation to simulate 262 thousand gusts of wind. They pick up humidity over oceans, drop off humidity on land, and are affected by altitude, temperature, and speed.


I think I am going to throw this work away.


The humidity map looks really cool but it is too chaotic and uncontrollable. Essentially I'm having the same issues as my original plate tectonics approach. Instead of simulating the physical processes of Earth, I need to program the end results. The above map is mostly desert and just doesn't feel right.

(https://i.imgur.com/2GH5aoq.png)(https://i.imgur.com/0YjZggP.png)

This different map also shows some of the problems.

My new solution will probably be pixel based. Just do operations on the grid instead of doing them with a approximation based system. This will save a lot of time so I might recalculate climates for winter and summer. (or I'll fake it using interpolation, depends on if I want trees/forests to impact climate simulation).




On the gameplay side of things, I think I've figured out a kinda cool thing for multiplayer. The forum RPG worked great with traveling from city to city since we could just ignore it until we arrived automatically. This wouldn't work though in a non browser game. Players need to be able to play it actively instead of passively.

In singleplayer, the player is free to fast forward the world whenever they please. In multiplayer, every player needs to have the same game speed. It's impossible from a game perspective to let one player fast forward while others play at regular speed. Weird time bubbles would break the background simulation so that just really really isn't an option.

The simple solution would be to just increase travel speeds for players. That however makes the map small. A player on the opposite edge of the world could show up in your city in only a few minutes.


The crazy solution is parallel dimensions.

Players are blessed by gods and have some supernatural abilities, so why use that for this too? Say a player spends an hour doing stuff in a city. They have shopped, had conversations, done a quest or two, whatever. Theoretically there would be a parallel world where the player decided to skip the city and walk to the next one over.

The player who spent time in the city can jump to the other reality where they are now at the neighbor city. Instant fast travel. They could do some things in that city, and then jump back over to a reality where they never left the first city.

This might sound like a needlessly complex way to describe a standard video game mechanic, but it has some important differences.

The parallel world must have diverged from the current reality within the past hour. Players cannot fast travel to the other side of the map, they can only fast travel within their local region.

Players can fast travel an unlimited amount of times with no cool down, but they can never reach destinations sooner by using fast travel. If it takes 10 hours to cross the world, it would still take 10 hours to cross the world. The only difference is that the player can spend time in a location without it increasing their travel time.

TLDR: fast travel within the local region.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 17, 2019, 12:07 AM


Good enough for me.

This is the map with moisture and temperature visualized. Deserts and ice.


I'll use next week as a vacation and when I get back, I'll start working on the actual front end instead of just the simulator. Every pixel in the 512*512 map is about 2 miles wide and still needs additional details when zoomed in. For example a single green pixel surrounded by water needs to become a propper island.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 17, 2019, 02:39 AM
Tile types: salt water, fresh water, flat land, forest, mountain, and frozen water. 6

A tile system would take a lot of work.

An overlap system could save time.

Say we have:
OM
MO

M=mountain
O=other

The mountains would always be drawn the same way regardless of what other is, as long as it is not mountain.

Mountains, forests, flat land, frozen water, fresh water, salt water. If drawn in that order, a lot of time could be saved. Only 16x6 corners would be needed.

Scratch that.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on May 17, 2019, 05:36 PM
(https://i.imgur.com/t94wONj.png)

Quick mockup of turning the lower res grid into a higher res map. My target detail is about one pixel per 100 feet.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 06, 2019, 11:22 PM
Here is the real deal in game.

(https://i.imgur.com/jW4HlBL.png)

Zoomed in on the bottom right corner to show more detail. Again here is the raw image that the map is upscaled from:
(https://i.imgur.com/7Q2vWWi.png)

A single pixel in the original map becomes 16*16 pixels in the new map, but it can get arbitrarily zoomed in. I tried two different approaches before settling on this one. This technique converts the pixel map into a curve. I realised that it would be nice to have this information anyway, so I figure I might as well use it.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 07, 2019, 04:54 AM
(https://i.imgur.com/qQeWOFv.png)

The scale is way off but I'm starting to experiment with artistic elements instead of just gameplay elements. Ripples around coasts and deeper water is darker.


The end goal is for the game to have a highly stylized fantasy map that acts as a backdrop for everything.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 12, 2019, 08:27 PM
Experimenting with something new.





Solves practically all of my problems while improving the end game. Here's how it works!

Everything is rendered in real time. A shader takes a height map, a detail map, and the global heat and humidity maps as input. It generates all the land from that info every frame. There is no actual mesh for the world, it's just a shader.

A compute shader or seperate thread can then render new local maps as needed. Only done as the camera moves or zooms in/out. Can be slow since it can happen on screen and still look good.


I think I'll embrace this new 3D look but an orthographic camera can be used to get a 2D looking map if I want to go back to that.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 18, 2019, 05:54 AM
(https://i.imgur.com/oSWauNY.png)

Some new mountain tech. I've been really struggling with this step of development since it's so loosely defined but I'm still managing two steps forward for every step back.

The new mountains are part of my general solution for rendering the world. A very high resolution picture is made that just shows if a pixel is water, land, or river. Since every pixel is just one byte, this picture can be held in memory without issues.

(https://i.imgur.com/ZYpvTXU.png)

Then new chunks are procedurally rendered as needed. For every pixel in the chunk, the distance from it to the nearest water is calculated. This gives a general mountain look. A lower res height map is then added to this so that rivers and lakes are not at sea level.

This height map can then be used by the shader to deform the mesh.
(https://i.imgur.com/VIYF6EO.png)
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 18, 2019, 08:59 PM
(https://i.imgur.com/uIle1gq.png)

Getting there.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 19, 2019, 05:00 AM


I think tomorrow I'll try to finish it up to minimum viable product level. Then I can move on with the rest of the RPG and get that into a playable state.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 19, 2019, 11:37 PM


Everything is coming together. Obviously there is more I'd like to improve but I'm pretty happy with the current state of things. The difference between this video and the last video is night and day (although I need to fix those spires). Now I can spend the rest of the day working on the art side of things. The whole world shouldn't just be mountains but I focused on that since they are the most complicated.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 20, 2019, 09:38 PM


It's working!

Everything is still low res and programmer art, but game is starting to resemble a game. Grass and trees are simulated, and you can see super fast seasons as winter extends through the north. There is a massive desert through the middle of the world, but there is actually another desert hidden under the ice sheet in the north.


This game is turning out so much crazier and cooler than I was ever expecting. The switch to 3D was primarily for programing reasons but it really demonstrates the scale of the world.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 27, 2019, 12:58 AM
Procedural family names


Without curation, here are some last names that I'm currently generating.

Goland
Pardy
Saloan
Amend
Hor
Hames
Herrol
Turgynd
Cargyle
Pendwater
Grafton
Preer
Hardiada
Blantony
Cargyw
Hedrearte
Reendwartlay
Whitfooone
Dakenshelld
Weit
Meathe
Tark
Lastbr
Wafforen
Lon
Wonchermax
Haste
Foler
Rer
Harwoway
Pontoley
Stan
Tarsfield
Layfood
Sall
Ambrk
Tebbesbe
Tendrs
Wod
Graunermon
Lanning
Carlanne
Artlack
Halteneoon
Arklyn
Hilter
Honsbe
Bargaryen
Wefferr
Cocran
Bucklell
Toorne


Seems to do a darn good job making names that follow a general style. I'm amazed at how "made up by a high school student writing fantasy" it feels compared to the consonant soups of my first attempts.

Will need to put in a filter though just to make sure nothing super bad gets generated. Next I'll try first names.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 27, 2019, 07:28 PM

Well except for human males, this looks good to go.

Spoiler for Hidden:
<br><br>Human Cities<br>1. contiago<br>2. quangpin<br>3. zhongduo<br>4. marceilles<br>5. burg<br>6. lolormsara<br>7. mantosport<br>8. cagliha<br>9. roy<br>10. jiza<br>11. tonju<br>12. ovss dn<br>13. oendos<br>14. kango<br>15. tarquolle<br>16. luoya<br>17. thessav<br>18. smos<br>19. yanto<br>20. bracus<br>21. reskos<br>22. ghangping<br>23. trebes<br>24. lerueilles<br>25. cavacera<br>26. gyeoali<br>27. cang<br>28. vaxicum<br>29. bopingzhou<br>30. kangapou<br>31. medroviyantonerg<br>32. hathai<br>33. vinnzhou<br>34. berraca<br>35. logn<br>36. laga<br>37. bhodes<br>38. karanto<br>39. cong<br>40. skanzhou<br>41. anzig<br>42. taj<br>43. aendanda<br>44. sanago<br>45. malls<br>46. habule<br>47. myousou<br>48. yegensburg<br>49. manti<br>50. ranting<br>51. cong<br>52. bonne<br>53. nopewell<br>54. aevenna<br>55. akangshad<br>56. naendu<br>57. nadango<br>58. zimbuktu<br>59. limingo<br>60. argont<br>61. canlier<br>62. euari<br>63. yeffa<br>64. vor<br>65. nendora<br>66. seccosburg<br>67. knorai<br>68. nazigrai<br>69. bogath<br>70. gour<br>71. allisbon<br>72. bugspei<br>73. mitsake<br>74. magrang<br>75. rempoia<br>76. soma<br>77. citta<br>78. taffanadu-batan<br>79. patra hora<br>80. hellstane<br>81. gulandung<br>82. jiankia<br>83. chexa<br>84. kinsbuhof<br>85. ptulora<br>86. mujgo<br>87. jiaozhou<br>88. trolis<br>89. bulgeium<br>90. tiankanng<br>91. yanyu<br>92. bri<br>93. val<br>94. kand<br>95. janth<br>96. citermarino<br>97. erdiseo<br>98. akrinde<br>99. lorinth<br>100. egngacu<br><br>Human Man Names<br>todo<br><br>Human Woman Names<br>1. rarian folt<br>2. clotild ollingfon<br>3. gra viddler<br>4. ligundra whart<br>5. asacey jusgg<br>6. aunderer make<br>7. jecimada celmon<br>8. aura risnsm<br>9. julya hurpo<br>10. jegaveve rosby<br>11. cifavia stonynd<br>12. cohelle rus<br>13. brath rowlis<br>14. juliara werand<br>15. chrilyn toy<br>16. liara mayney<br>17. lyendefer coston<br>18. chlenty shaelas<br>19. anitha spabb<br>20. cory baelin<br>21. carmella mossoway<br>22. raendrey hort<br>23. leya harrick<br>24. helyssent harryled<br>25. pelly wydder<br>26. trelippacquesta conch<br>27. julicia jusgower<br>28. annalys sustmanden<br>29. gessta wyrrenter<br>30. arice caynwody<br>31. rissandeina lake<br>32. pada ung<br>33. kikki sutchul<br>34. ianilyn greenwoodflother<br>35. ale bergrabb<br>36. marry tul<br>37. beexanda marlyndondon<br>38. hosha hupps<br>39. alexander owooksterlynear<br>40. alexis lorry<br>41. horalynn crax<br>42. velaria dushy<br>43. peta oanouth<br>44. ara braun<br>45. shaely ryswynson<br>46. elizailla cloanghimm<br>47. cilla pemforrester<br>48. saya ulslafy<br>49. shang toxthantlon<br>50. iaenda egandrrighet<br><br>Fairy Cities<br>1. rarksun<br>2. contpesun<br>3. limmetssun<br>4. rassysun<br>5. maidolowersun<br>6. tinn<br>7. esun<br>8. petun<br>9. peoncettemun<br>10. rellopesun<br>11. sun<br>12. fasun<br>13. honasun<br>14. sun<br>15. hoaryllaxsun<br>16. gradensun<br>17. bary&#39;sun<br>18. storsun<br>19. jarnsun<br>20. gahliasun<br>21. tinnsun<br>22. ganden pinksun<br>23. oodsun<br>24. laliniasun<br>25. anendrsun<br>26. ageenasun<br>27. rack soapwortsun<br>28. beesesun<br>29. twillingsun<br>30. ascilasun<br>31. feseasun<br>32. felloon flowersun<br>33. consun<br>34. ralvasun<br>35. postsun<br>36. brossun<br>37. cin beronsunsun<br>38. rairietasun<br>39. sun<br>40. sun<br>41. tulsun<br>42. lassun<br>43. blowersun<br>44. gariasun<br>45. yelodysun<br>46. merfallsun<br>47. beriwin<br>48. speniumsun<br>49. stsun<br>50. pasunafr sasun<br>51. browalasun<br>52. dun<br>53. cheresun<br>54. buttercun<br>55. enasun<br>56. luglesun<br>57. boozesthin<br>58. liminarisun<br>59. pearlet savesun<br>60. gainsun<br>61. primsun<br>62. gosebudsun<br>63. olintsun<br>64. forysun<br>65. sun<br>66. nilsun<br>67. ankedicasun<br>68. darinasun<br>69. fun<br>70. flowin<br>71. rhing glorysun<br>72. triamsun<br>73. lelphisun<br>74. chrylsun<br>75. laineiun<br>76. coowsun<br>77. toonywysun<br>78. tran<br>79. rintesun<br>80. killasun<br>81. bushiasun<br>82. gerasun<br>83. stsun<br>84. limogesun<br>85. acoleusun<br>86. gas plofsun<br>87. al fsun<br>88. melorssun<br>89. roun<br>90. wansysun<br>91. sun<br>92. hytun<br>93. gliliaxsun<br>94. greemisun<br>95. gottlasun<br>96. leun<br>97. banteloniasun<br>98. makersun<br>99. cardenioflowersun<br>100. honeflowersun<br><br>Fairy Man Names<br>1. peaut<br>2. rit<br>3. malebeeryspirit<br>4. fronillirmspirit<br>5. nspirit<br>6. elliumspirit<br>7. delpirit<br>8. flowflowespirit<br>9. mizit<br>10. duttespirit<br>11. itendespirit<br>12. frit<br>13. calipspirit<br>14. pephyspirit<br>15. orit<br>16. shseapirit<br>17. angerbury bellsspirit<br>18. plutunit<br>19. futassspit<br>20. vainforestspirit<br>21. lavendull caspirit<br>22. deasspirit<br>23. pragote gentianspirit<br>24. molacaspirit<br>25. belspirit<br>26. tutchman&#39;s breechesspirit<br>27. le manaspirit<br>28. olantaspirit<br>29. lacsvaaspirit<br>30. wilvermistspirit<br>31. orgnirit<br>32. mait<br>33. vit<br>34. summewesavoryspirit<br>35. varit<br>36. soirit<br>37. chrit<br>38. conthellirit<br>39. soseflowerspirit<br>40. rit<br>41. chunationspirit<br>42. coxgottenwoodsspirit<br>43. lumispirit<br>44. rit<br>45. gindespirit<br>46. rit<br>47. forastspirit<br>48. spirit<br>49. tendspirit<br>50. hosettaspirit<br><br>Fairy Woman Names<br>1. banerfal<br>2. rathenbul<br>3. cariassoul<br>4. glintsoul<br>5. tummoul<br>6. rasoul<br>7. rardensoul<br>8. allifoul<br>9. shoul<br>10. agoniasoul<br>11. gaffleysoul<br>12. cosssoul<br>13. asoul<br>14. grissiniumsoul<br>15. proul<br>16. choul<br>17. blaris edsousanssowfl<br>18. olsmerall<br>19. ful<br>20. dairinsoul<br>21. bordin pinksoul<br>22. flavesoul<br>23. adesoul<br>24. therasoul<br>25. lendflooul<br>26. maidesoul<br>27. scrigolesoul<br>28. marsoul<br>29. hul<br>30. dumbell<br>31. columiasoul<br>32. tarkspursoul<br>33. shadsoul<br>34. trecoul<br>35. rairinasoul<br>36. nasoul<br>37. piastesoul<br>38. holly soul<br>39. frissve gsoul<br>40. tasigesoul<br>41. bergersoul<br>42. caiasoul<br>43. straksoul<br>44. creesoul<br>45. sweetsoul<br>46. ssoul<br>47. nsoul<br>48. aroul<br>49. preen snowflakesoul<br>50. anonsoul<br><br>Machine Cities<br>1. ook&#39;v k&#39;vul<br>2. vpuk&#39;v <br>3. to iok&#39;v u<br>4. iruv 04509-6910<br>5. vtukk&#39;v <br>6. ulendinu <br>7. uivak&#39;v <br>8. lurv hi<br>9. kov w uut<br>10. toyoly<br>11. k&#39;v i<br>12. neviteti<br>13. finury<br>14. pernerluv<br>15. qulyu<br>16. kotu-kollu<br>17. lu e<br>18. volyut v<br>19. ulu iniu <br>20. lodu<br>21. vy vk&#39;v <br>22. toryi<br>23. prthfinder<br>24. indokk&#39;v huvurk&#39;v <br>25. dutey eurti<br>26. indo<br>27. gov ru<br>28. belgorod<br>29. verve<br>30. endu<br>31. vokk&#39;v o<br>32. oniey<br>33. rove- etul<br>34. bunk&#39;v h<br>35. ovk&#39;v <br>36. rover<br>37. k&#39;v endo<br>38. vubutter<br>39. ter<br>40. k&#39;v uhuuvu<br>41. r-tv ovkhu<br>42. unjo<br>43. hurihonjo<br>44. fevak&#39;v ovutvu<br>45. rvvyvtortter<br>46. dunuvhiru<br>47. k&#39;v endoy<br>48. tok&#39;v utu u<br>49. vppernovu<br>50. huku<br>51. k&#39;v ivhiwu<br>52. fuv ruvnodu<br>53. inuyu uga<br>54. fuiniu<br>55. o v unul<br>56. khelyubinvk&#39;v <br>57. rokuk&#39;v <br>58. tungel<br>59. venk&#39;v <br>60. u 1<br>61. ukk&#39;v <br>62. iruv 05280-6910<br>63. vhrgex<br>64. tok&#39;v unkhk&#39;v itv<br>65. nuikk&#39;v ugo<br>66. bujoryuk&#39;v i<br>67. v354 kephei<br>68. hydronuliu <br>69. uebuvhi<br>70. hunk&#39;v <br>71. aru 1 urov 1<br>72. pu un<br>73. ikk&#39;v h<br>74. r-1<br>75. tunk&#39;v u<br>76. ozur<br>77. yu-8000<br>78. one<br>79. vurutto <br>80. ozu<br>81. kuk&#39;v huigu<br>82. nohon utvukk&#39;v <br>83. to iyo<br>84. k&#39;v endov<br>85. vugov v hionov <br>86. buint petervburg<br>87. eu endevtruktion<br>88. bld<br>89. i 332277554499006611<br>90. rv uvuyu<br>91. guko<br>92. roend&#39;v <br>93. tokhe<br>94. yuendude<br>95. tukk&#39;v <br>96. urti ev<br>97. ink&#39;v <br>98. futvuyu u<br>99. n1-l3<br>100. nugoyu<br><br>Machine Individual Names<br>1. kuzun<br>2. hunk<br>3. ding ikovo<br>4. dun en<br>5. tonkephei<br>6. ukugoyu<br>7. yuenduvhi<br>8. iruku o<br>9. betrophro e<br>10. kelebrun glul<br>11. nikk<br>12. n1-l3<br>13. rvgk1-f02<br>14. vtel-on-do<br>15. vieboke<br>16. uiutvhi<br>17. rokkov ov<br>18. tukugeyury probev:<br>19. khovhi ur<br>20. lurk<br>21. izuho<br>22. vtelloy<br>23. urtk<br>24. quurk<br>25. uvvri<br>26. deend vuvteti<br>27. niku u<br>28. to ivu uni<br>29. geleld&#39;v <br>30. bruvnodur<br>31. bukivhi u urello<br>32. i u<br>33. ku utu<br>34. b 332277554499006611<br>35. bl kheuny<br>36. luvugu i<br>37. on bruwn<br>38. obu u<br>39. di ukhev<br>40. iyo<br>41. qunu 2<br>42. vutvu<br>43. turutu<br>44. uteyu<br>45. vokk<br>46. vovibrukheo<br>47. aji<br>48. vhika<br>49. nuri<br>50. u 1 iku<br>51. uvhiko<br>52. klinu<br>53. hirov.<br>54. vun uinbuyuvhi<br>55. vhoton<br>56. fro<br>57. rvenio <br>58. to vku<br>59. voxeruktu<br>60. lo u i<br>61. iva<br>62. y ulloy<br>63. nendiu 3<br>64. pholeptoyon<br>65. woh g64<br>66. uru<br>67. tvu<br>68. vunur voino<br>69. yutenu 9<br>70. niru<br>71. beto<br>72. vpekewulk<br>73. yovtoretolui u<br>74. hutvu<br>75. yate<br>76. vlto<br>77. ur 1<br>78. kongolu<br>79. ulliu <br>80. uki<br>81. kituyo<br>82. fuik<br>83. toyotu e<br>84. kr ifi<br>85. v-2 b<br>86. vteeve<br>87. upu 1<br>88. izitvvk<br>89. entil<br>90. vhoburuki<br>91. oldk<br>92. duikor<br>93. kuend<br>94. upu<br>95. unityu fu<br>96. rovtok et union<br>97. ikhevhiro<br>98. ark 18136<br>99. urgoyote<br>100. koguyu<br><br><br>



I cannot stress enough just how pleased I am with this setup. There is a ton of room for variation yet everything still follows similar trends. This system is pretty much perfect for any sort of raw name generation. Not all procedural names should use it (human first names might be better with just a list) but it's great for what it does.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jun 29, 2019, 03:24 PM



Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jul 06, 2019, 04:20 PM


Trying out a slightly more realistic art style. Old look was pretty cool imo but wasn't matching the feel of the game.

Also as you can see, the map is really coming together. The 512*512 grid is visible in this video when close to the ground. Not only is it cool seeing how much additional detail is added per tile with this second procedural generation pass, but these tiles will also be used for construction and empire building. The game does not have tile based movement or play like a tile based game unless the player is a governor/king focused on managing the bigger picture.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jul 06, 2019, 11:36 PM
(https://pbs.twimg.com/media/D-1FnKGU0AAYthb.jpg:orig)

Fading distant objects to blue helps demonstrate scale.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jul 12, 2019, 12:37 AM
Think I've narrowed in on how roads, bridges, and a few other things like that will work.

Essentially the world is split into sectors (hopefully I can figure out a more medieval sounding name before release). These sectors are the squares you see in the screenshot above. Along river banks and shores, sectors have irregular shapes and don't spread out into the water. Instead a seperate water only sector covers that space.

Sector wide improvements can be constructed including roads and irrigation. When roads are built on a water sector, they are automatically used as bridges. Makes it all fairly simple from both a player perspective and a dev perspective. No need to build paths between every building, just build the road upgrade for that sector and you are good to go. Neighboring sectors with road upgrades string together to form continuous roads for traveling long distances.
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Jul 12, 2019, 12:56 AM
Region, province, territory


zone is kind of weird.  It doesn't feel like it'd make sense in a medieval time, but it is actually a middle English word.  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Jul 14, 2019, 04:11 PM
Region, province, territory


zone is kind of weird.  It doesn't feel like it'd make sense in a medieval time, but it is actually a middle English word.  

I might try to not give them a in universe name. Kinda like how the hex tiles in Civ or the snap placement in Age of Empires are just viewed as part of the game's structure. They're only 2 miles by 2 miles so unless they are empty, the stuff inside them will be way more prominent.

Speaking of the stuff inside them, I've decided to bite the bullet and go with a freely explorable full open world. Basically Divinity Original Sin 2 for a seamless area the size of Europe. This is a lot of work but could maybe save time compared to my original hierarchy system. With that system there were a lot of edge cases that I was struggling with sorting out and I'd have to absolutely nail the visual presentation of everything to make it simple for players to understand and fun for players to exist in. My jump from 2D graphics to 3D graphics had similar pros and cons so I'm hoping it works out a second time. The only thing I've really worried about is character icons. I cannot have 3D models for every person but with a higher quality world, it'd be hard to make anything else look like it belongs.


Within sectors/tiles/zones there will be "locations" for lack of a better term once again. A location could start as a single hut and grow into a massive city so I'm not sure what to call it. Locations have location wide upgrades similar to sectors. Buildings are built automatically at the closest point to the center with enough room. This way they naturally grow like real cities but I do not need a system for players/AI selecting specific building locations.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 09, 2019, 09:03 PM
Been working on some secret stuff  8) but here's an update I can share.

I added an "island" setting that can rip landmasses into separate islands. With all other settings identical, here are three procedural maps generated with varying "island" strengths.


(https://i.imgur.com/hQyfCXp.png)
(https://i.imgur.com/KsGqZHc.png)
(https://i.imgur.com/aEfzfCw.png)

I'm still using 512x512 maps for the game. Here is what the last map looks like before being "upscaled." These pictures only show coasts.

(https://i.imgur.com/ljoYggj.png)

I put upscaling in quotes because the actual process is very structured. The system converts all land+water edges into a curve and smooths it out while adding a bit of random variation.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 11, 2019, 01:02 AM
(https://i.imgur.com/2oo5uPi.png)

Watershed map for a procedural world. Not worried about lakes that don't drain into oceans. This map is primarily used to generate realistic feeling mountains.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 16, 2019, 08:02 PM
I am not 100% sure how this will go down, but I want to get people playing the game as soon as possible. I'm thinking of setting up a semi-open alpha for the PC version of the game.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 20, 2019, 07:14 PM


Adding more detail to things. Pretty complicated since there are thousands of miles of coasts that need waves, but this method might work. There are a fair amount of things I can do to improve the quality but I'm really worried about keeping the terrain performance light.

Here is a video zooming out.

Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 21, 2019, 03:48 PM
Disabled grass, working on getting everything integrate.

Scale is really complicated and something that's hard to intuitively understand. I've been going around with a ruler sorting and adjusting everything haha.

Here a cube is scaled to 1.75 meters, the average height of an adult.







I decided to make mountains fantasy sized for the most part. Every square is still 2km by 2km. Since the whole map is about the size of Europe, I'm using space sim techniques for close up details.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 22, 2019, 05:52 AM
The world is 1024 km by 1024 km, just over 1 million square kilometers in area. That's over 40,000 times larger than The Elder Scrolls Skyrim!!!

From a gameplay perspective, that's not a good thing.


No player will enjoy spending hours/days of real world time traveling. I need such a massive map so that regions can develop independently and a player should spend the majority of their time in the same area, but even within that local area travel could be too slow.



I guess I'll break it down to multiple types of gameplay.

Local Travel:
The player only moves within a 3 by 3 sector area. They could be a king, a butcher, or anyone else that stays within a city or zone.

Regional Travel:
The player regularly moves within a 30 by 30 sector area. They could be a trader, adventurer, hunter, or anyone else that doesn't spend the majority of their time in the same place. Might slowly make their way across the map, but that is not the primary goal.

Migration:
Non regular movement over vast distances of the map. Similar to moving from England to France during the medieval era. Takes a long time and isn't designed as part of a gameplay loop.



The first mode of travel should be effectively instantaneous. Players can move within cities freely and move to nextdoor cities quickly. Traveling shouldn't take long enough to factor into player actions.

Second mode of travel could take a few minutes. Either the player is relaxing and enjoying the journey, or they are multitasking during the journey. Talk to companions, notice things along the way, browse your inventory, etc. Would be best to travel on horse.

Third mode of travel would take hours/days on foot. It is not designed to be inherently fun for players. Either the player makes many stops along the way, or the player multitasks with even more complicated things. Best to migrate by ship.
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Aug 22, 2019, 12:36 PM
Only 6x bigger than daggerfall
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 23, 2019, 02:50 AM
Only 6x bigger than daggerfall
I've been watching gameplay of daggerfall for comparisons haha.


I'd say this video does a good job expressing just how large 6x daggerfall is.




Two cameras are used to render the scene. One for the open world and one for close ups. This is seamless and just looks like lod. Kerbal Space Program does the same thing.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 23, 2019, 08:46 PM
Player speed will be roughly 5 meters per second. Not sure if that will be sprinting and need a cool down, but that feels about right in my test environment.

That means on a perfectly straight route it would take 6 minutes and 40 seconds to cross an entire sector. With 512 sectors, that means it'd take just over 56 hours to run from one side to the other. I think this is good.

I've decided to cut some features so that I can focus on making the moment to moment gameplay engaging. For example instead of hunting being a timer (click button and wait for food), hunting is now the physical act of catching a wild animal.

The minimum viable product has now shifted to exploring the natural world and hunting animals. I'll start granting access to the alpha build once I reach that state.

EDT:

(https://i.imgur.com/9gVSD6P.png)

Hey look, a game is coming together!
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 27, 2019, 04:44 PM
(trying out twitter for video hosting)




The sun is a ball of fire only 500 miles above the world. It slowly moves north and south producing seasons. All shadows in the game are dynamic to reflect the sun's true position.

edt: gfycat sure seems to work better.

Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Aug 27, 2019, 05:02 PM
What if we started seeing that gif on flat Earth pages?  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 27, 2019, 05:06 PM
What if we started seeing that gif on flat Earth pages?  
Haha I originally had used a flat earth tag but it felt too dirty.
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Aug 27, 2019, 05:34 PM
But this is really cool stuff.  

This is a lot of stuff that I've wanted to put together myself.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 27, 2019, 06:25 PM
But this is really cool stuff.  

This is a lot of stuff that I've wanted to put together myself.
Thank you  ;D

The plan is to start free early access in the coming weeks. With your feedback I should be able to do this concept justice.


The lore of a flat world however came completely from left field. I've really stumbled into that and have been making it up as a go haha. It seems like the perfect way to say "hey this is your world and you get to make your own stories" but still keep the game unique compared to our world and other games.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Aug 29, 2019, 05:59 PM
I haven't mentioned the crafting system in a while, but it has become really cool!

It's physics based. Anything can be crafted from anything.

For example if making a sword, there is the blade and the handle. Use different items for construction and you get different results. Put steel in the blade and steel+gold in the handle to get a sword fit for a king (if crafted with enough skill). On the other end of things, put a fish in the blade and a pie in the handle to get a very useless weapon.

This lets crafting have a bit of creativity and work in all situations. A player can be lost in the woods and craft stone tools and a stick shelter for example even though those aren't hard coded for that rare situation.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 08, 2019, 01:15 AM
I am blown away by how big this game could become. Will start with a free alpha that only includes survival elements in a forest. I can use that as a vertical slice of sorts and get that element of the game working great. Start building a community around the game too.

From there it'll enter paid early access or fully release, and then continue expanding as long as players are playing. Could end up with an rpg dream game.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 09, 2019, 05:45 PM
@the-Pi-guy

Any neural network advice you could share? I haven't investigated it yet but I thought of using a neural network for land generation when zoomed in. Essentially take a 2048x2048 heightmap and upscale a small section with added detail. Needs to only take a second or two to make the detail map. Sound like a good or bad idea?
Title: Re: Procedural RPG OT: every action has consequences
Post by: the-pi-guy on Sep 09, 2019, 08:34 PM
@the-Pi-guy

Any neural network advice you could share? I haven't investigated it yet but I thought of using a neural network for land generation when zoomed in. Essentially take a 2048x2048 heightmap and upscale a small section with added detail. Needs to only take a second or two to make the detail map. Sound like a good or bad idea?
I can't imagine at this point I could give you advice.  ;D

I do know that some companies are using neural networks for something similar.  

The difficult part is whether you could make enough examples to train it well.  
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 10, 2019, 01:13 AM
I can't imagine at this point I could give you advice.  ;D

I do know that some companies are using neural networks for something similar.  

The difficult part is whether you could make enough examples to train it well.  
Yeah I think I've decided against it. There are plenty of height maps from Earth but I'm not making Earth, I'm making a fantasy world. It would be very hard to fine tune the output to fit my needs.

Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 11, 2019, 12:55 AM


Not good but very functional terrain. Gives me a lot of control over things.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 11, 2019, 04:29 PM
The Forged Kingdoms: Survival

TFK: Survival is all about the basics. Just the massive open world and a lone player. This is the base game I'm focused on. Everything else will come in expansions.

This game only has 3 major things to worry about which is nice.

1: world interactions-running, climbing, swimming, hunting, fishing, etc.
2: world generation-making a good world with trees, birds, fish, deer, etc.
3: crafting-player building stuff.

1 and 2 are mostly solved. 3 is still a bit unknown.

Everything can be crafted from anything, but how does crafting work in general? Is a house just a single thing placed in one action, or is it built wall by wall? Is a quarry built or is it dug?


EDT:

I think I've come to a solution.

Buildings are physically built somewhat like real buildings. A blueprint is placed on the ground with the general shape of the building and material piles are generated for each part of the building. So let's say the player is building a nice house. The general scope and design of the house is set from the crafting menu and the player stamps the blueprint into the world. All this does is produce a basic outline of the structure. It also designates a section of ground for wall materials, a section of ground for roof materials, and a section of ground for furnishing materials. These ground sections are open air chests that the player can fill with construction materials such as stone, wood, gold, etc. Simultaneously the player needs to actually build the house. This first starts with digging the basement and setting up the foundation. The player, either using a tool or their bare hands, digs this automatically. It takes less time depending on the circumstances. Then the player builds the walls using a similar system, then the roof, and then the furnishing.

This time based system is needed imo since labor is a major element of construction. Ignoring it would result in unrealistic expansion for massive kingdoms, and would make massive mines and quarries free to build at any moment.

Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 14, 2019, 09:14 PM
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 15, 2019, 08:36 PM
(https://i.imgur.com/fFmR6N1.png)

It's amazing how much grass helps pull the image together.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 17, 2019, 04:49 PM
More or less I've finalized my terrain LOD method. A whopping 10 levels of detail will be used.

The highest level of detail is a 128*128 map of the area immediately around the player. It extends ~30 meters in each direction. A single pixel of this map covers ~19 inches. For comparison, the heightmap in Fallout 4 had one pixel per 18 inches. That seems like a good enough resolution considering it was good enough for a AAA game and I'm not pursuing realistic graphics.

The second LOD is another 128*128 map that covers an area twice as wide. Third is a 128*128 map four times as wide, fourth is eight times as wide, etc. After ten of these the texel density matches that of the 2048*2048 prerendered world map.

All ten maps can be packed into a single 512*512 texture so it becomes very efficient. The ground shader transforms its UV based off distance and doesn't need to change anything else.


During normal conditions all maps will be centered around the player, but this is not hardcoded. Each map is updated separately and can be positioned separately. So for example while walking down a path, the smallest map is updated almost every frame while the rest are updated sporadically. If the player teleported to the opposite corner of the world, the LOD levels could pop in from highest detail to lowest detail, opposite of normal texture streaming.

Last but not least, this system is flexible. The texture containing all the maps can be rendered at a higher or lower resolution depending on graphics settings. 64*64 maps can be packed into a 256*256 texture or 256*256 maps can be packed into a 1024*1024 texture and the shader would be fine with that.

Initially these maps will be rendered on the CPU but the end goal will be rendering them on the GPU in between frames.
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 20, 2019, 09:34 PM
(https://i.imgur.com/WXi8oHg.png)
(https://i.imgur.com/kdRoQIC.png)
(https://i.imgur.com/J0t4SNk.png)

Using random colors to set things up, the terrain LODs are mostly working. The third picture shows which pixels correspond to which LOD.

Since these maps will be used for terrain height, normal direction, rock to soil ratio, paved roads/paths, and vegetation rates, there is no need to improve texel consistency any farther. I might however add some trilinear filtering between the levels of detail to make the transitions more seamless when moving.

EDT:

Better example pictures with point filtering.
(https://i.imgur.com/URjYMGV.png)

(https://i.imgur.com/tDMNwbH.png)
Title: Re: Procedural RPG OT: every action has consequences
Post by: Legend on Sep 23, 2019, 08:30 PM
Trilinear filtering equivalent is up and running. It makes the transition between lods smooth.

(https://i.imgur.com/UUR6TD1.png)
(https://i.imgur.com/ZdhOos1.png)

Normal map texturing with simple noise, showing the smooth blend between high resolution at the center and low resolution near the edges.

(https://i.imgur.com/mJ7ZU2w.png)