Geschrieben von:/Posted by: Stan Arts at 29 April 2004 16:08:16:
Als Antwort auf:/In reply to: Re: Neurosis 1.7 geschrieben von:/posted by: Sune Fischer at 29 April 2004 01:58:00:
Hi Sune!
Very cool program, what library and language did you use for the 3D stuff?
Since you've gone to all that trouble already, perhaps adding a 2D board would
also be possible?
Would be nice with a higher polygon count and anti-aliasing, but I guess that
would be too expensive if it is software emulated graphics.
I don't suppose you care to make the protocol public?

Thank you. It's written in Pascal. No library for the 3D, that's part of my
main program, also the graphical functions to draw polygons and texturemapping
and pixels and drawing the font, it's all hobbied together from over a longer
time.
The .dll however is used to initialise a fullscreen direct-draw screenmode,
where I'm able to directly acces the screenmemory and draw to that. It comes
from an open Free-Pascal library called vgfx. I'm not good (=looking into it
gave me a headache and I stopped) at the to-windows-related-programming and
that has code that handles that for me. ie. : initialising the screenmode,
mouse, keyboard, and windowsevents.
Yes, I want to do that sometime, maybe so the user can switch back and forth
between 2D and 3D, but otherwise the winboard version will run under any 2D
gui like winboard and arena and those are good. But maybe I'll make an option
to view the board from above and the pieces flipped sideways and see what that
looks like. It would be fake 2D though.
Yes the graphics don't look so modern, but that's not so easy.

Especially
when looking at those boards the commercial programs now have.. Hmm, anyway
currently a full board is a bit over 2000 polygons for me. (pawn has 48
polygons, knight 54, bishop 64, rook 44, queen 64 and the king 64) Well and it
took me quite some time to create the pieces.. I also don't have any descent
editor for how I store 3D data except my old 320x200x256 Dos editor I wrote
long ago without mouse-support, but then it's faster for me to just text-edit
a row of numbers into a 3D shape.
The 3D costs me a lot in chess-speed. Depending on how fast the computer's
video-memory and memory is, the 3D version runs something like 20% slower and
that's with doing 15.000 nodes between each screenframe.
Anti-aliasing or anything other with light or blending texture-squares or so
would be really expencive indeed, also just texturemapping everything is too
expencive for me, but that's because of how I texturemap. Also things like anti-
aliasing are currently impossible speed-wise because of how I do the 3D. : I
handle and calculate the polygons separatly and then display them to screen,
instead of "raycasting" a screenpixel back to a polygon and it's texture-square
or lighting and so.
I could try to make the pieces more complex though, especially after the rewrite
the number of polygons isn't much of a problem anymore, and there's no noticable
slowing till about 10.000 polygons on a modern computer. But making new more
complicated pieces will take me another month..
There isn't one. It's hard-coded, N3D.exe also has all chess-code in it. But if
anyone's interested I can make a clean frame-ish code of the 3D board and then
they can try to make a gui out of it that can communicate with other engines.
I don't really understand pipes very well..
Here's how the neurosis-unit (have two versions, the winboard version is
one file as a main program, and the version for neurosis-3d works in a
unit) code communicates (through functions and procedures to transfer things
back and forth) with the interface part, by the way. :
procedure zetnieuwop(speelzijde:byte;tijdprsec:integer);
function doemenszet(veldje1,veldje2,promostuk:byte):byte;
function geefPV:string;
function denk1000:byte;
function hoediep:byte;
function transferbord(tveldnr:byte):byte;
function spelstatus:byte;
function geefnodes:longint;
procedure free_geheugen;
procedure opslaan_pgn(bestandnaam,tijdcontrols:string);
function geef_kijknaar:string;
function geef_score:string;
function zetuitlijst(zetnummerr:integer):string[20];
function geef_zetnmr:integer;
function geefspeleind:string;
function handletijd:byte;
procedure geeflevc(lclijn:string);
procedure deovertijd(tijdinsecover:longint);
function volgendetijdc:byte;
procedure zetmensachtig(zetmenswat:byte);
function wieschaak:byte;
procedure loggen(logaanofuit:byte);
procedure brdnaarneuro(tveldnr,inhvveldnr:byte);
procedure startvanedit(speelzijde,wieszet:byte);
procedure hoespecul(hoespec:byte);
procedure ilimt(hoevliter:smallint);
procedure zetvarren(varaanuit:byte);
function inhoudvangeslagenvak:byte;
Hmm..
Goodluck with Frenzee!
Stan