Last week, I was sick. During that time, I put together an in-depth guide to creating your very own battle (referred to as "encounter" in the guide, for clarity purposes). The guide also contains a description of every class involved in this program, along with methods (for nearly every class) that will/may be useful to you. Creating an encounter should be easy if you read this guide. I'll try to post my latest draft here as soon as I get to a computer; I'm on mobile right now.
In other news, I was working on the engine earlier today. I created a new attack for my battle, using the purple soul. While I was working on this attack, I ran into a problem I had run into before while working on a green soul attack: occasionally, projectiles wouldn't collide with the soul. So I began searching for the problem in my code. Let me tell you, there is A LOT of code. After reading line after line, examining the logic in my head, I decided to display the coordinates of the picture and the collision box of each projectile. The results were: (the x value I set, the y value I set) and (0, 0), respectively. Huh, that's strange. So I looked at the differences between the code for this attack and the ones that worked. Nothing. It looks exactly the same... How strange. But then I looked closer. Turns out that the constructor I used to create the projectiles in this attack was a different one than in the other attack. Aha! After doing some digging through the code (this time following a known path, rather than just randomly searching for problems), I arrived at a dead end: the constructor for CollisionLabel. This is the end of the rabbit hole (or at least, the particular end that I was looking for); the only method calls in this portion of code are for built in methods by Java - there's definitely nothing wrong there, or, at least, nothing I can fix. So I looked over this code, reading the lines a few times. Whatever's wrong must be here... But what? It all looks fine. Then, after looking at a particular line, it hit me. Of course! Turns out that I moved the image to where it needs to be, but I forgot to move the collision box. So I added the extra line, and now everything (directly related to that issue) works now.
Tuesday, February 23, 2016
Wednesday, February 10, 2016
Pictures, as promised
A few posts ago, I promised some pictures, so here they are. In the meantime, I've also added the ability to play sound, but since I can't capture that with a screenshot, I'll have to improvise.
Ding! The blue soul.
Pew pew. The yellow soul.
This one doesn't really have sound effects...
Unfortunately, I was unable to get a screenshot of the actual attack with the animation and health bar fast enough. I'm doing this on a Mac right now, and, as Mac users know, you can't get a screenshot and do controls at the same time. At least, I don't know how to do that.
Friday, February 5, 2016
Submenu Navigation
I've been avoiding it for a while, but today I finally coded the submenus. Now item, act, and mercy can have submenus, and you can even move your cursor around them! I've programmed the mercy menu first, since it's always the same. Setting up the act menu will be up to the Battle subclass that's currently running, and item will be set up dynamically. Good progress!
Tuesday, February 2, 2016
Soul Colors and Fighting!
Over the weekend, I put in some work on the engine. I finalized the attack option and allowed the main game loop to pause to allow smooth transition from the player's attack to the monster's attack, with no jumpiness. Everything there is working properly now.
I've also been working on different soul colors. This week, I've implemented blue soul (gravity affected for those of you who haven't played), yellow soul (grants the ability to shoot projectiles), and purple soul (places the soul on strings). I'll include pictures later.
I've also been working on different soul colors. This week, I've implemented blue soul (gravity affected for those of you who haven't played), yellow soul (grants the ability to shoot projectiles), and purple soul (places the soul on strings). I'll include pictures later.
Subscribe to:
Posts (Atom)