Giter VIP home page Giter VIP logo

pong_70-sgame's Introduction

PONG_70-SGAME

A simple game whose objective is to hit a ball back and forth across the screen with the bars, without letting the ball leave the playing area.

HTML: Create a basic structure for the webpage. In this case, two divisions (

) are needed for the players, one division for the ball, and two divisions for the scoreboards.

CSS: Create a style file (style.css) to format and style the webpage. In this case, styles are needed for the player divisions, the ball, and the scoreboards, as well as to center and position them on the page. Styles are also needed for the start button ().

JavaScript: Create a script file (script.js) to provide functionality to the game. In this case, variables are needed for the speed and position of the ball, the position of the players, the scoreboards, and to know if the game has started. Functions are also needed to move the ball and players, detect collisions, and update the scoreboards. Finally, a function is needed to start the game.

To start the game, click on the start button. One player will use the W and S keys to move, while the other will use the arrow keys.

Juego sencillo cuyo objetivo es golpear una pelota de un lado a otro de la pantalla con las barras, sin dejar que la pelota salga del area de juego.

HTML: Crear una estructura básica para la página web. En este caso, se necesitan dos divisiones (

) para los jugadores, una división para la pelota y dos divisiones para los marcadores.

CSS: Crear un archivo de estilo (style.css ) para dar formato y estilo a la página web. En este caso, se necesitan estilos para las divisiones de los jugadores, la pelota y los marcadores, así como para centrarlos y posicionarlos en la página. También se necesitan estilos para el botón de inicio (

).

JavaScript: Crear un archivo de script (script.js) para dar funcionalidad al juego. En este caso, se necesitan variables para la velocidad y posición de la pelota, la posición de los jugadores, los marcadores y para saber si el juego ha empezado. También se necesitan funciones para mover la pelota y los jugadores, para detectar colisiones y para actualizar los marcadores. Finalmente, se necesita una función para iniciar el juego. Para iniciar el juego clicamos en el boton start, un jugador utilizara las teclas W y S para desplazarse y el otro lo hara directamente con las flechas.

pong_70-sgame's People

Contributors

sualba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.