Wednesday, August 29, 2007

Out of my Depth

Came across a few major problems.

1/ The whole area tile thing was a dud. There were issues with moving the character from on area tile to the next because the depths of the area tiles were different. When the character was spanning area tiles half of it would disappear underneath the adjacent one.

2/ Ditched using the original map array data definition to determine tile/char positions. Once it is loaded into the virtual map grid it is no longer used. The virtual map grid is organised by vertical and horizontal tile slots, and is easier to work with (no tricky array index calculations).

3/ There were rounding errors occurring converting virtual map distances to axonometric ones. The errors were cumulative. The more the character moved around the screen the greater the discrepancy between the virtual and axonometric map. I had to do some nasty coding to compensate for this.

4/ Character Depth - *sigh*. On the whole this is ok, but there are conditions when either the adjacent top-right or bottom-left tile is wrong (either it is in the foreground when it should be in the background, or vice-versa). Could spend more time on this but would rather look at more interesting things like opening/closing doors, etc.

Monday, August 20, 2007

Foreground vs Background

Been doing some more work on this and got my virtual map things going. You can see it on the right hand side. (You can switch it off by setting debug.generate to false).
It took me a couple of days to iron out the wrinkles, but it seems to be moving around ok, even if it is a little jerky. Also need to reinstate the board move/scroll as well.

Focusing on foreground/background stuff at the moment. Trying to change foreground clips (i.e. walls, etc), to have a higher depth than the character if they are in the foreground. This would make the character go behind walls, and remove the floating appearance.

This is turning out to be a little tricky as 'char' (the character) is attached directly to 'axomap', and the 'tile' movie clips are attached to 'area' movie clips, which are then attached to 'axomap'. This seems to be doing weird things since the area depth (which the tile is attached to) is lower than 'char' depth, but the tile I have moved to the foreground (still attached to the 'area' mc) has a higher depth than 'char' depth.
AM I making sense? Basically is there any correlation between a mc's depth and its parent depth, or are they totally independent and non-related?
The reason why I ask is that my walls keep disappearing when I move them to the foreground, and I don't know why.

Here is the flash file.

Thursday, August 16, 2007

Coding Headache

Been looking at Kah's ArrayMap stuff, and when I tried to use the detectKeys() function it didn't work, so ended up going back to addKeyListener stuff. That seems to be working now.
Also getting my head around Flash's Action Script implementation of object orientated programming (Oop). Quite un-Java-like in terms of how loose and weakly-typed it is though kind of similar. Will 'objectify' the code a little more as it makes more sense.

The main headache has been trying to work out where I am on the map. In axonometric it is fairly complicated because of the way the tiles are laid out, you can have multiple rows occurring on the same x-axis. (It's a little hard to explain here you would have to see the code to see what I mean. I might do a pic so you can see).

Anyways decided the easiest away around this is to have a 'virtual map' and a 'drawn map'. The virtual map is the actual tile layout in a Cartesian vertical and horizontal co-ordinate system. This facilitates the following:

  • All the co-ordinates can start from 0 and be positive (i.e. don't have to worry about negative values in calculations).

  • I can use the Kah's ArrayMap logic to find adjacent tiles. i.e Keep-It-Simple-Stupid (KISS). Adjacent tiles are above/below, left and right. No weird axonometric calculations involved.

  • It is easy to translate 'virtual map' movements to 'drawn map' movements because an axonometric tile is just a normal square rotated 45 degrees. They have the same number of pixels.( Well that's my assumption. We'll see if it holds up).


Will have another bash at it today and see what comes up.

Monday, August 13, 2007

Recode

Spent all evening recoding what I did over the weekend. Changed it slightly. Don't know if I went overboard. Have 4 layers: the root stage -> map mc -> area_mc -> tile_mcs.

The tiles (i.e. walls, doors etc) are placed on the area tiles in a 6x6 grid. I have set it up so if there is just the floor nothing is placed (the floor isn't interactive so it's not a prob). The idea being that invisible areas (i.e. area_mc) gets switched off when not visible/off-stage.
At the moment when moving it is just moving the base movie clip (map_mc), and it seems a wee bit slow.

Eventually hoping to make it like the scrolling demo. Also you have to press the keys multiple times to make it scroll in th browser. It doesn't do that inside Flash.

Sunday, August 12, 2007

Sadness

I lost my file that I was working on on Sunday. Doh! Feeling a bit upset about that as I worked 5 hours on it. Managed to get an axonometric going and was about to work on the collision factors... starting from scratch again. PS Hacking a version of Kah's ArrayMap.

Wednesday, August 8, 2007

Project 3 Concept V2

Ok here it is:
Concept  Part One=
Concept Part Two

Here is it a bit more formally:

Concept:
Stop Skanky Dred Fred from getting a job, and being respectable.
Every morning (a game pattern or level) he wakes up and tries to go to for a job interview. You have to thwart his attemptes and stop him from getting that job. If you succeed you move to the next level (i.e. another morning, where he tries again, but it is harder to stop him). If you fail, and get gets the job you lose the game.

Methods: Lies and deceit, distraction or diversion, sabotage and general misdirection.

Gameplay: hmmmm....

There are certain things Fred needs to do successfully in order to get to the job interview. These are things such as:
  • Wake up on time

  • Shower & shave

  • Get dressed in business/interview attire (i.e. look smart)

  • Have breakfast

  • Have things he needs for the interview (e.g. CV, being prepared with the right info, research etc)

  • Getting to the interview destination (transportation)


Basically there are lots of opportunities for mishap.

As a player you could do things like turn off his alarm clock, so he sleeps in and misses the interview, hide his work clothes, Let down his car tires making him late, as above etc.

In terms of gameplay there would be certain actions you could do when he is in the room (i.e you need to have a face to face conversation with Fred to misinform and misdirect him), and certain actions you can only do when he is out of the room e.g. sabotage like letting his tires down.
In the latter case there would be the danger of getting caught in the act and busted.

Concept Part Three

There would also been an opportunity window for performing sabotage. For example if you turned off his alarm after he woke up it wouldn't make any difference.

Your could have different levels or probability of success for different methods of "thwarting". Sabotage might have a high chance of success, but telling lies may have a 50/50 chance (i.e. there would be the opportunity for him not to believe you).

Thwarting could take the form of distractions, of using Fred's favorite pastimes against him. Drinking, getting high, playstation etc.

The gameplay isn't totally ironed out yet. You'd need to put some mechanism in to stop you doing the same thing every day. Fred could also be more unpredictable and do tasks each day in a random order.

Themes: The general themes the game touches on are drug abuse, or more specifically stoner culture and apathy. The stoner culture is something that I don't particularly like about New Zealand. There are youths out there with no aspirations or - dare I say it - a belief in a better life, and that's rather unsettling. Rather than be PC (dull) about the whole thing I thought it would be more fun if I inverted the objective and made the game about keeping someone in a rut, rather than trying to motivate them to move forward.

A sub-theme of the game is how people can be threatened by change and fight to keep the status quo.

Tuesday, August 7, 2007

Hold on a minute ...

After speaking with Kah, decided that a remake wasn't such a good idea.
Will have a new concept for Project 3 posted later this evening.

Project 3 Concept - Paradroid 2

Actually I don't know if it would be version 2. I actually think there is a version 2 out there. You know the basic premise: Irradiated robots gone crazy need dealing to by yours truly. Your goal is to clear the ship of robots. To be clear, the game is not a straight out shoot 'em up, there is strategy involved.

In terms of gameplay the original Paradroid was fairly limited. The basic choices you had were:

1. Which levels do I take first?
2. Should I clear the deck totally of robots or leave some left in case I need to jump to them later?
3. How do I kill the robot - shooting it versus taking it over? (the latter being more favoured unless the robots were weak).

For Paradroid 2 I'd like to revamp the gameplay:

1. Rationalise the robot classes. Make them more distinct from each other in terms of what they can do and how they can interact with the environment.e.g

Messenger Robots - Speed/Agility. Maybe the fact that they deliver messages means they have access to most levels of the ship. No weapons.

Crew Robots - Have command access or can access certain restricted or personnel only areas. They could open doors or enable certain functions. This could also be used to lock doors (temporarily?) and stop help from arriving. They'd have either small weapons or no weapons.

Security Robots - Basically the grunts. Big guns, harder to kill.

2. You could add the element of disguise to the game. So when you take over a robot you are an imposter and can move around the level unchallenged. But if you are seen doing something unauthorised or blow your cover (either by shooting or transferring to another robot) then you have an intruder alert, and are treated as hostile.

3. In the original game you can access all levels of the ship, and different levels had robots of differing toughness (e.g easy, moderate, and hard). You could restrict access to levels, so you'd have to of transferred to a robot of the equivalent strength to gain access to the level (i.e. if you were in a 300 level robot and tried to access the 400+ level you wouldn't be able to).

4. Vectorise the graphics. That's just me though .(It could be the VectorTD addict in me talking!). I think I'd still like to keep the top-down (plan) view. I think the gameplay would be hard enough to program without tweaking it for isometrics. Also the plan view gives more clarity about edges, and you wouldn't have to worry about stuff getting hidden from view behind things.

5. The original talked about 'weak' robots (i.e damaged) being easier to take over than healthy ones. I don't know if that really ever manifested in the game, but the shoot'em/transfer to them action could be used in combination.
These are just general ideas to be developed.

6. Powerups etc...

I know a remake isn't strictly a 'new' concept, but I see this as a new idea because the whole game is being re-conceptualised from the ground up.

Wednesday, August 1, 2007

Isometric

Since that paradroid game is a top down view, I thought it might be fun to change it to an isometric. I've tweaked the introTiles.fla so it draws diamonds instead.
Had a few problems adding some functions as Flash didn't seem to recognise them, so had to write it in the code which was no biggy.

There is a parameter in the actionscript to change the diamond angle if you want.
You can also switch it off so it does squares again.
Intro File Diamond Flash File.