Temple of The Roguelike Forums

Development => Design => Topic started by: SarahW on March 10, 2017, 07:43:21 AM

Title: Variable Encounter Rate?
Post by: SarahW 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.
Title: Re: Variable Encounter Rate?
Post by: javelinrl 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.
Title: Re: Variable Encounter Rate?
Post by: SarahW 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.
Title: Re: Variable Encounter Rate?
Post by: tuturto 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.
Title: Re: Variable Encounter Rate?
Post by: javelinrl 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