RoepStoep / lidraughts

lidraughts.org: the forever free, adless and open source draughts server
https://lidraughts.org
GNU Affero General Public License v3.0
104 stars 10 forks source link

Feature request: Dameo variant #14

Open drewm1980 opened 3 years ago

drewm1980 commented 3 years ago

The user experience for lidraughts is really polished; congratulations!

I would love to be able to play the dameo variant on lidraughts; I haven't been able to find a good real-time dameo server to play against friends yet.

Thanks!

notzmv commented 3 years ago

I've started to look into this to write the Dameo variant, but it's not very straightforward to implement since it's a straight game and not an oblique one, and since kings move differently from men--that is, kings move like chess queens but capture orthogonally in all directions like men.

I don't think it should be too hard, but I'm not familiar enough with how either lidraughts or lila work internally at this point and don't really know Scala.

Maybe if sometime @RoepStoep could please throw out some pointers into what sort of stuff/where to find what I'd need to change it I might be able to introduce a pull request for this. I've written a little bit based on the templates of the other variants but I think I'd need to throw in more overwrites inside the variant definition at the very least.

RoepStoep commented 3 years ago

You should know that the goal of lidraughts is not to support every draughts variant in existence. Initially we focused only on international draughts and the 10x10 board, but are now moving in a more general direction, aiming to become a platform for those draughts variants that have the biggest real world representation (world championship cycles, international tournaments, official ratings / titles, etc). We won't consider adding "experimental variants" like Dameo until we have reached a certain point of completion there.

That being said, if you still want to implement it, I can give you some pointers. As you've seen you will need to create a variant class and override move generation, drawing rules, etc: https://github.com/RoepStoep/lidraughts/tree/master/modules/draughts/src/main/variant,

The biggest difficulty is that Dameo is played on both the light and dark squares of the board, while all current variants only use the dark squares. So you will also have to implement a new 8x8 board type, that defines fields 1-64 (instead of only 1-32) and their directions of motion: https://github.com/RoepStoep/lidraughts/blob/master/modules/draughts/src/main/Pos.scala

This must also be supported in the frontend (which everywhere maps fieldnumbers 1-50 or 1-32 to dark squares only), first and foremost in the draughtsground module: https://github.com/RoepStoep/lidraughts/tree/master/ui/draughtsground

So beware, this variant could be a lot of work!

notzmv commented 3 years ago

Thank you for the pointers! I will try to implement it anyway since me and some friends have enjoyed playing Dameo but there aren't many options as to where to play it, and maybe eventually if you're interested you can merge the code, even if just as a stepping stone to implement, say, Turkish or Armenian draughts.

In addition, perhaps you could create a project or some issues yourself on variants you're interested in supporting in the near future so you can get more help on that front. Again, thanks for the help.