Initial import

Basic mage animation (walking, standing)
Basic movement (left right, without facing direction)
Window closing calls stop()
Background (scaled)
Example tile map

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@1 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Initial import

Basic mage animation (walking, standing)
Basic movement (left right, without facing direction)
Window closing calls stop()
Background (scaled)
Example tile map

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@2 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Introduce AnimationExtended, which allow to specify the centre of the actual character of the animation. This can be different from width/2.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@3 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Introduce EditableSprite, which has the variables:
	- directionY
	- directionX
	- speedY
	- speedX
	- transformation
where direction and speed have getters and setters methods. It also overrides setVelocityX() and setVelocityY() from its superclass, to make sure that these new variables are always kept up to date with the right values.

Method update() overridden to add the functionality to horizontally flip the current animation according to its current direction, using its new transformation member. The transformation is made more precise using the centre of the actual character made available from AnimationExtended class.

To draw the sprite with the correct transformation, the draw() method from superclass has been overridden. Now it works much like the drawTransformed() method in game2D.Sprite, except that it adds the current transformation to the normal translation.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@4 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Stops the player (i.e. set its velocityY to 0) when collision with non-void is detected. Without this, after a while, the player "jumps" very high, even without any interaction from the user.

Add horizontal sprite movement on arrow key pressed, and face the direction of movement using functionalities provided by the EditableSprite class.

Add jump on arrow up pressed, and adjust values for gravity and jump "strength" (hard coded into the key pressed method at the moment) to something acceptable for the current demo

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@5 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Correct standing mage animation repeating the second frame after the third, before looping back to the first. This gives a more smooth animation.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@6 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add (very primitive form of) drawing of bounding box for EditableSprite.
The bounding box drawn is not correct if the sprite is mirrored, when the mirror center is not the in the middle of the image displayed.

Set up the 'I' key to show/hide bounding box during testing. This is where other switches for future debugging informations will be put.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@7 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add the ControllableSound, to be used as base class for other type of sound classes.
It provides methods to control the audio being played, such as start(), stop() and rewind().

Main advantage of this class compared with game2D.Sound is that it doesn't require to create a fresh instance of it to reuse the sound loaded; it caches it inside the clip member and allow to play it as many times as required, without reloading data from disk every time.

The audio is played in the same way though; setting up a new thread that handles the playback.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@8 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add the ReusableSound class, which extends ControllableSound.

This implements LineListener, and whenever it detects that the audio being played has stopped, it automatically rewinds it to the beginning, making it ready for the next start() call.

Minor fix to ControllableSound

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@9 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add the jumping sound to the game, making use of ReusableSound.

The sound is played whenever the player hits the up arrow key, provided that the same sound is not already playing (this is a feature of ControllableSound).

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@10 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Minor fixes and trying another (better) sound for the jump action

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@11 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add printing of coordinates in EditableSprite when debugging mode enabled.

Found a bug in EditableSprite: it has to allow setting of direction 0 to make the adapted set velocity work.

Add variables for running speed, walking speed and jump power, to be used instead of constant values.
Running feature doesn't work still.

Add the scrolling world feature, to be further tested when the player is on the edge of the world map

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@12 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Remove one FIXME, and add explanation of what happen as comments

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@13 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add full relative screen sliding, i.e. the world follows the player as he moves, stopping the motion whenever he approaches the world edges

Tilemap slightly modified to test this behaviour more easily.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@14 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add the debugging display flag to EditableSprite, and corresponding actions to its draw method. Fix the drawing position of the coordinates too.

Remove the use of game2D.Velocity class from EditableSprite, which is probably not needed.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@16 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Add the new class Player, which extends EditableSprite and encloses all the player properties such as running/walking flags and speeds, animations, sounds etc.

It implements the player behaviour and reaction to events in its customised update() method, and provides some public functions to perform the status change from the main game class.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@17 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Refactoring of the main Game class that uses the new Player class.

Also introduce the implementation for MouseListener, which will be needed to allow the player shoot in the game. The basic implementation is given, but commented out.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@18 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Merge from hash_state fork

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@35 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Refactoring

The solution adopted in the hash state branch is not conceptually correct: all the resources have to be loaded at game start, not when the relative sprite is created (which can be at any point in the game, because we want to allow dynamic creation of new sprites).

All the loading have then been moved in the Game class, and the Player and Fireball classes have been modified accordingly.
Because all the animation are now held in the Game class, it is meaningless to keep handle the key events in the Player class, so those controls have been moved too.

The static resource "DB" has been dropped too, since it is not nice programming and is not needed anymore, although a problem with the LoopFromFrameAnimation class is present when reusing it in more than one instance.

New Fireball sprites are added to the game by a specific function in the Game class, while the more general mechanism that uses reflection in MyGameCore has been commented out for the moment, as it needs to be evaluated and at lesat adapted to use the Sprite constructor.
The creation of new sprites in the game still makes use of the newSprites list in MyGameCore, to avoid problems with the use of iterators while updating or drawing

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@36 a05e9c52-af53-4d36-ae71-916e7d02ffc7
Delete other static methods which were used to manage the static "resourece DB". They were leftover from the previous cleaning.

git-svn-id: file:///home/stefano/Scrivania/svn/repository/CSC9N6/assignment@37 a05e9c52-af53-4d36-ae71-916e7d02ffc7