Progress Report – Week 8

This week, I added functionality for text boxes and random encounters, and made the bullet hell fights into multiple separate encounters as opposed to a continuous gauntlet. The latter was good for testing the bullet hell combat in particular, but is unhelpful in the context of a full game; however, I have not gotten rid of the code I used for it, and may later use it to create encounters with multiple waves.

In addition, I introduced the keystone of the game: the menu-based toggle between RPG and top-down shooter gameplay. It is available on both the main menu and the pause menu, and currently functions without issue. The shooter style of gameplay is already in place and functions at an acceptable level; all that is left to do is add the RPG side of things and polish that to my satisfaction, and then I can focus on polishing what is already here and adding small new things to improve the experience. 

The manner in which random encounters work as of the time of this writing is as follows:

  • Each time the player takes a step (i.e. completes their movement pathing), a number is rolled for the global variable MobSeed. The table on which it is rolled is random, but the range depends on what the current room is–this allows different areas to have different encounter tables.
  • A local variable in the overworld player object, randint, is also rolled as a random number between 0 and 100, inclusive. If the result is less than 10 and the player is within a zone that permits random encounters, the game saves the player’s current room and X/Y coordinates within said room, then transports them to a separate room dedicated to random encounters. The room to which they are sent depends on the currently selected gameplay style.
  • Once there, the current value of MobSeed is checked. Depending on what it is, a different set of enemies is spawned.
  • In this way, the encounters themselves are not completely random, but they are still random–that is to say, the enemies that appear are not selected randomly on an individual level, but on a group level.

Bug Fixes:

  • The overworld player object spawns in in battles when it shouldn’t.
  • After ending an encounter, it boots the player back to the title screen.

Leave a comment