Nay Saga Devlog 3: Digital Prototype Hints & VS CPU
I'm back with more updates about Nay Saga, my (digital) card game! It'll be physical in the end, but this time I made a lot more progress on the digital version.
So I started out by actually thinking more about the digital version. At first, it was just an idea to prototype and test by myself... but I wanted it to become something more. I started to brainstorm story ideas and ways to make this into an actual game so more people could experience it beyond those who have the physical version. I came up with this idea that because it involves all (or at least a lot) of characters from The Nays, I want it to be kind of a summary/look back on the story. So I'm thinking it'll involve Jibu, Mr Dude, and (maybe) Mahllory (or Gojo/Ralphie?) as the three main characters. Each of them can have a different card playing style and they'll walk the player through different aspects of the bigger The Nays story. Through this, they'll unlock cards in chronological order based on when characters first appear in the story. I really liked the idea of connecting this all together better.
So I decided to sketch out some of the digital menus. Super basic wireframes, just to think about how the player would walk through the menus. I want there to be a story mode with the ideas discussed above, and then also a free play where everything's already unlocked and you can just play the card game. This mode might even have a PVP mode if I can figure out a good method for it. I know I can make it kind of work with the first mode I'm working on, but with the ones that have hands, I may just not have that be an option for those.
I finally decided to work on the AI CPU so I could actually start testing this game out. And this ended up being a long journey for me. A week of intensive programming that was ahead of me. I started out with another p5 project to figure out the basics of how the CPU would generate hints, based on the character cards in the hand. I started with a lot of arrays... and the whole thing ended up being mostly arrays, honestly.
I had the basics down for how to store the data in arrays, but it was pretty new to me to figure out how to find the most frequently used data that I could pull out and reference and sort through. I spent a lot of time on Stack Overflow and W3 Schools trying to actually learn how arrays work more. It was pretty difficult and some of the code I still don't have a full grasp of how it's working, but I got it all to work in the end! This article on Medium was super helpful for understanding a lot of it. I didn't have everything 100% working in p5, but it was close enough that I figured I would finish it up in RPG Maker.
So I transitioned back to RPG Maker. I started by storing all of my arrays in variables and actually wrote the RPG Maker script in p5 first before I added it, because it was a lot of code. Once I defined all of those variables, I moved on to the main code.
I realized I had to copy a lot of variable data and push it back and forth to make them globally available, as I was making the scripts. I imported the functions with the arrays pretty much exactly and they worked as they did in p5. So it cycles through and finds the most frequently used value, and which location it's in, within the array.
From there, I basically converted most of the end parts of the code to RPG Maker events. It was a lot of if statements and looping around all of the data, so that was a lot easier to accomplish in RPG Maker. I made use of labels to loop it back and conditional branches to check for each value.
Then I created the code to determine which hint to give, based on if the most frequent trait matched any of the random character's. If it doesn't, it loops back to the start and does it all over again. So I finally had a way to loop it back if it didn't find a match, but I realized that I needed a way to remove the most frequent element so it wouldn't just pop up again. I ended up creating a for loop that basically iterates through and removes every instance of that trait (turning it into "0"), so I can have it ignore that trait when it goes back through. This worked out really well and I got it up and running!
Everything was working! I had a lot easier of a time creating this in RPG Maker than I did when I was just confined to p5. Though I will say, this is definitely the longest RPG Maker script I've ever created. I had considered turning it into a plugin even, but that seemed more complicated than it was worth, so I just put comments around my large script event.
I also was printing to the console quite a bit while I was debugging. This was a lot faster than going into the F9 variable manager in RPG Maker to check every time something changed. It also gave me more real-time feedback on what was happening at what moment.
So then I started to work on the playability of the project, since it was all functional. I made a total of up to 3 hints show up, and it iterates through and keeps choosing them. They pin to the screen and show different information based on the variables. I also figured out how to add icons to them so they can more directly relate to the cards and make it easier for the player to decipher the hints. And then I also updated some of the placements and look overall, to organize all of the information a bit better. I updated the correct/incorrect positions and effects as well.
So this was a huge programming journey for me this time! I know this was very light on the actual visuals, but I accomplished a lot and I'm so happy that it's playable and I can actually fully test it by myself! There are still some things I want to do to improve it, but the bare bones are there and I've been testing it out. It's been fun so far, so that's what's important!
Get Nay Saga
Nay Saga
Card Game about Timelines and Collaboration
Status | Released |
Author | Michelle Rakar |
Genre | Card Game, Simulation |
Tags | Board Game, Deck Building, Relaxing, RPG Maker, Singleplayer, Tabletop, Tabletop role-playing game, Turn-based |
Languages | English |
Accessibility | Subtitles, One button |
Leave a comment
Log in with itch.io to leave a comment.