Chess Assets

Share your advanced PureBasic knowledge/code with the community.
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Chess Assets

Post by dige »

Have a look at how it looks like with SpiderBasic. Unfortunately there are a few grafical bugs:

http://h2717740.stratoserver.net/chess/index.html

How can that be?
"Daddy, I'll run faster, then it is not so far..."
User avatar
Michael Vogel
Addict
Addict
Posts: 2807
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Chess Assets

Post by Michael Vogel »

Haven't played around with SpiderBasic so far, but would assume you'd need to add ClosePath() here and then.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Chess Assets

Post by netmaestro »

@dige: Looks like the flag #PB_Path_Winding isn't available on SpiderBasic. Not sure why but its library likely isn't the same as Windows which uses gdiplus. the pawns are pretty easy to fix by starting at the top, going all the way around and back again with part-circles, curves and a line for the bottom. Then it should stroke and fill fine. The queen isn't using #PB_Path_Winding so I'm not sure what's going on there. Shouldn't be too hard to find though.
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Chess Assets

Post by netmaestro »

Reworked the Queens and Pawns so they would draw properly in both PureBasic and SpiderBasic. You can see a rendering of the SpiderBasic version at: https://lloydsplace.com/ChessAssets.html The problem with the queens turned out to be with the AddPathArc command. I replaced it with AddpathCurve and it straightened up. The pawns suffered from not having #PB_Path_Winding available, so a bit of rework made that flag unnecessary and all's good now.
BERESHEIT
BarryG
Addict
Addict
Posts: 4176
Joined: Thu Apr 18, 2019 8:17 am

Re: Chess Assets

Post by BarryG »

netmaestro wrote:You can see a rendering of the SpiderBasic version at: https://lloydsplace.com/ChessAssets.html
Looks fantastic, but note that the Kings and Queens are on the wrong squares (for both colors). The PureBasic version is correct.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Chess Assets

Post by netmaestro »

That's a black-from-the-bottom board, they're where they should go. Queen to her color, remember, and white on the right. The square IDs on the sides identify the black-from-the-bottom board with a8, b8, etc. at the bottom. (scared me there for a sec!)
BERESHEIT
BarryG
Addict
Addict
Posts: 4176
Joined: Thu Apr 18, 2019 8:17 am

Re: Chess Assets

Post by BarryG »

netmaestro wrote:That's a black-from-the-bottom board
You're right. I didn't notice the numbers (and pieces) changed. Sorry for that.
Post Reply