Skip to content

Map feature - using DIV instead of Canvas implementation - #10

Open
foreza wants to merge 7 commits into
thireven:masterfrom
foreza:map-feature-v1
Open

Map feature - using DIV instead of Canvas implementation#10
foreza wants to merge 7 commits into
thireven:masterfrom
foreza:map-feature-v1

Conversation

@foreza

@foreza foreza commented Aug 17, 2018

Copy link
Copy Markdown

Basic prototype, want critique before I go any further.

  • Hovering over a grid space marks it some color
  • Selecting a character sprite indicates it's ready for movement
  • Clicking any empty grid space will move that sprite to that space
  • Cannot stack characters on a space
  • Character images pulled from characters array

foreza added 7 commits July 6, 2018 13:41
…examples in default.js

Just to get things started a bit, added all the relevant stats, classes, etc.
Added placeholders for spells, proficiencies, etc. We'll need to find better places to put those but it's easier to visualize it when we have it mocked up
Toned down base/maxhp since you never roll that lucky for health!
Consulted: https://www.dndbeyond.com/spells
https://orcpub2.com/pages/dnd/5e/character-builder
https://en.wikipedia.org/wiki/Character_class_(Dungeons_%26_Dragons)
http://engl393-dnd5th.wikia.com/wiki/Backgrounds
Added alignments because that's always fun
Removed mana since DND doesn't use mana
…n the side element

Map now is drawn with 10px by 10px squares, you can set scale.
Setting scale to 1 is highly not recommended, you get terrible performance (have you tried drawing 400x400 elements and see how much your computer hates you)
Absolute position is calculated dynamically and then added to the map
This is temporary to help me debug / troubleshot
@thireven

Copy link
Copy Markdown
Owner

@foreza Why a new PR for this? This should've gone in the previous PR for map

@foreza

foreza commented Aug 18, 2018

Copy link
Copy Markdown
Author

@thireven

isaacs/github#18

Github doesn't support it the other way, looks like the added it so you can change base
ill keep digging but yeah, i didn't see an option to change the branch im doing PR for on github.

@thireven thireven left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up the formatting of the code. There's very inconsistent line and tab spacing all over the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants