Author Topic: Variable Encounter Rate?  (Read 10695 times)

SarahW

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
    • Email
Variable Encounter Rate?
« on: March 10, 2017, 07:43:21 AM »
Has anyone else considered this? In mine you play as the avatar of a character in an artificial virtual world, so it changes a lot from the traditional rules that generally come with rogue like games.

The way I'm planning it out at the moment, it's something like In Ruby:

In this context, the encounter frequency changes based whether the MC's avatar has their in-game proxy properly set up. An improperly configured proxy means that the MC is more likely to get into puzzle battles fighting underlings rather than the bosses themselves.

One rations out the steps they take using pass phrase input.

In mouse movement, you might only be able to click on one hot spot, but in this concept you can put in a pass phrase that allows you to open a treasure chest and go to the boss, without wasting more than a single step.

This is in a 4 x 4 dungeon, so might need to reconfigure encounter rate to something like 20 steps for stealth mode and 10 steps for broken proxy mode where you're actively being tracked by the AI.
« Last Edit: March 11, 2017, 09:23:52 AM by SarahW »

javelinrl

  • Rogueliker
  • ***
  • Posts: 86
  • Karma: +0/-0
  • Creator of Javelin
    • View Profile
    • Javelin - party-based roguelike (open-source RPG / strategy game)
Re: Variable Encounter Rate?
« Reply #1 on: March 10, 2017, 04:26:09 PM »
I hate to be that guy but my eyes just bled a little reading your code. What's wrong with:

Code: [Select]
if $steps_taken == $steps_per_battle
    b = Battle.new
    b.fight_menu
  end

Instead of $alarm_mode? This way you don't have to hardcode magic numbers or have duplicate code in your if-else. It's also a lot easier to extend, you don't have to add another "else" whenever you think of something new.

Of course you can still have $alarm_mode if you need that for other stuff, just set $alarm_mode and $steps_per_battle together when the alarm is activated or deactivated. Finally it's not really a "mode" if it's only on and off (true or false), might as well call it $alarm_active or just $alarm instead.
« Last Edit: March 10, 2017, 04:29:48 PM by javelinrl »
Javelin, party-based roguelike (free RPG / strategy game for Win/Mac/Lin)
https://javelinrl.wordpress.com/

SarahW

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
    • Email
Re: Variable Encounter Rate?
« Reply #2 on: March 11, 2017, 09:18:57 AM »
I hate to be that guy but my eyes just bled a little reading your code. What's wrong with:

Code: [Select]
if $steps_taken == $steps_per_battle
    b = Battle.new
    b.fight_menu
  end

Instead of $alarm_mode? This way you don't have to hardcode magic numbers or have duplicate code in your if-else. It's also a lot easier to extend, you don't have to add another "else" whenever you think of something new.

Of course you can still have $alarm_mode if you need that for other stuff, just set $alarm_mode and $steps_per_battle together when the alarm is activated or deactivated. Finally it's not really a "mode" if it's only on and off (true or false), might as well call it $alarm_active or just $alarm instead.

Because I didn't specifically assign $steps_per_battle. It's for tracking the steps you take outside of battle, Steps per battle would convey the amount of steps taken during a battle. Which is useful if you wanted to do a tactical battle system, but I'm not tracking how many steps are taken during battle.

In other words, it would convey something I'm not going for.

If I wrote $alarm and $steps_taken on the same line it wouldn't work as intended. It just would not. $steps_taken is a sub if/else of alarm mode, because I want a different encounter rate if MC is not proxied.

In other words, alarm is important to notify whether a MCs identity is compromised.

I mean I get you want accurate variable naming. But if I'm going to call it $steps_per_battle, why not go even more specific? $steps_taken_in_battle for in battle navigation and $steps_taken_outside_battle.

That would completely make it have more clarity.
« Last Edit: March 11, 2017, 09:52:58 AM by SarahW »

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: Variable Encounter Rate?
« Reply #3 on: March 13, 2017, 08:33:49 AM »
Roguelike set to artificial world sounds interesting as you aren't bound by laws of physics (as if fireballs would obey them in the first place, but you get the idea).

If I understood your idea correctly, proxy would shield you from underlings and allow you to reach the boss without so many interruptions from underlings? Sounds reasonable idea to me.

Is there any reason player would want intentionally have a broken proxy? Might be a nice tactical option for player.
Everyone you will ever meet knows something you don't.
 - Bill Nye

javelinrl

  • Rogueliker
  • ***
  • Posts: 86
  • Karma: +0/-0
  • Creator of Javelin
    • View Profile
    • Javelin - party-based roguelike (open-source RPG / strategy game)
Re: Variable Encounter Rate?
« Reply #4 on: March 13, 2017, 01:31:49 PM »
it would convey something I'm not going for.

You missed my point. My code is functionally identical to yours except it doesn't require duplicates.

I didn't mean "steps taken in battle" but "how many steps before a battle" (steps per battle). I'm well aware of how this system is used in JRPGs.

Might I also suggest that you randomize that (1 chance in X per step, instead of 1 battle every X steps). This achieves pretty much the same function, without being too predictable or having the player counting steps to min-max for optimal play. It "encourages players to bore themselves" by finding out how many steps it takes to start a battle and then keeping a count of these steps to try to game the system to their advantage https://github.com/crawl/crawl/blob/master/crawl-ref/docs/crawl_manual.rst#anti-grinding
« Last Edit: March 13, 2017, 01:34:17 PM by javelinrl »
Javelin, party-based roguelike (free RPG / strategy game for Win/Mac/Lin)
https://javelinrl.wordpress.com/