Re: [ Slightly Off Topic ] Background & Why I love Lazarus & Pascal



G'day Gnome-Games-developers,

see comments below

With Best Regards,
  PEW { Peter Eric Williams }
from Hobart, Tasmania, Australia

My FREE Websites:  http://pewink.org


On 12 March 2010 20:41, Peter Williams <pewslinuxvault gmail com> wrote:
>
> G'day Robert,
> (and all CC folks)
>
> See my comments below (I'll try to not top post).
>
> Fond Regards and Best Wishes,
>    PEW { Peter Eric Williams }
> from Hobart, Tasmania, Australia
>
> My free websites:
> http://pewink.org  (&)
> http://pewslinuxvault.googlepages.com
>
> ----
>
> On 12 March 2010 03:32, Robert Bradbury <robert bradbury gmail com> wrote:
> >
> > Peter,
> >
> > Interesting note (though it may not have been of interest in general to the
> > gnome-games community); but your story was of interest to me.
>
> You will see on my website ( http://pewink.org then go to the Delphi
> source code page) that I have written a number of games in Delphi.
> Also some utilities are there also.
>
> I have converted some of these (smaller ones) to Lazarus, but not yet
> released the code to the FOSS community. That's on my to-do list. :-)
> When I do, I'll make them available on my
> http://pewslinuxvault.googlepage.com website -- with links from the
> older Delphi versions to the newer Lazarus ones.
>
> That's the plan, anyway. Does anyone want to volunteer to help me
> collaborate on converting some of the old Delphi 5/7 projects over to
> Lazarus? Lazarus already has a built-in Delphi to Lazarus conversion
> tool, which I think is pretty powerful.
>
> Also, if there is someone reading this who would like to help me...
> Please also have a look a my 'Downloads' page of my http://pewink.org
> website. It contains software which I developed in Delphi 5 and 7 and
> did not release the source for. I am willing to also make these FOSS.
>
> Many of them are very big and complicated. ;-) Others not so big. I
> started by trying to make them shareware but quickly decided that it
> would be easier for me to make them freeware. I've still got the code
> for them on cd-r & they're coded in Delphi.
>
> Games
> ----------
> * Hexxpawn8 Game

This one is a very old & favourite of mine. I was written in different
versions of Delphi. Delphi 7 Enterprise was the latest IIRC. Lazarus
is strongly based on D7 so there SHOULDN'T be a lot of problems
porting it.

In the Lazarus IDE there is a menu option for importing Delphi code.

Note that if you surf the internet you'll find many shareware and
commerical versions of Hexpawn which plays on a 3x3 grid. Mine is FOSS
and plays on a 8x8 grid with each board pattern being recorded in a
comma-seperated-database. At the end of each game, the computer looks
at the winner and flips over the board patterns to increase learning
etc. As you can imagine the was a challenge to debug all those years
ago.

The main issue I want to address are:
(a) the OOP of the way the program store it's game playing strategy is
too confused and needs rewriting. ;-)

(b) the Hexxpawn8 app (a GUI) uses extremely bad ettique when playing
e.g. when it knows it is about to lose it's game it resigns rather
that letting the player win. This should not be too hard to correct.

(c) At the time I used a very complicated descendant of TStringGrid
for the board, a freeware component called TStringAlignGrid...
K.I.S.S. the features I need in this type of component are: (1)
individual fonts per cell and grid wide. (2) ability to set individual
cell fore & background colours & also blink the text slowly to show
(by blinking it) this is the piece you've selected to move.

(d) The is also a lot of complex A.I. logic built into Hexxpawn : (1)
you can swap the board around (change sides), (2) tell it to suggest a
move & (3) also there is a facility to write a debug file and (4) high
scores are keep in a text file and can be 'zapped' (wiped out) by the
player with a warning. (5) also I think (?) I even allow the player to
customize the board colours with a colour picking dialog. (6) all user
setting are saved to a config file (.ini)... I strongly want to not
need to mess with system config files as I don't understand such
things. The .ini fie is stored in the local folder (user Windowzzzz
with Delphi 7 Ent... which I no longer use).

All of the above was fully working with D7 last time I checked AND I
do still have all of the code!!! I did not use a version control
system and as a result I used to get myself into shit when trying to
save the project as a new version. I would quite often loss my changes
cos I didn't realize that Dephi was pointing to the wrong fies.

I was to use Subversion and maybe RapidSVN (it has a GUI). @@PLEASE
SOMEONE SUGGEST@@ A good, reliable and easy to use VCS with a GUI and
is not too confusing. I AM A NEWBIE at version control systems.
HELP!!!!

> * Adventure Game Utility 3-in-1 package (3 apps which also share some
> common code) for developing small adventure games

This is another fav of mine. Good for small adventure game and has a
GUI interface. All fully debugged on last check many years ago.

It has 3 apps (with GUIs)

* Adventure Game Editor -- very complicated GUI front-end to allow
user to create, setup, config etc the data files for different
adventure games. Can use a text editor if you prefer. The is a
windozzzzzz HLP file (not sure what version) which is very big and
comprehensive. I need help to convert this to some kind of
cross-platform Linux Gnome Help file -- I must confess to being
ignorant about the different help formats.

* Adventure Game Player. Reads the above created data and macro (text)
files. And allows the player to play the game in a GUI environment
with buttons for N,S,E,W,up,down show per room based on the exits
available in the current game state. I tried to make the adv game
player as user friendly as possible. You can ask for hints or help
(with a small penalty) and it keeps score. You can also save each game
at almost any point then go back a restore the game. Also there is a
HLP (Windozzzzs) file (maybe the same? cannot remember -- it was years
ago)

* Adventure Game Analyser - GUI app which lets you select a game then
analyser the data files (CSV) and macros (text) to try to see what it
does. Handy for debugging.

* I attempted to make it as clever as I could for small adv games. The
macro files are very powerful and in 10 - 20 lines you can implement
as complex 1,2,3 or 4 word text input command from the user.

In case you nice folk are wondering, I'm also a big fan of Prolog (but
am a bit rusty) and a lot of my Delphi implementations of Hexxpawn8
and Adv Game Utility Package are based on A.I. technique which I
learnt a long time ago in particular at the Uni of Canberra but also
since age 11 programming different games.

I never got to fully understand assembler and sprite graphics and
graphics libraries very well ;-(((

I have many other FOSS game worthy of consideration. Some of these
have either been fully or partially converted from Delphi to Lazarus.
Some to XLogo. (Random Angle Tree drawer on pewslinuxvault)

Over the last week or so I have recently had my desktop server (this
pc) reconfigured to Fedora 12 -- it will go back on monday for some
fine tuning.

I am running Lazarus for the first time on my Fedora 12 system.. and
trying to fly be the seat of my pants! ;-)

Don't have a version control system (?) installed-- or maybe I do and
just do understand how to set it up. Like I said -- I need one with an
excellent easy to use GUI and something which will protect me from
silly mistakes when very tired or programming late into the night.
;-)))


>
> Utilities
> -----------
> * Find-a-Word Puzzle generator
> * Simple Character Map program
> * and a text editor which multiple forms.
> My intention was / is to convert may of them to Lazarus --- time
> permitting and also permitting that I can find Lazarus versions of the
> components I use. Or perhaps, where I've used third party components,
> try to port them.
>
> >
> > I to have a fondness for my first language which was PPL (polymorphic
> > programming language).
>
> Never heard of it, sorry. ;-)))  As I mentioned, I studied many
> programming languages. At TAFE, Uni of C and many other places. ;-)
> Pascal was probably my favourite one.
>
> >I don't think it made it out of Harvard and a couple
> > of other universities but it was what was taught to people learning a
> > programming language their first year at Harvard in the mid-late 1970s.  It
> > had line numbers (like basic), no strong typing (I think it may have
> > auto-converted types), was interpreted (one of my TA's was a grad student
> > writing the first compiler), but had more advanced features like functions,
> > recursion and operator redefinition and overloading (so one could for
> > example define complex math operations).  An interesting language for
> > newbies with an interesting mix of simplicity and complexity.
> >
>
> Yes, Commodore (C=) Basic 4 which the old C= PET 4016/32 used wasn't
> strongly typed either. Actually the if..(condition)..then..(statement)
> in C= basic 4 didn't even have an ELSE statement. So, you needed to
> use GOTOs and line numbers to implement ; in effect the ELSE
> behaviour.
>
> C= Basic 7 for the C= 128 was quite a big improvement. I have also
> owned and programmed the C= 64 and C=128.
>
> I've also played around with a language for the C= PET, 64, 128 and
> other models, called COMAL 80. It was sort of a cross between basic
> and pascal. Very similar to later strongly typed version of basic. I
> believe that COMAL is still around in different versions.
>
> > But it is your background in 2D and 3D design which is of greatest interest
> > to me.  I generally use the Gentoo variant of Linux because it allows one to
> > put together ones own "ebuild" (packages) and they tend to follow the
> > cutting edge of package evolution (rather than a more "freeze & release"
> > oriented approach common with other variants of Linux).
>
> I use, as I think I mentioned, both Mint 8 Free & Mandriva 2010.0
> Free. For my HP Laptop and Desktop respectively.
>
> I like both versions. But Mandriva 2010 seems to be more complicated,
> than Mint 8 Free.
>
> I'm still trying to work out how I can use my ROOT user's theme files
> on this computer (Mandriva), with the 'Peter' (non-admin) user on the
> same computer. I have created three (3) customized themes as ROOT, and
> saved them as the ROOT user.
>
> I used the 'locate' command from a Terminal and found the ROOT user's
> themes have been saved as hidden /.theme.myfilename files. And I want
> to share them with the 'Peter' user (ordinary user, non-admin rights)
> on the same computer.
>
> Do you know how I can do this? Also, I'm having problems with working
> out how I can save these Theme files, as quite often the SAVE button
> is greyed out (disabled).
>
> >
> > A problem arises when packages depend on "older" environments and the
> > environments move ahead but packages lag behind.
>
> Yes, well, I think that the Lazarus developers are *trying* to be
> proactive and support as many new environment as possible. Also, it is
> multi-platform; and I can only imagine that that must make it more
> difficult to develop. ;-(
>
> >I gather that Lazarus is a
> > pascal development environment which seems similar to what Qt is for C++.
>
> Actually, it's based on Delphi, which is basically Object Oriented
> Pascal. It also relies on Free Pascal Compiler (FPC) which Lazarus
> need to compile. You could say the FPC and Lazarus have a synergistic
> relationship. ;-)))
>
> > At the current time Gentoo is transiting from Qt3 to Qt4.  This will result
> > in the leaving behind the Qt3 based 2D CAD system (sci-misc/qcad) which is
> > quite interesting for me [1].  Qcad is about to become an "unsupported"
> > package due to the development environment transition.
>
> I must confess that I'm quite ignorant about the different desktop
> environments. *SMILE* I use Gnome, and I don't particularly care much
> for KDE. I know that there are other options and etc which I probably
> have not configured, yet. :-)
>
> > Now, the developers
> > of Qcad, whom appear to be a quasi-commercial organization in Germany seem
> > to suggest that Qcad may be upgraded, hopefully to a Qt4 based version, in
> > 2010, but given that Qcad for Linux seems to be a "limited" version I was
> > wondering if you are aware of any complete, "open source" 2D/3D CAD packages
> > which are available under Linux?
>
> I'm pretty sure that I've seen some CAD packages available when I was
> experimenting with different software in Mint 7 and this desktop (a
> year or two back). I went a little crazy - installing everything that
> looked good :) with the result that my system became unstable. I
> needed to reinstall and lost a lot of it's configuration info :-(
> That's just Life!
>
> >
> > Regards,
> > Robert Bradbury
> >
> > 1. Part of my interest in qcad is a subset of it in Gentoo known as
> > "qcad-parts" which I suspect is a collection of pre-designed parts that
> > might be used in qcad.  My interest in those is whether or not software
> > could be designed, which might take advantage of Nanorex's Nanoengineer-1
> > software (which is open source) which might convert the macro-scale qcad
> > parts, to nanoscale "molecular parts", e.g. a "solid structural object" from
> > a macroscale design could be converted into one or more carbon nanotubes or
> > other atomic scale objects which could then be modeled from a molecular
> > dynamics standpoint to determine its properties.
> >
>
> Sorry, I don't know anything about nanoscale and atomic scale objects. ;-)
>
> Maybe someone on this CC list will be able to help you. I think that
> many CAD packages have library for the different branches of science.
> I cannot comment I with ones have what, and are FOSS.
>
> Cheers
>      Peter W (aka pew)
> from Hobart, Australia  ;))))
> -----------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]