I used Greenfoot's
getOneIntersectingObject(Obstacles.class)
function. It uses the image of both the player and obstacles objects to detect collisions with the object "Obstacles". For example in the player movement code after the player moves right a while block runs to move the player outside the bounds of the image of "Obstacles" object.
pseudo code:
if ("right" key is down)
{
move Player right by X
}
while (getOneIntersectingObject(Obstacles.class) != null)
{
Move Player to the left one
}
A new version of this scenario was uploaded on Mon May 20 16:17:54 UTC 2013
Added:
- Blocks are now breakable
-Source
Fixed:
-Random death bug
ToDo:
-Add end to world/game over
A new version of this scenario was uploaded on Mon May 20 16:23:24 UTC 2013
Changed:
-Changed level speed
A new version of this scenario was uploaded on Tue May 21 00:50:24 UTC 2013
Added:
- background parallax
Changed:
-coin collecting sound when breaking blocks
STATS:
-file size is now 4.39 MB uncompressed
A new version of this scenario was uploaded on Fri May 24 16:14:13 UTC 2013
Fixed:
-double block break bug
Added:
-More comments
A new version of this scenario was uploaded on Wed May 29 00:39:57 UTC 2013
Fixed:
-Not being able to kill more than one Goomba.
Added:
-Two more levels(not complete yet.)
A new version of this scenario was uploaded on Wed May 29 01:53:50 UTC 2013
Added:
-pressing the "escape" key quits out of the world.
-live system (1000pts gives mario one extra live and removes 1000pts, up to 9 lives)
A new version of this scenario was uploaded on Wed May 29 02:32:30 UTC 2013
Changes:
-slightly reduces file size, should improve loading.
A new version of this scenario was uploaded on Fri May 31 14:52:06 UTC 2013
Amazing work! Some advices I may give is you die at the end of a level and you can't get to the next level. Also, you could make the background and music change in every level. You can also create other enemies or objects. All the others are perfect!
2013/5/20
2013/5/20
2013/5/20
2013/5/20
2013/5/20
2013/5/21
2013/5/23
2013/5/23
2013/5/23
2013/5/24
2015/5/11