Wednesday, 27 September 2017
Python App 2: The Finishing Touches (For Now)
Really it sounds like I did nothing much else when I word it as putting the "finishing touches", when in reality there was quite a bulk of work. I added multiple enemies (and being able to target those multiple enemies), and also gave them the ability to attack individually and give them a rudimentary AI (they heal themselves while their health is low, otherwise that is the one ability they don't use). In my own version, I also gave them the "Pray" magic I had created myself earlier, meaning they also replenish their own MPs. It has really given the enemies some real teeth, and needing some strategy to defeat!
I had also spent maybe 45 minutes trying to see how I could recreate it as a GUI application using Kivy, but realised I didn'y actually know enough about the ins-and-outs to effectively transfer it over, with buttons and the likes, even if I can create on a whim fancy buttons (that don't actually hook up to or do anything). I decided to continue with the course instead, at least until I've finished his lessons on using the built-in Python interfaces. Maybe then I'll have a better idea of how to manipulate the code better?
As usual, my code is available to peruse and learn from at my GitHub page. The course I am learning from is Nick Germaine's "The Complete Python Course: Beginner to Advanced!" Available at StackSkills.
Tuesday, 26 September 2017
Python App 2: Working, animated HP bars + Working items + building my Party!
I have turned it into somewhat of a game, where I pause the video and try to spot the error myself first, but still. It makes the learning experience needlessly difficult and harder to grasp. I don't want these words to be taken as slagging off the course, as on the other hand I enjoy the more conversational style. It means I can, generally, follow along. One other minor frustration is that he tends to have the program front and center on his recordings, wheras I would prefer either to have it only covering one one half of the screen (so I can code along with it on the other side), or to have the video tall and fill the entire screen, so I can snap it to one of the sides.
Now that is out of the way, onto what I was learning today. Firstly, I implemented some proper item usage code. Because I had already created a "charge" function (is function the right word? I get a little confused with the lingo, I mean something that works something out and comes back to you), I could use that for mp healing items too. I also replaced some of my own code with his, to do with only healing max hp/mp for elixers (rather than just healing a blanket 9999MP, which had the same effect but looked strange when the status came up as that on healing to max... It looks cleaner just having "fully restore mp".
After that, it was a kind of combined task to create animated statusbars with adding new party members. In some ways they went hand-in-hand with each other, and to my surprise it was increadiblyeasy (you just use classes, which act like a metaphorical "mould" when there is more than one of something, like characters). It was interesting seeing how to make the code cleaner by only calling a few lines of code a number of times (rather than copying and pasting that same piece of code multiple times, which is inefficient and results in a longer, and uglier, document).
It was quite a similar experience creating the hp bars. There is actually only one code for what a Name/HP/MP bar looks like... Then, for every character, it peeks at that template, and adds the character's own stats to it. Again, it was fascinating seeing solutions to problems I'd never even considered when sat at home playing games. I mean, if I thought about it logically I'd probably imagine it look something similar, but it's cool to implement these things myself and have them do the work for me.
My one frustration was... name lengths. I wasted a great deal of time trying to figure out how to deliver a fixed 9 character field for names on the HP bar, so they are laid out in something like a table rather than all over the place (and so, when a status update is posted like "Ronius attacks for 85!" it doesn't end up appearing "Ronius attacks for 85!". I gave up in the end... Which is maybe for the best, seeing as I want to somehow give this more of a GUI for Android and Windows (using Kivy), which will likely require an entirely different solution!
As usual, my code is available to peruse and learn from at my GitHub page. The course I am learning from is Nick Germaine's "The Complete Python Course: Beginner to Advanced!" Available at StackSkills.
Monday, 25 September 2017
Python App 2: Magic Class, Fixing Heals and Charge MP magic type!
The last lesson I completed was to do with moving magic into its own class rather than the main script. And, although the tutor nearly broke his (and my) game because of a mistake he made in the video, I managed to finish it successfully. I then realised I hadn't included a "heal" function for my Player... So I hacked it together, using some of the code for dealing damage, and replacing the minus sign with a plus. I also added an "if" statement that set the hp to maxhp if the HP went above that amount (effectively capping the HP to whatever the max is.
As such, the magic code looked like this:
...I then added a line to my main code copying the black magic code but replacing it as such:
def take_damage(self, dmg):
self.hp -= dmg
if self.hp < 0:
self.hp = 0
return self.hp
def heal(self, dmg):
self.hp += dmg
if self.hp > self.maxhp:
self.hp = self.maxhp
...
...
if spell.type == "white":
player.heal(magic_dmg)
print(bcolors.OKBLUE + "\n" + spell.name + " heals for", str(magic_dmg), "HP." + bcolors.ENDC)
elif spell.type == "black":
enemy.take_damage(magic_dmg)
print(bcolors.OKBLUE + "\n" + spell.name + " attacks for", str(magic_dmg), "HP." + bcolors.ENDC)
...
Feeling pleased with my work, I decided to create a magic that charges some MP called Pray (at a 0MP cost); first I created another copy of the heal code, but tweaked it as such:
...
def charge(self, dmg):
self.mp += dmg
if self.mp > self.maxmp:
self.mp = self.maxmp
...
And then finished by adding an extra line to the main script:
...
elif spell.type == "charge":
player.charge(magic_dmg)
print(bcolors.OKBLUE + "\n" + spell.name + " charges", str(magic_dmg), "MP." + bcolors.ENDC)
...
And... Well, it worked! Which astounded me! It may be a tiny thing, but it shows me that I'm actually learning the ropes and create my own deviations rather than purely copying/pasting code! It appears I'm actually understanding it!
As usual, my code is available to peruse and learn from at my GitHub page. The course I am learning from is Nick Germaine's "The Complete Python Course: Beginner to Advanced!" Available at StackSkills.
Saturday, 9 February 2013
Final Fantasy XIII: Key Facts Review
Final Fantasy XIII is like a supermodel; astoundingly beautiful but with little substance.
Gameplay: The intention of Square Enix with Final Fantasy XIII was to strip away much of the complexity in order for the game to appeal to a new, younger audience. In a sense you could say they were successful. You now only control one character in battle, and the game does much of the actual "strategy" for you using what is called the "Paradigm" system. This controls the abilities available to other characters, similar to how the class system worked on Final Fantasy 5. For me the nail in the coffin, and in a sense what also appears to be the whole direction of the game, is the "Auto-Battle" menu item for your main character. Apart from the occasional time you need to micro-manage, you don't even need to think about strategy besides the paradigm anymore! The simplification is also reflected in the "exploration" of the world environment. By exploration I mean, of course, a linear path going from A to B via C (the odd enemy) with your reward being D (usually a cut-scene). Lather, rinse, repeat. Maybe this really is bringing the game to the barebones of what actually makes an RPG game fun, but for me I didn't feel grounded in a real world inhabited by people effected by real events. And as if to make more of a mockery of previous games and their fans, a huge explorable area is tacked on in the last quarter of the game, which bears little relation to the rest of the story or it's world. When in a conversation it came up that the game gets better towards the end, I don't consider playing 40+ hours to get to the best bits a plus points. Don't get me wrong, I'm not expecting the interactivity or freedom of Skyrim in a Japanese RPG. Indeed, in a JRPG what I look for is a more linear story with a non-customisable but completely relatable main character, as part of a wider world and storyline with a clear beginning, middle and end. But this isn't so much a game as an interactive movie. And I feel like I'm playing for 40 hours before I can finally get to a "World Map" for the first time.
Graphics: Hands down, this is the best part. The graphics are simply stunning, especially for a multi-platform game. Square Enix aimed to create a game that looked as good at the recent Final Fantasy VII: Advent Children, and it definitely doesn't disappoint. Character animation is fluid; the environments are highly detailed and with very decent effects. I also have not seen a graphical glitch through the entire game. Graphically, the game does everything it can to draw you into the world.
Sound: Besides the title screen music and the battle theme, the soundtrack for this game feels uninspired. This is pretty disappointing for a series which prided itself for the quality of its music. Tunes don't really feel like they are going anywhere; they are slow, and have a real anti-climatic feel to them. An even bigger knee in the bollocks (and yet more representative of the "populist" direction of the series) is the fact the main theme of the game was changed in English additions to some crap from a Leona Lewis album. Advertising for the game apparently point to her being a huge fan of it. She seems almost as in awe of the graphics as I was, so it must be legit! I can't understate enough how much something like switching a theme song for "localised" markets can have on the affect of the game. It damages the (in this game somewhat limited) build up of the game's soundtrack. Voice acting is also disappointing- they seemed to forgotten the lessons learnt from Final Fantasy XII and it's amazing voice talent to go back a step with miserable-sounding actors. And if I have to hear Vanille one more time, I swear it will mean the end to my TV.
Overall: If you can get it for £5, and you are a serious, serious fan of the old games and just have to buy this, then get it. For every other fan of the series, the experience will probably be too depressing. You'd be better off getting Final Fantasy VII: Advent Children and Final Fantasy: The Spirits Within
on Blu Ray while downloading the free game Progress Quest, a far superior RPG that requires no user input at all! Almost like FFXIII.

