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

Report as inappropriate.

SirFoxie
SirFoxie presents ...

2011/3/10

Mouse Follower

This will become a game sometime soon. For now there's nothing to do except fly and shoot at the ground.

(Edit: Well, actually, it's not gonna become a game anytime soon. I've decided I'd rather be using C++ and using programming tools besides Greenfoot. But you should use my mouse follower code in your own stuff!)

Controls:
- Accelerate: "W" or "up".
- Brake: "S" or "down" or "space".
- Steer: the Actor turns to face the current mouse position.
- Fire gun turret: any mouse button.

I didn't make the music. It's from the song "Balloon Flight" on the album "Bremelanotide" by "The Grammar Club". The full version with vocals is freely available on their website ( http://thegrammarclub.com/grammarfarm.swf ) in the "media" section. (Their lyrics contain swearing and PG-13 concepts.)

I was planning some cool stuff with the game music, but I can't figure out how to do it with Java/Greenfoot. I was gonna have the music change dynamically with what's going on in the game, but now it'll just play a loop of the same static song. I'll do the cool dynamic stuff in C++ sometime, unless someone can figure out the problem I'm having (which is posted here: http://www.greenfootgallery.org/topics/77 ).

9999 views / 1299 in the last 7 days

5 votes | 0 in the last 7 days

Tags: mouse game music demo with-source gun fly plane turret steer

open in greenfoot
Your browser is ignoring the <APPLET> tag.
SirFoxieSirFoxie

2011/4/16

I could change it so that if you don't set a turning speed it defaults to an instant turn. The code I have now does make it turn instantly, pretty much the same as yours. The speed just has to be at least 180 degrees per frame.
A new version of this scenario was uploaded on Mon May 23 07:50:51 UTC 2011 Added light flashes for bullets. Added really simple music that doesn't work yet.
A new version of this scenario was uploaded on Mon May 23 07:54:23 UTC 2011 Got rid of the music for now, since it's not working.
A new version of this scenario was uploaded on Tue May 24 02:50:53 UTC 2011
A new version of this scenario was uploaded on Tue May 24 02:58:50 UTC 2011 Retrying export so audio will work on the website.
A new version of this scenario was uploaded on Tue May 24 03:04:31 UTC 2011 Reuploading for music.
A new version of this scenario was uploaded on Tue May 24 20:44:35 UTC 2011 I gave up on dynamic music and just went with a static song.
MathManiacMathManiac

2011/8/17

You haven't been active much. This should be something when u get on. I have some Fresh Programming homework for you: Making a small scenario that connects to a special file created by the same project and reads a special format ([ARTICLE]/[TEXT] Per line) and prints it onto the screen. Nice tackler, don't you think? I shall give this to other Fresh Programming members to see their responses. Comment on my most recent scenario with the first words saying "Fresh Programming Homework". Good Luck!
dlannidlanni

2012/4/11

Thanks for including your code--it's way too advanced for me, but someday I hope to implement mouse-directed movement.
RedPhoneBoothRedPhoneBooth

2012/4/11

Woah I LOVE the music, lol the game looks great!

See all comments

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

Who likes this?

Busch2207 h123n dlanni MathManiac delmar