This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

askgriff
askgriff presents ...

2013/10/10

Zombie Rescue Squad

I'm following Mik's Trick the Turtle code and customizing with sound, music, graphics, etc. If the kids get bitten by zombies, they reappear as zombies along the edge of the screen -- making it more difficult.

5110 views / 1073 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game music food sounds zombie turtle survivor trick fx rescue

open in greenfoot
Your browser is ignoring the <APPLET> tag.
A new version of this scenario was uploaded on Sat Oct 19 00:54:35 UTC 2013 Got the "Game Over" screen working (Thanks Jacob!), the music stops at the end now, and I built custom sprites for the main player (still some fine tuning to do there). Also completely changed the movement method to work with the new sprites.
A new version of this scenario was uploaded on Sun Oct 20 17:31:52 UTC 2013 Fixed a couple glitches and remembering to publish the source code this time.
askgriffaskgriff

2013/10/20

What is the most "elegant" way of making the wall blocks unpassable? I thought about doing the "ifCanEat" method to avoid moving -- but I don't know if that's the best way.
MatheMagicianMatheMagician

2013/10/21

I would suggest using the "getIntersectingObjects(Wall.class).size()>0": this checks whether there are any walls touching the character. You can then back up if it is touching. If you want, I can give you some example code (you probably want to try yourself first, though).
A new version of this scenario was uploaded on Wed Oct 23 06:32:30 UTC 2013 Adding a new "Wall interaction" using getIntersectingObjects. Having some difficulty getting the player to just not be able to go through walls. He tends to get "stuck" and move in the opposite direction at times. Suggestions?
A new version of this scenario was uploaded on Wed Oct 23 15:13:32 UTC 2013 Adding a new "Wall interaction" using getIntersectingObjects. Having some difficulty getting the player to just not be able to go through walls. He tends to get "stuck" and move in the opposite direction at times. Suggestions?
askgriffaskgriff

2013/10/23

My code with intersectingObjects was overwritten by my old code. Back to the drawing board. :/ I'll take this opportunity to comment and organize my code before I re-implement it.
A new version of this scenario was uploaded on Wed Oct 23 16:29:20 UTC 2013 FINALLY got the walls working properly. It was a mental roadblock for me and I discovered what was broken. Sorry for yet another update. I'm getting there!
A new version of this scenario was uploaded on Wed Oct 23 17:07:12 UTC 2013 Walls are working for zombies and bonus (survivors) now. Cleaned up more code.
A new version of this scenario was uploaded on Thu Oct 24 16:35:38 UTC 2013 Changed the "CanSee" and "Intersecting Object" code to "isTouching". It seems to work pretty well. Thoughts?

See all comments

Want to leave a comment? You must first log in.

Who likes this?

davemib123 kimber_jo