Want to play?

April 9th, 2008 - No Responses

The next, and possibly final, iteration of my game is up.  I did a lot to it — new instruction screen and edits on all other screens, endpoint, dragon special ability, etc.

I’ve been working for a while.  Time for bed.

Addendum

April 1st, 2008 - No Responses

Time: 2.5 hours

I spent some time trying to fix the buggy growth rate of plants.  I didn’t get anywhere.  Please tell me if you notice that plants sometimes grow too quickly.  In addition, I worked on things concerning the enemies.  Their AI is a little more random now, as they no longer need to hit a wall to change direction.   Because of this new AI, they can change direction when they aren’t lined up with the middle of a movie clip.  This has caused another depth bug.  I fixed the bug somewhat, but enemies still appear behind movie clips occasionally.

Monday Update

March 31st, 2008 - No Responses

Time: 4.5 hours

I have corrected the brutal bug that I encountered last week. It ended up having to do with variable names and scope — I was using the name temp.x in two different functions and somehow they both ended up being the same space in memory. Now that I think about it, maybe it has to do with the fact that I never declared temp in either function (ActionScript is weakly typed). Anyway, it is fixed now after much frustration.

I encountered another bug today that had to do with depths of the movie clips (like layers). The problem was with enemies being blocked out by newly placed tiles when loading the tiles on the border of the screen (if you’ll remember, tiles are attached and removed to/from the screen as the player moves). Luckily, I crafted a cool function that swaps the depths of conflicting movie clips and it’s been working pretty well.

I worked on the AI of the enemies for a while. Their paths look pretty simple — they just travel in one direction until they hit a wall, and then they head in a new, random direction. This ended up taking a while to implement as I needed a linked list to accomplish what I wanted to but I couldn’t find one to use. I ended up using a stack (some functionality is built into ActionScript) to randomly push the possible directions enemies can go in once they hit a wall, and then I pop the directions one by one to check them.

Right now, when you collide with the enemies, they take away your collected crops. The number of crops they take away depends on the level you are on, getting harder as you progress. The collision took me a little while to get down just right, but I now made it so that collisions with enemies can only occur once a second.

I think that’s all I have to report right now. I’m going to work on it more tomorrow. I’ll upload the new version at some point — maybe after I get some kind of message in there that pops up when the player collides with enemies, displaying how many crops were taken away in the collision.

Seeya on Wednesday.

Tired

March 25th, 2008 - No Responses

4.5 hours of debugging with nothing to show has made me pretty frustrated, so I’m going to take a break from it and come back another time. Greta, I am going to ask you for Flash help tomorrow (I think the whole problem has to do with movieclip depths). I hope you can help!

I may work on enemy AI later.

Edit: I added a “Most Recent Version” link to the bar on top for easy access.

Bugger

March 25th, 2008 - No Responses

I am in the process of adding enemies into HG.  I am encountering freezing when I shrink down the min./max. numbers of columns and rows for grid creation.  This is related to how I randomly place the main character on the grid.  I have looked at the logic many times and it makes sense, but it freezes the game sometimes.  The “sometimes” makes me think it has to do with occasionally generating a row/column combination that is outside of the grid boundaries.  I have tried to address the problem in many different ways, but I just can’t solve it.  I’ll look at it again another time.  For now, I want to get those enemies in.