Author Topic: Wanderers / open world RL  (Read 47443 times)

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #30 on: November 17, 2014, 11:47:59 AM »
Also, for several weeks, I've been playing with the names (and ~ "language") generation, but I'm still not happy with the results. The idea is to make a distinctly sounding randomly generated set of syllables for each nation, which can be combined to produce the names for all non-player characters.

How do you generate the names now?

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #31 on: January 04, 2015, 10:22:43 PM »
How do you generate the names now?
Sorry for replying late. I will give a very broad picture of the generation procedure:

To generate a name, each language has a set of 15-30 syllables, an evaluation function to evaluate the words, and the transition matrix with the transition probabilities from one syllable to the next (i.e. Markov chain). We generate 5-10 random string of 2-4 syllables and choose the one with the best evaluation.

How the evaluation function works: It scans through the string and evaluates every pair and/or triple of characters and gives the score.   

Each language has its own evaluation functions. The syllables themselves are generated individually for each language with a genetic algorithm: They continuously mutate and exchange letters, trying to optimize for 1) better evaluation score of the generated words 2) more unique syllables, 3) syllables that are not too long and not too short.

This is the general idea.


Update:



1. New map ('M') visualization mode, see the screenshot above. You can move the map cursor with the arrow keys and < >.

2. New debugging command line interface ('*'), with a few simple commands: 'heal', 'item', and 'blink'. Of course, only for testing.

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #32 on: January 10, 2015, 06:11:23 AM »

This is a big update.

1. Added merchants, who are basically travelling shopkeepers. This is a big deal, because not only the player, but all player-like NPCs (actors) can barter with them selling useless loot and buying better equipment.

Merchants are not stationary and can travel like any other NPC, however, when possible they prefer hanging around at markets:



The guys with a dark strap/cloak on their right shoulder are the merchants. This update is quite a big improvement actually, and a lot of new code was added.

2. Added Barter interface and improved visuals for the Inventory. To enter the barter mode, come close to a merchant, press v, choose the tile with the merchant, and press v  or Enter again. The barter mode works the same way as the Inventory mode.

To confirm your purchase, use the Enter key.


3. Fixed a weird bug: Previously, one faction (the orange nation) had more actor NPCs that any other faction. It turns out, the problem was in the way I sample from a discrete distribution (it turns out, it was caused by <= instead of <, but the bug was vary hard to pinpoint and it had a huge effect on the game simulation..)

As a result, non-human factions (the Undeads) start getting a lot more actor NPCs (including merchants), so the underground dungeons are probably a nasty place now. I did not test the the dungeons much this time, but that's what I expect.

4. Unfortunately, I started observing an unpleasant bug: The player, when walking from one region to the other, if collided with another unit, may get stuck in the terrain. It seems, I have to pay for the complex walking mechanics.  ;D

I think, a new Windows build is coming soon! Linux users, get the game from github.

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #33 on: January 18, 2015, 10:16:34 PM »

More complex overworld:



Disjoint pieces are connected by underground tunnels:


koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #34 on: January 21, 2015, 02:48:52 AM »
Hey guys, a new Windows build is ready.

>>> Download for Windows:
Download the latest Windows build (January, 20, 2015).

How to play: README at Github.

>>> Download for Linux (and probably OSX):
Get the source code from Github. Compilation is straightforward. install the latest ocaml package for your system. Make sure you have your SDL1.2 and OpenGL libraries installed. Then just execute make.

How to play: README at Github

Also, the first post is updated.
« Last Edit: January 21, 2015, 07:46:51 AM by koiwai »

Ferret

  • Rogueliker
  • ***
  • Posts: 122
  • Karma: +1/-0
    • View Profile
    • Demon: A monster collection roguelike
    • Email
Re: Wanderers / open world RL
« Reply #35 on: January 22, 2015, 05:39:57 AM »
Had some time to check out the Windows build tonight. :D Going to start with my general impressions/feedback, then detail out a bit more on the two runs I played. :) And no mistaken attempts to bump attack this time. :D

* The merchants are definitely a fun add and (assuming you don't get a start like my 2nd game where the entire world is against you :D ) it's definitely good to have another shot at grabbing some equipment. I feel like this game will get exponentially better with each new 'piece' like this that you add, since the number of possible interactions grows and grows (in sort of a Dwarf Fortress sort of way. :D )

* Magic was also new to me too, though only my first character was able to really make use of it (he had a much better magic score than the prisoner.) It was good to feel like a low CON character wasn't just "weak" anymore, and it was neat to be able to see the purple mana fonts to gather up (and more to the point, interesting to see that the non-magical "prisoner" barely saw any!) Can't wait until there are some spells to use :D

* The maps seem to do a good job particularly at the high level. The terrain feels "correct"... mountainy/wastes on the outskirts of the map, forests towards but not up to the edges usually, and central plain areas where most of the people live. I feel like the progression of biomes as I explore is coherent and makes sense. This sort of thing is important for helping players feel really in the world, which is great to me because this game encourages me to do a little role-playing (see my second game), and more in the world the game can make me feel, the more fun that is. :)

* My second game really got my attention and was quite fun, even though it ended pretty horribly for my character. :) True, this was a combination of the random factors present in the game + my own way of interpreting them, but as I sort of said in the first bullet point too, I think this sort of filling in the blanks by players will become more and more likely to happen as more elements are added to interact with each other and it becomes easier for players to find ways to fill in the gaps. Anyway, the second game breaks out what happened more, so I'll leave the rest of this for there. :)


Now, the two game reports. :D


First run (Seed: xd):

Started off with a mediumish (is 69 mediumish?) CON build that had 1 gold to his name. His part of the world was very, very much at peace. Lots of peaceful tribes and farm animals. Wandering about, he managed to come across a sling and another gold piece... but then he found this:



A bazaar! Certainly home to many merchants! I checked the wares of several of them, but for the most part they had a gold penny or two and a kitchen knife to their names. I figured my sling was better and went wandering off without buying anything.

Heading deeper into the wilderness, I came across my first hostile: a skeleton! I quickly learned my sling was not up to the task (he didn't seem too impressed by the projectiles, and he was kind of ouchy in melee), but happened to notice a small knife laying nearby. I went to pick it up... and to my surprise, the skeleton wandered away. Why did he do that? After a quick rest, I found out: a goblin had appeared and the two were fightng it out to the death. I can't blame the skeleton for deciding the goblin was a bigger threat. The sling vs. bony claw fight had really gone against me... and besides, the goblin actually killed the skeleton. :D I managed to finish off the goblin and laid claim to their combined loot of a penny and some sort of helmet or hat (probably the skeleton's, and probably explains why I had so much trouble hurting him with rocks? Not entirely clear how DEF works. :D)

There was a dungeon entrance nearby, so I went exploring. The first floor went well, I was able to slay several skeletons, quickly laying hands on an axe (a significant upgrade on my knife). The second floor also started well, but... alas, I ran into a much stronger skeleton down there who ended me quite quickly.

First run specific thoughts:
* It's pretty neat to see the various tribes going about their business. :) Things like seeing them running around with horses and cows, moving in and out of buildings, gathering at bazaars, etc. do much to add weight and a "real" feeling to the world.
* I'm curious: Was the bazaar features (the tables full of fruit in a square arrangement) placed and caused merchants to spawn, or did it "grow" from the large number of merchants in the area?
* It was a little hard to keep track of which merchants I had spoken to and which I hadn't. Tempting to say "mark ones you've spoken to", but what if they get new wares? Maybe instead do something like an icon for 'inventory changed since last player interaction'? But, if a group of them tend to do a lot of swapping, that may not work either.
* Once I found my sling, I really wanted to find something to bonk with it, but this particular world (seed: xd) was very peaceful, it took a fair bit of wandering to come across foes. True, I could have picked a fight... but I didn't feel like I was playing an "evil" character and didn't want to attack something unprovoked. Have you considered a "bard" type NPC that could provide general information about the world and maybe guide you towards particular types of elements? Granted, he IS a bard... the information could be vague enough (and become more vague the further from the 'source' he is) where you still have a legitimate adventure finding the place and event he's talking about. Since the game is very emergent, this could be tricky to code up though... but that's where being vague comes in again handy again. I kinda of see the bard making comments ike "there is heavy fighting among the western tribes" if there are a large number of NPCs fighting somewhere to the west, or "evil stalks the southern forest" (a forest cell south of you has some skeletons / goblins / etc)


Second run ("Prisoner", Seed: qt):

Well this is very different. Second guy started off in the middle of a wilderness, a few wolves in sight, absolutely no equipment! High CNS, no MGC... almost feels like some sort of escaped prisoner? Tried running away from the wolves, only to find more wolves and some skeletons! Dodged most of those, but got chased down by a wolf I was forced to fight unarmed. That... barely... worked. After a long rest to recuperate, the "prisoner" decided to continue looking for a safe spot... or a weapon.

Some humanoids were spotted shortly after, but these proved to be hostile too.. perhaps the ones who exiled him to the wilderness? Not willing to fight 2 v 1 unarmed, the prisoner had no choice but to dive back into the wilderness... and right back into more skeletons and wolves. No easy breaks here! This turned out to be even worse than the humanoids, so the prisoner circled back, made a mad dash through several types of different looking humanoids (all of whom hated him on sight... what on earth did the prisoner do anyway?!) before finally losing the whole lot of them in a northern mountain range where he rested.

A random, also unarmed, traveler decided to try being a hero, but the prisoner managed to win this fight easily. And yet to what purpose? He was still unarmed, and in the mountains.  He searched the mountains thoroughly, but found no weapons, only a few other would-be-hero travelers. Eventually, using the mountains as a safe base of operations and a place to retreat to, he began to pick off those who wandered alone too far from the villages, hoping to find a weapon. Unfortunately, he did not find a weapon, instead he found trouble:



Yes, all of those are hostile, and our prisoner is still unarmed. Nothing to do but run for it...alas, this ended up turning badly after an archer (probably an actual guard or something as opposed to one of the many peasants?) herded me into a bad, bad spot:



Death followed one turn later.

Second run specific thoughts:
* It was awesome how the randomly generated map, character, and factions were (with some help from player imagination) come to together to suggest a story for the blank slate wanderer. It really felt like he was some sort of prisoner on the run, trying desperately to just stay alive. Every hand turned against him: no friends or resources. And, probably like usually happens in that situation, it didn't turn out so well. :)
* This run also highlights why it's awesome to be able to place specific seeds. :) I will probably try seed: qt again. :D If the prisoner had found a good set of equipment, he might have showed a different side to the angry mob that hounded him to his death. }:>


This is coming along very nicely. :D I look forward to seeing what sort of stories the game can suggest as more and more features come online. :)

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #36 on: January 22, 2015, 11:38:08 AM »
Hi Ferret, thanks a lot! This is by far the best in-depth feedback I've received on the game!

I think, that's awesome that certain roleplaying came naturally. Particularly because the game does not really have any story, lore, or custom character creation ;D I was always a big fond of computer RPG games, especially those that could create immersive experience, Fallout and Neverwinter Nights were my favorites ::) What I want to say is that many games had a great looking facade, which was hopelessly dead and static, and that was a major turn off. So, making a living and breathing world is probably my dearest goal in all game programming. Haha, of course, it's not a simple task to say the least.

Adding more social interactions will be a definite improvement. Randomly wandering NPCs can be entertaining for some time, of course, but more complex behavior is definitely desirable. I am planning to have rumors and other information spreading. So you can ask a n NPC if they know some news, or maybe if they know something about a particular NPC, or other topics like wars, dungeons, good shops, craftsmen, etc. Bards will work nicely, they may really add depth and character to the game..

DEF = the percentage chance that an attacking blow will be blocked. However, when the attack is blocked the player still absorbs full momentum of the blow.

Also, the recommendation to have CONS > 65 with the introduction of magic became a bit obsolete. However, it's still true that if the Constitution is < 60 you better rely on ranged weapons and magic. With 60-70 you can do both ranged/magic and melee. Even heavier guys are primarily melee fighters (however, they are still good at using bows: their shooting rate is a bit low due to poor Reaction, but they are strong and deal good damage nevertheless).

By the way, there is one very rare type of character: those who are have very high CONS (e.g. CONS > 120). The thing is that the magical abilities increase for those overweight dudes, and so it's possible to make a fat slow mage ) Well, such guys are extremely unlikely, I don't even know a seed for such a character, but they are possible.

One useful hint. It did not make it to the README somehow, but now I see that it's important. There is an indincation that an NPC has a weapon (or money). You probably have noticed yellow, orange, and red dots near some NPCs. Those dots tell you an estimated strength of a mob (it's a very rough approximation based on the total price of the items the mob has, but nevertheless it's quite accurate and very useful):
- The mobs with two yellow dots are a somewhat weaker than you although still can be dangerous.
- The mobs with three orange dots are comparable to you and dangerous.
- The mobs with four red dots are stronger than you and you should be very careful.
So, you may want to fight only with those enemies who have those markings, which means that they carry weapons.

About the bazaar! Hahahah, I like hordes of merchants. Although seeing 0, 1, or 2 of them is more common ;D The fruits, meat and other stuff for sale is completely fake and is not related to the number of merchants in the area, unfortunately). The merchants themselves are normal actor NPCs that are created from normal civilians. So, they they don't spawn specifically at the market. But when they are wandering around, they prefer highly populated freindly areas, and once they find a market location, they prefer to stay there for very long time (if not forever, don't remember this partular detail). I kind of like that you came across such a big group.  I should say that merchants try to offer you only those objects that you will be able to buy, and they try to hide the total amount of money they have (so you saw them offering 1 coin, because the price of your sling was 1 coin, however the metchants might have 50-100 coins). The merchants get new weapons from other NPCs (whose guys with shield like badges). So, you can come later and they may have new items, although it's unlikely to find very high quality weapons there. Dungeons are the best place to get new equipment.

I'd say that your first two runs were quite successful. You are right that the sing is very weak. I'd describe it as an auxiliary weapon if the enemy is much stronger than you, you may want to shoot from a distance, run away and shoot again. Alternatively, shoot a few times and go melee, it still gives you little advantage, which does matter in the early game. Going deeper into the dungeons is a sure way to get much better weapons and armor, of course. A more long term goal would be to find a new inhabited valley (it's possible to get there through some of the underground tunnels). Even more advanced goal is to find very deep dungeons, the 19th level is the deepest in the current vesion (I've never been below 14th level deep, and it was a couple of months ago), so I'm not even sure what is going on there really ;D

It is also good that you could got this "prisoner" scenario. Such situation happens when player's faction gets completely wiped out at the preliminary world simulation stage. It's a tough scenario, it feels kind of sad, you may start in the wilderness (and the woods may be pretty nasty), or you may spawn in a hostile village. In any case, it's quite a challenge to start in such conditions. However, it's not a hopeless situation! Even though your native faction have not survived, there may be a friendly faction somewhere on the map.

I don't feel like I want make this game advertised to a wide audience at this stage of the development, so I don't have many sources of feedback at the moment (Roguetemple and TIGSource forums + a few friends), so getting reports like this a big deal for me. Thanks a lot! The suggestions and comments are very helpful!
« Last Edit: January 22, 2015, 11:41:06 AM by koiwai »

Madmachine

  • Newcomer
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #37 on: March 05, 2015, 02:27:55 AM »
Any reason why there's no diagonal movement?

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #38 on: March 10, 2015, 05:04:09 AM »
Tried to run it on mac os x. Installed ocaml.
But when running make I've got this:
Code: [Select]
ocamlopt \
  \
  -I lib/ -I src/      -ccopt -Llib/ -ccopt -Lsrc/     graphics.cmxa unix.cmxa str.cmxa bigarray.cmxa  lib/sdl_stub.o lib/glcaml_stub.o -cclib -lSDL  -o wanderers \
lib/sdl.cmx lib/glcaml.cmx src/prob.cmx src/base.cmx src/fencing.cmx src/item.cmx src/inv.cmx src/common.cmx src/global.cmx src/trade.cmx src/org.cmx src/simtrade.cmx src/simorg.cmx src/carvebase.cmx src/carve.cmx src/genreg.cmx src/globalmove.cmx src/genmap.cmx src/vision.cmx src/politics.cmx src/top.cmx src/simobj.cmx src/console.cmx src/barter.cmx src/state.cmx src/sim.cmx src/grafx.cmx src/view.cmx src/main.cmx
File "_none_", line 1:
Error: Cannot find file graphics.cmxa

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #39 on: March 14, 2015, 04:29:49 AM »
Tried to run it on mac os x. Installed ocaml.
But when running make I've got this:
Code: [Select]
ocamlopt \
  \
  -I lib/ -I src/      -ccopt -Llib/ -ccopt -Lsrc/     graphics.cmxa unix.cmxa str.cmxa bigarray.cmxa  lib/sdl_stub.o lib/glcaml_stub.o -cclib -lSDL  -o wanderers \
lib/sdl.cmx lib/glcaml.cmx src/prob.cmx src/base.cmx src/fencing.cmx src/item.cmx src/inv.cmx src/common.cmx src/global.cmx src/trade.cmx src/org.cmx src/simtrade.cmx src/simorg.cmx src/carvebase.cmx src/carve.cmx src/genreg.cmx src/globalmove.cmx src/genmap.cmx src/vision.cmx src/politics.cmx src/top.cmx src/simobj.cmx src/console.cmx src/barter.cmx src/state.cmx src/sim.cmx src/grafx.cmx src/view.cmx src/main.cmx
File "_none_", line 1:
Error: Cannot find file graphics.cmxa

This is interesting. "graphics.cmxa" is a part of the OCaml itself, not my code. Maybe the compiler cannot find the path to the standard library?

To test if "graphics.cmxa" can be found, there is a short program: http://sprunge.us/OaJj
save the file as "test.ml" and compile it as follows:
Code: [Select]
ocamlopt graphics.cmxa test.ml
In any case, thanks for trying the game.

Any reason why there's no diagonal movement?
Does it need 8 directions?  :)

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: Wanderers / open world RL
« Reply #40 on: March 19, 2015, 04:14:48 AM »

This is interesting. "graphics.cmxa" is a part of the OCaml itself, not my code. Maybe the compiler cannot find the path to the standard library?

To test if "graphics.cmxa" can be found, there is a short program: http://sprunge.us/OaJj
save the file as "test.ml" and compile it as follows:
Code: [Select]
ocamlopt graphics.cmxa test.ml
In any case, thanks for trying the game.


Code: [Select]
bash-3.2$ ocamlopt  graphics.cmxa test.ml
File "test.ml", line 2, characters 5-13:
Error: Unbound module Graphics

I googled a little and it looks like default implementation of graphics on OS X requires ... (drumroll) ... X11.
That's... disappointing.
Later on I'll try to find if there is native implementation.

I'm very interested in continuous yet turn based mechanics. I was thinking a lot about it :)

Aleksanderus

  • Rogueliker
  • ***
  • Posts: 179
  • Karma: +0/-0
  • Champion of the unknown
    • View Profile
Re: Wanderers / open world RL
« Reply #41 on: October 25, 2015, 06:01:16 PM »
Seems interesting but is the project alive?
PTW