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

Report as inappropriate.

Josp101
Josp101 presents ...

2014/8/15

Flash Fighter

WASD to move, V and B to attack - Ninja

ARROWS to move, Backspace and Enter to attack - Mage

Press down to shield (also reflects bullets)

2959 views / 779 in the last 7 days

Tags: game with-source player 2d 2

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

2014/8/17

I saw something interesting, have the mage fire the fireball, then have both players turn on their shields, the fireball will go back and forth faster and faster and eventually the ninja will get blasted off of the screen.
Josp101Josp101

2014/8/19

yeah i have found that too, i think it is because movement is actually gradual teleportation each frame. as the fireball gets faster it teleports further and further each frame. eventually it skips past the shield and because the ninja has a smaller shield it hits her first im going to continue to update ( i will next add upward attacks ) but im not sure it will be worth fixing this considering how hard it would probably be and i would rather spend the time adding more features
lordhersheylordhershey

2014/8/19

check for collision then check the actor if they have their shield on and if so make the hit not count.
KalleLarssonKalleLarsson

2014/8/19

Nice game! A simple (but maybe not so nice ) fix to that kind of problem is to limit the maximum velocity of objects. Another is to use getObjectAtOffset for a number of different Points in the direction your object is travelling, to "pre-detect" impact (and since the velocity and the approximate distance is known, a good Point of collision can be estimated, and the collision resolved properly, but this requires some math). I also found that if the mage is standing to the left of the ninja the fireball will slow down and eventually stop in mid air instead of accelereating if they Bounce the ball between eachother... :)
A new version of this scenario was uploaded on Thu Aug 21 20:44:02 UTC 2014 NEW MOVES NEW CONTROLS
A new version of this scenario was uploaded on Thu Aug 21 20:52:47 UTC 2014 Debugging
Josp101Josp101

2014/8/21

Thanks for the help and suggestions guys, I've now fixed both of those things. Also the Mage can now shield sword attacks :)
Josp101Josp101

2014/8/21

The fireball eventually flies off screen but otherwise it would crash the computer so please forgive me for that :)
A new version of this scenario was uploaded on Fri Aug 22 12:38:01 UTC 2014 Double Jump fixed (you now have to press twice) Speed of characters adjusted Ninjas side attack improved
Josp101Josp101

2014/8/22

I would like to know who people think is the stronger character and why so if you think you know then please tell.

See all comments

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

Who likes this?

No votes yet.