Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Vapourware So...Random Encounters

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
I'm making a step based...thing

So, about random encounters.

currently, I use rnd(1000)

and if the returned # is < 21 an encounter happens (the 21 will eventually be configurable)

However, I still check for an Encounter even if you haven't moved.

Good Idea or Bad Idea?

I'm not sure which way to go with this. Also, due to randomness, I might have 2 (or 3 or more) encounters in a row. Now I could add some code to stop that...but should I?

Should I allow the grind (ie: just staying in one place and wait for an encounter) or force the player to move at least 1 unit, then start checking for encounters again.

On That note, should turning in place be considered a move, or should you have to move off your current unit block.

Zep--
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
Ok...so my "can move" code runs at 60FPS (60 ticks)

I changed the RandonEncounter()) thing to run every 3 "can move" calls (so 180 ticks).

Seems to be sufficiently boring enough to encourage the player to move.

So maybe, I will add some code to check if moved, and lower the 180 ticks to maybe 60

But after so many ticks of not moving, up it again to 180 ticks.

Zep--
 

Bester

⚰️☠️⚱️
Patron
Vatnik
Joined
Sep 28, 2014
Messages
10,996
Location
USSR
You're asking stuff without providing any context. Give the closest thing to your game or give screenshots. Fallout 1 map maybe?

And if it's like Fallout 1, then no, it's not a good idea to generate encounters while standing (or turning), because players consider the map a place of respite, and a place where time doesn't move unless your character moves.

If it's like fallout 1 map, I'd suggest the following algorithm:

- Each frame that your character moves, increment some variable (done in tick).
- Roll for encounter every time (variable % 90 == 0)
- That variable may also serve as an additional parameter in the RollForEncounter() method, such as it slightly increases the chances, so the further you move, the more likely you are to stumble upon something. After a successful roll for encounter, reroll again if you want the possibility of multiple encounters, but decrease the variable before rerolling. And again, etc.
 
Last edited:

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
If it's like fallout 1 map, I'd suggest the following algorithm:

The "map" is the level, it's not a world map thing. Anywhere from 15x15 to 100x100 (or more)

- Each frame that your character moves, increment some variable (done in tick).

Yes, I'll probably implement something like this.
1. Don't allow an encounter unless you have moved off your current block.
2. Don't consider spinning in place as a "move"

#1 (and #2, I guess) would solve one of my problems where as soon as the game started...an encounter could occur.

I guess I got bored (testing movement, the geometry and collision, etc) and added the random encounters. An "Encounter" at this point in time just puts some text on the screen "An Encounter!!" with a little sound.

Zep--
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
I've settled on something like this:

You have to move to a new block for an encounter to even happen.
Spinning in place or running into the same wall over and over...no encounter

If you have moved, I do 4 encounter checks (1 check every 60 timer ticks)

If no encounter has happened with those 4 checks, I set the has moved flag back to 0, and you must move again to have a chance at an encounter.

Mainly now, I'll just be tweaking/experimenting with the rnd() function and try to find a good balance of encounter rate.

Zep--
 
Joined
Mar 16, 2016
Messages
450
Blobber?
Each tile have danger level and type of enemies which can spawn here. Moving through tile increases danger counter by this value until it reaches some cap and encounter happens. After battle danger counter reset.
This way players can find safe and fast way through low danger tiles (or even zero danger tiles which can appear after level boss killed) or farm on high danger tiles deep in the maze.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233

Not sure yet. Blob or 3D Rogue-like or maybe something entirely different.

Right now I'm just working mostly on the engine.

When I get bored of engine work, I experiment with different game mechanics and what not.

The tile "danger level" sounds interesting though. May throw that into the mix at some point.

Zep--
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
Each tile have danger level

While I haven't implemented the "danger tile" idea. I have implemented something I call "Danger Level" in with the randomness.

So, if the random encounter gods are in your favor and you don't have any encounters, every encounter check I increase "danger level" by an amount. If you've had no encounters, and the "danger level" hits 100, an encounter is guaranteed to occur and then resets "danger level" back to 0.

Sweet!

Zep--
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
This is probably the most annoying form of RPG encounter system there is. There comes a point at which the player has grown tired of killing annoying random monsters, and the novelty of random stuff to kill has worn off. It also enables the practice where players do things like walk back and forth in circles to grind endless monsters, throwing off your game's level curve. It's not really a design paradigm to be encouraged in this day and age.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
This is probably the most annoying form of RPG encounter system there is

I've yet to hear your idea...

If your'e determined to grind, you're gonna grind. It may be boring, but you want "TEH LEVLS"

If you're playing the game as a game, you don't worry about maximizing your random encounters.

I could also implement a "grind cap" or some such thing per map #, after you reach the grind cap, encounters stop giving you XP (or give you very little XP and/or items), forcing you to exit the map and move onward.

Zep--
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
That's why good blobber devs have encounter frequency configurable in settings :smug:


Well, of course..I thought I said it would be configurable already. But it is/will be configurable (well, when I add the configuration file..that is...:) But that was always the idea.

Zep--
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
This is just an experiment to merge into the larger picture later.

The RND(1000) < 30 + Danger Level seems to work fine, at the moment. It gives you time to explore the level, without an encounter every 3 steps.

That could change, of course. But for now it seems fine.

Zep--
 

levgre

Novice
Joined
Sep 27, 2017
Messages
55
I don't know your game but from the sounds of it I'd add a "hunt" option for the player for them to search for random encounters on a tile. You could have it result in an immediate encounter, have a set delay, or have a random delay.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
I don't know your game but from the sounds of it I'd add a "hunt" option for the player for them to search for random encounters on a tile. You could have it result in an immediate encounter, have a set delay, or have a random delay.

Interesting Idea, I'll ad that to my notes.

Zep--
 

baud

Arcane
Patron
Joined
Dec 11, 2016
Messages
3,992
Location
Septentrion
RPG Wokedex Strap Yourselves In Steve gets a Kidney but I don't even get a tag. Pathfinder: Wrath I helped put crap in Monomyth
I don't know your game but from the sounds of it I'd add a "hunt" option for the player for them to search for random encounters on a tile. You could have it result in an immediate encounter, have a set delay, or have a random delay.

Interesting Idea, I'll ad that to my notes.

Zep--

You could also a maximum number of random fights in a level, but keeping the "hunt" option to be able to grind. So it would allow the player to go back to a previous level without having to fight under-leveled enemies. Once the number of random fight is depleted, it should visible that there are no more enemies lining up to fight you.
 

Gregz

Arcane
Joined
Jul 31, 2011
Messages
8,510
Location
The Desert Wasteland
However, I still check for an Encounter even if you haven't moved.

I always hated this mechanic whenever I need to AFK or alt-tab out, however, if there's a way to exploit it in game (automated party attacks) I would use this and let it run over night while my party levels up. I did that in Wizardry 8 for instance.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
However, I still check for an Encounter even if you haven't moved.

I always hated this mechanic whenever I need to AFK or alt-tab out, however, if there's a way to exploit it in game (automated party attacks) I would use this and let it run over night while my party levels up. I did that in Wizardry 8 for instance.

Yeah...I put the stop on that already.

Zep--
 
Joined
Mar 16, 2016
Messages
450
That's why good blobber devs have encounter frequency configurable in settings :smug:

One of stupidest things actually.
Random encounters affect resource management and resource management affects difficulty. Finding way towards boss while spending minimal amount of resources as possible can be challenge by itself. With such option you remove this kind of challenge, also it promotes lazy monster/encounter design which can be seen in this "masterpiece". Can as well just make all fights fixed, without random encounters at all.

aweigh
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
I've yet to hear your idea...
The solution which largely superceded this pattern was that there were actual enemies on the map, that would thus pursue the player on approach and initiate an encounter on contact, enabling the player to either attack or avoid them depending on his ability. This means that players who tired of pointless fights can do something to dodge them and those who want to get in fights can attack them, and nobody gets annoyed by either being constantly annoyed with random fights popping out of nowhere, or being unable to find a fight.
 
Self-Ejected

aweigh

Self-Ejected
Joined
Aug 23, 2005
Messages
17,978
Location
Florida
ThisNameIsFree

man talk about serendipity

to answer ur question i find that the philosophical decision to imbue an attrition on the player rather specifically on the game world itself there MUST be a type of encounter system. These, that i spoke of specifically RIGHT NOW in this sentences: ALL SUCH ARE ALWAYS RANDOM.

IN RECENT years the dubious innovation of making enemies appear in the field but still lead to same battles as always is not something i consider even worth consideri.

for my money WIZ games:

- wiz 1 thru wiz 6
- wizardry gaiden 1 - 6 (most recent one, no.6, is Prisoners of the Battles)
- Wizardry Gaiden 1 - 5 (no 4 - demons heart - scenario was translated into english and it is very good dude
- Wizardry DIMGUIL
- Wizardry EMPire 1 - 2 (handheld versions that served as proving grounds for te devs to gon and do Wiz Gaiden 4 and Wiz Gaiden 6 which are, coincidentally, top 5 for sure in te wiz scenarios, especially Gaiden 4: Gaiden 4 is a joy of a traditional Wiz adventure plus it can ramp up difficulty toot-suite)
- Wizardry Chronicle: Recaptring the Holy Land
- wizardry ASTERISK a REMAKE OF 1st Scenario PROVING GROUNDS OF THE MAD OVERLORD made by some team i dont know name of for the Nintendo DS.




why did i make that list // b ecuse ALLLLLLLLL of those Wiz games, AAAAALLL OF THEM, use te iron-tried and diamond-true way of tossing enoug randoms at the player so as to give meaning to explorig and resource management...

...without ever crossing over the line into play sessions where a player will not look foward to fights because:

1) the wiz player enjoys the sublimely elegant and nigh-perfect brand of Wiz-blodder turn based combat so he he finds random encounters just fine
2) the wiz player always has LOOT awaiting him as he knows they will ALWAYS,,, ALWAYS drop ONLY!! ONLY from FIXED ENCOUNTERS.
 
Self-Ejected

aweigh

Self-Ejected
Joined
Aug 23, 2005
Messages
17,978
Location
Florida
do you get what im saying here im saying while obviously not a perfect melding of design schemas at least for Wiz series and all other copy cats this blueprint will always always always work just fine-- as long as they dont fuck Up the games encounter design and they dont fuck up te non-fixed enemies.

im sayig give me both, hy not, if its done well (like in Wiz clones) i mean u get best of both worlds.

now ThisNameIsFree i wanna resume romhacking Empire 1 for PC but i actually never was able to find ANYTHING that would make the game display dungeon wall textures properly among many other things. any ideas or suggestions //

i tried ddraw dll (a new emulated file) i tried DXwnd i tried using CUSTOM RESOLUTION UTILITY and also used another app to make sure AAAAALLL resolutions were at stock, cos i read that in these games--

1) games made with direct draw (ddraw dll inside game folder as wlel)
2) requires d3drm dll file

anyway i read that apparently if your 640xxxxxxxxxxxxxx480 resolution isnt stock without ANYTIHNG whatsoever that might cause graphic anomalies in these old DirDraw games on windows PC.

Note that the game works FLAWLESSLY on my sony vaio laptop, (intel cpu + intel hg IGP) and the game (wiz emp 1) runs PERFECT and disaplys all graphics

it also USED to work on my previous rig wihch had amd cpu and amd GPU. i really wanna fix it so it can get done.
 
Self-Ejected

aweigh

Self-Ejected
Joined
Aug 23, 2005
Messages
17,978
Location
Florida
also FIXED ENCOUNTERS are stationary (gatekeeping of variated degree; AFAIK exclsively keepig any gates only on their respective level)

FIXED ENCOUNTERS (thoug not always) are sometimes used te most effectively as a literal obstacle for the player asthey are almost always awaiting to be triggered right when u enter a room or the like.

its another layer of strategy man, and to finish your qestion i think its better to have - half and half - heree on this matter as entire dungeons - levels featuring noting BUT FIXED u blah sounds borig as fk

EDIT: and also wanted to reiterate that Wiz games, all the classics (1 - 5) and the newer Wiz games (Gaiden Empire Tale of the Forsaken Land etc) do not employ a high encounter rate.

i played a bunc of stuff also all the wizzes and if anyone thinks Wiz games have _hyperactive enc rate_ is either a dumb fool eating his regurgigated retard whistles-- in fact one of the main design philosophies durig dev of WIZ 1 was to make combat speedy but engagingly tactical so its not like you even take that long in a random enc.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
I like the way you think, aweigh

My Randoms and Gates will be pretty much as you described.

Are you drunk or is English a second language for you?

Zep--
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom