Giter Club home page Giter Club logo

hoverbattles's Introduction

Hoverbattles

This is a toy project I pick up from time to time, socket.io + webgl + a healthy dose of shared server/client code = gaming fun, supposedly. I'm trying to do the quickest thing possible for most part, to get to a playable game with as little fuss as possible, this means spending days on little pieces of technology is a no-no (brute force terrain, lack of octrees etc :-))

Currently implemented:

  • A basic rendering pipeline (render everything given to it, make sure that globals are settable like camera etc)
  • A shader delivery system (packaging up shaders from server into a single json file)
  • A brute force terrain, genned from sin/cos and cached on disk (so theoretically could model them in a BMP or whatever)
  • A simple hovercraft simulation + interaction with terrain
  • The simplest scene graph ever, with the obvious bit of frustum culling
  • Entities + components system
  • A chase camera with a bit of damping, I'm sure it'll cause motion sickness for people that way inclined
  • Some 'intelligence' in the chase camera (trying to look at the current target)
  • An eventing system for inter-entity (and internal) communication, used for syncing across network boundaries
  • A messaging system for external input into scene in a replicable manner (across client/server boundaries)
  • Synchronisation code for keeping client/server in sync with some rubber-banding for good measure
  • collision detection between entities (hah, for x in entities, for y in entities...)
  • A GPU calculated particle system (without trails, it's a bit hard to see other players)
  • An input system for controlling the hovercraft (WASD + Space for jump)
  • Targetting + automated firing on entities
  • An overlay system for rendering 2D elements + text over the scene
  • a HUD for displaying current targets/other players
  • A loading screen (using the overlay system)
  • Entity destruction sequence, explosions and all that
  • Post processing pipeline (currently being used for a tacky neon glow)
  • Scoring (entity is destroyed, score is incremented across client/server displays)
  • Login/registration/guest-access
  • Persistence of events to a datastore (for statistics in the future)

See the issues list for tasks I'm currently eyeballing

hoverbattles's People

Contributors

robashton avatar testaccountforob avatar

Stargazers

 avatar Fajar van Megen avatar Angus H. avatar Hussein Kaddoura avatar Nikhil Krishna avatar Karla Falcão avatar M-Fawaz Orabi avatar Marten T. Compoc avatar Lukas B. avatar Rex Feng avatar Dan Brinkman avatar  avatar Paweł Stiasny avatar Peter Richardson avatar  avatar  avatar Marwan Hilmi avatar mparaiso avatar Shao-Chen avatar jeep avatar  avatar Jeremiah avatar William Wharton avatar Paul Evans avatar Stefan Wagner avatar Bobby Dimmick avatar Jason Padvorac avatar Jeremy avatar Leonardo Garcia Crespo avatar  avatar Drew Purdy avatar Meng avatar Mark Nijhof avatar  avatar Max Stockner avatar Dan Atkinson avatar Sébastien Arnaud avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

hoverbattles's Issues

Global config

Pull out all those random numbers into a JSON file, and have push updates from server to client when modified, so I can tweak the game to make it playable

update readme.md

Hey, I will give you format just write rest of the content.

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and run on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

Give examples

Installing

A step by step series of examples that tell you have to get a development env running

Say what the step will be

Give the example

And repeat

until finished

End with an example of getting some data out of the system or using it for a little demo

Running the tests

Explain how to run the automated tests for this system

Break down into end to end tests

Explain what these tests test and why

Give an example

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone who's code was used
  • Inspiration
  • etc

And also you can add contribute.md file which is written in markdown languga.

Contributing to the project

Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue, assessing
changes, and helping you finalize your pull requests.

As for everything else in the project, the contributions to this project are governed by our team.

Using the issue tracker

First things first: Do NOT report security vulnerabilities in public issues! Please disclose responsibly by letting [ this project team](mail to:team@thethis projectfirm.com?subject=Security) know upfront. We will assess the issue as soon as possible on a best-effort basis and will give you an estimate for when we have a fix and release available for an eventual public disclosure.

The issue tracker is the preferred channel for bug reports,
features requests and submitting pull
requests
, but please respect the following restrictions:

  • Please do not use the issue tracker for personal support requests. Use
    the this project Chat.

  • Please do not derail or troll issues. Keep the discussion on topic and
    respect the opinions of others.

Bug reports

A bug is a demonstrable problem that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!

Guidelines for bug reports:

  1. Use the GitHub issue search — check if the issue has already been
    reported.

  2. Check if the issue has been fixed — try to reproduce it using the
    latest master or next branch in the repository.

  3. Isolate the problem — ideally, create a reduced test case.

A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What OS experiences the
problem? What would you expect to be the outcome? All these details will help
people to fix any potential bugs.

Example:

Short and descriptive example bug report title

A summary of the issue and the browser/OS environment in which it occurs. If
suitable, include the steps required to reproduce the bug.

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

<url> - a link to the reduced test case

Any other information you want to share that is relevant to the issue being
reported. This might include the lines of code that you have identified as
causing the bug, and potential solutions (and your opinions on their
merits).

Feature requests

Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to you to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.

Pull requests

Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.

Please ask first before embarking on any significant pull request (e.g.
implementing features, refactoring code), otherwise you risk spending a lot of
time working on something that the project's developers might not want to merge
into the project.

For new Contributors

If you never created a pull request before, welcome : tada: 😄 Here is a great tutorial
on how to send one :)

  1. Fork the project, clone your fork,
    and configure the remotes:

    # Clone your fork of the repo into the current directory
    git clone https://github.com/<your-username>/<repo-name>
    # Navigate to the newly cloned directory
    cd <repo-name>
    # Assign the original repo to a remote called "upstream"
    git remote add upstream https://github.com/this projecthq/<repo-name>
  2. If you cloned a while ago, get the latest changes from upstream:

    git checkout master
    git pull upstream master
  3. Create a new topic branch (off the main project development branch) to
    contain your feature, change, or fix:

    git checkout -b <topic-branch-name>
  4. Make sure to update, or add to the tests when appropriate. Patches and
    features will not be accepted without tests. Run npm test to check that all
    tests pass after you've made changes. Look for a Testing section in the
    project’s README for more information.

  5. If you added or changed a feature, make sure to document it accordingly in
    the README.md file.

  6. Push your topic branch up to your fork:

    git push origin <topic-branch-name>
  7. Open a Pull Request
    with a clear title and description.

For Members of the this project Contributors Team

  1. Clone the repo and create a branch

    git clone https://github.com/this projecthq/<repo-name>
    cd <repo-name>
    git checkout -b <topic-branch-name>
  2. Make sure to update, or add to the tests when appropriate. Patches and
    features will not be accepted without tests. Run npm test to check that
    all tests pass after you've made changes. Look for a Testing section in
    the project’s README for more information.

  3. If you added or changed a feature, make sure to document it accordingly in
    the README.md file.

  4. Push your topic branch up to our repo

    git push origin <topic-branch-name>
  5. Open a Pull Request using your branch with a clear title and description.

Optionally, you can help us with these things. But don’t worry if they are too
complicated, we can help you out and teach you as we go :)

  1. Update your branch to the latest changes in the upstream master branch. You
    can do that locally with

    git pull --rebase upstream master

    Afterwards force push your changes to your remote feature branch.

  2. Once a pull request is good to go, you can tidy up your commit messages using
    Git's interactive rebase.
    Please follow our commit message conventions shown below, as they are used by
    semantic-release to
    automatically determine the new version and release to npm. In a nutshell:

    Commit Message Conventions

    • Commit test files with test: ... or test(scope): ... prefix
    • Commit bug fixes with fix: ... or fix(scope): ... prefix
    • Commit breaking changes by adding BREAKING CHANGE: in the commit body
      (not the subject line)
    • Commit changes to package.json, .gitignore and other meta files with
      chore(filenamewithoutext): ...
    • Commit changes to README files or comments with docs: ...
    • Cody style changes with style: standard

IMPORTANT: By submitting a patch, you agree to license your work under the
same license as that used by the project.

Triagers

There is a defined process to manage issues, because this helps to speed up releases and minimizes user pain.
Triaging is a great way to contribute to this project without having to write code.
If you are interested, please [leave a comment here](https://github.com/this projecthq/discussion/issues/50) asking to join the triaging team.

Maintainers

If you have commit access, please follow this process for merging patches and cutting new releases.

Reviewing changes

  1. Check that a change is within the scope and philosophy of the component.

  2. Check that a change has any necessary tests.

  3. Check that a change has any necessary documentation.

  4. If there is anything you don’t like, leave a comment below the respective
    lines and submit a "Request changes" review. Repeat until everything has
    been addressed.

  5. If you are not sure about something, mention @this project/maintainers or specific
    people for help in a comment.

  6. If there is only a tiny change left before you can merge it and you think
    it’s best to fix it yourself, you can directly commit to the author’s fork.
    Leave a comment about it so the author and others will know.

  7. Once everything looks good, add an "Approve" review. Don’t forget to say
    something nice 👏🐶💖✨

  8. If the commit messages follow our conventions

    1. If there is a breaking change, make sure that BREAKING CHANGE: with
      exactly that spelling (incl. the ":") is in body of the according
      commit message. This is very important, better look twice :)
    2. Make sure there are fix: ... or feat: ... commits depending on wether
      a bug was fixed or a feature was added. Gotcha: look for spaces before
      the prefixes of fix: and feat:, these get ignored by semantic-release.
    3. Use the "Rebase and merge" button to merge the pull request.
    4. Done! You are awesome! Thanks so much for your help 🤗
  9. If the commit messages do not follow our conventions

    1. Use the "squash and merge" button to clean up the commits and merge at
      the same time: ✨🎩
    2. Is there a breaking change? Describe it in the commit body. Start with
      exactly BREAKING CHANGE: followed by an empty line. For the commit
      subject:
    3. Was a new feature added? Use feat: ... prefix in the commit subject
    4. Was a bug fixed? Use fix: ... in the commit subject

Sometimes there might be a good reason to merge changes locally. The process
looks like this:

Reviewing and merging changes locally

git checkout master # or the main branch configured on github
git pull # get latest changes
git checkout feature-branch # replace name with your branch
git rebase master
git checkout master
git merge feature-branch # replace name with your branch
git push

When merging PRs from forked repositories, we recommend you install the
hub command line tools.

This allows you to do:

hub checkout link-to-pull-request

meaning that you will automatically check out the branch for the pull request,
without needing any other steps like setting git upstreams! ✨

Issues

Issue open :
It is not just like fun and You need also post a valid post with the opening Issue.

Closing Issue:
Actully this is also follow same above and It will need to more percise to resolve the problem and test yourself and then you can close.

Add explosions on death

I have a particle system, it'll need

  • Gravity adding to it
  • Tying in to the player death so it goes kaboom when a player dies with some orange bits and bobs
  • Initial velocity should be the velocity of the player as it'll be well coool

Get the missile interaction to be 'playable'

Currently missiles are slow, and that's good enough for testing

  • Speed them up so they can't be avoided just by flying
  • Optional: Add turning speed to them so they don't just zero in on target (so they can be faster than target in straight line but less so if banking heavily)
  • If a missile has been fired and the firer loses targetting, missile should become a stray and stop tracking target

Game modes (PvP and PvE)

Need to de-couple the actual game from the 'engine', and have different processes running for different running games ( starting with PvP and PvE, with reportable stats so users can join the right thing)

Map editor in Blender

I need some maps, currently using a brute force generated heightmap terrain - but that's kinda lame.

If I use blender to create a 'surface', mark it as such, and then place models around it I'll effectively have a 'map' file which can be efficiently rendered with pre-calculated lighting and ... buildings and stuff.,

Buildings

I need to add buildings/whatever to the scene to give a real impression of scale/speed

Neon shaders

Time to add style, thinking Neon battle grid with glowing shaders/effects

Weapons

Currently weapons are just 'missile' for an instant kill, everybody in PvP should start with two missiles and have a machine gun for wearing enemies down (this implies that people have 'life' or 'shield' which means that'll need modelling too)

High scores/info tables

Very quickly now - a couple of tables that show

a) People who have played, ordered by their scores
b) Profile pages that show deaths (who has killed you) and kills (who you have killed)

Organise the code files now we have a structure

Spent the past week on an architectural tidy up (Yeah, unusual in this project), but that means my messaging/eventing/commands are much tidier now and it's no longer crippling to think of adding new gameplay features.

Part of this means that there is much less division between client and server, I'm thinking I should make two drivers (client and server) and stick all the rest of the code in a shared folder and further subdivide into entity components, controllers, messengers etc. It'll make life much better.

Buffer de-allocation

Er, not doing this at all - for most things it doesn't matter, but for the explosions this is going to present an issue

Upgrade socket.io

I've already upgraded, but I'm using socket.send.json, which is utterly wrong.

Detail texture on terrain

I've a basic terrain texture which I'm going to keep (I really cba with any splatting/Lod algorithms on this project), but a detail texture wouldn't go amiss for when we're zoomed up close

Add a targeting reticule

At the moment, targeting is a mystery to players, we need

  • An indicator showing that a player is being tracked (can be more than one)
  • A special indicator showing that we're trying to get a lock on a player ( the one we've had tracked longest)
  • An indicator to show that we HAVE a lock on a player/we've fired on that player
  • A distance indicator to show
    • How far from the player we are
    • how far our missile is once it is fired

Fault tolerance on sockets

Server crashes occasionally, but only because of failed writes to socket.

I guess on bad write to socket we should consider the socket disconnected and throw the client away

Add a rantbox

Shao Chen wants to shout at players who kill him because he's a pussy, I guess it's only fair

Loading screen

Would be nice to have some text/help as part of the loading mechanism and to use the canvas for this (with a spinning circle or whatever is cool these days)

Add player naming

The most basic thing ever

  • On entering the site for the first time, user enters a name they want to be
  • This gets sent to the server for 'validation' and it is set in a cookie
  • Cookie is read by client code on connect, and contents sent to server on socket.io start-up
  • Server ties this to the socket.io connection and lo' the player has a name
  • I'll have a log-out button so they can clear this cookie if they want

Handle disconnection

Clients could do with notifying when they've been disconnected, it's only polite.

Sound effects

Find somewhere with free sound effects (or purchased if they're cheap) so we can have a bit of noise

Player labels

It would be nice to see who you're shooting at before you shoot at them

Death screen

On death, the camera zooms out so you can see the entire map, a countdown showing how long until you spawn again would be a big plus.

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.