Code Monkey home page Code Monkey logo

ogres's People

Contributors

mjhale avatar samcf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ogres's Issues

Prevent inactive players from being timed out of a multiplayer session

The websocket server will timeout connections that have not received or sent messages within the last 5 minutes. Either the server or client should periodically send PING messages.

  • Is this an application-specific PING or something inherent with the WebSocket protocol?
  • Should the server send these PINGs to clients, or vice-versa?

Tokens labels are sometimes difficult to read or obscured by other tokens

Consider the following improvements...

  • Scale font size with zoom level, increasing them when zoomed out and decreasing them when zoomed in.
  • Render token label with foreignObject to avoid SVG font rendering.
  • Re-arrange token rendering order by vertical position so that tokens higher up on the screen are rendered last.
  • Use background color to emphasize font instead of hacky text stroke.

New control for focusing player cameras to match the host's current view

Currently, players are invariably pulled into whichever scene the host opens, whether or not the host is ready for them to be there or not. This was done as a hack when first building out the multiplayer experience. This behavior is limiting since the scene is not always fully prepared by the time the players need to be moved to it.

This feature should allow hosts to create new scenes or open existing ones without automatically pulling players into it. This will give the host the freedom to explore and setup the scene and provide an explicit button that, when clicked, will pull the players into the scene using the host's current view.

This will also allow the host to focus the players on a new point in the existing scene.

New toolbar options for syncing, snapping, and locking windows in multiplayer sessions

Hosts should be able to control what connected players are allowed to see and interact with during a multiplayer session.

There will be new toolbar buttons for the following actions and modes:

Snap
Player views are immediately transitioned to the current view of the host, but they can continue to pan and zoom their view freely.

Snap and lock
Player views are immediately snapped to the current view of the host, they can no longer pan or zoom their view, but they are not synced with the host's view.

Snap, lock, and sync
Player views are immediately transitioned to the current view of the host, they can no longer pan or zoom their view, and their views are synced with the view of the host until disabled.

Options to disable shared cursors

There should be two new options in the "Friends" multiplayer panel form.

"Share cursors"
Toggles the live sharing of cursors for everyone. This option is only available to the host.

"Share my cursor"
This toggles the visibility of your own cursor for other players in the session and is available for everyone.

Invite players to join the host in a multiplayer lobby

Sharing the player view window over Discord or Zoom is a decent, effective way to create a collaborative experience. There are some pretty serious limitations, however.

  • The operating system doesn't want to update windows that are hidden behind other windows; this forces the host to keep the player view window visible on their own computer.
  • Players are limited to telling the host what they'd like their character to do and cannot move their own tokens.
  • It is much less of an immersive experience; far removed from the traditional round table setup. Players feel more immersed in the experience if they can directly control the objects on the canvas.
  • The visual quality and detail is vastly improved by rendering directly on the player's browser instead of through a video conference.

Many other virtual tabletops allow hosts to invite players to participate in a multiplayer lobby through the browser. This story represents the first step towards a more collaborative tabletop experience.

  • The host may turn their session into a public lobby which can be accessed by anyone with the private URL that is shared by the host to the players.
  • The players navigate to the given URL and can see the canvas and all the publicly visible elements on it.
  • Players are restricted to only being able to move the camera around.

Display token conditions on canvas

Right now, conditions and flags are only visible in token options and the initiative track. This work would render the conditions as small icons around the token itself.

Some things to think about...

  • Make sure nearby adjacent tokens don't cover up the condition icons.
  • Make sure tokens can bear to have all conditions at once without too much visual clutter.
  • Include markers for "player", "hidden", and "in initiative" flags, as well.
  • Optimize for at most 3 conditions on a token at any given time.

Prefer common system fonts instead of 'Valkyrie'

Consider the fonts offered by https://systemfontstack.com/

Serif

font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;

Monospace

font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;

Cut, copy, and paste tokens

Introduce new tools for cutting, copying, and pasting tokens within a scene or across scenes.

One use case this is particularly useful for is when moving player character tokens between scenes, especially if there are, for example, many floors to a tower that they are moving up and down within. Cutting the tokens from one scene and pasting them into another saves a lot of time.

Copying tokens should preserve the following attributes:

  • Image
  • Label
  • Size
  • Conditions
  • Visibility
  • Lighting

The following attributes should not be preserved:

  • Position
  • Initiative

These new commands should be available as shortcuts:

ctrl + x for cut
ctrl + c for copy
ctrl + v for paste

Both hosts and players should be able to perform these actions freely.

Pasted tokens should appear in the center of the view. Multiple tokens should be pasted with minor horizontal adjustment so they don't all lay on top of each other.

Uniformly scale tokens by size

Currently, changing the size of a token does not also scale its label or condition flags. There is also considerable effort put into manually scaling the token element.

Consider using transform: scale(x, x) to scale the token parts uniformly.

Prompt to confirm closing a window

It can be a huge pain in the ass if you accidentally close a window with a bunch of tokens and stuff on it. The application should prompt users to confirm when closing windows that seem to be in use.

Panel state ought to be scoped to the local entity instead of the current window

As a player in a multiplayer session, it is very jarring when your selected panel tab changes when the host changes the workspace. This has made it obvious to me that panel state is not scoped to the current workspace, but to the local user state. Both the currently selected panel and the collapse state should be elevated to the local user scope.

Periodically attempt to re-establish closed connections

When a player is disconnected from the multiplayer session, periodically attempt to retry establishing a connection to the room using the same key. The retry time should be randomized to help reduce "stampeding herd" conditions.

Draw movement distance when dragging tokens

It's very helpful to know how far, in feet relative to the grid size, you are dragging a token.

  • Display a move distance next to the token being dragged relative to its original position.
  • Display the original position of the token as a "ghost" token.
  • Display a line connecting the original position and its new position.

Prefer previously used room key when creating new multiplayer sessions

When a host creates a new multiplayer session, attempt to use the last used room key for the session identifier. This will prevent the host from needing to redistribute a new room key to the players, and ideally require no action on the players part to reconnect at all once automatic retries are implemented.

Optimize uploaded token images

One of ogre.tools most important priorities is ease of use and low barrier to entry. Users can upload images directly from their computer and are not asked to crop and resize these images. It doesn't attempt to modify the image at all.

This works great when you are the only consumer of these images. However, sharing these images over the network to many different players on the session may introduce long loading times since these uncompressed images are sometimes very large; in both file size and dimensions.

The application should resize and compress token images via HTML Canvas before adding them to state and cache.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob

Some concerns

  • Is the checksum of the compressed image deterministic? The app should prevent uploading the same image twice, resulting in duplicates.

Support for more token conditions

The following conditions are not supported:

  • Deafened
  • Poisoned
  • Paralyzed
  • Petrified
  • Restrained
  • Stunned

We can support another row of 5 conditions, at least.

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.