An arrow might be doable by listening for mouse release and then drawing a rotated image of an arrowhead at the end of the line.[/quote] The canvas API is actually vector based, although you'd need to clear and redraw to have a live preview. SVG might be more appropriate for live updating objects.
He didn't mean a live preview, just an arrow that is drawn with its orientation matching the last known direction of the mouse.
What I meant by Live Preview is that while the mouse is going from start point to end point, you the arrow is being draw as if the mouse button was released at that point.
I think I can actually automatically create a color palette using the army colors of players in the game. I really like that @LavaSnake is working on the tools so that I can focus on the UI. I'll make a github project later so that we can switch those roles around a bit if you have some ideas for the front end.
Those would definatelly be enough, actually more than that. If you look at the TV analyses they do using drawing, they don't use more than 2 colors anyway.
I will probably have a third color as well, in case you wanted something neutral. I would just leave that yellow every time, but some players might be yellow. It could take some work to automatically create a good neutral color every time.
It looks like the drawing tool we are using already just draws a vector on a time interval as long as the mouse button is down. The arrow can just point in the direction of the last vector drawn.
I'm not sure what you mean. The problem would be to come up with a color that is as far away as possible from any of the team colors currently being used, while still being bright and easy to see on a stream.
Casters will not use the color of the team to draw the arrows, you only need two colors to distinqueish the "moves" you are drawing, it is obvious what color match a player based on its direction.
I'd use red yellow green colours, with a black outline. This way the colours could convey information if the caster desired (traffic light style; danger zones, safe zones, preferred routes etc).
Well, I think it would be simplier like that, to only have three shapes: vector arrow vector circle free-drawing And these shapes can be in three colors: red blue black There would be a simple interface, three buttons to click a shape and three buttons to select color. And a button to clear the screen. It needs to be working quick, imagine an army is moving to one's base, you want to draw a "this army will move this direction and see this defending army over there, if they move this way (draws an arrow) they will be able to stop the attacking force". So the interface needs to be just "click arrow - click red - do a quick shape - click another color - draw the same shape and done. Couple seconds timeframe for the arrows to be useful only.
If it is the same color as armies it will be ok. amd ofc it is thixk enough, totally fine. i think we can test this later anyway if it doesnt work
I have it up on GitHub now at https://github.com/pamods/mods-conundrum/tree/master/cSketchJS It works, but so far it is very limited. You can free draw, change the colors, and clear the canvas. The arrow drawing doesn't work, but should be able to hook into LavaDraw easily enough. I also still need to get some kind of feedback for hovered and active buttons.
That UI looks very nice! To add LavaDraw just make sure it gets loaded after Sketch.js and then switch tools like I show in the Testing Ground.html file.
Thanks! I think the appearance of caster mods is pretty important, so I'm going to start trying to be more mindful of that when I make things that will show up in a cast. Hm, I thought I did that. When you get a chance maybe you can try to figure out what I did wrong.