[Lazarus] Some information please

Peter E Williams foss.game.pascal.developer at iinet.net.au
Mon Jul 5 08:28:57 CEST 2010


Hi Hans-Peter,

You forgot to reply to the list :-))). You simply needed to click on
reply-all. I would prefer that this discussion be kept on the list
instead of private.

On Sun, 2010-07-04 at 18:58 +0200, Hans-Peter Diettrich wrote:
> Peter E Williams schrieb:
> 
> > can recommend learning how to draw Nassi/Schniderman Charts for your
> > procedures and making friends with computer lecturers and programmers.
> 
> +1
> 
> 
> > I would like to see this book translated also. I have about 15-20 books
> > on Delphi but none on Lazarus. Is there a good English lazarus textbook
> > that we can buy???
> 
> AFAIK the German book is the very first one, written about Lazarus. For 
> many purposes it's sufficient to use the available Delphi literature, 
> tutorials etc.

Just wondering if there are any copyright issues with sending html or
PDF files to a photocopy shop instead of printing them ourselves.

> > See my comment about about languages taught at Uni of Canberra. I loved
> > Pascal because it was structured and typed in contrast to BASIC (in
> > 1989) which I had a high skill level in. Also Pascal was standardised
> > whereas BASIC was not.
> 
> At that time a couple of well structured BASIC versions existed, 
> HP-Basic (Rocky Mountain Basic) in the first place. I used GfA-Basic up 
> from 1986 on my Atari ST, to develop my C decompilers, because the 
> available C compilers sucked at that time, and a Pascal system became 
> available only later (I assisted a bit in its development). The bad 
> quality of the C-subset compilers lead me to the idea of C decompilers 
> at all, because I wanted to decompile the C libraries, for which (then) 
> no source code was available.
> 
> 
> > Remember that Delphi 5 Standard was AUD$99 and it did not come with the
> > source code for many units. If you wanted to get all the source code
> > then you needed to buy Delphi 5 Enterprise for about AUD$2500-3000.
> 
> The Professional version (D4 ~$400) already came with full VCL source code.
> 
> 
> > Look at this page.
> > https://sites.google.com/site/pewtas/home/delphi_source_code
> > 
> > It is my Delphi Source code page on my personal website and contains
> > about 11 Delphi open source games. None of them use graphic libraries.
> 
> I remember "101 Basic Games" (for the pdp-11, or PET?), that included 
> such classics like Wumpus :-)

PDP-11 I think. The biggest hassle with these books is that the BASIC's
were all slightly different. So you needed to do a little translating of
the syntax as you entered them. The BASIC manual was essential. :-)))

I have that book and a few other too. I typed in many of the programs. I
eventually rewrote many of the programs in pascal (Turbo Pascal then
Delphi). See the above website for "Hunt the Wumpuz" which is a Delphi 5
version of Hunt the Wumpus rewritten in Delphi / Pascal. I tried to be
as true to the original game but also use Windows instead of crt print
statements. I also got a friend who was a graphic designer to draw the
map for the caverns as a GIF image and IIRC you can press "M"ap and it
will display the GIF image of the caves in a separate window then you
just study it and close the windows. I needed to use a GIF display
component, since Delphi didn't have one. I think it's standard now for
lazarus. I did not want to use it as a JPEG because as you probably
know, if you have a JPEG then edit it a few times the quality of the
JPEG will degrade because as you save it each time the palette colour
info is reduced and the image quality degrades in a minor way with each
save. Other formats don't do this but BMP (M$ Windows) is a memory hog
as it is not compressed. At the time PNG wasn't invented, or if it was
it was not well supported at the time.

You can find Hunt the Wumpuz and all files on the above page. Anyone
feel like doing a quick port of it to lazarus and emailing it to me as a
zip so that I can put up a link to the lazarus version of it??? If not,
I may do it in a few weeks or maybe sooner.

> It nearly broke a party in 1983, when I offered the guests to play with 
> my new LSI-11, because half of them couldn't stop playing any more. At 
> that time I was the only one who had an computer at all...

You'd probably enjoy the "Guess the Animal" game (same web page). Based
on a BASIC game and there are also versions of it in prolog. This one is
a direct port of the BASIC to Delphi 5 game (or possibly originally
Delphi 3). I original was just text based but mine used a form with an
edit box and some buttons. I thought this was an improvement. :-)))
Also, I wanted to make a MS Windows version of it instead of a console
app.

The animal questions and answers are stored as strings. The structures
were originally manipulated with MID$, LEFT$ and RIGHT$ in BASIC so I
think I used the copy() function is Delphi. Not sure. It was not rocket
science!!! Fun to port and play. It is a lot of fun to play the game and
build up a good library of known animals. I don't think that the
original BASIC game saved all of the known animals. Mine does. IIRC I
save them to either a .DAT text file or possibly to a .INI file.
Probably a .DAT text file. Funny how a simple small feature like saving
the known animals on exit and loading it again next time can improve the
game. You just need to make sure that you keep an original copy of the
data file in case you corrupt it and need to start again with a fresh
one. It would probably be easy enough to hard code it so that you didn't
need to save the original copy.

> 
> DoDi
> 

Peter W. aka pew

-- 
Proudly developing Quality Cross Platform Open Source Games
Since 1970 with a Commodore PET 4016 with 16 KRAM
http://pews-freeware-games.org (<--- brand new --still under development)





More information about the Lazarus mailing list