diff --git a/ReadMe.md b/ReadMe.md index ed256c4..95e202f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -29,3 +29,10 @@ brew install sdl2 # You will also need to add the following to your ~/.bash_profile, if it is not already present. export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" ``` + +## How to play ? + +This is a local multiplayer game, so two players can play using the same keyboard, player 1 uses 'w' and 's' and so player 2 uses the arrow keys. +For now there is no leaderboard or score, so whenever someone looses, the game is over and the window closes. +Check on updates, I might add thoses features soon ! + diff --git a/resources/ball.png b/resources/ball.png index d6db2be..2e2a162 100644 Binary files a/resources/ball.png and b/resources/ball.png differ diff --git a/resources/player1.png b/resources/player1.png index 3775f9a..e47d004 100644 Binary files a/resources/player1.png and b/resources/player1.png differ diff --git a/resources/player2.png b/resources/player2.png index 46aadac..702d196 100644 Binary files a/resources/player2.png and b/resources/player2.png differ diff --git a/src/main.rs b/src/main.rs index b725a2c..8e13225 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,7 @@ use tetra::{Context, ContextBuilder, State}; const WINDOW_WIDTH:f32 = 640.0; const WINDOW_HEIGHT:f32 = 480.0; const PADDLE_SPEED:f32 = 8.0; -const BALL_SPEED:f32 = 5.0; +const BALL_SPEED:f32 = 5.0; const PADDLE_SPIN: f32 = 4.0; const BALL_ACC:f32 = 0.05; @@ -61,6 +61,7 @@ struct GameState { impl GameState{ fn new(ctx: &mut Context) -> tetra::Result{ let player1_texture:Texture = Texture::new(ctx,"./resources/player1.png")?; + //player1_texture let player2_texture:Texture = Texture::new(ctx,"./resources/player2.png")?; let ball_texture:Texture = Texture::new(ctx,"./resources/ball.png")?;