Silver Chess - My first LOVE game!

Show off your games, demos and other (playable) creations.
User avatar
Sir_Silver
Party member
Posts: 286
Joined: Mon Aug 22, 2016 2:25 pm

Silver Chess - My first LOVE game!

Post by Sir_Silver » Tue Aug 23, 2016 8:16 pm

Hello, today I wanted to share with you fine people my first LOVE creation, which is Silver Chess!

Here is a list of some of the features:
--Sound effects for moving pieces, winning, and stalemate.
--Move assist, which shows you all of the legal moves for a piece that you are holding.
--Highlighting for squares that you are hovering a piece over.
--Full rule compliance, all rules of a real chess game are accounted for including; en-passente, castling, pinned pieces, pawn promotion, etc...
--Resizable window with blurry graphics in case you want to get that early 1990's video game feel.
--Single/local player support - you can only play against yourself or someone else who is sitting next to you.
--And many more that I can't think of!

White pawn on e4 is deciding if it should move forward or attack the black pawn!
Image

The white pawn on g7 is deciding between moving forward, or capturing a delicious rook or a savory bishop.
Image

Lastly, after the white pawn has decided it wanted to capture the rook. A drop down window shows all of the possible promotion options that can be selected.
Image
SilverChess.love
(671.81 KiB) Downloaded 125 times
I hope you will check it out and let me know what you think, or if there are any bugs. Thank you! :crazy:

User avatar
zorg
Party member
Posts: 2620
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Silver Chess - My first LOVE game!

Post by zorg » Tue Aug 23, 2016 8:33 pm

One suggestion would be to have the drop-down menu for pawn promotions a middle-grey shade, so it stands out a bit more.

Also, i'm not completely sure what the rules of chess say about promotions, but me playing against potato-me and getting a pawn to the last row allows me to promote even when i never lost any other rook/bishop/knight/queen; not sure how that would work with a physical board that has no "extra" pieces.

Also, i saw that there was at least 2-3 window size changes when i first started it up; you could fix that with defining the window as false in your love.conf, and creating the window only later, with setMode.
But it also remakes the window when resizing... i don't think it's supposed to do that...
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
Sir_Silver
Party member
Posts: 286
Joined: Mon Aug 22, 2016 2:25 pm

Re: Silver Chess - My first LOVE game!

Post by Sir_Silver » Tue Aug 23, 2016 8:37 pm

The first idea sounds decent, it certainly could stand out more.

As for the second point, yeah you can promote to any of the four pieces, regardless of how many you currently have, so theoretically you can have 9 queens (8 pawns promote to queens + the original queen), you just need to have sufficient spare pieces laying around, which you should.

And yeah, I was never really sure what the deal was with it opening/closing the window at the start, definitely something weird/wrong that I am doing with resize or whatever, will look into it, thank you!

User avatar
Sir_Silver
Party member
Posts: 286
Joined: Mon Aug 22, 2016 2:25 pm

Re: Silver Chess - My first LOVE game!

Post by Sir_Silver » Thu Aug 25, 2016 9:36 pm

Bump-date:

--Revising the way some drawing operations are performed so that they are done less stupidly. (Like creating new canvases every drawing frame *shudders*)
--Made the game a little easier on the eyeballs.
--Fixing the window resizing/recreating at launch. (Resizing the window will probably be redacted)
--Will be fixing an issue where en passant (https://en.wikipedia.org/wiki/En_passant) captures are appearing as green (non capture moves) when they should appear as red.
--General performance and code optimizations are underway.

The potential en passant capture on b6 appears as green instead of red.
Image

Potential new features may be coming soon, such as:
--Rudimentary A.I. opponents!
--Move timers and options.
--And many more.

Stay tuned for more. :ultrahappy:

User avatar
ivan
Party member
Posts: 1454
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Silver Chess - My first LOVE game!

Post by ivan » Fri Aug 26, 2016 4:32 am

Hello there.
It's an OK start, good choice of a chess font, drag and drop movement is fine, en-passant check which is always nice
but the code needs a lot of work if you plan on making a full game.
Move validation needs to be one of the fastest areas of your code,
Imagine loading up a 10 MB PGN and waiting for half an hour for the computer to validate the file.
My biggest concern here is the board representation.
Having a different Lua "object" for each piece is just not a good approach,
it's possible to make something like that work, but it's going to be a memory hog at best.
Take a look at this old library that I worked on
Repo: https://bitbucket.org/itraykov/chess.lua/src/
Love2D: viewtopic.php?t=80105
Less code and it can generate all legal moves (both "to" and "from" any square).
not sure how that would work with a physical board that has no "extra" pieces
Completely legal to promote to any piece that you want. Back in my day, we used to put an upside-down rook to signify a second queen.

User avatar
zorg
Party member
Posts: 2620
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Silver Chess - My first LOVE game!

Post by zorg » Fri Aug 26, 2016 5:07 am

ivan wrote:
not sure how that would work with a physical board that has no "extra" pieces
Completely legal to promote to any piece that you want. Back in my day, we used to put an upside-down rook to signify a second queen.
The question was, if no non-pawn of yours was "killed", how would you promote one of your own pawns when clearly you have no more pieces to put into play.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
ivan
Party member
Posts: 1454
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Silver Chess - My first LOVE game!

Post by ivan » Fri Aug 26, 2016 5:33 am

zorg wrote:The question was, if no non-pawn of yours was "killed", how would you promote one of your own pawns when clearly you have no more pieces to put into play.
It's possible in theory, but any good player will resign well before something like that could happen. :)
When I was a kid we would put a coin on the board, when we ran out of pieces.
In practice, nobody promotes more than 1 or 2 pawns and it's usually at the end of the game so it's rarely a problem.
99% of the time, the pawn will be promoted to a queen and the game would end shortly thereafter.
Sometimes it's better to promote to a knight, rook or bishop
in order to avoid stalemate or force-check the opponent, but even that is quite rare.

User avatar
pgimeno
Party member
Posts: 1690
Joined: Sun Oct 18, 2015 2:58 pm

Re: Silver Chess - My first LOVE game!

Post by pgimeno » Fri Aug 26, 2016 12:00 pm

To account for all possible situations, a chess set should have 9 queens, 10 knights, 10 bishops and 10 rooks per side. These extreme situations are just rare enough for chess set makers not to bother :)

User avatar
zorg
Party member
Posts: 2620
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Silver Chess - My first LOVE game!

Post by zorg » Fri Aug 26, 2016 12:52 pm

Okay, so the rules do allow it, only it's not a lifelike scenario, so they don't give you any extra pieces.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
ivan
Party member
Posts: 1454
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Silver Chess - My first LOVE game!

Post by ivan » Fri Aug 26, 2016 1:01 pm

pgimeno wrote:To account for all possible situations, a chess set should have 9 queens, 10 knights, 10 bishops and 10 rooks per side. These extreme situations are just rare enough for chess set makers not to bother :)
Not only that, you would need two of each color!
A regular set has 32 pieces, to cover all possible situation you would need an additional 64 pieces (4*8*2). :)
Okay, so the rules do allow it, only it's not a lifelike scenario, so they don't give you any extra pieces.
In practice, any self-respecting chess player would resign after their opponent promotes one queen let alone eight.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests