Saturday, February 23, 2008

FINAL PRODUCT VISION

Here is a screen shot of how I envision the final version of my game to look with all the elements and functions added, click the image to enlarge to full resolution - (800 x 600)

Friday, February 22, 2008

CHA-CHA-CHA-CHANGES

A lot has happened in just a few days so this is going to be a fairly sizable update to go with some big changes to my game...

The other evening in my games session my Duck Pond game took a harsh beating from Brad (my games tutor). Rightly so I have to say, the game at that stage was very simple and there wasn’t much to it. In my defence I must say it has taken me this long (80% of the project time) to get to this far with the coding… and it’s been a one hell of a struggle! (thanks for the continuous help & tutoring with this Adam & others)

Negativities aside myself and Brad set about coming up with changes and additions to improve and add more depth to the game play. The set brief states my submission has to be a platformer; my game seems to be stretching the platform concept a little, so to drop it into that category I have given the avatar some movement. The position and perspective of the avatar has changed, the old lady now faces towards the pond from the bottom of the screen and she can move LEFT and RIGHT only (using the arrow keys). When she disappears off the stage in one direction, she will appear on the opposite side of the stage. This actions isn’t very ‘realistic’ I know but this ability will boost the game play somewhat.

I have also changed the crosshair as show in the previous post; to be honest I implemented the target crosshair on the fly just to test out the mouse over and out function. I didn’t realise until later that it gives off the wrong connotations... SNIPE THE DUCK!

I’ve now dropped the idea of a shop / store menu at the start of the game, only because the requirements to make this happen are way out of my coding league. Don’t get me wrong I don’t want to seem like the wuss who isn’t prepared to challenge himself but believe me when I say that this simple game concept is challenging my coding skills enough! To compensate for this loss of the shop menu I am going to implement a difficulty setting, easy (2 good ducks, 1 bad duck) medium (1 of each) and hard (1 good duck, 2 bad ducks) this I can accomplish easy enough with-in the time given.

My next step is to work out how to create selectable items, very much like an inventory or a weapons selection function. I’m going to have another item or two for the player to choose between other than just bread. This also makes up somewhat for the missing out the shop / store menu again.
IF I can get this function running it opens up a whole variety of different game play modifiers, for example I could have point based rewards if the players scores X amount.

Another bug has developed with-in the game, if a thrown item crosses over a duck before landing the score goes crazy! This happens because the ducks are repeatedly hit testing with the item whilst it’s still on the move, another issue to fix.

Play about with the current version HERE, it is a lot different from previous versions, use the LEFT & RIGHT arrow keys on your keyboard to move the old deer about. If you do play please leave a comment telling me what you think. It’s still very much in development but I can see an end in sight.

Monday, February 18, 2008

TODAYS ADVANCE

Today I accomplished some small additions to my game…

1. Pointer changes to crosshair on mouse over water area (image above)
2. Water area made click-able, outside of water area none click-able.
3. Enemy duck added (black duck) - that's not a racial slur!

It is starting to take shape, click HERE to play about with the current version.

Sunday, February 17, 2008

TWO MAJOR CHANGES

Adam (one of my course mates) has really helped me out on the coding front. He has looked over and re-worked my script in several ways so now the whole game is looking a lot more… alive!

I’ve just spent the last few hours picking apart what’s been altered so I can fully understand the changes and how they benefit my game engine.

Apart from re-organising the script layout and generally scrapping the un-used code there are 2 major changes…

1. Getting rid of the trajectory of a projectile equation that mapped out the thrown items path. The main issue was that it constantly needed updating (looping code) to continue moving the thrown item along its path. Also this equation relied to heavily on velocity, trajectory and gravity, making the thrown item over hit or under hit the users clicked position 8 out of 10 times.

The thrown item now moves along a defined path using a Bézier curve, the Bezier code lays out four positions… initPos, EndPos, ContPos and perPos. The ContPos & perPos parts of the code can be altered numerically to increase or decrease the curved effect. The EndPos is determined by where the user has clicked the mouse, so this means the item travelling along the Bézier curve will STOP when it reaches the chosen EndPos… thus I can also loose the hidden platforms that I introduced a few posts back.
2 birds, 1 stone.

2. The problem of the duck suddenly taking flight and buggering off out of the game screen, never to be seen again, this has been a frustrating bug in my game since the very start of the project.

Every time the duck hit one of the invisible walls that was boxing him/her in, a new random direction was generated. Because I didn’t declare the numbers as integers (a number that has no decimal places) the game engine couldn’t calculate a random direction from numbers that had so many decimals in them, thus breaking the code and leaving the duck to break free and carry on travelling in its current direction. Now that the numbers generating the new directions are declared as integers, nice simple round, decimal free numbers, easy for the game engine to handle.

Big thanks Adam for helping me out. Your name has valiantly made its way into the game credits along side myself and others.

The following are issues that I am tending to next...

a. There can only be one item upon the water at any one time, so the player has to wait till the duck eats it and then the player can throw again. I’m looking into making it so multiple items can be thrown, say 3 or 4 at the most.

b. At the moment the user can click anywhere on the game screen and the item will be thrown to that mark, I am going to limit the ‘”click-able” area to just the water sector, where the duck swims about.

______________________________________________

Click HERE to play about with the current version.
Its still very minimal & flawed but its alive!

Friday, February 15, 2008

PHUX0R AS3

I’ve come to a point in the project where I have the code for every main function of the game, in theory I should be able to get the game up and going.

I’ve developed the code for each action separately, each function being produced in its own .fla project file, I did this because it made constructing the code easier, free from conflicts caused by other functions in the script.

Now I’ve come to the stage where I can piece the blocks of code together to make one “working” game engine. After doing so half of the functions cess to work, great. Odd thing is I get no errors spat back at me from Flash… creepy. I’ve spent the last few days working out what could be wrong with it, no joy.

Since it’s the weekend and the coding work isn’t going anywhere I decided to re-work my character designs, please see below…

ABOVE: the hero of my escapade.


ABOVE: good duck & evil duck.

Another function that I can tick off my list is the pre-loader, see screen shot below. I plan to have some audio in my game so that means I MUST have a pre-loader or else it’s doomed in terms of accessibility (slow connections…etc) My pre-loader’s source came from an awesome tutorial that I found at Newgrounds.com here, very easy to understand and customise.


Sunday, February 10, 2008

X+Y+Z = 3D

I’ve come up with a way of making the items that are thrown into the pond stop when they hit the surface of the water. The big problem with this project is that I’m trying to do a 3D physic in a 2D environment… let me TRY to explain…

Clicking the mouse activates the old lady to throw an item across the screen, this involves the X axis (horizontal, length) and the Y axis (vertical, height)… pretty simple… until I came to the stage where I wanted to land that thrown item onto a flat surface, the Z axis… X+Y+Z = 3D… my game is 2D with a side on view - DOH!

I could have gone back and re-designed the whole perspective of the game, maybe make it isometric. Instead I decided to put tiered platforms into the area where the thrown item travels through. I then applied a hitTest variable to these platforms so the thrown item can land on any platform it connects with.

Man I found that hard to explain, hope it made some sense. I’ve printed a screen shot to try and further explain my solution, please see below. Obviously the platforms won’t be visible in the game.


*** Addition *** as feared it seems my explanation wasn’t as crystal as I’d hoped. Adam’s comment prompted me to add the additional image below to expand on my explanation, hopefully it shows what I mean by the action that I was trying to achieve was a 3D one. No worries now though, platforms to the rescue!

Wednesday, February 06, 2008

PIECING IT TOGETHHER

OK… update, 3 things to show you…

1. In this version I have the duck swimming about his pond (random direction generated every time) The countdown timer is working, along with the score / points system. Also the avatar throwing animation is working (click anywhere over the pond) The avatar doesn’t have the ability to actually throw any items in this version, but I have placed a piece of bread already on the water just to demonstrate the score system at work, the duck will eat it pretty quickly. Click HERE to view this version.


2. The above image illustrates what I am trying to achieve with this version, for the item to stop on the line of X. The line X is determined on the user clicked position. This whole action is what I’ve been trying to crack for a while now but it still isn’t as I want it. Thanks to Danny’s & DD’s help I’ve managed to get the old dear throwing items based on this equation below, trajectory of a projectile... maths PAH! Click HERE to view this version.

3. To give my mind a short break from baffling maths and AS coding I decided to start working on the animated menu screen. The image below is a sign that I have designed for the game’s title screen. Mouse over each button to trigger a different animation, the buttons don’t lead anywhere… yet.
Click HERE to view this current version of the menu screen.

I’ve also decide to re-design the pixelated ‘old lady’ and ‘duck’ characters due to various comments about how they don’t mix well with the smooth vector background. I seem to agree after taking a 2nd look.

The plan is to merge these several versions with their different functions to make a finished game. It’s tough going and I’ve done a couple of Flash game projects before. I'm currently devoting 110% of my time at the moment to this… sorry 3DSM, I haven’t forgotten you.

Saturday, February 02, 2008

CODING

Accomplished… countdown timer function added and throwing animation on mouse click added.

The game is slowly starting to build up and take shape. I’m struggling like hell with the Action Script though but I’m gradually picking things up here and there. I’ve had some great help from Mazoonist on actionscript.org, thanks!

Click the image below to play about with the current version, it's still VERY minimal...

Friday, February 01, 2008

CS3/AS3 PROJECTILE PROBLEMS

I’m having major issues programming the main action of my avatar, throwing items (bread…etc) into the pond. I’ve been doing some research into how I can go about this in CS3, as far as I can understand it involves this AS3 code – angle=Math.asin(g*d/ (v*v) / 2 – this code is based around a trigonometry equation which can be explained… here.

I’ve managed to get a simplified example of what I’m trying to accomplish using good old CS2, click the image below to try it out. This isn’t exactly what I’m intending to do though, I’d like to achieve a realistic looking gravity effect on the final version.

AIRSOFT FPS

I recently found these photos on an old CDR, there from an awesome day of Airsofting at my then local paintball site in West Yorkshire.

I’m posting these really to go with a conversation I had last week with someone on my course about what a great video game an FPS Airsoft game would make, if it was done right… of course. It would really have to convey the game of Airsoft fully, rather than just be another throw-away FPS.

Rockstar pulled of an awesome table tennis game, Rockstar Table Tennis, that’s how it has to be done, felt more like a simulator staying true to the game rather than a generic sports game thats been taken in the totally wrong direction.

(I’m the 3rd one in from the left in the group photo below…
...oh boy I got so many kills that day)

This guy below with the scope was lethal!