Click here to Skip to main content
15,889,216 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Snake game problem [modified] Pin
Luc Pattyn28-Dec-09 11:33
sitebuilderLuc Pattyn28-Dec-09 11:33 
AnswerRe: Snake game problem Pin
Skippums13-Jan-10 10:58
Skippums13-Jan-10 10:58 
GeneralRe: Snake game problem Pin
Luc Pattyn13-Jan-10 11:30
sitebuilderLuc Pattyn13-Jan-10 11:30 
GeneralRe: Snake game problem Pin
Skippums13-Jan-10 13:36
Skippums13-Jan-10 13:36 
GeneralRe: Snake game problem Pin
Luc Pattyn13-Jan-10 13:56
sitebuilderLuc Pattyn13-Jan-10 13:56 
GeneralRe: Snake game problem Pin
Skippums13-Jan-10 14:22
Skippums13-Jan-10 14:22 
GeneralRe: Snake game problem Pin
Luc Pattyn13-Jan-10 14:40
sitebuilderLuc Pattyn13-Jan-10 14:40 
AnswerRe: Snake game problem Pin
pewtas23-Feb-10 20:16
pewtas23-Feb-10 20:16 
Hi 'thebuzzwright',

> So far i have made the snake move about, eat randomly generated food pieces and the peices attach to the end of the snake, i need help on figuring out how to move the "segments" attached to the head of the snake.

I just wanted to add that I have a freeware open source version of the Snake game, written in Borland Delphi 5 (no longer owned by Borland any more. See: embarcadero.com for the latest trial versions of Delphi or google for 'free Delphi compiler download' to find older free versions of Delphi).

https://downloads.embarcadero.com/free/delphi[^]

... for M$ Windows (almost all versions). You should also be able to port it to other versions of Delphi or even convert in to Lazarus programming language (available for M$ Windows, Macs & Linux). Delphi and Lazarus are essential Object Oriented Pascal with a GUI (Graphical User Interface) RAD (Rapid Application Development) interface.

I would recommend Delphi 3 or 5 or 7. Standard is fine (named 'Personal' in later versions) however, with the later forms of the compiler e.g. Professional or Enterprise version (and later Architect)... they can be very expensive and also have a very large foot-print (e.g. size of installed files and folders) but they will also have the source code for it's units included with the compiler. This is handy if you need to re-compile it's own units (not usually necessarily) and also if you want to look at the code for one of Delphi's own unit or form files to see how they have implemented some of the code to achieve a particular task.

Alternatively, Lazarus compiler is very good... however, note also that the compiler is constantly being developed and re-programmed and tweaked and developed ... so you will need to find a 'repository' for the 'snapshots' of the compiler and download it and compile it... There are different versions for different OS's and also different versions of the compiler -- some of which are considered stable code and some contain experimental beta version of the compiler (RAD GUI). Just google for it.

My Snake Game
=============

Here is a link to my freeware open source version of the Snake game in Delphi 5. It is based on an earlier version of it by someone else, which I debugged and made some changes to. It was also written in Delphi (possibly ver 4 or 3... I forget, as this goes back years). There is also a link to the older ver in the code, and possibly also the code of the ealier version *may* be included.

http://sites.google.com/site/pewtas/delphitable2#SNAKEGAME[^]

Note that there are some nifty new features which I added, like being able to have the borders ON or OFF. When the border are OFF, you can move thro' the borders (or walls) and the window for the snake simply wraps around e.g. left and right borders join and so do the top and bottom borders. I also added numerous tweaks and debugged it quite a bit and re-wrote some of the code and declarations (e.g. type-declaration -- to make it more structured and/or more readable).

Regards,
PEW Wink | ;-) ))
from Hobart, Tasmania, Australia
Peter E Williams Wink | ;-) ))

GeneralRe: Snake game problem Pin
venomation4-Mar-10 1:25
venomation4-Mar-10 1:25 
QuestionGeometry problem Pin
Daniel.Sturza27-Dec-09 3:03
Daniel.Sturza27-Dec-09 3:03 
AnswerRe: Geometry problem Pin
Luc Pattyn27-Dec-09 3:10
sitebuilderLuc Pattyn27-Dec-09 3:10 
GeneralRe: Geometry problem [modified] Pin
Daniel.Sturza27-Dec-09 3:45
Daniel.Sturza27-Dec-09 3:45 
AnswerRe: Geometry problem Pin
harold aptroot27-Dec-09 4:33
harold aptroot27-Dec-09 4:33 
GeneralRe: Geometry problem Pin
Daniel.Sturza27-Dec-09 5:31
Daniel.Sturza27-Dec-09 5:31 
AnswerRe: Geometry problem Pin
Luc Pattyn27-Dec-09 5:28
sitebuilderLuc Pattyn27-Dec-09 5:28 
GeneralRe: Geometry problem Pin
Daniel.Sturza27-Dec-09 5:52
Daniel.Sturza27-Dec-09 5:52 
GeneralRe: Geometry problem Pin
Luc Pattyn27-Dec-09 6:10
sitebuilderLuc Pattyn27-Dec-09 6:10 
GeneralRe: Geometry problem Pin
Daniel.Sturza27-Dec-09 7:13
Daniel.Sturza27-Dec-09 7:13 
AnswerRe: Geometry problem Pin
ProtoBytes28-Dec-09 6:21
ProtoBytes28-Dec-09 6:21 
AnswerRe: Geometry problem [modified] Pin
ProtoBytes28-Dec-09 9:05
ProtoBytes28-Dec-09 9:05 
GeneralRe: Geometry problem Pin
Daniel.Sturza28-Dec-09 16:06
Daniel.Sturza28-Dec-09 16:06 
GeneralRe: Geometry problem Pin
belzu29-Dec-09 4:52
belzu29-Dec-09 4:52 
AnswerRe: Geometry problem Pin
belzu29-Dec-09 4:35
belzu29-Dec-09 4:35 
AnswerRe: Geometry problem Pin
Skippums13-Jan-10 11:32
Skippums13-Jan-10 11:32 
QuestionPair wise testing with QICT Knuth shuffle algorithm Pin
ProtoBytes24-Dec-09 12:11
ProtoBytes24-Dec-09 12:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.