So I think I have the layout done for the battle screen. I've devised a dynamic border based on the length of the enemy name. Sadly, as it gets longer, it does seem to pad with a little spacing, I'm not entirely sure how to combat that yet.

The code in question:

Code:
Text(133,5,Str5
length(Str5)9->Q
Line(1,58,4+Q,58,12,1
Line(1,78,4+Q,78,12,1
Line(0,59,0,77,12,1
Line(5+Q,77,5+Q,59,12,1

Line(3,60,2+Q,60,12,1
Line(3,76,2+Q,76,12,1
Line(2,61,2,75,12,1
Line(3+Q,75,3+Q,61,12,1


I'm happy enough with it for now to start making progress on the actual battle system. The "dialogue box" at the bottom will contain everything. Will let you use items, choose magics, etc, along with telling you the actions of what is going on. I hope. I'm also contemplating raising the height of the dialogue box up to touch the bottom of the action box. Thoughts?

Edit:

Staring at it, it seems that the problem is stemming from characters that aren't as wide as others. The fix available seems like figuring out the characters that are narrower, and if it comes across those to reduce the values slightly, but that seems like an unnecessary pain to implement. I wonder if the lowercase letters offer more of a consistency than uppercase, or if they are both just chaotic in widths?


Throwing this up here as an alternate dialogue box sizing. Would appreciate your guys' thoughts on if this one, or the previous post's image layout is better.
The bigger text box looks cleaner to me, unless you're going to be filling all of that whitespace above it with more graphics.
Nope, the one graphic takes 3ish seconds to draw. I have been contemplating trying to use Line( to draw some quick graphics to depict attack and such, but I haven't settled on that. I need to verify the filled in > will fit properly in the attack options menu, and begin the process of starting making the battle system actually do something..

Edit:



So I added in chances to flee. Currently when you fail to flee, it just sends you back to the menu, however once I get it set up so the enemy attacks, it will go there, finishing your turn.

In order to flee, you need to be at least 5 levels higher than the enemy. I did not institute a speed system in the past, not implementing it now. If you are less than 5 levels stronger than the enemy, a randInt(1,10) is done, and you have to be lucky enough to match 1 of 3 values in order to successfully run, otherwise you stay and fight.

I think the next object to set up will be the items system, since it's 2 things, and then attacking for both player and enemy.

My goal is to wrap it all up within 1 program for battling. We shall see how well I can pull that off.

Battle program sits just under 3k in size as of now. Once everything works, I'll toss it to SC to swap all caps over to some smaller case lettering.
Been making small leaps in progress with the battle system. As of now, all the text is now nicer looking with lower case letters. I've completed the Items feature, though as there is no enemy attacking segment yet it just returns back to the action box. This will be corrected once basic enemy attacking can be implemented.

I've been working on the Magic segment, it all happily fits inside the dialogue box, so glad we expanded it out. I've also set it up so that "EXIT" is variable on the screen. If you don't have enough MP to cast the weakest spell, that will be on the first line. If you have 3 magics you can cast, it'll be the 4th option. Was pretty easy to implement, and makes things look a little nicer and more dynamic. Now I need to see about implementing each of the options in that menu, honestly should be pretty easy to pull off, just require the time and the focus to make that happen.
Small update, sadly no pictures yet of progress. Wanting to do a bit of a gif once I get this thing to where both parties can attack...

Anyways, theoretically, I have magic able to be cast against the enemies, and to cast healing spells against yourself. I made an adjustment for "Heal", it now gives you back 200 HP. I added a slight modifier to the attack magics to help deliver a little more variance of damage than old me had it set up. I will, of course, try to adjust enemy stats to compensate a bit as the player progresses.

Really the only thing left outside of testing magics (I can do it, just need to adjust a few values to make it testable..) I just need normal attacking set up, which honestly shouldn't take long, and then we can work on having the enemy strike back normally!. Once I get that going, we'll be able to fold the battle system into the main engine and see about making random battles truly happen 🙂

The battle program sits currently at 8,880 bytes.
Are those sprites all just a bunch of Pt-Ons?
Oxiti8 wrote:
Are those sprites all just a bunch of Pt-Ons?


Nope, I use a routine I created called Hex2Sprite, it uses custom Hex by adding the character G to indicate the end of a line. It takes about 3ish seconds to load a sprite on the screen. 🙂
...So are they still rendered using Pt-On? Looks too big to be Pxl-On and text sprites are unviable
Yes, the routine itself uses a loop with Pt-On( to display the sprite.


Code:
5->Z:2->G:1->V:1->U
While V<length(Str4)+1
   inString("123456789ABCDEFG",sub(Str4,V,1->theta
   If theta>0 and theta<16:Then
      Pt-On(Z,B,9+theta,1
   End
   V+1->V:Z+3->Z
   If U>A or theta=16:Then
   5->Z:B-3->B:1->U:End
End

Is the routine that draws the sprite.
Quick update for the battle system!



There needs to be some polishing of text placement, of how long the Wait command goes before it continues. And I still haven't dealt with the Victory screen as of yet. But.. There is a back and forth being done with the attacks. I need to verify that use of magics sends you to enemy attacking, same with item usage.

I'm genuinely feeling pretty good about progress, now 🙂


Edit
Here is a question for you all. Should I show the enemy health as a bar or numbers? Or is the mystery of the health not being shown better for enjoyment?
So a bit of an update. I've been working on the battle system still, haven't messed with the hp bar as of now, still debating best implementation of such a thing. I think best scenario will be to lower the enemy sprite 8ish pixels, and put the bar there.

But as of now, everything should be functional. At least it is on paper, outside of enemy using magic. I think there's 1 or 2 on the first map that has that ability, but they can only use Cure, so it's not super important to me at this juncture.

I've coded in the death and victory scenarios. For the death scenario, I need to actually set up the title screen so it gives the player the ability to start new or load from save data. Still designing that, I want something slightly fancy, we'll see what I can come up with 🙂

The victory portion should be ready, along with learning new magics and leveling up. I believe I've managed to get the player's magics all working, but again all on paper and currently untested. Need to link the chance for encountering enemies into the main game engine so I have the ability to properly test, level my character, and see how things react.

Edit:



Had some issues with values not updating like they should be, forgot to add in those changes to stats. Sadly the lowercase characters are smaller than the uppercase, so my placement of the values showing up in the text lines are a little off. Oops lol And I clearly put the wrong value for the Defense up text line..

At least learning a new magic shows up properly lol


Each level up increases health and magic way too much, so I'll need to adjust that.

I'm incredibly excited we can get to a victory screen, now 🙂

Was laying in bed last night and managed to get some values actually displaying correctly, and it seems to raise the stats properly. There is clearly a little bit of text alignment that needs to be smoothed out, and I'll get that going this weekend I hope. Next aspect is getting it tied into the walking engine. Out side of the minor adjustments, I still need to get the enemy using magic, and tie this into the walking engine. Once I can get all of that going, will try for a gif of it all tied together? We'll see.
Wow this is impressive love the pixel art can't wait to see it when its done! 😁
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement