www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 101 BASIC Computer Games - In D?

reply Walter Bright <newshound2 digitalmars.com> writes:
This book is the granddaddy of all the computer game books.

https://archive.org/details/bitsavers_decBooks10Mar75_26006648

They are a bunch of simple text mode games. They're a great way to learn 
programming while having some fun.

I've idly thought that it would be a great vehicle for teaching D to kids.
(That 
is, if any kids these days would have the remotest interest in a text mode 
game.) It's sometimes surprising to me how compact these games are that still
do 
something clever.

Note that the listings have been OCR'd (in the downloadable PDF), which would 
make them a lot easier to cut/paste the code into an editor then translate away.
Aug 10 2016
parent reply bachmeier <no spam.net> writes:
On Wednesday, 10 August 2016 at 11:14:58 UTC, Walter Bright wrote:
 This book is the granddaddy of all the computer game books.

 https://archive.org/details/bitsavers_decBooks10Mar75_26006648

 They are a bunch of simple text mode games. They're a great way 
 to learn programming while having some fun.

 I've idly thought that it would be a great vehicle for teaching 
 D to kids. (That is, if any kids these days would have the 
 remotest interest in a text mode game.) It's sometimes 
 surprising to me how compact these games are that still do 
 something clever.

 Note that the listings have been OCR'd (in the downloadable 
 PDF), which would make them a lot easier to cut/paste the code 
 into an editor then translate away.
It would also give us example code making heavy usage of goto statements. goto is badly underutilized by our community. For that matter, we don't have enough spaghetti code examples to make programmers from other languages comfortable.
Aug 10 2016
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/10/2016 8:34 AM, bachmeier wrote:
 It would also give us example code making heavy usage of goto statements. goto
 is badly underutilized by our community. For that matter, we don't have enough
 spaghetti code examples to make programmers from other languages comfortable.
Nobody sez leave it as goto's.
Aug 10 2016