Eschecs FreeBASIC (UCI chess GUI)
-
- Posts: 139
- Joined: May 28, 2009 20:07
Re: Eschecs 1.2.1 (UCI chess GUI)
@ Roland and Paul Doe:
if that is the cause of the bug I can offer a modified Version:
64Bit support and for the mouse buttons, mouse position and mouse wheel a ScreenEvent is now used.
But that has not been extensively tested, either alone or with your chess program.
https://1drv.ms/u/s!AsTPhVzcfzRrhthCHpczPwU3yi3KUw
Mutton
if that is the cause of the bug I can offer a modified Version:
64Bit support and for the mouse buttons, mouse position and mouse wheel a ScreenEvent is now used.
But that has not been extensively tested, either alone or with your chess program.
https://1drv.ms/u/s!AsTPhVzcfzRrhthCHpczPwU3yi3KUw
Mutton
Re: Eschecs 1.2.1 (UCI chess GUI)
That's very generous from your part, thanks. I don't use it, but Roland does, so it would be great.Muttonhead wrote:@ Roland and Paul Doe:
if that is the cause of the bug I can offer a modified Version:
Yeah, it has been tested. I use it a lot in my code; that's how I came to know about the hanging issue, so no worries =DMuttonhead wrote:64Bit support and for the mouse buttons, mouse position and mouse wheel a ScreenEvent is now used.
But that has not been extensively tested, either alone or with your chess program.
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
@Muttonhead
Great! Thank you. I will try that version of sGUI and report here the result.
Great! Thank you. I will try that version of sGUI and report here the result.
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
It compiles (after I changed "chr$" to "chr" in sgui_misc.bas), and the application seems to work. But I don't know if the problem is really solved. Testers welcome. :)
[link deleted, see next message]
[link deleted, see next message]
Last edited by Roland Chastain on Aug 28, 2018 20:07, edited 2 times in total.
-
- Posts: 375
- Joined: Mar 15, 2015 12:41
Re: Eschecs 1.2.1 (UCI chess GUI)
I did a couple of tests:Roland Chastain wrote:It compiles (after I changed "chr$" to "chr" in sgui_misc.bas), and the application seems to work. But I don't know if the problem is really solved. Testers welcome. :)
https://drive.google.com/open?id=1cIz1D ... hGVhKbz6TK
Play 1 game against Fruit without problems.
In other game appeared black lines on board, with size of around one square, but was removed as soon as I move the window.
In other try against List, the game crashed.
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
@Luis Babboni
Thank you for the feedback.
Thank you for the feedback.
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
Unfortunately the game still freezes ands crashes. As I suspected a bug in animation I deactivated it.
I also removed two engines, in order to reduce the file size.
Please download new files on FB Portal.
https://www.freebasic-portal.de/downloa ... s-210.html
@paul doe, muttonhead, Luis Babboni
Thank you for your contributions. :)
Code: Select all
' graphics.bi
#define NO_ANIMATION
Please download new files on FB Portal.
https://www.freebasic-portal.de/downloa ... s-210.html
@paul doe, muttonhead, Luis Babboni
Thank you for your contributions. :)
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Eschecs 1.2.2
Hello!
I took the latest version of the project and tried to compile it under Linux. It was not as hard as I imagined. I just had to use the excellent bipipe library, instead of my Windows specific code. It works!
I also tried (without success) to solve the animation issue. So the animation stays deactivated. After all, it isn't so important.
Here is the source code of the project, including a Linux 32 binary. I am not sure that it will work on another computer: maybe you will have to install some library (maybe pcre).
Eschecs.zip
Theoretically the project should be compiled and ran under Windows, but since I touched many things, it is possible that something be broken. I can't check for now because I don't have a Windows computer under the hand.
Regards.
Roland
I took the latest version of the project and tried to compile it under Linux. It was not as hard as I imagined. I just had to use the excellent bipipe library, instead of my Windows specific code. It works!
I also tried (without success) to solve the animation issue. So the animation stays deactivated. After all, it isn't so important.
Here is the source code of the project, including a Linux 32 binary. I am not sure that it will work on another computer: maybe you will have to install some library (maybe pcre).
Eschecs.zip
Theoretically the project should be compiled and ran under Windows, but since I touched many things, it is possible that something be broken. I can't check for now because I don't have a Windows computer under the hand.
Regards.
Roland
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Eschecs 1.2.2
In fact it doesn't work very well. Sometimes the application freezes, and I have to kill it in the task manager...
Re: Eschecs 1.2.1 (UCI chess GUI)
I am having trouble with fbsound, so I cannot run the code at the moment, but try:
And use SGUI version 20180826. Version 20141212 seems 32-bit only.
Code: Select all
stringlist.bi:
Function stringlist._QCompare Cdecl (e1 As Any Ptr, e2 As Any Ptr) As Integer
Function stringlist._QCompare Cdecl (e1 As Any Ptr, e2 As Any Ptr) As Long
parser.bi:
function CompileRegExpr() as boolean:
dim as integer error_offset
dim as long error_offset
function ParseBestMove(buffer as const string, aBestMove() as byte) as boolean:
dim as integer ovector(VECTOR_COUNT - 1)
dim as long ovector(VECTOR_COUNT - 1)
function ParseUciOk(buffer as const string, byref aName as string, byref aAuthor as string) as boolean:
dim as integer ovector(VECTOR_COUNT - 1)
dim as long ovector(VECTOR_COUNT - 1)
validator.bi:
function IsMatch(byval aPattern as string, byval aSubject as string) as integer
dim erroffset as integer
dim ovector as integer
dim erroffset as long
dim ovector as long
Code: Select all
#define SGUI_20180826
#ifdef SGUI_20180826
#include once "sgui/20180826/sgui/sgui.bas"
#include once "sgui/20180826/sgui/menu.bas"
#include once "sgui/20180826/special/eschecs/clickmapgadget.bas"
#else
#include once "sgui/20141212/sgui/sgui.bas"
#include once "sgui/20141212/sgui/menu.bas"
#include once "sgui/20141212/special/eschecs/clickmapgadget.bas"
#endif
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
Thank you for your help. I will try the modifications that you suggest.badidea wrote:I am having trouble with fbsound, so I cannot run the code at the moment, but try:
What is the trouble with fbsound? As a quick solution, you could remove the sound code: it's just four or five lines to remove (there is only one sound). But I have a better idea: I will add a "NO_SOUND" option.
Yes, indeed. Today I used the 32-bits compiler.badidea wrote:And use SGUI version 20180826. Version 20141212 seems 32-bit only.
I improved the logging system and could start to localize the bug. It's after a move from the engine. The move is correctly received, it is validated by the chess library, but nothing happens...
Re: Eschecs 1.2.1 (UCI chess GUI)
I get "error: lib fbsound-64 not loaded !"
I have had this with fbsound before. Not sure why. Disabled for now. 64-bit seems fine so far...
I do get a lot of "eschecs.bas DISPLAYARBITRATORMESSAGE (494)". Not sure if this is normal.
The engine is in C? Then check all (u)integers involved in communication with engine.
Or communication is via strings it seems?
I have had this with fbsound before. Not sure why. Disabled for now. 64-bit seems fine so far...
I do get a lot of "eschecs.bas DISPLAYARBITRATORMESSAGE (494)". Not sure if this is normal.
The engine is in C? Then check all (u)integers involved in communication with engine.
Or communication is via strings it seems?
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
Nice screenshot. :)badidea wrote:64-bit seems fine so far...
Yes, same experience here: I used sGUI 2018, compiled to 64-bits and could play several games without trouble.
Yes, it's just some code that I added everywhere to try to localize the error.badidea wrote:I do get a lot of "eschecs.bas DISPLAYARBITRATORMESSAGE (494)". Not sure if this is normal.
Code: Select all
#ifdef DEBUG
dim shared vConsole as integer
#define DEBUG_LINE_ID __FILE__ & " " & __FUNCTION__ & " (" & __LINE__ & ") "
#define DEBUG_LOG(_X_) print #vConsole, DEBUG_LINE_ID & (_X_)
vConsole = freefile
open cons for output as vConsole
#endif
Yes, the engines are independant programs. The communication is done through pipes (2).badidea wrote:The engine is in C? Then check all (u)integers involved in communication with engine.
Or communication is via strings it seems?
I made the modifications that you suggested (1) and added a "no sound" option. Same download link.
(1) No more warnings with 64-bits compiler. Great!
(2) You could take a look into eschecs.log to see how it works.
Re: Eschecs 1.2.1 (UCI chess GUI)
There is indeed something wrong with the animation. If I change STEP_LENGTH to 1, it is more clear. Sometimes a piece does not reach its target. My initial thought was a timer issue again, but no timer is used for animation. I'll look into this further...
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
I made some cleaning and some little improvements in the code. Please use the new version (same link).