Home Creators Posts Import Register Favorites Logout

Content

Out of the prep work and back into the field. It felt a little weird writing code again after a week or two of more preplanning and research.

Before I could forget to do so, I fixed that bug from the pre-alpha release that would crash the game if you died with what I refer to as the Grenade Upgrade, the one that makes your bullet leave behind an object that shoots out more bullets for you. It was a pretty simple fix—it was referencing a variable from the Player Character, but the dead Player Character isn’t there to reference. I through in a conditional statement and now if there is no Player Character, it won’t make that reference call.

After that was the big challenge. Presenting the player with a handful of random upgrades from which to choose between, allowing the player to actually chose one of those options, and having that option provide the specified upgrade.

The actual menu itself was easy to implement, being a simple array of options and checking for an input from the player to move a ‘position’ variable in order to determine what exactly the player currently has selected. This is far from perfect right now, as it’s checking for individual button presses and thus cannot be held down, and lacks controller support, but I think it should be easy to fix both of these problems. I also need to figure out which button on the keyboard should be the Confirm button because I don’t know how I feel about it being the Space Bar. I’d also love mouse support for the menu as well, considering that the mouse is how you aim on keyboard controls.

The trick was actually having option on the menu to choose between. Luckily, the different choices on the menu are pulled from an array, I could make that a variable I could change on the fly.

I took inspiration from how the bullet system works and created a constructor function, which allows me to create an array and assign variable values to each item within the array. Namely, I could assign a name and description to each item. Then, before the choice menu calls the array, I create a shuffled version of it and place the first four options of the shuffled array into the four menu options. I was honestly surprised by how well that worked.

The tricky part was making them actually do things when you select them. Luckily, there’s a built-in function in Game Maker called ‘Script Execute’ that lets me run a function which can be assigned to a variable, so much like how I assigned a name and description to each upgrade or perk or whatever I’ll call them, I created a function and assigned it to a variable within each item in the array, and then in the menu, I used the Script Execute on that variable to run code unique to each perk.

There was a brief snag when I overcomplicated the code to do this and it wouldn’t run, but I quickly figured out the problem and fixed it.

My plan for this week is to further refine this code by taking it out of an ugly menu box that for some reason isn’t scaling correctly to fit all of the text inside of it to having something akin to cards which have the name and description of the upgrade on them. The current functionality lacks a place to put that description variable that I assigned to it, but I’ve already created that variable so calling it won’t be an issue. I may have to work out how to make text wrap to fit the card I put it on, but that shouldn’t be hard to figure out considering it’s necessary for all forms of dialogue boxes.

I’ve also elected to have a monthly release of the current in-progress build. We’re remarkably close to an alpha build of the project right now, but also playtesting and feedback is a crucial part of the design and development process. Seeing as I cannot afford to hire a full Playtesting team, I’m outsourcing that to you all. As you may remember, Tier 2 and Tier 3 Patrons get access to these builds a week earlier than everyone else.

My plan for this current build is to get the Perk Selection stuff working and implemented, which should mean you have a far greater ability to plan and strategize your builds. This will also mean adding in about two dozen new upgrades that I planned out these past two weeks, which I’ve mentioned in other DevLogs.

Also, the current setup is perfect for the plans I have with the story of this game. Though, again, adding narrative to a game takes valuable time and energy, which I may not have depending on my financial situation.

What I would like to have is this: The dungeon explored in the Roguelite sections is a mysterious dreamworld that the protagonist is trapped in every night, along with other people from the city where she lives. During the day is a Persona-style life sim (which shouldn’t be hard to code; it’s like 90% variable calls) while at night you make dungeon runs to attempt to discover the cause of the strange supernatural events you’re experiencing. You also form bonds with friends met both in the real world and the dream world—and, of course, anyone from the dream world can be met in the real world.

Increasing your bonds with these characters would steadily unlock new bonuses for the player, like increased health, more attempts at the dungeon ever night, etc. But the way that the perk system is set up, I can also have a separate array of new cards which can be added in, putting new cards in the pool. Meaning that I can reward new cards to the player for increasing their bonds.

Persona 3 already had almost all of the gameplay happen in a procedurally generated dungeon, so it’s not like there isn’t precedent.

Of course, pretty much all of that is a pipe dream at this point. We’ll see.

Until next Devlog!

-DeusVerve

Special thanks to my Tier 3 Patrons, Haelerin and Christos Kempf!

Comments

No comments found for this post.