Friday, July 9, 2010

SFPC - July Combat Test Preview Video

I wouldn't call this the official July video, but I felt like seeing if I could do a quick video this morning and maybe try having smaller videos more often. I had to quickly reinstall VirtualDub and FRAPS first this morning since I forgot to reinstall them when I put together my new PC, and the video compression settings were a little off so the video quality is not where I usually like it.

Anyway, this primarily shows off the range checking code. I've tested it on ranges up through 5 and it works fine, but I just have it set to do a plain melee range check for the video. The game loops through the established initiative order, which is currently just all characters in the battle sorted based on agility. (Is this correct? I don't know! Feel free to chime in below in the comments!) The code looks for any potential targets within range and just lists them in the debug info. Note that the Dark Dwarves are not AI controlled at this point, that's still a ways off, I'm pulling all the strings here with the keyboard. They are, however, on the enemy team. You'll notice for instance when Sarah does a range check near the end of the video, it does not list Bowie or Chester as valid targets. Only units on the opposing team will show up on the target list.

I've been dragging my feet on doing the next post on the scripting system, I should work on that soon. As a hint for the question from last time: what happens to the chest when you leave the map and return later? Also on that note, from the comments, BNC was right about the chest-opening music, and I didn't even think of that part! I'll have to work that in eventually, too.


  1. Great work. Looking forward to seeing more progress and the next demo.

  2. There is some randomness to turn initiative but it is hard to tell because I'm pretty sure Shining Force 2 rotates characters who have the same agility each cycle. So, for example, say you have two characters who each have 10 Agility. On cycle one it will be A then B. On cycle two it will rotate them so B goes first (assuming they have the same agility still).

    Ultimately if you want to throw some randomness in you can make it Agility + random number, Agility + a class-based modifier or whatever you want ultimately. From the perspective of someone looking forward to using the engine I must ask for the ability to override agility when scripting battles. There are times when you want a specified sequence of units moving.

    Finally Shining Force 2 interprets any agility value of 128+ as two turns. It then takes the original agility value, subtracts 128, and uses that as the unit's battle agility.

  3. Now, I have little to no knowledge of any real coding (a high school year with VB and messing with RM2K3 I don't think counts). So, with the chest, if you where to leave the map and come back it would be reset. Perhaps you would have to give each chest an individual value, 0 for closed and 1 for open and save them. That would make for a lot of values though.

    As for agility, Ladyabaxa is correct. I also tend to agree with her ideas of randomness agility (perhaps at the beginning of combat the engine generates a random number and adds that to agility).

    Once again, I'm getting even more excited with each video. Keep it up!