changed sprites and added instructions in ReadMe
This commit is contained in:
@@ -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.
|
# 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"
|
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 !
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 225 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 303 B |
Binary file not shown.
|
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 294 B |
+2
-1
@@ -9,7 +9,7 @@ use tetra::{Context, ContextBuilder, State};
|
|||||||
const WINDOW_WIDTH:f32 = 640.0;
|
const WINDOW_WIDTH:f32 = 640.0;
|
||||||
const WINDOW_HEIGHT:f32 = 480.0;
|
const WINDOW_HEIGHT:f32 = 480.0;
|
||||||
const PADDLE_SPEED:f32 = 8.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 PADDLE_SPIN: f32 = 4.0;
|
||||||
const BALL_ACC:f32 = 0.05;
|
const BALL_ACC:f32 = 0.05;
|
||||||
|
|
||||||
@@ -61,6 +61,7 @@ struct GameState {
|
|||||||
impl GameState{
|
impl GameState{
|
||||||
fn new(ctx: &mut Context) -> tetra::Result<GameState>{
|
fn new(ctx: &mut Context) -> tetra::Result<GameState>{
|
||||||
let player1_texture:Texture = Texture::new(ctx,"./resources/player1.png")?;
|
let player1_texture:Texture = Texture::new(ctx,"./resources/player1.png")?;
|
||||||
|
//player1_texture
|
||||||
let player2_texture:Texture = Texture::new(ctx,"./resources/player2.png")?;
|
let player2_texture:Texture = Texture::new(ctx,"./resources/player2.png")?;
|
||||||
let ball_texture:Texture = Texture::new(ctx,"./resources/ball.png")?;
|
let ball_texture:Texture = Texture::new(ctx,"./resources/ball.png")?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user