dfb / gmtools Goto Github PK
View Code? Open in Web Editor NEWExperiments in tools to help gamemasters
Experiments in tools to help gamemasters
When the user sees the welcome screen (#5), we should:
Instead of having the user click a tile, then select things like its type, then click another one, etc., it'd be better if we give the user a sort of paint brush so that as they drag around over a bunch of tiles, the current style or whatever gets applied to each tile they drag across.
Currently there are 3 main tile properties we need to be able to paint, and each tile can have a value for each of the different properties:
We'll depict each property in the tile itself visually, but then also explicitly spell it out when you select the tile. So maybe for type we could have a little icon representing each type of ground, for lighting we apply some darkness filter, and for movement we overlay the tile with a hash or X or something. Hopefully at a glance you'll be able to see that e.g. this tile is a dimly lit castle with no movement restriction, that tile is a forest in the dark, etc. - without having to select it to read its properties.
As for how we present this to the user, one idea could be:
The overall idea is that we make it as painless as possible to quickly create or edit a board, keeping in mind that a decent sized board may have many hundred tiles.
Also, painting tiles should use the persistence API (once we implement it #2) so that changes are saved. For performance reasons, it'd be good to batch the changes, i.e. instead of calling the save API for each tile we change, accumulate a list of changes to pass to the save API when the user releases the mouse button. As a bonus, this will work nicely with an undo/redo API if we ever get around to making one.
In the board tools/info section, have a button to open a resizing dialog:
Once the user chooses a new size (vs cancelling), we should update the data structure, store it in the persistence layer, and then load it into the board viewer/edtior
Latest in git has a single grass tile type, so now we can go back and add in more. For each:
LoadImages
paintToolRows
For now I think we need:
We don't need anything too fancy, and we also don't want them super detailed because these tiles are drawn underneath units placed on the tile, movement indicators, and lighting indicators.
Adam said it'd be nice if each unit could have a little note attached for it to help the GM remember what it's for, etc. I don't think we need a big text area, so just a text input will do. And let's make it save automatically - i.e. no Save button but instead do an on:blur
handler to trigger the save.
When the user clicks on a tile in the grid, we should show it as selected (maybe an outline around it?) and then in the tile info pane on the right show info like:
Each unit should have a movement value representing how many squares it can move per turn. As with HP and AC, it should have an editable value at the time of spawn and then be editable after the fact too.
When the user sees the welcome screen (#5) and chooses to create a new board, we should:
After placing a unit on a tile, the user should be able to grab it and drag it to another tile, and then both the original and the new tile should re-render accordingly.
Also, on the start of drag, we should probably select the source tile, and when the unit is dropped, we should probably select the destination tile.
We need a way to show a popup modal dialog that blocks other input while the user interacts with it. We could either use an existing third party component library or whip up one of our own quick.
After we do #12 and #20, we should visualize unit movement:
Currently you can pan the grid by dragging with the left mouse button, but that won't work once we get into things like painting tile types or moving units. Let's make it so that you instead press and hold the right mouse button to pan.
For the first version, we're just using the browser localStorage for storing the boards and other info. Long-term, however, I'd like to store everything in a remote database. It would be nice if we had a persistence layer/module that initially could be implemented on top of localStorage, and then later we could reimplement it for a remote DB without having to make too many changes to the code. I don't think we need to go crazy and try to make a perfect API that anticipates everything we could want; mostly I wanted it to be somewhat structured like what we'll eventually have so that it takes just some "light" refactoring to switch to it. So maybe something like:
ListBoards
, GetBoard
, UpdateBoard
, etc.(another ticket broken out from #4)
It might be nice to be able to rapidly switch among tile painting tools via hotkeys. One possible way to do it:
Example: water is currently selected and the user taps '3', so it jumps to the first item in the movement row
Example: water is currently selected and the user taps '1', so it moves to forest (or whatever is next in the tile type row)
Possible variation that might be a terrible idea: when moving among rows, instead moving to the first one, move to whichever one was previously selected on that row.
As with hit points, when you have a unit selected, you should be able to edit its AC (and, of course, those edits should be persisted).
When a user selects a tile we should show which units are currently on that tile. If there are less than 4 units present, an 'add units' button should be enabled. Clicking it opens a modal for selecting the unit type, etc., after which we add it to the current tile, it gets displayed in the list in the tile info, and the tile itself re-renders to show the presence of the unit on that tile.
(this is a ticket broken out from #4)
As with tile types and tile lighting, we need a 3rd tile layer for movement restriction:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.