How do birds suddenly appear?

There are things in the rooms now. NPCs to talk to, items to pick up, signs and whatever else to look at. What we are missing is something to attack!

I’ve been pondering how to approach this for a while and I have seen a number of different approaches over the years. There’s the visible enemy approach that you can avoid in a room, actively attack or who might chase you, there’s the enemy on entry that triggers a set number of encounters once you enter the room and there’s the random encounter.

Personally, I’m drawn to the random encounter option. I’ve always found that it encourages you to complete grinding and levelling up as you trek from location to location rather that arriving underprepared or having to divert away from the continuing storyline to simply level up your characters. I also see it as an opportunity to place increasing control in the users hands as the game progresses. For example allowing them the option to flee early on and then later to equip clothing or armour that makes them less susceptible to attack or detection in the area. 

I’ll look at developing this more later but at this stage I’m going to start working with a random encounter model as a base and work outwards from there. Manageable growth and all that!

As it stands currently, I have a setting variable that is simply an integer representing the type of location that we’re in. Say for example that 1 is the worldscape, 2 cityscape, and 3 is battlescape. Each time gameloop goes around it generates random number between 1 and 1000, and if it falls on 3 it triggers a battle between the player characters and a mob. Obviously this would need catches in place to prevent it rolling 3 every time for several consecutive loops as that would be tiresome to say the least and it would need modifiers in place for areas where mobs were rampaging and where they were sparse, but we’ll start here and work outward.

Tonight’s project. 

  1. Trigger and start a new intent to manage the battle loop outside the main game loop.
  2. Create battle loop that checks for user input and triggers mob turns once the players turn is complete.
  3. Receive and respond to user input. Simple input. Player turn complete? Yes/No. 

Keeping it simple at this point, and not implementing any battle features until the loop and it’s function is complete and robust.
TL;DR – Many years of game playing tells me that without something to attack this will get tedious! So lets give our hero a loop to throw down in.