Thursday, April 23, 2009

Game Design: The Beginning

I’ve always been interested in making games. In fact that interest is the reason why I became interested in computer programming and in many ways has lead me to my current place in life. Anyway, I have recently downloaded and attempted (still trying) to install XNA which I will use for the development. Since it is C# .NET based and that’s what I program in every day I thought it would be a good place to start. Plus, if my game turns out awesome I could publish it to XBOX Live. Tonight hopefully I will begin making my first real game.

I have decided to go with a simple 2D platform game since it’s a relatively simple place to start while still having the potential to be really awesome. Being a programmer rather than an artist I am a little more interested in the gaming elements rather than just making a pretty looking game. I think the 2D approach obviously simplifies graphics even if only from a technical perspective.

So far I’m still brainstorming ideas for an actual setting and story for my game, but I’ve thought of some more technical elements which I can start on before I get that far. In terms of setting and story though I’m still at the vague stage of cool concepts, though I’ve begun to lean the way of a fantasy setting. Something like from the Golden Compass movie though rather than a Lord of the Rings kind of thing. I like the idea of the fantasy world having a kind of childish grace and largeness to it.

I’ve definitely got a few more concrete ideas about the technical side though. I like the idea of having power ups or items in the world which you can use. Even something as simple as the mushroom in Super Mario is cool. I think that linking this idea into some kind of limited character development might also be cool. Maybe nothing quite so complicated as levelling up, but maybe something like choosing which power-ups to be using at a given time.
I also like the idea of procedurally generated levels. This can add a lot of replay-ability to a game and its also a complex and interesting problem. For a project at university I did make a simplistic maze game with procedurally generated levels (the only saving grace of a horrible project), so I think I’m ready for another go at it. I’ve also been playing Spelunky recently which is an awesome platform game with procedurally generated levels so I’ll take some inspiration from that.

The other element I’ve decided is a must have is more graphical but from a technical perspective. I saw the technique watching a show about how the Simpson’s movie was made and while subtle it can make a huge difference. It involves overlapping several 2D background images (you can also include foreground images I guess) at different depths. For a single frame this makes no difference, but then as you alter the images for each subsequent frame you alter each depth individually in a way that corresponds to its depth. This means that with simple 2D images for a background you can create the illusion of a complex 3D background scrolling by. Since I’m no good at drawing anything I can do to add some sheen to the graphics would be cool so I really like that idea.

Anyway, those are my ideas so far. I still have to get XNA going and figure out how it works so it may be a while before I actually get anything done on my game but hopefully I will have something to show before too long. I while post a few updates as I go to chronicle my first attempt. If you have any cool ideas feel free to leave a comment.

Thursday, March 12, 2009

Space: Time Travel

Time travel is an interesting idea, but immediately brings to mind a whole array of potential paradoxes, the most prominent of which is the “Grandfather Paradox”. It states that if we could time travel, any of us could effectively go back in time and kill our grandfather before our parents were born. Then if our parents were never born, how could we have been born, and thus how could we have killed our grandfather.

Paradoxes such as these are generally hints that Mother Nature or the laws of physics have a problem with what we want to do and probably won’t allow it. However, when it comes to time travel the strange thing is that there seem to be no laws in physics to prevent it and even some that make it theoretically possible. Of course if you’d read my blog yesterday you’d know about my scepticism regarding science. They probably messed up somewhere and all the laws of physics are wrong anyway but let’s continue anyway.

The reason most of us look at these paradoxes and see a huge problem is that most of us don’t fully understand the way time works. It’s not simply the one way linear street, inexorably moving forward, that we all think it is. In reality it is far closer to the three dimensions of space we all see every day. It is the fourth dimension existing just as the three dimensional world around us. And in this world we are free to go back and forth as we choose, so why not the same for time?

In actual fact we all do a bit of time travelling every day. If you are in a moving car time actually moves slower for you then for a pedestrian. The difference is so tiny that we would never notice but it’s there. In fact the faster you move the more time slows down. If you were to travel at the speed of light time would almost come to a standstill.

But with speed we can only move forward in time, not backwards. So we have no problem with our grandfather paradox just yet. However, gravity also effects time and this is where things start to get really interesting. Even on our planet slight differences in gravity make a difference to time.

If you and a friend were to work in a tall building one near the ground floor and the other near the top, time would move at a different speed for the two of you. Of course the difference in gravity is tiny so it makes almost no difference, but out in space, there are things that begin to really mess with gravity.

Black holes. Once only a part of Einstein’s theory we have now found them. Black holes as we all know have gravity so intense that even light cannot escape. So what about time? Well before we get there it’s important to note another thing about Einstein’s theory. His theory sees space and time as dimensions as I have said but it also allows for them to be bent and warped. Of course it turns out to be gravity that does the warping. For the most part its subtle but around black holes things get really messed up. Black holes twist space and time so violently that it twists into a spiral, like the eye of a storm. Of course in terms of time travel, a black hole is useless, because there’s no coming back. It’s a one way ticket for probably a very short ride.

Another possibility thrown up by Einstein’s theories, though yet to be found is wormholes. Worm holes occur where space time folds over on itself and a black hole of sorts unites the two pieces. This is where time travel gets potentially useful. Theoretically you could enter the one side of the worm hole at one place and time and come out the other side in a totally different place and time. Of course scientists are yet to find a worm hole and there still are some other theoretical problems to with radiation killing anything trying to go through. You never know though, at one time black holes were a theory even thought ridiculous and impossible by Einstein himself.

Time travel is likely to remain fantasy for the foreseeable future and yet it is far more possible then most of us would ever realise. Physicists still haven’t found a law to prevent it so we might just one day be able to move back and forth in time as we do in space. Of course it’s just as likely that Mother Nature will chuckle silently to herself and find some way to strike down misbehaving humanity in some way.

Science vs. Religion

Touchy topic I know, but here’s my opinion from the almost neutral position of not believing in either.

A few months ago I read a book on Quantum physics and the universe. It was a really good book, giving an overview of all the major parts of current physics and an explanation of how they all work and what they mean. The book gave me a general understanding of the ideas of people like Einstein and Newton, but what I really took away from the book is an edgy sort of feeling that these guys don’t actually have a clue as to what’s really going on.

Anyway in relation to religion which is my main point for this post there are a few things I have realised about science I’d like to highlight. First off, almost everyone out there except our “brightest minds” knows almost nothing about the cutting edge of science. We all know a bit of the old stuff, and have a grasp on some of the new stuff but in reality when it comes to the latest ideas we don’t have a clue. We simply read about the latest advances, accepting what we are told by scientists for no real reason other than they are telling us.

We personally have no way to verify their results. We do not understand the inner workings. So what we are doing is accepting it all on faith. There comes the magic word, faith. Now that’s starting to sound a little more like religion isn’t it?

Now it’s not quite the blind faith of religion. Believing in that which cannot be proved or disproved, having faith in a greater power. It is similar though.

Now to my next point. Science has always been an evolutionary process. It builds on previous ideas, correcting or replacing them when proven wrong or adding to them over time. Newton developed the idea of gravity. It was accepted and built upon, piece by piece, until hundreds of years later Einstein comes along and proves it all wrong, replacing it with his own theory. So what happens to everything everyone has done for a hundred years. Einstein’s just proved them all wrong. But eventually someone will come along and replace his theory and the cycle will continue. Apart from the fact that this begs the question as to when science will actually ever be right if they keep proving themselves wrong it reminds me of religion as well.

Religion has a remarkably similar way of adapting and building on itself although it can be much more subtle. I once saw a documentary on Islam and how it was founded by Muhammad. Now it was a while ago so please don’t hold it against me if I’m fuzzy on the details.

Basically Islam was founded on the basis of Christianity and Judaism but was adapted because they felt they all got it horribly wrong. Just like one theory replacing another in science. But it does not end there. Muhammad with his lovely new ideology proceeded to adapt it over time to meet what was needed. At first it preached peace and forgiveness, but as threats loomed bits were added to the Koran about war and defending your people.

Science also builds on its ideas as new bits are needed. We have been building on Einstein’s theories for 70 years, just like we were building on Newton’s for hundreds of years before that.
It doesn’t matter whether its science or religion. We all accept either with some degree of faith. They way they build on their ideas bears remarkable similarity. A theory is formed and built on piece by piece until it’s no longer adequate. Then we form a completely new idea a start the whole process again.

In my opinion science and religion are fundamentally the same thing. They are attempts to make sense of the world around us. We keep building on their ideas to try and build ourselves a better picture. The only difference for me is the direction they approach this problem. Science attacks it from what it already knows. It builds on its knowledge slowly adding and reshaping ideas. Science starts from the unknown position of God and builds the world around Him, but they meet somewhere in the middle.

Personally I put little faith in either. I admit I believe in what science has done. I’m not going to sit here and argue that all science is wrong and could never possibly have come up with the ideas needed to make this computer I’m typing on. I also believe in God. Not a Christian God or anything but something. I don’t use either one to make sense of anything though. The world is because it is. It works because it does. I am because I am.

Thursday, February 26, 2009

The Landslide to Come

Our Friday blog topic for this week is politics. Not a subject I have great familiarity with apart from reading the newspaper headlines posted on boards as I walk home or in my news24 rss feed at work. However, as the new election approaches things are becoming very interesting.

Since the end of Apartheid the ANC have ruled South Africa with a majority and near total control. There recent ousting of Mbeki, their own president and the fact that many members have now left the party to form their own new party, COPE, show the signs that the times are changing. The faith entrusted to our current leaders is slipping, maybe just a little for now, but the landslide could come.

This loss of faith does not come without good reason. The ANC are in all honestly a complete shambles. The recently ousted their own president and the president of South Africa, a man trusted with the job by the people of South Africa, in favour of Jacob Zuma, a man waiting to stand trial for corruption. Now in most democracies anyone associated with corruption would most likely stand down, since with such allegations surely no one would trust them enough to consider voting on them. Never mind the fact that he has been given charge of the ruling party, and will most likely be their presidential candidate in the upcoming election.

That alone should be enough to shake most people’s faith. A recent poll shows that many do in fact believe Zuma is guilty, more than half of the ANC’s supporters. Despite this Zuma still claims that he knows the ANC will win the election, but wants a majority so huge that they will have total control. Control which will allow them change the quality of life for the better.

They have had fifteen years since Apartheid to do this and yet they have not even managed to put a dent in the tasks. Now things seem to be getting worse. Food prices are rising uncontrollably and cholera outbreaks are killing people. Inaction against AIDS has led to thousands of deaths and thousands of houses promised to those desperate for somewhere to live stand incomplete.

COPE, the new party, formed because members of the ANC felt that the ruling party to which they belong were failing in their mission to improve South Africa. A failure clearly highlighted for me by the fact that the party leader is waiting to stand trial for corruption.

COPE still seems disorganised and not entirely ready to compete with the established dominance of the ANC but their formation provides a clear shift in the balance of power. In the past those who suffered under Apartheid had little option but the ANC. Sure there were plenty of other parties but none that really provided them with an option they would be willing to take.

Now COPE gives them an option. Those frustrated by the ANC’s repeated failures have an alternative. Not only that but the split within the ANC, with many members speaking out over their repeated failures has shown the people that there should be discontent, that just maybe the ANC are not the right people to lead them anymore. They may have won the war against Apartheid, but they are losing the battles that follow.

Don't forget to check out Brett's blog on the same topic. Get it here http://balthosabyss.blogspot.com

An Alternate Meaning in Dreams

Many people take there to be meaning in the strange visions of dreams. I have seen the huge volumes that claim to allow you to identify the symbolism within your nightly dreams. Yet I have also heard the other view; that dreams are the pieced together collection of thousands of random neurons firing as you sleep.

I believe the truth as always lies somewhere in the middle. Most people take the meaning of dreams to be held in the elements they contain, in what they dream about. However, we can see that if our dreams are made up of random neurons firing then what is in our dreams is entirely random. Surely there can be no meaning in those elements individually if they are simply random.

I take my meaning from a different viewpoint. If dreams are our brains desperate attempt to reconcile random brain activity then maybe there is something in the way we choose to piece together the bits. If thousands of random thoughts are firing as I sleep, some memories of past events, maybe someone I know or a place, something that happened that day or maybe even just an emotion, my brain could interpret these things in a million different ways. So why then does it choose to piece it together into the single dream I have?

Well if dreams are an attempt to make sense of these random thoughts then it’s only logical that our brains would piece them together so as to make the most sense to us. So maybe there is no meaning in dreaming of my mother, or home, or my lunch from yesterday. Maybe though if I dreamt about walking home and my mother giving me said lunch that has meaning. In the way I interpret the relationship between three random thoughts. Seeing my mother as a caregiver, providing security at home and whatever else we may choose to read into it.

Most dreams are far more complex than this simple example. They combine the entire menagerie of our thoughts including our sub-conscious. If we look carefully at the interplay of our dreams we might be able to find hints at those thoughts we hide from even ourselves. It is not in what we dream that we may find this meaning, but rather in how we dream it.

Thursday, February 19, 2009

Blog about Blogging: The Riptide of Competitive Inspiration

So, yesterday friend and I came up with a bit of a blogging game plan. Since we are both often a bit lethargic about putting up new blog posts we have decided to, once a week, agree upon a topic and then both write a bog on said topic. Nothing like a little competition to motivate you.
This is the first of our co-topics, a post about blogging on the same topic. There might be a million things I could write about but a nagging little part of my mind keeps thinking: I wonder what he’s writing. Just a little part, but enough to be distracting.

Anyway, the dual posts each week could make for very interesting reading. Between us we can come up with some unexpected and brilliant ideas so at the very least we should have interesting things to blog about.

Now that I think about it though, from a philosophical and psychological side it could also become very interesting. Sure our friendship might have been formed on a whole stack of common interests, but aside from that we have vastly different personalities. The difference can be seen even just in the way we write. He crafts each sentence, almost word by word, often leading to very poetic but sometimes chaotic and meandering stories. I on the other hand, am a little more plot driven. Maybe less poetic but also a little less wild.

So from that perspective, together with how our views and feelings on each topic combine with our writing it could make for some interesting insights into our minds. Could be fun. Let the games begin.

Oh and it you don’t read Brett’s blog, check it out here: http://balthosabyss.blogspot.com

Monday, February 16, 2009

Whatever Happened to Optimism?

Has anyone else noticed that modern society is decidedly pessimistic? It just seems that no matter what is going on in the world everyone seems to latch onto every tiny thing that goes wrong and forget about anything good. The media are especially guilty of this. The phrase “No news is good news” has suddenly become eerily prophetic of any news report these days. Good news is simply glossed over in favour of the new horror story of the day. Any news that is reported is bound to be bad.

And as my primary example of this sorry school of thought I put forward the fans of Liverpool Football Club. Never mind that Liverpool have made massive almost unbelievable improvements this season, all Liverpool fans seem to be able to think of is failure. They look at a brilliant season and do not see the achievements of their side; they see poor decisions from a manager even when those decisions have led to victory. They see only crisis where they should see accomplishment.

Why take something good and try to suck all the life out of it by picking apart the tiny failures? Rather look for all the good bits even if there might be a few bad spots. That way we can enjoy the world even with the few sorrows it holds. If our optimism continues to drain the world will surely become a very dark place.

Monday, February 9, 2009

A Grievance with Independance

For all our modern advances in medicine, government, technology, civil rights and the standard of everyday living there seems to be a certain something else, just below the surface that is sending the world spiralling toward the abyss. We may not all acknowledge it but I think deep down we all feel it. War, crime, poverty all grow worse every day. It’s not that these things never existed in the first place, as long as there has been man there have been wars. It's just that these things seem to be getting worse.

I have often thought of the reason for it and greed is often among my reasons. A new idea has struck me though, one that is not attributable to any individual but to us all as a whole. The book I am reading now is a fantasy story set around a close knit tribe. As with humanity in the past they all depend on each other for survival. Any disagreements between the members of such a tribe are weighted by their contributions to their society. As the saying goes do not bite the hand that feeds you.

This kind of mentality is all but gone from modern society. We all exist as independent members of society. Of course we are actually dependant on a lot more these days. It takes more to bring us food, power, clean water and such than in simpler times. It is just that now we are so far removed from those people on which we are dependant that we do not even notice them. These people have also become replaceable these days. If your baker dies, there are probably ten others in the same area. Actually you probably have never even seen the man who bakes your bread, which just proves my point.

With this new found independence our mentalities have changed. We no longer care for the circumstances driving other people’s actions. We see only their actions, the outcomes of their life and sometimes not even this much. If we see a mistake, it is no longer weighed against the effort taken to get that far or all the past good that that person has accomplished. We see only failure and we simply think to ourselves, there is someone out there who would have done this properly.

Of course the reverse is also true. We are often so far removed from those who depend on us that we do not often consider them. In the past a hunter was valued by his people and at the same time knew that if he did not have a successful day his people would go hungry. Now we tend to think, it can wait one more day. We are not motivated to help those people we do not know.

This kind of a shift toward independence serves to remove us from the motivation and responsibility our every action might warrant. We do not feel the impact of our actions because we do not know those people who are affected and they do not know us.

Of course in our modern era it is impossible to move back to this sense of community in that same way. Because of industrialization and the huge scale of life these days we can never be close to all those we depend on. I will never know the man who built my iPod. But maybe in some smaller way we can move back toward that mentality.

We all have groups to which we belong. We have work colleagues, teammates, friends, family, clubs, churches. These all have a community mentality to some degree. If we could only expand this to our everyday thought. I think it all boils down to one truth that we have all forgotten. “Love thy neighbour.” It doesn’t even have to be that hard. Just know your neighbour. Say hello. Ask him how his day was. Know how he contributes, and value his presence for it.

Friday, February 6, 2009

The legacy of Evolution

I was reading today that researchers have built software that allows a robot to adjust to changes in its body structure and relearn certain tasks. The software uses neural networks, a technique which mimics the human brain, along with genetic algorithms which allows for learning to take place. These techniques have been used before but until now the task off adapting to changes in its own structure has proved infeasible.

With this new software the robot can detect changes to its own structure and then adds a new collection of neurons to its existing "brain" and uses these to learn its new task, building on what it already knows.

For instance, if the robot starts with two simple, un-jointed legs and six neurons it will use these to identify the best possible way to walk. Once it detects no more improvement in its learning process it will lock these neurons in place. It has learnt how to walk.

Now, if we add a joint to each leg the robot, using its previously learnt algorithm, will suddenly detect its walking is no longer as effective. Since it already knows the best way to walk it realises its body has changed. It now creates a few new neurons and begins to learn again. The key idea behind this is it does not start from the beginning. It still remembers how to walk, and simply learns what to do with its new bits. It builds on its knowledge.

This technique has also been used for sensors and several legs all with success. The key drawback mentioned by other researchers though is that this can result in an unnecessarily large number of neurons. The same tasks could be done with fewer, although relearning everything each time is too complex.

However, this talk of unnecessary neurons immediately made me think of our own brains and the supposed 10% we use. Maybe all that extra brain power is the relic of our evolution. The neurons that originally learnt to breathe in water and swim with fins. Now without purpose they sit idle, the legacy of our past.

Wednesday, February 4, 2009

Special: Football

I would like to mention two main things today. The first is the current rules regarding penalties and cards. To me both seem ridiculously stupid in their current descriptions at times being simply way too harsh a punishment and at other times simply not being enough of a punishment to stop players making "professional" fouls.

Firstly, the current penalty law which gives a penalty kick for fouls in the box. Way too often the fouls that occur in the box are near the edge with the player being fouled not even in a position to make an attempt on goal. In these circumstances a penalty is not a fair punishment because one team is being given a free chance at scoring simply because a foul occurred within an arbitrary area of the field. In all likelihood for most of these fouls had it occurred just slightly further away it would not be a penalty and the free kick would be far fairer punishment.

Of course the opposite is also true. Often players in good positions lining up a shot or having gone past their man are taken out just outside the box. In these cases the free kick given outside the box seems a ludicrously light punishment since a clear chance to score has been denied to a player.

Surely a far simpler and better solution would be to simply forget about the box with regards to penalties and simply give a penalty whenever a player is denied a definite goal scoring opportunity as decided by the referee. I don't think this will by any means remove all controversy. We will all still argue over what situations are definite goal scoring opportunities. For instance Steven Gerard from 25 yards might be a scoring opportunity if he is lining up a shot, but the same might not be true for other players from the same distance.

What I do think this ruling will accomplish is to stop players going done in nothing positions looking for a penalty. Rather they will strive to create that opportunity to score because that is the only way they will be able to do it. It will also mean that defenders are far less paranoid about defending inside the box, even when a player has his back to goal and is going nowhere.

My second issue is with yellow and red cards. Being a Liverpool fan I am of course deeply upset over Lucas' red in the derby this week. I find it completely stupid that he is sent off for two nothing tackles one of which was never in a million years a yellow. The whole game Everton players had been in late, at least 15 or 20 times and yet only the occasional yellow card was shown. Steven Pienaar made at least three tackles worse than any that Lucas made, two of which were on Lucas himself.

That red card completely swung the match and I think it does so in a way that is just not good for the game. Teams should not win a match because one player made two niggley little fouls when their entire team has been doing it the entire game.

Of course I was not very upset to see Lampard sent off on the weekend for what on second viewing should not have been a red either. Off course in that game Liverpool were dominant anyway and if anything the red just made Chelsea hang back a little more making it harder for Liverpool.

I think an approach more like rugby would work better than the current system. If a player makes a few stupid fouls or maybe one that is a little dangerous give him ten minutes of the field. The aggrieved team is given an advantage, but not one that will often instantly decide the match as a red card often does. Of course bad fouls must still be punished with a red where tackles are particularly bad or a professional foul is committed.

Then linking back to the penalty idea, often we see a red and a penalty given for a last man tackle or the like. If a player was rather given ten minutes off the field when a penalty is also given it would be far less of a match ending moment.

These simple adjustments to the rules I think will make the game a lot more fair and also improve the way the players go about the game. It will reduce diving and remove the fear and nerves from some tackles. The impact of refereeing decisions will also be reduced to a degree which is what you want. You don't want the whistle deciding a match, you want the players doing it.

Tuesday, February 3, 2009

Behind Already

Ok, its Febuary already and as with almost every year I'm already behind on my list of goals for the year. I set myself the task of blogging three times a week and since this is my first post of the year I'm already thirteen or fourteen behind.

Forgetting the past though, I'm going to try once more to step up to the challenges I have set for myself, starting with this blog. So this is how its going to be. One post monday, one post wednesday, one post friday, plus a few bonus ones thrown in to make up for a poor January. In terms of my themes for this year, I'm thinking along these lines:
  • Monday - World Affairs/Views
  • Wednesday - Philosophy
  • Friday - Science/Technology/The Universe

Of course this may change over the year but for now thats my plan and I'm sticking to it. See you friday.