Git Product home page Git Product logo

particle-go's Introduction

Particle Go

A Java program that simulates a simple game with a Client-Server architecture, where users are spawned randomly inside an arena full of particles. Multiple users can see each other on the map. Likewise, users can see particles created by the server. The program utilizes Java sockets so that this could be run on multiple machines given that all of them are in the same network as the Server. This project is for the partial completion of the course STDISCM at De La Salle University. The course is headed by and submitted to Sir Ryan Austin Fernandez.

Running Locally

  1. Clone the repository.
git clone https://github.com/cifelse/particle-go.git
  1. Run the Server (package: server.Server.java)
  2. Run the Client (package: client.Client.java)

Important

If you are running the server and client on the same machine, you can use the 'localhost' as the IP address. If you are running the server and client on different machines, you can use the IP address of the machine where the server is running.

Specifications

A user should be able to add particles to the environment with an initial position (x, y), an initial angle Θ (0 degrees is east, and degrees increase in an anticlockwise manner, e.g., 90 degrees is north), and a velocity V (in pixel per second). The particle will travel in a straight line, bouncing off the four walls of the canvas. Particles do not collide with other particles. All collisions are elastic, which means particles do not slow down or speed up after a collision. The canvas should be 1280x720 pixels. Coordinate (0,0) is the southwest corner of the canvas. Coordinate (1280,720) is the northeast corner.

Particles can be added in batches. This is in three forms:

  • Provide an integer n indicating the number of particles to add. Keep the velocity and angle constant. Provide a start point and end point. Particles are added with a uniform distance between the given start and end points.
  • Provide an integer n indicating the number of particles to add. Keep the start point and velocity constant. Provide a start Θ and end Θ. Particles are added with uniform distance between the given start Θ and end Θ.
  • Provide an integer n indicating the number of particles to add. Keep the start point and angle constant. Provide a start velocity and end velocity. Particles are added with a uniform difference between the given start and end velocities. Additionally, a user can also add walls, given two endpoints (x1, y1) and (x2, y2), which the particles will also bounce off of.

Ensure that your screen resolution is high enough to show all particles on-screen. Show the FPS counter on-screen every 0.5 seconds.

particle-go's People

Contributors

cifelse 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.