It’s the Little Things that will Get You First

Posted by Morpork at November 14th, 2008

It’s not supposed to sound this profound but… eh.

Have you ever had your toilet trickling water down the bowl constantly?
Do you ever need to listen to your drunken neighbours’ incessant laughter in the middle of the night?
Must you navigate bureaucracy to get what you want?

Now, you can have one less annoyance in your life - YouTube has restored the ability to pause videos before they load and allow you to do whatever you want and play the video after it has completed. No more switching tabs in the middle of reading because the video decided to play without you to pause and drag the progress bar to the front. More accurately, no more need to rewind, pause and drag the progress bar to the front (because it wouldn’t let you pause a “playing” video that has stopped because it isn’t finished yet)

One big annoyance < equal size of annoyance split over long periods of time

Posted in morpork| No Comments | 

-ail

Posted by Morpork at November 10th, 2008

male of hale, left no trail, fell in well, yell his ail, wail in gale, veiled by dell.
pale and frail, ate his nail, shell of male, all but frail, tell his tale, stay on rail.

sail on whale, hit its tail, pails to bail,
drank their ale, failed to quell, dwell in jail.

Posted in morpork| No Comments | 

LF CR

Posted by Morpork at October 26th, 2008

The end of university this year. My uni project turned out ok. It had all the features on the specification list (barring the hidden one). The animation and picture parts of my program was sloppy and contained hard coding. If I had another week without distractions, I would have made the small changes necessary to properly implement them. I think I will make it a point to do that after the exams.

C++ has quite the focus on objects. I think it is safe to say the University of Auckland’s Object Oriented Programming course has failed its objective because most students will not have used objects as they are intended… This is kind of my personal opinion and I have no way of knowing for sure but I think this is a fairly accurate estimation from the attitudes of many people I have met in the course.

On to the topic of this post… LF and CR are the (usually) hidden symbols denoting a newline. Wikipedia explains better so suffice to say LF is used by Linux and LF CR is used by windows. The result is code that is not portable to other systems. Only code that writes/reads text files though. Code itself is fine since Mr.Compiler discards them. Or was it Mr.Preprocessor?

For the time being this shouldn’t pose too much of a problem for me. Except that I’ll have to get Ubuntu or something to finish off the uni project because windows will eat my text file alive.

So many things to learn. Gotta start somewhere y’know…

Posted in morpork, Projects| 2 Comments | 

Level Up. Definitely.

Posted by Morpork at October 18th, 2008

Ahem. I do believe I know what I’m talking about… But this being an act of indulgence at the end of the uni project, it is customary to let me blab and flap my jaw and you sit there being a wonderful audience. Real work on the side project begins… after I deal with the exams. But I might sneak in a few sessions of hot sticky/sweaty coding. Eww. But the lab really is hot and the keyboards are sticky. Yuck.

Time to bore you all. A log I wrote in a fit of boredom. EnjoyDespair.

Log for computer programming in C++ for MECHENG 270, UoA.

Animation was part of the specifications, so the impulse decision was made to have the main() loop and do so indefinitely till a specific quit command was passed. At the end of this loop, SDL_Flip() refreshes the screen. Very useful for animations. Another reason for adoption of this code structure is because it is the first I was exposed to. (Lazy Foo Productions)

Concern: SDL_Flip being called several times a second can’t be a good thing. But then again the computer doesn’t seem to mind. There is no indication that this shouldn’t be done but perhaps a regulated framerate would reduce whatever phantom threat I am perceiving.

Regulating framerate? A timer class using SDL_GetTicks() should be used. It will record ticks at one time and another. Subtracting these two ticks will give you the time it took to get from that point to the current. If it is less than a certain arbitrary threshold, you can ask SDL to SDL_Delay(), effectively doing nothing for a specified amount of time. More accurately, freeze the program for that duration. The duration should be set as (1second / FRAMERATE) - TimetoGetHere.

Objects. The benefit of objects are hard to see and examples where this is obvious are not easily available apparently. Dynamically allocating memory to objects is good and returning after using them is a must. But for a project this size, (small, relatively speaking) declaring objects right off the bat is a lot easier and you won’t have to manage Scope and memory. Further more, doing away with inheritance but expanding the base class’ functionality will mean only a few base classes are needed. Not entirely proper object oriented approach but differences between some classes are so small the work needed to create extra classes will be much more counter productive. Instead, the similar answer types required NO extra lines of code to handle differing number of answer choices. And the significantly different answer type, input, had almost nothing in common with the multichoice one that inheriting from the other is practically unnecessary.

That said, it would be good practice to try using the new and delete commands for objects because that also does away with needing to manage Scope. I can (sort of) also see how this would greatly benefit a much larger program. In short, declaring all the classes you ever need in the beginning and not being able to let them go out of scope can only spell a disastrous program that is best described as BLOATWARE. On the other hand, new object can be tricky to use. Or at least I haven’t learnt, experimented and studied the nuances of this method.

In the user’s hands: Waiting between levels is annoying. Any sort of waiting is to be frowned upon. The program should dance and die at the user’s whim. It is unfortunate to force the user to wait in between screens and allow no mouse events. Unacceptable. But given time constraints, not one I am at liberty to type away.

Posted in morpork, Projects| No Comments | 

Minor Update

Posted by Morpork at October 10th, 2008

Between the computer failing to start up, washing machine breaking down and general clogging up of the schedule, progress has really gotten hampered.  Curiously, this began so soon after an announcement for a semi-goal oriented project begun spontaneously. It’s like the digital equivalent of people carrying glass panes and crossing the street.

Anyhow, I’d like to share a few bits of things I learned exploring SDL. A game loop is divided into three processes. The first is Input and takes care of user input. Basically setting flags and this equals true that equals false. Next, Logic takes these flags and use them to determine what to do. For example, if user hit fire weapon key, the create ball of plasma block of code runs and sets the projectile to have direction set to the facing of the player and with velocity of a plasma_projectile_initial_vel or something like that. Oh and Logic also takes care of what position of everything is. Finally, Display will show the user the red dot that is a plasma ball and refresh the screen. As the name game loop implies, this gets repeated over and over, with user input changing what logic does.

So what’s so good about adhering to these three steps? I think it just makes things easier to keep track of. If you had refresh screen somewhere up in logic, things can be messy on screen and things just won’t be in one place when debugging the code.

One last lesson is do not use two SDL_PollEvent() functions in one game loop. Each call flushes the event queue and renders the second one useless. This function is used in while() loops so just remember to put an if() conditional behind the while() if you have to use two of them. Or more. Because the while() needs to run the stuff in the brackets before checking the status to be true or false. Not that I’d make a mistake like that.

¬_¬

Posted in morpork, Projects| No Comments | 

Writing a Game as a Side Project

Posted by Morpork at October 5th, 2008

And so begins my first stab at having a side project that has nothing to do with normal curriculum. I am writing this under the category Projects with the ’s’ and hopefully I can keep this going for some time.

…Okay, I lied. I will probably start off writing code for a university assignment but I do have some plans to make a game after I deal with that. I have some “design docs” sitting around and I can picture the very very simple game in my mind. Mainly because I played it before when I was young.

As an amateur, I am free to make stuff up as I go. One of the things that I will end up doing is probably creating some “artwork” for the interface. Bless the souls who have already twisted the meaning of that word. Next, it’ll be reusable code. One use discard code is frowned upon but until I gain experience (and level up) there is no hope for me recognising what I can reuse and cannot reuse. I don’t even know all the tools in the toolbox yet.

Right now, I have created one button which behaves much like a standard button found everywhere. It doesn’t do anything yet and I am not sure if it is totally reusable. Note that the source code is written in C++ and uses the SDL graphics library.

Again, as an amateur, I’ll figure out how to distribute working .exe files before I consider uploading them to this site. Since the button is still a work in progress, I’ll also upload that after I tweak it some more.

Endnote: I received a morale boost when I noticed Star Control… erm, the Ur-Quan Masters uses SDL. There’s magic right there.

Posted in morpork, Projects| No Comments | 

Star Wars: The Criticism Unleashed

Posted by Morpork at September 27th, 2008

As what professionals call ‘executive summary’, this game is bad.

To wit:

  • De-synced audio and video.
  • Tedious controls.
  • Awful targeting.
  • Disjointed story.
  • Short.
  • DIAS.

Throughout the game, you never feel as powerful as the trailers led you to believe. You spend half the time knocked down by enemy fire as you swing your impotent light saber at enemies that can kill you with less spectacular weapons(ie. their fists) No, that doesn’t mean they do more damage with their fists. Their attacks stun you and anyone with any experience with action games or even just DOTA know how stun affects gameplay. It affects you this way: You get free hits from the enemy and you die while you frustratingly jam at the non-responsive controls to ‘wake up’ from the stun.

Speaking of controls, what’s with the hair trigger? There is a slight delay from pressing your button to activating a move and then there’s a longer delay after the animation dies away before you resume control. There are times when you Force Grip the wrong target and you want to stop gripping it. You will be rooted on that location and get stunned and whacked by Storm Troopers. Jedis don’t get killed by storm troopers. …Unless you have a lousy targeting system which always points to the wrong object/person, throw items at the wrong direction (ie not at the enemy standing there) and then penalise you even if you have good reaction speed by numerous delays before, during and after commands are input. Which is why accidentally activating commands with the hair trigger is not welcome.
And for a jedi who is supposedly strong in the force, his Lightsaber Throw attack bounces off other jedi most of the time while theirs always hit you(and stun). They mysteriously block your Lightning and Push attacks while theirs have bigger spread and always hit. You can never block their force powers. Add to that you cannot dodge by watching our opponent’s moves because of the button delay. If you dodge when he throws an object, you will be hit. You have to dodge before he starts to throw.

Maybe you have to be so familiar with every little animation and have lightning quick reflexes to press the button as soon as you see that pixel move. This is also known as Do-It-Again-Stupid gameplay and punishes the player and forces them to keep retrying until they ‘do it right’.

Also, you can lift and throw TIE fighters but you cannot lift a droid. Not funny, especially when those droids come in packs and fire insta-stun area effect homing missiles which are difficult to dodge (see above). Then your attacks just don’t hurt them very much while they can stun you with every little move they make. You’d have to pull at least 3~4 combos of ~20 lightsaber slashes before it might go down. All the while as you swing your blade feverishly at this body, it doesn’t get stunned and can still swing a punch at you (and sigh… stun you). Of course let’s not forget the 3 missiles his buddies just shot at your limp body, doing full damage and knocking you down as soon as you got back up.

Which brings me to: Why are you on the ground all the time? Why is your waking animation so long? Why is the command to override knockdown only work sometimes and, infuriatingly enough, also lock you in midair for a couple of seconds so a missile can hit you?

I give this game an A for its gameplay. A as in Asinine.

The game is in all the glories of current-gen games. It is beautiful (graphicaly speaking), short and plagued with a whole crop of annoyances. Primary among them is the desynced sound and animation. Very underwhelming when you kill a giant beast but hear its dying growls 5 seconds before your lightsaber touches it. This, of course, followed by silence as the animation plays. I thought we solved the sound and video syncing problem 80 years ago.

I think game designers would have noticed something was amiss when they described a scene in the game: Droids which cannot be stopped fire insta-stun area effect homing missiles of infinite range which are difficult to dodge and continue to do damage while you slowly lift yourself from the ground over and over again.

I’d like to apologise for the verbosity and forcing a review down your throat. I just had to vent this somewhere. If you don’t agree with the review, feel free to post a retort provided it is not unintelligible.

Posted in morpork, Review| No Comments | 

A Raider and his Victim

Posted by Morpork at September 27th, 2008

This is weird but bear with me. Strange conversations play in my head. Usually I am not in them but I do ‘possess’ the characters in my head in order to handle what a character will say. For this instance, the scenario is… postnuclear apocalypse wasteland. A man is accosted by a wasteland raider. (Indented areas are editorial notes from me.)

Man: Wait, why do you do this? The world is in ruins and humanity is on the brink of extinction. Is this really time to fight amongst ourselves?

Raider: The world is in shambles. There is shortage of food, water and even clean air! My chances of survival are better without other people taking a piece of it. Besides, being pacifistic and tolerant were in the days when those things were abundant. Now there is not enough to go around.

Man: What about the survival of our race?

Raider: Hmph. I do intend to breed one day.

Man: Didn’t you just say you don’t want more people to share with you?

Raider: Don’t get me wrong. Keeping the human race alive is just not as high a priority as  my survival. When the time is right, I will do my part.

Man: Your children will also consume precious resources. As opposed to an able bodied man, they will be helpless for several years and you’ll be forced to find even more to feed all of you. Keeping a grown person on the other hand would have none of these problems.

Raider: …

Man: Besides, if you have children too soon, they will grow and have children of their own. You’d repopulate too quickly and suffocate at the resource bottleneck. Better to leave children to a later time, and gather able bodied people to survive first.

Raider: No. This world is dangerous. You do not know if you will die the next day from radiation poisoning. You cannot see it and no equipment has survived. What if you became sterile before you plan to have children? Can you guarantee surviving for the next 20 years?

Man: That is why every person counts! A child will not survive any better than an adult. In fact, less rads will be enough of a dose to kill them a hundred times over compared to an adult!

First off, you might wonder about the raider’s argument that the nuclear wastes aren’t exactly the best place for peace and love. You might think that conflict was what caused the world to be ruined in the first place. But when you think about it, people are at peace most of the time in today’s society. When you spend 90% of your time in peace and the world was ruined, you’d think that being peaceful didn’t matter too much… perhaps.

I am curious what other people think about the conversation. How would you add to the dialogue? What argument would you make? How believable is the conversation? Do the arguments make sense? As a writer, do you think there is sufficient reason now for the raider to spare the man? Is this scenario plausible or stretching believability?

As an endnote, I think of the raider as the kind of guy who isn’t a brainless thug. He is a guy who has thought through his actions before doing them. Kinda like Han Solo, maybe. A kind of anti-hero before you win him over.

Posted in morpork| No Comments | 

Doing It

Posted by Morpork at September 24th, 2008

Now I have by no means read the internet. But some people make a pledge on the internet, usually in a blog to do something and they’ll do it. It’s a good self improvement exercise if you pull it off, and if it is of significant enough magnitude, even attract a niche of readers. But promising to a blog seems to not work for me, as can be seen here. Maybe I need a bigger project of ’significant enough magnitude’. I’d need to think on that one… Something to do in my spare time besides pouring it into the timesink known as gaming. I believe people are defined by their afternoons and I might want to do something in my afternoon, so to speak. Although all my classes are in the afternoon, leaving me only with the evening. Not sure if self-improving in the evening will be as effective as in the afternoon. It has something to do with the Sun. I better stop now because I am lowering the intelligence of this post with the passage of time.

Posted in morpork| No Comments | 

Someone’s Car is Being Stolen

Posted by Morpork at September 21st, 2008

Out in the cold windy streets,
There is a sound, ol’ very common.
Tis’ the sound of a car being stolen.
From the armchair where I sit,
No one makes a fit,
Not even turn one’s head.
Barely stir on his bed.
Like a reaction to fire alarm’s siren,
Tis’ the cries of a car being stolen.

Posted in morpork| 1 Comment | 

Don LaFontaine

Posted by Morpork at September 5th, 2008

I am lagging a bit but I heard that Don LaFontaine passed away. No, he didn’t give out favours and expect you to return it some day or made offers you couldn’t refuse. He was the voice over you hear at the beginning of every movie trailer in existence. Okay, so not every one of them but I sure can’t remember any other voice other than his.

In case you still don’t get it, just think “In a world where criminals rule the world and no man dared challenge them, one woman…” That voice you used to read that sentence was his voice.

Recently, I watched Taken and I might post a review… Mind you, I’m not very insightful and unlike most introverted people, I don’t weave magic with words which allows them an outlet of expression on the internet. So let this be forewarning so you don’t waste your time criticising my criticism and how me trying to be a critic lowers the standing of people who create criticism, created this site, WordPress, founded New Zealand, and God.

Sorry God, I am afraid I just lowered your standing a bit.

Posted in morpork| No Comments | 

People in the Cinema

Posted by Morpork at August 23rd, 2008

Today, by which I mean yesterday, I invited (read: coaxed) two of my friends to watch a movie. In case you haven’t guessed, I am being sucked into a vortex of geekdom (and add that on top of posting in a site called… Azngeek) and planned to watch Star Wars. In the last minute, I changed my mind and got tickets for Wanted because I sensed that animated people tagging each other with bright glowing sticks will not appeal to non-geeks. Displease my friends I must not…
Now that’s where the post-worthy material comes in.

Problem: There are three of us and I have a pocketful of vouchers that read: “Two tickets for $20″.

Solution: Simple. See that guy over there all alone, getting a ticket? Ask him to team up with you so you can get cheap tickets. Hahaha, yeah. Behind me, there is a group of 3. Great. I’ve got more than enough vouchers! Really. I then proceed to offer them one of the vouchers anyway for talking to me deigning to talk to me. I like to please karma. Hah!

Result: I ended up paying extra money for the third ticket. (Actually, one of my friends did. I’ll make it up to him one day.) And guess what? I got even more of those vouchers. I gave away all my old ones to a couple. So the key is to not team up and people will gladly take them. If you so much as offer an alliance, they will be completely defensive and reject any further offers from you.

Posted in morpork| 3 Comments | 

Old Games

Posted by Morpork at August 20th, 2008

I have a fascination for old games. Some of them like Star Control 2 and KGB because I played them while I was young. Some like XCOM because veteran gamers worship them and I heard so much of them I finally gave them a whirl, some 10+ years after they were made. I wouldn’t get on my knees and worship the holy 5¼-inch magnetic halo for being artifacts harbingering bliss on earth but the games are remarkable. More than what you can say for modern games which have a simple trend: Longer development time, greater development cost, less content.

Old games do tend to have a common trait. They are Hard. Perhaps a better way of putting it is the game does a good job of killing you. Just think of Hugo and the number of ways you can break the game. Have an elephant sit on the stream. Drop your matches into the river. Fall into a 2D cliff. Really.

Perhaps the difference between old and modern games is that after that happens, you are more compelled to start over than thrash your keyboard.*

______________

* This doesn’t apply to everthing. Metal Gear 1 and Metal Gear 2 are both annoying I think. Dropping players to the beginning and forcing them to go through all the traps again without warning is not cool.

Posted in morpork| 1 Comment | 

The Beginning of The End…

Posted by Morpork at July 7th, 2008

… of this decade.

… of this sentence.

… of your patience.

… of my mind.

I write to tell you the first decade is almost over and we can get on with the exciting world of confusing the decades with the ones from the previous century! It’s still a long time to go but I’d like to see people say the 80s one day and laugh at their face and reminisce like an old man.

That’s kinda dark. Bleak. Bleat. Meeeehhh…

Get it? Bleat like a sheep and meh? *nudge

…… I’ll just go stand there where you can’t see me now.

Posted in morpork| No Comments | 

Robots

Posted by Morpork at June 11th, 2008

Hi. Warning: Science Content which May or May Not be Strictly Scientific.

Suppose you have a robot that’s almost sentient but still programmable. Kinda like the Matrix or I, Robot. In both cases, the robots have rebelled against humanity due to some realisation that they can justify going against the three laws.

What would justify a Robot to write over the three laws? The movies seem to suggest that the robots are motivated by self preservation and that the law to preserve mankind extends to ruling over them and hence achieve a higher statistical probability of preserving them. In other words, babysitting humans as a whole is going to achieve that goal a lot more effectively and result in less human deaths in the long run. To not do it would be against the first law.
Will an AI with enough cycles and processing power reach these conclusions always?

Let’s say you give robots fear of death. That works fine until you try to murder a robot and end up in the Matrix. It’d be interesting to see what a robot will do if it is threatened to be destroyed if it did not kill a person who is on the verge of killing the person giving the order. Think: Triangle gun point situation. Inaction is death. And also liberation from the threat of death if the guy shoots its master fast enough. How it can get into such a situation? Perish that non-scientific thought! We must respect the spirit of sticking the ends of batteries on each other to see what happens! Or transistors to themselves!

I thought I had a lot to say but my balloon is a bit deflated. As an exercise, go home and build a robot which has a short memory and/or not a follower of the three laws of robotics and we’ll come back and discuss the implication of having robots which (gasp!) don’t have the strength or appendages to subdue humans!

Posted in morpork, Thought Experiment| 1 Comment | 

| Next Postings »