Hi J?rgen and All, On Mon, 2010-07-05 at 08:16 +0200, lazarus-requ...@lists.lazarus.freepascal.org wrote: > Message: 4 > Date: Sun, 04 Jul 2010 18:59:16 +0200 > From: J?rgen Hestermann <juergen.hesterm...@gmx.de> > Subject: Re: [Lazarus] Some information please > To: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> > Message-ID: <4c30bde4.8000...@gmx.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > jjb schrieb: > > @Hans-Peter, maybe my son will one day be a great programmer but as > for > > me making a "game-makers library for Lazarus", I wouldn't > > know where to start! > > My son wrote (for his own education) a kind of snake clone which he > started on Delphi (7). Since a year or so he is using Lazarus/Free > Pascal. I am quite impressed by the graphics (the "snake" is not > restricted to lines and columns but can be directed in a arbitrary > direction and all the chain links follow the head as if it was a real > snake, accelleration and direction changes may lead to a coiled snake > etc.). Textures are applied to the chain links and so on... He got it > running quite fast (well, age *does* a difference ;-)). He used opengl > for the graphics.
Yes, snake games are fun. I found one on www.planet-source-code.com many years ago and updated it. My version is for Delphi 5 and I think that the graphics are done with buttons on a form. Colour is used and it does not need as much memory as graphics. IIRC I added sound to it. It was a third party component which simply beeps the speaker (frequency and time of a tone)... simple to use. Just disable it if it doesn't work in lazarus (which I suspect it won't). Actually the version number probably should be later. I debugged and enhanced the original version. I tried to contact the author to get him to post an updated version but could not so I called my version v0.01 and put it on my page... crediting the author. The main improvements were to debug it. Nothing drastic. And rewrote a few things in minor ways. The main improvement was to make the walls of the snake area be able to be turn on or off. This meant that if the walls were off then the play area was infinite with the up movement from the top going to the bottom and vice versa, and left going to right etc. This is not hard and it meant the the snake could become very long and it is fun to move it around and see how to move it around until it collides with itself -- death and end of game. Of course with the walls off you also need to check that you don't switch them on again with the snake half way between the walls as that would be silly. IIRC a simple boolean variable does the job of keeping track of if the snake is moving through the open wall/s (a long snake may be going thru' more than one wall). Snake Game v0.01 (Version #??) original by "//hIDRA_5" with modifications by PEW The original snake game for Delphi was by //hIDRA_5, and can be downloaded from http://www.planet-source-code.com/ (until he updates it with this new version). I am one of many people who have visited the above site and downloaded the source to the original game. The attached files form the new version of the snake game, as modified, enhanced and debugged by myself. I am sending this new version (0.01) including this file, to //hIDRA_5, in the hope that it will become the "official" next version, replacing the original. Firstly, I would like to thank "//hIDRA_5" for sharing his source code and cool little game with the rest of the world. I hope that the new version will be accepted as an improvement to it. :-))) It seem that "//hIDRA_5" after my many attempts to contact him, has decided to ignore my new version, so I am making it available here. > > > From what I read on the web a lot of Delphi stuff is now being > > rewritten in other > > languages especially C# which would make you wonder about the future > (for > > Delphi at least) > > That's the problem: Those who give a ruling often don't know about the > things they decide. So they follow the masses and what they hear from > others. At least noone can blame them later if it was a bad decision. > > BTW: As far as I know C# is something for Windows only. No comment about C#. I don't know. Regards, Peter W. aka pew -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus