Closed ApplySci closed 3 years ago
Thanks for your interest in the project! I applied some of your changes (see commits attached to this PR), but I'm not sure about other ones.
Inkscape 1.0 command line. Unfortunately the new option (--export-filename
) is incompatible with Inkscape 0.9x. Linux distributions are somewhat slow to adopt 1.0 but I guess it's OK to require 1.0 now. Done.
The remarks about PATH, and missing step for cd server && yarn
: I updated the README, thanks.
The Makefile part for Windows. I'm not too comfortable having that part inside the Makefile, because I will not be maintaining it (I do use Windows, but develop on WSL). Also, presumably other parts of that Makefile still do not work on Windows. How about making a separate file, like Makefile.win
?
"make test
to run server tests (having used make server
to ensure it's running)" - are you sure? It should not be required, and the tests work without make server
for me.
I haven't had any other problems with the Makefile than that one part. The following make
targets work ok, after that change: parcel, files, server, test, build
.
You're right that make test
doesn't need make server
, and that applies on windows too. I don't know why it failed the first time I tried it, but I just tried it again and it worked fine without make server
.
Hi @pwmarcz
I'm planning to make a fork with a few automation features. I completely understand that you don't want those as pull requests, so I won't submit them.
But you know this code thoroughly. If you could give me a couple of pointers on where I should look in the source code (which file, which function, or which objects) for some key things, that will save me a lot of time trying to learn how everything fits together.
I'm planning to add:
Where should I start looking, to do each of these?
Hello!
That's right - these don't sound like they belong in with my vision of the game, but I hope you manage to achieve your goals with the fork.
First, some general advice. Generally the code is structured in layers, so probably you can follow them. For instance, if you add a "quick discard" feature, then the key handling belongs with other keys (game.ts:onKeyDown
), then the handler for the action would go with all the other actions in world.ts
.
Luckily, your ideas all sound like they can be done without modifying the network layer. You'll be adding some extra tile changes to the existing code. Make sure that the updated state gets sent to server (world.ts:sendUpdate
, I think).
For the features specifically:
- a quick discard feature so that the discarded tile always goes into the next available discard slot.
Your code will need some understanding of which slot is which, but that doesn't sound too hard - the slots have names, after all.
This sounds easy enough if this is just a "teleport", not an animation - there are no real movement animations in Autotable, just tiles moving along with mouse. So if you want animation, you would have to somehow simulate the tile moving. There is one feature that is kind of similar - a fancy animated multiple tile flip (select multiple tiles in your hand, and press Shift-F to see it). If you need animations, maybe the code for that (onFlip
) will give you some ideas.
- A button to toggle the reveal & hide, of all tiles in people's hands
I guess you could change all the tiles' rotations to "lying down". Seems pretty similar to the current flip (onFlip
), you could probably use that.
- Removing tiles from the set so that we can play with just pin; or just pin and sou; or just pin, sou, man. So that we can teach using the Tibet Rules method.
This is already supported in the code (there is a 3-player mode which uses a different set of tiles, etc.) You should be able to define a new set of tiles, then a new set of slots, and a new way of dealing. It will be a bit awkward, sorry. Follow what happens to conditions
in the code. Most of that will be in setup*.ts
.
- A toggle option for a player to have an auto-sorted hand.
I would start by adding a manual "sort" button or key. Then, keeping the hand auto-sorted means calling that function at the right moment to sort the tiles during the movement. Probably after the movement ends, i.e. player drops the tile/tiles to destination.
That part sounds like it needs some testing: what happens if drag move multiple tiles? what if I move tiles inside my hand? what about tiles that are flipped? etc.
Good luck!
That's brilliant, @pwmarcz . Thanks so much, that's exactly what I was hoping for!
… update Makefile to account for the command-line change for Blender 1.0 and enable it to do make build on Windows as well as linux/mac.
I hit a few snags when trying to get things running on my machine. One was the changes to the Blender command-line argument; another was missing dependencies. These changes should help others get started.