View previous topic :: View next topic |
Author |
Message |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Mar 05, 2003 9:29 am Post subject: Volunteers wanted, Project KiXChess |
|
|
Ok,
always wanted to add value in my scripting skills , so what would be better than an 'open source' Chess program ...
What I had in mind (not even started yet, just brainstorming) is a KiXforms based Chess game to be played over LAN (ini-based network communication) for 2 players ...
As soon that part is running the hard part is starting : THE COMPUTER PLAYER ALGORITHMS
Thats the part where this is starting to get interesting
Anyone ?
If I recall correctly CJ had started once a chess script for kix 3.63 , oh yeah : KixChess - working version _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Chris S. KiXforms Enthusiast

Joined: 05 Mar 2003 Posts: 241
|
Posted: Wed Mar 05, 2003 1:00 pm Post subject: I was just thinking the same thing yesterday |
|
|
In fact, I was looking for some Chess icons on the internet. I don't know how useful I can be, but sign me up if you need anything. |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Mar 05, 2003 1:16 pm Post subject: |
|
|
Chris,
yeah that'd be a start ... so far I have 'created' the Chessboard with mspaint ... The black fields are KiXtart blue
For the figures and movement ... will try to get some time this evening and post back here t'morrow _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Chris S. KiXforms Enthusiast

Joined: 05 Mar 2003 Posts: 241
|
Posted: Wed Mar 05, 2003 9:31 pm Post subject: |
|
|
I was playing around with a board. Here's what I came up with. This would make the board highly customizable by the end-user. They would just have to pick a new tile to change their board.
Screenshot & Tiles:
http://www.geocities.com/gk_zone/chessboard.htm
Here's the code:
Code: | Break On
$frmBoard = CreateObject("KiXtart.Form")
$frmBoard.ClientWidth = 386
$frmBoard.ClientHeight = 386
$bitwise = not 0
For $lTop = 0 to 336 Step 48
For $lLeft = 0 to 336 Step 48
$lGrid = $lGrid + 1
$nul=Execute("$$picGrid"+$lGrid+" = $$frmBoard.Label('',$lLeft,$lTop,48,48)")
$nul=Execute("$$picGrid"+$lGrid+".BorderStyle=0")
If $bitwise=0
$nul=Execute("$$picGrid"+$lGrid+".Picture = 'C:\Documents and Settings\ShiltCK\Desktop\Icons\black48.bmp'")
Else
$nul=Execute("$$picGrid"+$lGrid+".Picture = 'C:\Documents and Settings\ShiltCK\Desktop\Icons\white48.bmp'")
EndIf
$bitwise = not $bitwise
Next
$bitwise = not $bitwise
Next
$frmBoard.Center
$frmBoard.Show
While $frmBoard.Visible
$nul=Execute($frmBoard.DoEvents)
Loop |
|
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Mar 05, 2003 9:55 pm Post subject: |
|
|
Very interesting
I have found a volunteer
copied the code already and dig into it
Hey, the page your link points to tries to run the 'Install Instant Bullshit Wizard' in a pretty penetrant way
{edit}
Hmmm .... feedback tomorrow if you don't mind _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Mar 06, 2003 9:15 am Post subject: |
|
|
back ...
I took Chris' code and suggestions (we had a short but effective chat yesterday) and that's I think is the point to start (as soon the thang does anything I will open another 'Code of KiXChess' thread)
Code: | break on
;Project KiXChess written by
;
; Christopher Shilt, Jochen Polster
;
; 03/05/2003 - Today
$bitwise = not 0
$form = createobject("KiXtart.Form")
$form.Caption = "KiXChess"
$form.ClientWidth = 520
$form.ClientHeight = 470
$picBoard = $form.PictureBox
$picBoard.Location = 20,20
$picBoard.Size = 409,409
$picBoard.BorderStyle = 0
$picBoard.BackColor = Black
dim $xC, $yC
for $x = 1 to 401 step 50
for $y = 1 to 401 step 50
$xC=$x/50 $yC=$y/50
$ = execute("$$btnField$xC$yC = $$picBoard.ToolButton('',"+($x+$xC)+","+($y+$yC)+",50,50)")
$ = execute("$$btnField$xC$yC.FlatStyle=1")
$ = execute("if $$bitwise $$btnField$xC$yC.BackColor=KiXtart else $$btnField$xC$yC.BackColor=White endif ")
$bitwise = not $bitwise
next
next
$form.Center
$form.Show
while $form.Visible
$ = execute($form.DoEvents)
loop |
Chris: your mail server denied to deliver the mail I sent you (Domain_has_been_associated_with_spammers ) ... therefore the post here  _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Chris S. KiXforms Enthusiast

Joined: 05 Mar 2003 Posts: 241
|
Posted: Thu Mar 06, 2003 1:02 pm Post subject: |
|
|
Looks good. The initial $bitwise should be......as A1 should be "black."
I found some chess icons. I'll play with it if I have time today (maybe at lunchtime).  |
|
Back to top |
|
 |
Chris S. KiXforms Enthusiast

Joined: 05 Mar 2003 Posts: 241
|
Posted: Thu Mar 06, 2003 1:13 pm Post subject: |
|
|
Hmm. It was worse than that. You were actually creating an extra row that wasn't being shown. Here is the modified code (it is also printing the $btnField_xy name being created to the console)...
Code: | break on
;Project KiXChess written by
;
; Christopher Shilt, Jochen Polster
;
; 03/05/2003 - Today
$bitwise = not 1
$form = createobject("KiXtart.Form")
$form.Caption = "KiXChess"
$form.ClientWidth = 520
$form.ClientHeight = 470
$picBoard = $form.PictureBox
$picBoard.Location = 20,20
$picBoard.Size = 409,409
$picBoard.BorderStyle = 0
$picBoard.BackColor = Black
dim $xC, $yC
for $x = 1 to 351 step 50
for $y = 1 to 351 step 50
$xC=$x/50 $yC=$y/50
"$$btnField_$xC$yC" ?
$ = execute("$$btnField_$xC$yC = $$picBoard.ToolButton('',"+($x+$xC)+","+($y+$yC)+",50,50)")
$ = execute("$$btnField_$xC$yC.FlatStyle=1")
$ = execute("if $$bitwise $$btnField_$xC$yC.BackColor=KiXtart else $$btnField_$xC$yC.BackColor=White endif ")
$bitwise = not $bitwise
next
$bitwise = not $bitwise
next
$form.Center
$form.Show
while $form.Visible
$ = execute($form.DoEvents)
loop |
|
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Mar 06, 2003 1:21 pm Post subject: |
|
|
copied and found groovy
I claim lack of caffeine for the buggy code
Can you link me to the icons please ? _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Chris S. KiXforms Enthusiast

Joined: 05 Mar 2003 Posts: 241
|
Posted: Thu Mar 06, 2003 1:34 pm Post subject: |
|
|
I haven't made them yet. I looked and looked for good icons yesterday, but couldn't find any. But...I did find some good font that I can convert to icons.
Here's the link: http://www.enpassant.dk/chess/fonteng.htm
Let me know if you have any preferences. |
|
Back to top |
|
 |
Rod KiXforms Webmaster


Joined: 22 Feb 2003 Posts: 202 Location: United Kingdom
|
Posted: Thu Mar 06, 2003 1:49 pm Post subject: |
|
|
In actual fact the hard work has already been done for you. In every font description there is a "View pieces" link which then pops up a new window containing the 6 different chess pieces as GIFs, including both black and white sets.
Rod. _________________
 |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Mar 06, 2003 2:03 pm Post subject: |
|
|
So then ... either save 'em then as bmp strips OR install the font and just apply it to the ToolButtons, changing Caption for different figures
Great !!!
{Actually writing the first function 'ResetBoard' to draw all figures in start place} _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Mar 06, 2003 2:15 pm Post subject: |
|
|
Oh dear ... the 'Chess Cases' Font is transparent on white figures
Maybe thats the case for all those ?
Will try out _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Rod KiXforms Webmaster


Joined: 22 Feb 2003 Posts: 202 Location: United Kingdom
|
Posted: Thu Mar 06, 2003 2:30 pm Post subject: |
|
|
T.B.H. it would only take a few minutes to solve the transparency issue with a graphics program like Fireworks MX. Let me know if you need me to help out with that one.
Rod. _________________
 |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Mar 06, 2003 2:47 pm Post subject: |
|
|
Yeah !
If you can do that , please do it on CHESSCASE.ttf
That is the first font to dl in the list on the site
Will post a first sample of the board with figures in approx. 30 minutes _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
|