Programming More Efficiently, adjusting FPS and placing NPC’s

So my last update was a while ago, but I’ve finally been able to get back to work after going through a ton of job interviews and work and family related junk. When I got back to work, I went through a reviewed a lot of my program, to make sure everything was working as it should and figure out what my next step would be (having these updates was nice because I knew what I had completed and everything). One of the major things I noticed was my code had a lot of excess baggage that wasn’t strictly necessary. Although it functioned fine, it was essentially a repeat step I used multiple times throughout the code. More or less, I had a number of if/else statements that would cause some given variable to be set. Once the variable was set, I would adjust it so it would print out on the screen correctly. However, I did this for every single one of the possible variables, which led to me repeating that portion of the code way, way too many times. I realized it, though, so I shifted all of it to the end and simply adjusted whatever variable I was using after I had selected the correct variable, eliminating about 50-100 lines of code.

After fixing up a little of my code, I went into game to see what I had finished. While I was pretty happy with navigating, talking to the NPC’s I had programmed into the game, activating battles and using the menu, I noticed the movement seemed extremely slow (I’ve been playing a shit ton of Fire Emblem, and the basic interface is pretty similar). For this reason, I bumped up my FPS from ~10 to ~50. I had initially set it fairly low because I didn’t want the player to be able to sprint around the map at like mach 6, but I wasn’t accounting for all the stops the player would have to make throughout the game for villages and stores and bosses and battles and everything. For this reason, I shifted it to make the game a lot more fluid and much less choppy. Ten FPS was probably really low in the first place, but that’s what designing games is for – learning.

Once that was pretty set, I started putting together the rest of the NPC’s. I stored all of the data I needed to input in my game design notebook, so I simply had to fill out all that info and put it into the game (after setting variables and everything). I’m not quite done, yet, but after testing it out and making sure it all works, for the first few levels it should just be a little bit of busy work to implement the rest.

After I’m finished with placing the NPC’s, I need to write out the chat lines for each of them. I’ve already set that up, as well, so I just need to input the lines. I don’t have everything set for that, but I made notes about what I want each of the given NPC’s to say in my notebook as well. After that I’m not sure where I want to go. I still need to debug my battle system a LOT, I still need to implement the bosses, my menu still needs a little work, I need to design cut-scenes, I need to design treasure chests, and I could probably do some work as far as the items go as well. There’s still a lot of work to do, basically, but I like how far I’ve come after looking back at everything I’ve done. I also need an artist because there’s no way in hell I’m gonna be drawing anything for this game.

There’s the update for now, I’ll get another out soon.