Tuesday, 6 October 2015

my first three Python scripts (programs)

1

inventory = ["sword", "Shield", "Charm", "Luck"]
spent = ""
word = ""
import random
while inventory != "":

 word = random.choice(inventory)
 print (word)
 spent = spent+word

 if word in spent:
  inventory.remove(word)
 else:
     print("/n")

 input ("press a key")

What this program does is select a word at random from a list.
Then it displays the word.
It then selects another word, it will not select the same word more than once.
It will always be a random selection.
The program concludes when there are no more words to display.

2

def game():
    again = ""
    buy = ""
    wallet = 30
    attributes = {"Dexterity": 30, "Wisdom":30, "Health":30, "Strength":30}
    print (attributes)
    while again != "n":
        if attributes == "":
            print("goodbye!")
        else:
            choice = int(input("1 = exit \n 2 = spend money on attributes \n for your character. \n 3 = sell an attribute. \n 4 = sell off an entire attribute. \n Choose a number from 1-4:"))
            choices = {1, 2, 3, 4}
            while choice in choices:
                if choice == 1:
                    print ("Goodbye")
                    input ("press a key")
                elif choice == 2:
                    #spend coin
                    buy = input ("what would you like to spend money on?:")
                    if buy in attributes:
                        attributes[buy] += 5
                        wallet -= 5
                        print ("You have ", wallet, " dollars left"); print (attributes)
                    else: print ("that is not a legit attribute!")
                    again = input ("play again y/n")
                    if wallet <= 0: print ("you can't play anymore"); break
                elif choice == 3:
                    #make coin
                    sell = input ("what would you like to sell for money?:")
                    if sell in attributes:
                        attributes[sell] -= 5
                        wallet += 5
                        print ("You have ", wallet, " dollars left"); print (attributes)
                    else: print ("that is not a legit attribute!")
                    again = input ("play again y/n")
                    if wallet <= 0: print ("you can't play anymore"); break
                elif choice == 4:
                    #sell an attribute
                    sellAll = input ("which attribute would you like to sell all of?:")
                    if sellAll in attributes:
                        wallet += attributes[sellAll]
                        del attributes[sellAll]
                        print ("You have ", wallet, " dollars left"); print (attributes)
                    else: print ("that is not a legit attribute!")
                    again = input ("play again y/n")
                    if wallet <= 0: print ("you can't play anymore"); break

replay = input("Are you tough enough to play? y/n")

if replay == "y": game()

This program still has a ton of bugs in it.
What it does is display a list of attributes and quantities of those attributes that your character has in his inventory.
Then the program gives you the option of selling some of or all of any of the attributes, or buying more of any of the attributes. I haven't yet got it to the point where you can choose to do anything.
It all runs fine until you decide to take a different action.
The program never returns to the main menu to list your available actions, it just repeats the question, for example, "what would you like to spend money on?" whereas it should say "what would you like to do next?"

3

parents = {"Luke Skywalker": "Darth Vader", "Judy Garland":"Liza Minelli", "Peter Fonda":"Henry Fonda", "Kate Hudson":"Goldie Hawn"}
print ("I know these children")
allInherit = list(parents.keys())
print (allInherit)
child = input ("Tell me a child and I will tell you their parent.")
if child in parents:
    inheritance = parents[child]
    print (inheritance)
    input ("press a key.")

This program is much simpler.
The program lists a number of people's names and boasts that it can tell you the name of one of their parents. You are supposed to input one of the names, be sure to spell it correctly. And the program will display the name of the parent.
This works, but it is a bit too simple, it does one thing and then exits.

Sunday, 30 August 2015

After Burner - stages 1 and 2 (sega master system)

The first couple of attempts I'm left feeling is that it? Is that worth considering for a top games list? Or am I simply remembering and romanticising the arcade version which was shaped like a fighter jet and bent and moved with the jet on the screen. And vibrated when your jet got shot.

I soon begin to realise that there is a certain amount of skill in getting to stage two without losing a plane. Or without losing more than one. To start with I just stay in first position and rapid fire at the wave of enemies like synchronised swimmers, darting back and forth in unison before me.

Then I dip to the left when they come by that side. Dip to my right as they are bound to go there next. This isn't easy, only because the controls are clunky. The enemy lacks AI so I dare not call it intelligent, and enemy behaviour is designed so poorly I can predict even without having played it before, where their ships will go next and what maneuver they will try.

Despite this drawback, it is satisfying reaching stage two. And when I die and return to the beginning, I do still want to play again because I learned something from my mistakes. And I want to see how my new skills will be rewarded, how better I can play that first stage. Like fighting with the ghost of myself and winning.

The graphics are not so lacking. It's not Tempest (Atari Jaguar), but the fighter jet animated, scratchy images take me back to a simpler time. The music and sound FX also remind me of that first time I played After Burner at the arcade in that massive Jet seat. Before big games like that cost $3 for one game and a game would last about ten seconds because they built them with the re-feeding of coins in mind.

So you pull up to tilt the plane upwards and climb, and you press down to tilt down and dip the front of the plane so you descend. A weakness I notice is that you can't dip right down to the ground or climb so high you stall - lacking realism and potential for more interesting design elements.

This limits the game design, mainly because anything more would require a lot of programming to fill in all those extra design elements - the crashing of the plane into the environment, what the pilot would see if he was pointing straight up. This is a simple game, limitations are there to keep the scale down.

Shooting enemy is fairly simple. When they come into your crosshairs, press B (second action button.) You dip and tilt to aim. You also need to avoid or shoot missiles that are shot at you by some of the enemy jets and helicopters. This is easy to begin with, but the controls are a bit awkward so it can get more difficult the more enemies and obstacles you have to destroy.

Overall, it begins as a challenging and fun game for fans of retro. But it's loaded with weaknesses, poor design and a big, dumb and clunky attitude.

Saturday, 2 May 2015

Crash Cancelled

A video on Youtube brings us the first peek of Crash Landed – the unreleased demo of a cancelled Crash Bandicoot game for DS by Renegade Kid studios. Other games by the studio: Moon an FPS that looks like a cross between Doom and Alien Trilogy (PSX) and yet has a very slick and cool feel to the movement, which elevates it somewhat from the difficulty of making an FPS work on the DS. The Nintendo DS is not designed for first person shooters. The screen isn’t big enough, the controls are too small, the system was designed to be portable not cinematic. Dementium II - a horror FPS sequel, (with echoes of the House on Haunted Hill 1999 movie remake,) has creepy and volatile visuals, but is lacking in freshness. By now you get the idea of the kind of game these guys like to make - first person, walk around and be engaged (shooting or jumping.) So not thinky games, like Braid and Limbo – which is surprising because the xbox would be a perfect home to a cinematic FPS and the DS would be a good home for a cerebral 2D platformer. These games were switched at birth.
As far as the video of the cancelled game, leaked by the studio onto Youtube, Sonic springs to mind – with the precision jumping, collecting objects, ricocheting enemies to defeat them. The tone of a classic platformer, but with an added dimension. The genre never really succeeded in transitioning from 2D to 3D back in the days of the original Tomb Raider, where navigating 3D space just feels awkward. Except in the PSX game Tenchu which simulated all the slippery mischief ninjas enjoy – turning a rope and grapple hook into a flying fox, sneaking up behind people and slitting their throat, creeping alongside walls (somewhat reminded of another great game about creeping, Metal Gear Solid – especially in the VR Training.) In Tenchu, your ninja negotiates 3D space with ease, but then movement is so important to the mechanics of that game. Tenchu is about moving like an assassin, it would not have worked at all if its Japanese developer, Acquire hadn’t figured out a way to make the movement a fun process.

The results of the 2D to 3D platform transition experiment were the weird hybrids of Spyro and Crash Bandicoot which did manage to find their own audience among a certain type of hungry gamer. This was before games like Lego Star Wars began to address the problem with navigation in 3D space.

Wall E DS would be an exception, but that’s because he moves slowly, wheel tracks instead of legs. Crash of Crash Bandicoot walks and runs faster than the time it takes to ingest the environment. It would require tiny taps of movement – small spurts to be as effective in 3D as Sonic is in 2D.
What do fans think of the demo?

There seem to be two schools of thought on the demo. One thinks that the demo is harking back to the classic platform style – which seems to be a good thing according to fans.

The other thinks that it looks drab, clunky and that only Naughty Dog should do Crash games. Which I think is a little unfair, considering the demo was built in two weeks.

Sunday, 12 April 2015

Nintendo Dreams - Bionicle Heroes DS

Learning to jump, I feel like a baby deer learning to walk. What's a baby deer called? Venison.

The enemy robots roll up in ball form. So far I have been unable to emulate this maneuver. They also come at me incredibly quickly, which would be menacing if they weren't so easy to destroy. The next enemy I meet is a humanoid like me. I shoot him, (which is probably the one simple action a robot performs.) And he dies.

I'm not even sure that these robots are alive. But I am, so I treat them as such. And yet I kill them, go figure. It is the nature of the game. They are very eager to kill me so I consider it self defence. A few more advance on me, but I stand well back and shoot them while they are balls.

I hear a strange noise. Not exactly a buzzing. It sounds like car radio static doing an impersonation of  a buzzing bee. It's not in my ear and I'm not sure if it's coming from above, though you'd expect as much. The field and sky are filled with this noise and it has no centre. Finally, I find the culprit - a robot locust with guns. Well I assume it has guns because all of the other robots do.

Except it isn't actually shooting at me yet. I very slowly aim at it, because that involves looking up. Because I take so long, it shoots first. But when I blam my guns, I kill it quickly.

There are two others, so I repeat the tedious process and arise the victor. Suddenly, I begin to shake violently. Again. And again. I'm being shot at, but I can't see the perpetrator of this heinous crime. I use my radar and gradually turn around to view my enemy. It's a green spider-crab thing. I'm concerned about my health, because turning around has taken a long time and the spider-crab thing is a fast shooter. But it dies just like the rest.

The enemy squads seem inexhaustible. As soon as I finish killing the next batch, new balls roll up. But less than a second after they transform into humanoid form, they fall to pieces because I've been shooting at them since they appeared. It's only the high and low robots that seem to be giving me trouble.

Looking up and down is unfortunately the only complex challenge in this entire experience. Whenever a robot falls to pieces, it drops a number of cogs. Collecting the cogs recharges my health. Apparently cogs heal robot wounds.

I find myself in a room alot like all of the other rooms, fighting enemies that look alot like all of the other enemies. Enduring a process of slowly aiming and quickly killing which is becoming all too familiar. Only somebody shoots me and it's all black again.

I do remember dying. Neglecting to keep an eye on my health report and pick up cogs to compensate probably made an early death inevitable. But because I'm a robot, it didn't hurt. Come to think of it, I haven't felt physical pain since this journey began. I guess I could say that a robot's death lacks gore.

It isn't very interesting, either. So I won't go on about it.

Wednesday, 8 April 2015

Nintendo Dreams - Star Trek: Tactical Assault DS (part four)

There is a destination on the warp screen called The Neutral Zone, which means I'm not actually in the Neutral Zone, like I thought I was. So I hit the warp button. It's becoming less fun now. As soon as I arrive, we receive a distress signal from some planet that's being attacked. We warp over there, slickity-whip. I hail the green planet and the citizen tells me that the enemy are based on the moon. And guess what? We have to warp over there.

We finally reach the enemy ships. I can see one coming out from behind the moon. I hit L to lock on. It starts firing at me. Uh oh, I realise it's a freighter, but guess what? It's been customised with bigger guns. And there are two of them. This is not going to be easy. Because I don't know any better, I apply the same strategy as every other battle I've had so far in Star Trek Land.

Get close, shoot phasers. Tilt, swing by, side phasers. Turn, photon torpedo. Fly away, other side phasers as I retreat. Get the heck out of range while I recharge. I even over-clock my photon torpedo. Then repeat.

The problem with this strategy is that while I'm systematcially bruising one of the freighters, the other freighter is blasting me in the bum continuously with some kind of mega phaser. My shields are down pretty quickly. I've lost one of the ships tails, and I'm pretty sure I need that.

Now the rest of the ship is falling apart, beneath me. Mission Failed. Everything is dark. Darker than Space. Again.

That's the only life I've lost in this game world. So either it's random, which from what I know about Nintendo, is unlikely, or it's on some kind of timer. I spent about five minutes in training, three minutes foolishly wandering through Space. And I lasted two minutes in my first real battle. I probably was in Mech World for about ten minutes as well. I wish I knew how many game worlds there are, then I could calculate how long I have to live.

I'm a robot. Not inside a robot or a robotic suit like last time. I'm an actual robot. And the differences in the way my mind now operates are very confusing. For example, if I want to move any part of my body to my right, I move it to the right. It's the same with the left. As one might guess, this is normal.

But if I want to look up, I actually have to move my head down, and vice versa. This is very confusing and so it is also annoying. Walking is easy. Battling is not. The other robots are positioned all over the place, so this takes a lot of looking around and it's awkward. I do have radar. For this I am grateful, otherwise I would simply sit down and wait to die.

Except that I can't actually sit down. Or crouch. I can jump. But this is is also confusing...

Friday, 3 April 2015

Nintendo Dreams - Star Trek: Tactical Assault DS (part three)

I hit him. He's damaged. But my ship is almost a wreck. I back out of range while my photon torpedoes recharge. I decide to chance it and overclock them, (overclocking increases their power, but also increases recharge time.) Once recharged, I can't afford to get hit anymore, so I swoop in on tilt. Carefully centre the front of my ship (where the guns are) on the drone. And fire, destroying it. I let out a whoop, because this time I earned it. I won. But my ship is black and blue.

I can see really blackened damage on my ship's hull. But there's an emergency. Without repairs, I have to go into an actual battle to rescue a vessel from a rogue freighter. Apparently the freighter has small guns, but it's big and hostile.

I warp to the location, which is still fun despite my anxiety about having no shields. I find the freighter and start hitting it with my starboard phasers. And a photon torpedo for good measure. It's not going down. The vessel I was supposed to rescue explodes. The freighter is still firing, so I continue firing back.

As much as I enjoy certain elements of the experience and everything looks so cool, this battle really is no different from my last battle with the drone, and the one before that with the first drone. The only real difference is that this one is taking a really long time to kill - long enough that even with feeble guns, it might eventually destroy my ship.

I receive a hail from the Admiral, which is almost a relief. He's telling me to abort mission and return to the Training Facility. I respond that I don't want to, because I haven't killed the enemy, yet. He repeats the order, so I comply.

When I return, I am told that the battle with the freighter was a training exercise and I didn't fail, after all. Far from it, according to the Admiral, I and my crew acted outstandingly, with one exception - I need to learn to follow orders.

Finally, I am ready for my first mission: patrolling the Neutral Zone. As mundane as this sounds, it's pretty obvious I'll run into hostiles. This is a game, after all. As I'm leaving the Training Facility, I see a ship, so I hail it. This only results in idle chatter, so I try hailing the Training Facility. The Admiral offers his goodbyes and good lucks officially and that's the end of that conversation. So I set out on patrol.

I don't know which direction to go, as patrolling is pretty vague, so I pick one at random. I'm not going very fast, can see nothing but Space, and am unsure if I'm even going in the correct direction. After three minutes of this, I decide warp would speed things up a bit, and I discover my error...

Thursday, 2 April 2015

Nintendo Dreams - Star Trek: Tactical Assault DS (part two)

There are drones in space that I need to track, shoot and destroy. But they will shoot back, so I have been informed that we will need to go to red alert to turn on the shields and the weaponry. So I click the 'red alert' button. I'm not joking, it's that simple and obvious.

Tracking the drone is concluded sooner than I expected and the fight takes me by surprise. I can see two weapon buttons, already we're being shot at. Both of the weapons take time to recharge after firing. My first missile is a near miss. I remember now, a woman on my crew was telling me that firing range is about 46. I'm guessing that's kilometres.

I steer the ship out of range, watching the number on the view screen. Then I go in for the rematch in melee. As soon as the drone starts firing, I tilt the ship. Click the phaser, direct hit. I notice his shield integrity has been damaged by the blast. My instinct is to fire the missile again, but I don't want to miss. So I line up just so and fire before he can. I think maybe his shields will absorb the impact but then he'll lose shields. Instead, the missile goes straight through the damaged shield and detonates on the hull. The drone is destroyed.

I'm so excited, I do a little dance. Then the officer at the Training Facility says, 'We also have photon torpedoes.' Cheeky sod. Eventually I realise that the missiles I had been firing actually were photon torpedoes. What I also didn't realise is that I also have side phasers. So instead of always attacking my enemy head-on and losing most of my shields in the process, I can do drive-bys.

Gearing up for my second training battle, I have time to contemplate my situation (my Star Trek Land situation, not my stuck in Nintendo World situation.) Firstly, I have still not lost a life while being in Star Trek Land. Secondly, I doubt the Admiral will let me die while undergoing training in a Training Facility, ie the drones are non-lethal.

The second drone doesn't fall for the same trick. His shields are completely unaffected by my phaser strike, which I take to mean that I missed. Meanwhile my shields are taking major damage from the drone's phasers. Twenty seconds and I've lost outer shields. Ten more seconds and I've lost inner shields. My phasers are still having no effect. I have no shields. I finally hit him with an overclocked phaser, but his shields are showing green.

Screw it. I fire photon torpedoes...