Giter Site home page Giter Site logo

deepfates / gather-town-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedcoelho/gather-town-scripts

0.0 1.0 0.0 158 KB

A script to implement a minimap on gather.town, amongst other ideas...

License: MIT License

JavaScript 96.52% TypeScript 3.48%

gather-town-scripts's Introduction

gather-town-scripts

Experimenting with a gather.town frontend client scripting to implement things like:

  1. drawMapAllPlayers.js: An interactive minimap (with live heatmap of player positions)
  2. autoMove.js: A script that moves the player automatically in a set pattern of directions (or a random pattern)
  3. playerInteracts.ts: A script that logs data about player interactions with objects in a given space
  4. goKartStation.js: A script that manages a custom goKart Station object
  5. coordinatesLogger.js: A script that enables logging and monitoring map coordinates interactively
  6. becomeGoKart.js: A script that removes and restores the players outfit when he gets on a vehicle
  7. teleportAllPlayers.js: A script that will prompt the user for a map number to then teleport all players in a gather.town space into.
  8. measureSpeakingTimes.js: A script that measures speaking times for all players based on the playerActivelySpeaks events firing in a space.
  9. confettiHitDetection.js: A script that checks for players in the range of the confetti effect and subscribes to the playerShootsConfetti event, triggering a notification.
  10. mapCollisionsToString.js: A script that converts from map collision data to base64 string data expected by some Gather.Town API methods.
  11. getAvatarImage.js: A script that takes the player's outfitString, converts it into an ordered list of outfitLayers and requests an avatar's spritesheet or profile image from gather.town's dynamic-assets endpoint.
  12. isMovingNearObjects.js: A script that demonstrates a playerMoves subscription that logs objects within two squares from the player who moved. This also demonstrates how subscriptions can be cancelled and how events can be filtered from within the game.subscribeToEvent call itself.
  13. findMatchingObjects.js: A script that finds all objects in the space with any property value including a given string (quickly searches through all property values for every object in a space)
  14. mapTileSelector.js: A (client-side) script relying on the HTML Canvas to take a map's background image, break it into tiles associated with the gather.town coordinate system and then filter them based on a set of HEX color thresholds. Ex: filter all map tiles containing at least 60% of color f2f2f2 and 10% of color whatever.

minimap roadmap

v2 roadmap

  • Possibly have a mode that renders all maps in a given space simultaneously
    • Or allows you to select a given map or a list of maps to render
  • Have a toggle that triggers objects / portals / etc rendering

v3 roadmap

  • Have a toggle that triggers heatmap layer rendering

⏳ UNDER DEVELOPMENT

  • Handle whether the player has already entered the game or not, in order to get it running on page startup without any problems
       * this includes toggling visibility / deleting the canvas if the player leaves the game
       * consider browser navigation / URL change event to stop minimap interval check
       * NEED to find out how to intercept the clicking on the sign OUT button, to avoid late destruction of the map

✅ DONE

v1 roadmap

  • Include a button on the UI to hide / show the minimap
  • Possibly include a zoom feature to allow for the minimap to be scaled up or down in real-time (could be achieved by buttons)
  • Allow dragging the minimap to reposition it (and a button to reset the minimap's position and scale)

v2 roadmap

  • Consider the impact and usability of displaying other players on the minimap
  • Add debug function
  • Teleport directly to the coordinate clicked
  • View players names on mouseover
  • Highlight certain important types / kinds of objects (ex: portals, interactive objects)
    • render function could be broken into steps, for better legibility, and wrapped by a wrapper (render players, render map, render objects, etc)
  • Implement a heatmap view of player movement / player positions

⏳ KNOWN BUGS

No known bugs to report at the moment

gather-town-scripts's People

Contributors

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