Thursday, 29 January 2015

Star Wars Floppy Disk

Too good not to post here. +1 Geek Point....Da da daaa dum da daa dum da daaa. DA DAA DAAA DUM DA DUM DA DAAAA!




Saturday, 24 January 2015

Friday, 23 January 2015

Doctor Who Theme (all of them)

Just because I heard this tune this morning, I've decided to post it here, with some facts so I can pretend I'm teaching you something:



Doctor Who meets Orbital Timeline.



#doctorWho #orbital

Windows 10 looks amazing

I've just caught up with the announcement from Microsoft, and can say that I am genuinely excited about Windows 10 which looks truly amazing.  Code written once that runs on every device in an appropriate way.  Seamless transition between tablet and desktop mode.  The MS-Word engine sitting inside your outlook app.  Cortana integrated into desktops.  It all looks like good stuff for those interested in productivity, but they have improved the experience for gamers as well, with the Xbox app sitting on every device.  I know my gamer friends will be interested in the ability to stream Xbox content onto any Windows 10 device.  Even the new web-browser (codename Spartan) looks great.  Microsoft have revolutionised the way we can share content from the web (please, please, please be standards compliant).  I am very interested in the new Surface Hub device, an 84 inch screen with integrated Win 10 and OneNote.  They didn't talk education, but this device has clear applications in the classroom.

The year ahead looks very compelling.

If you haven't already, then do check out the live event: announcement from Microsoft.

All the best of Win 7 and Win 8.  Am I dreaming?  This looks like a quantum leap in Computing.

Oh...and did anyone mention holograms?

Addendum:  Do check out the competition as well.  I understand that Apple may make one or other of their devices a little bit bigger or a little bit smaller this year.

Thursday, 22 January 2015

Monday, 19 January 2015

Getting started with the Little Man Computer (post #02)

Continuing our series on The Little Man Computer.  This time - adding.

<-- previous post.  

The little man has an instruction for adding - simply "ADD". An instruction for adding might look like "ADD X", which means "add the value at the address labelled 'X' onto the accumulator." 

Example program number four.
Add three numbers together.

...adds three numbers together
lda x
add y
add z
out
.
.. the values of x, y, z
.. are coded here
x dat 5
y dat 10

z dat 100

When the LMC compiles this program it translates the first four commands into the codes, 599 (lda x), 198 (add y), 197 (add z) and 902 (output) as shown in the image below.
The LMC memory showing how the first four commands have been translated into codes.
The values of 'x', 'y' and 'z' are placed at locations 99, 98 and 97 (the little man decides that this is the best place to put them).  In the image below you can see the values 5, 10 and 100 in these locations.
The little man puts the values of 5, 10 and 100 into address 99, 98 and 97 and labels them x, y and z.


What is happening?
First the little man reads code 00: 599 and translates this as "Load the value in address at 99 into the accumulator.  This is our value 5.
Now that we have a value in the accumulator, we can add the other two values on, so...
The code 01: 198 means 'Add the value at address 98 onto the accumulator.'  This means that 10 is added to 5 and stored in the accumulator.  The accumulator should now contain the value 15.  The next code, 02:197 means, 'Add the value at address 97 onto the accumulator', so the value 100 is added to the current value in the accumulator - 15, giving an answer of 115.  Opening the output report should prove this:


The output instruction puts the current value of the accumulator into a file for easy reading.



Mnemonics used in this post:

add  -  adds a value at an address onto the accumulator.  For example 'add 99' adds the value at the address '99' onto the accumulator.  CAREFUL!  This is NOT the same as adding the value 99 to the accumulator.

lda  -  loads a value at an address into the accumulator.  For example 'lda 99' puts the value at address '99' into the accumulator (replacing any other value currently there.

out  -  writes the current value in the accumulator into the output file. 

dat  -  puts a value into the computer memory.  for example, 'one dat 001' puts the value '1' into an address and labels it 'one'.

#littleManComputer

Children react to computer motherboard

The quote is from 11-year-old Louis upon seeing the old motherboard of a computer system.
"It's like LEGO but more complicated."

#computerScience #LEGO

Thursday, 15 January 2015

Getting started with the Little Man Computer (post #01)

The Little Man Computer is a simple way of showing how a real computer works underneath.

We can imagine a little man running around inside the computer fetching instructions, and faithfully executing them.  

The little man uses the following instructions, which can be either coded as mnemonics in a program, or posted directly into the computer's 'brain'. The computer memory is represented as one hundred boxes numbered 0-99.

Instruction                    Mnemonic          Code
ADD                            ADD               1..
SUBTRACT                       SUB               2..
STORE                          STA               3.. 
LOAD                           LDA               5..
INPUT                          INP               901
OUTPUT                         OUT               902
BRANCH ALWAYS                  BRA               6.. 
BRANCH IF ZERO                 BRZ               7..
BRANCH IF ZERO OR POSITIVE     BRP               8.. 

For example, the Code 399 means 'STORE the current value in box 99.  We could write this as "STA 99"

Example program one.
Get a number from the human and store it in the computer memory (for later).

... a simple LMC program
inp

sta 99

The first line is a comment and is ignored by the little man.  It is there to help us understand our program.
The second line is a request for input.
The third line is our STORE in address 99

Here is a screenshot:
Your program after you compile it and press "execute".  You should see the LMC has converted our mnemonics into two codes in adresses 00 and 01.  The value we entered is put into address 99.

In fact we could store our value at any point in the computer memory.  Try the following program:

Example program two.
Get a number from the human and store it in the computer memory (for later).

... a simple LMC program two
inp

sta 54

Here we store the human's input at address 54.

What is happening?
Here, the mnemonic "INP" has been translated to the command "901".  When the little man reads this, he knows that it means, "get input from the human".  Here I typed the number '4', and the value of 4 is placed into the accumulator. The mnemonic instruction "sta 54" is translated to "354" and the little man understands that this means, "write the value in the accumulator into address 54".

Example program number three.
Let the little man decide where to put the human's input.

...example of variables
inp
sta first
inp

sta second

Here the little man has decided that it is best to store the first value in address 99 and the second in 98.
What is happening?
In this program there are two inputs.  The little man also receives the instruction "sta first", which means "store the value in the accumulator into the next available address and label it 'first'".
The instruction "sta second" means "store the value in the accumulator into the next available address and label it second."

Next time.  Adding numbers together.

Wednesday, 14 January 2015

Algorithms song

A cheesy* song about algorithms.



*Note that there is no such things as 'cheesy', only 'emotionally resonant'.

1981 news on the Internet!

A daring look at the future from 1981 - that's 34 years ago, and 10 years before the Web was developed. Feel old?

Computer history fans might like our history of computing timeline.

Thursday, 8 January 2015

The (Unofficial) Talisman Computer Game

I discovered that I still have a back-up copy of the original Unofficial Talisman Computer Game (the one that was removed by request of Game's Workshop's over-cautious legal department in 2009), so I decided to upload the site to a new server (for educational and legacy purposes only).

There is an even older version of the website here as well.

You still won't find the actual game on any websites I control, so here is a video of it running instead.

Saturday, 3 January 2015

Starwars name generator NOT phishing attack

Although intended only as a bit of fun, my Starwars name generator has received more than its fair share of criticism.  Some users are worried that the app was a phishing attempt; in other words, an attempt to harvest security question details. Although this is not the case (and you are free to view the source code by pressing CTRL+U to check yourself, and despite the presence of disclaimers) I have altered the questions so that it no longer asks for potentially sensitive details.

Mother's maiden name has been replaced with "random object", and first car replaced with "object to left".

Phew!  Do please like and share, enjoy in the spirit intended and rest assured that I do not, and never will farm your personal information.  Find your Starwars name now.

PLEASE do be careful when you play on the Interwebs - don't give personal information to apps you don't recognise.  In the words of C3PO - "R2D2, you know better than to trust a strange computer" (The Empire Strikes Back).

  1. “Ben! I can be a Jedi. Ben, tell him I’m ready!” (Thumps head on ceiling.) “Ow!”



Friday, 2 January 2015

Timetrek

Timetrek is a game by D.Elliot for Program Power (released in Europe in 1982).  I remember this game fondly and so when I found it on the brilliant BeebEm BBC Microcomputer emulator, I thought I would have a go at porting it over to the Windows platform. I hope that neither D.Elliot nor Program Power mind that I have done this.

For the most part all I have had to do is slow the game down so it runs correctly on modern PCs, although I also have made a slight change to the Enterprise's phasers - they didn't work well under Windows.

DOWNLOAD executable and source code. (BB4W source code)

Timetrek is a version of the Star Trek text games that were popular in the 1970's and 80's.  Your mission to command the Enterprise and rid the galaxy of all klingons.  Yes, every single one!  Not a bad little game, from a time when you could squeeze a good game into 11 kilobytes.

Timetrek in all its glorious teletext graphics goodness.

The Enterprise (the 'E') shown on both the galactic map and the short range scan.  The asterisk is a star (don't collide with it), and there appears to be one pesky klingon one quadrant up.

The Enterprise in battle with two klingon ships.  Good stuff!

The rules (part 1)

The rules (part 2)

Choose your skill level carefully as the difficulty ramps up very quickly.


The original cover from the Micro Power release.



Wednesday, 31 December 2014

What's my Starwars name?

Ever needed to know what your name would be in the Starwars universe?  Me neither, but that didn't stop me creating this site to help you find out.

What would you be called in the Starwars universe?

Monday, 29 December 2014

RSS feeds

I've been playing with RSS feeds in JavaScript.  My first attempt is a webpage that shows the top BBC news stories; provides a Google search box and, rather uselessly displays the current day of the week.  I shall continue to work on it in an attempt to make a rather useful homepage.  Please take the code and give it to children to hack.  Have fun.  Oh, and a link to the jQuery RSS feedreader code I used.


Saturday, 27 December 2014

So long Ceefax

This is a post for anyone who remembers a time before The Web, when the height of digital entertainment was the one-kilobyte-per-page, primary-coloured block-graphics wonderland that was teletext (lower-case t).  If you are still awake, and remember the joy of the Bamboozle quiz on Channel 4's Teletext (caps T) - then read on!

I was delighted to discover the Teletext Preservation Project, an attempt to archive some of the many pages from the UK teletext providers (BBC's "Ceefax", C4's "Teletext" and ITV's Oracle - which I was also delighted to discover is an acronym for Optional Reception of Announcements by Coded Line Electronics).  I have shamelessly stolen some images from the TPP for use in this post.

How we watched the 1997 general election results.  Damn you, Tony Bliar.....!!
How we celebrated.

The last ever Bamboozle screen *sob*

Utter lies, but at least the BBC coders had a sense of humour.

Other notable websites keeping teletext alive include The Teletext Museum (this link showing how the events of the 11th September 2001 were reported) and Alan Pemberton's website (an informative history of the subject).

Goodbyeee

Thursday, 25 December 2014

LEGO Competition

A new Christmas tradition in my house: - LEGO competition!  Each competitor is given 16 ounces (454g) of randomly assorted LEGO bricks, and 60 minutes to build the most awesome thing.  Here are some of the best from this year's competition:

Grandpa's entry: "Space police, space toll booth".  Category - best use of sloping yellow bits.  Prize - chocolate coins.
Grandma's entry: "Archaeological dig (in space)".  Category - best story.  Prize - satsuma.  
My entry: "Humbug mobile".  Category - all round excellence.  Prize - washing up duty.

Wednesday, 24 December 2014

My LEGO advent calendar is complete

The LEGO advent calendar is finally complete (with a few bits left over).
Everyone will remember this scene from the movie Starwars.

Have a very metal Christmas

Dear readers, wishing you a very metal Christmas...you'll go down in his-tor-raAAGHAAAAAAY!

Tuesday, 23 December 2014

Programs written in BBC BASIC for Windows

A collection of videos showing programs written in BBC BASIC for Windows.  Also I discovered the following BB4Win facebook group.


A software simulation of the BBC One World Logo (OWL), otherwise known as the Computer Originated World (COW), rendered in real-time using Direct3D on a Windows PC by Richard Russell



This is a simulation of a novelty Ball Bearing Clock, made using BBC BASIC for Windows and the Box2D physics engine. You read the time from the bottom to the top: hours, minutes tens, minutes units, seconds tens, seconds units; it starts at five to twelve



A strange random music generator by Celtic Saint


Agitation by Celtic Saint


A load of games written in BBC BASIC for Windows by various people.


Optical illusion by dw1664 (Creator of the gfxlib)


Awesome games from a time when 'one didn't just complete video games'

A selection of BBC Microcomputer video games, from a time when games were so difficult, you did not complete them.
Thrust - a lesson in Physics, from the time when computer games were difficult.
"Probably the most challenging game for the BBC Micro" - so much so that Micro power offered cash prizes to anyone who finished it. I had a primary school teacher who was awesome (and forward thinking) enough to let us play this game ad nauseum. Never managed to complete it.
Repton - one of the greatest BBC Micro games I never owned, not that I would have completed it if I did.
The game that changed everything. Elite -the first truly 3D game. This video shows the game being played on vintage hardware. This was a true revolution in gaming. For the first time you were not limited by three lives with levels speeding up as you progress until it becomes impossible to play. Elite immersed you in a vast sandbox universe. I lost countless Friday nights as a young teen exploring the many alien worlds and battling the Thargoids and I never did manage to make it to the status of 'Elite'.  It is so good, we might do a whole series of posts on it. I wonder how many people are now spending countless nights playing Elite: Dangerous?
"We are the Arcadians" they taunted at the start of every battle. Great stuff! A fantastic version of Space Invaders for the BBC Micro. Impossible to complete, the arcadians just came at you faster and faster...
Exile - a fine example of one of the excellent adventure games for the BBC microcomputer. Did someone say 32K?
A mind-boggling and difficult adventure game featuring teleports, platforms and various beasties we came to expect from Acornsoft computer games.
Ricochet - excellent graphics and a wonderful gameplay made this game a firm favourite. I forget the name of the protagonist in this adventure, however I do remember that the aim of the game was to bounce your way through four different worlds looking for pieces of the thingy you needed to complete the game. It was a truly fiendishly difficult game, and suffice to say, I never completed it.
Baron. One of my favourite beeb games because it kind of felt like a sequel to Castle Quest. I later found out that Baron was written in a hurry to fill up space on the Acornsoft's "Play it Again Sam 11" compilation. It is not actually possible to complete this game, although I stand ready to be corrected.

Chuckie Egg. It is not possible to win, just survive longer than last time. Eventually the big yellow bird in the cage is released. If you survive that, his little blue buddies team up and kill you. Even so, this is probably one of the best games ever. They don't make games like this anymore.
Pipeline - an ingenious game with great graphics, complex puzzles and cool soundtrack. Pipeline also game with a level editor and graphics editor allowing you to spend literally days tinkering with your own levels and puzzles. One of the most memorable features of pipeline was the maze of pipes that one would enter and inevitably become hopelessly lost within...
White Magic 2 - a rogue like monster-slaying game for the beeb. This one had a level editor which was more fun than the actual game.
Ravenskull - "harder than titanium nails laminated with kryptonite!"


All of these games, and more, are available to play on the wonderful BeebEm emulator by David Gilbert.

Monday, 22 December 2014

List of browser games

I have started curating a list of fun browser-based games. Most are either HTML or flash. More will be added over time.

Friday, 19 December 2014

Awesome marble runs built from LEGO

A collection of awesome LEGO marble runs.


Clearly the best so far. Apparently over 600 hours of work has gone into this. Be prepared to say: 'WOW', then 'WOW!', then 'OH MY GOD, WOW!!'
Another good one. Video gets more awesomer as it goes.
Close up of awesome LEGO marble run
If only I had these toys...
Another fantastic piece of work, this time a 9V powered marble run, with human loader.


It's a simple one, but a beauty!

Cute

Marble train. Someday our cities will look like this
Saving the best till last - a new world record...

Writing an Adventure Game 09

This shall be the last post in our series on writing an adventure game in BB4W.   Posts are getting rather long, and it really is over to you to complete the game now.  If you want an example of a more complicated adventure game engine, then do check out GOLIATH.

In this edit, we have added a procedure for allowing the apple in the woods to constantly grow back once it has been eaten (ultimately preventing the player from starving to death forever).  I've also added a cake object as a special gift for all my readers - enjoy!

Source code follows:

     REM an adventure game in BB4W
     REM by Mr Street

     REM version 1.0.0.1 setting up the world
     REM version 1.0.0.2 moving around the world
     REM version 1.0.0.3 fixing it so you can't walk out of the grid
     REM version 1.0.0.4 health decreases each turn (because you get hungry)
     REM version 1.0.0.5 set-up some objects for the player to interact with
     REM version 1.0.0.6 allowing objects to be picked up
     REM version 1.0.0.7 allowing obejcts to be dropped
     REM version 1.0.0.8 eating the apple
     REM version 1.0.0.9 the apple always grows in the woods.

     REM let's set up a 'world'
     
SIZE% = 3
     DIM World$( SIZE%, SIZE% ) : REM creates a 3x3 grid
     REM now 'populate' the grid with some space names
     
PROC_populateWorld
     REM now some data about our player
     REM player's starting position
     
x% = 2
     y% = 2
     REM player's health
     
health% = 50

     REM the objects
     
numObjects% = 3 : REM start with just a small number of objects
     
DIM prefix$( numObjects% )   : REM eg "a" or "an" or "the"
     
DIM object$( numObjects% )   : REM object name, eg "sword"
     
DIM objectx%( numObjects% )  : REM object x position
     
DIM objecty%( numObjects% )  : REM object y position
     
DIM edible%( numObjects% )   : REM set to -1 for an edible object, otherwise is 0

     
PROC_createObjects
     REM a list of objects that the player has
     
DIM playerObject%( numObjects% )
     REM the apple always grows in the woods
     
appleDelay% = 10
     PROC_main
     STOP


     
DEFPROC_main
     LOCAL command$ : REM user's input
     REM the main program
     REM repeat until the player is dead
     
REPEAT
       
REM show the player's current position
       
PROC_showCurrent
       REM show objects here
       
PROC_showObjects
       REM get some input from the player
       
PRINT REM a blank line
       
INPUT "What now? > " command$
       PRINT REM a blank line
       REM deal with user's input
       
PROC_executeCommand( command$ )
       REM the apple always grows in the woods
       
PROC_growApple
     UNTIL health% <= 0
     REM game over message
     
PRINT "GAME OVER!"
     ENDPROC

     
DEFPROC_executeCommand( command$ )
     REM deals with the users input
     
LOCAL com$, gridError$
     LOCAL ok% : REM checks whether the user's input is acceptable
     
ok% = TRUE REM assume user's input makes sense
     
gridError$ = "You can't go in that direction!" : REM a message for when you move off the grid
     
com$ = FN_convlc( command$ ) : REM convert to lowercase so it is easier

     
CASE TRUE OF
       WHEN 
com$ = "n" OR com$ = "north"
         IF y%<SIZE% THEN
           
y% += 1
         ELSE
           PRINT 
gridError$
           ok% = FALSE
         ENDIF

       WHEN 
com$ = "s" OR com$ = "south"
         IF y% >1 THEN
           
y% -= 1
         ELSE
           PRINT 
gridError$
           ok% = FALSE
         ENDIF

       WHEN 
com$ = "e" OR com$ = "east"
         IF x%<SIZE% THEN
           
x% += 1
         ELSE
           PRINT 
gridError$
           ok% = FALSE
         ENDIF

       WHEN 
com$ = "w" OR com$ = "west"
         IF x%>1 THEN
           
x% -= 1
         ELSE
           PRINT 
gridError$
           ok% = FALSE
         ENDIF

       WHEN LEFT$(
com$,3) = "get"
         thisObject$ = RIGHT$(com$, LEN(com$)-4)
         PROC_getObject( thisObject$ )

       WHEN LEFT$(com$,4) = "drop"
         thisObject$ = RIGHT$(com$, LEN(com$)-5)
         PROC_dropObject( thisObject$ )

       WHEN LEFT$(com$,3) = "eat"
         thisObject$ = RIGHT$(com$, LEN(com$)-4)
         PROC_eatObject( thisObject$ )


       OTHERWISE REM this MUST be the last statement in the case
         
PRINT "I don't understand you!"
         ok% = FALSE


     ENDCASE

     
REM if the user's input was acceptable, then they have
     REM made one 'turn' and should lose one health point
     
IF ok% THEN
       
health% -= 1
     ENDIF

     ENDPROC


     
DEFPROC_showCurrent
     PRINT "----------------------------------"
     PRINT "You are at the : "World$(x%, y%)
     PRINT "Your health is : "STR$(health%)
     ENDPROC


     
DEFPROC_showObjects
     REM look for any objects here
     
LOCAL n%
     REM look through list of objects
     
FOR n% = 1 TO numObjects%
       REM is the player's location the same as the object location?
       
IF x% = objectx%(n%) AND y% = objecty%(n%) THEN
         
REM objects is here
         
PRINT "There is "prefix$(n%)" "object$(n%)" here."
       ENDIF
     NEXT
     ENDPROC


     
DEFPROC_getObject( this$ )
     REM allows player to pick up objects
     
LOCAL n%, found%, index%
     LOCAL objectError$ : objectError$ = "I don't see one of those here!"
     WHILE n% <=numObjects% AND NOT found%
       IF this$ = object$(n%) THEN
         
found% = TRUE
         
index% = n%
       ELSE
         
n% += 1
       ENDIF
     ENDWHILE
     
:
     IF found% THEN
       
REM check that the object is at the player's location
       
IF x% = objectx%(index%) AND y% = objecty%(index%) THEN
         
REM object is here, so pick it up
         
playerObject%(index%) = TRUE REM add to list of player's objects
         
objectx%(index%) = -1 : REM remove object from the grid
         
objecty%(index%) = -1 : REM remove object from the grid
         
PRINT "OK, you take "prefix$(index%)" "object$(index%)
       ELSE
         PRINT 
objectError$
       ENDIF
     ELSE
       PRINT 
objectError$
     ENDIF
     ENDPROC

     
DEFPROC_dropObject( this$ )
     REM allows player to drop objects
     
LOCAL n%, found%, index%
     LOCAL objectError$ : objectError$ = "You are not carrying one of those!"
     WHILE n% <=numObjects% AND NOT found%
       IF this$ = object$(n%) THEN
         
found% = TRUE
         
index% = n%
       ELSE
         
n% += 1
       ENDIF
     ENDWHILE
     
:
     IF found% THEN
       
REM check that the player has the object
       
IF playerObject%(index%) THEN
         
REM player has one so can drop it
         
playerObject%(index%) = FALSE REM remove from list of player's objects
         
objectx%(index%) = x% : REM add object to the grid
         
objecty%(index%) = y% : REM add object to the grid
         
PRINT "OK, you drop "prefix$(index%)" "object$(index%)
       ELSE
         PRINT 
objectError$
       ENDIF
     ELSE
       PRINT 
objectError$
     ENDIF
     ENDPROC


     
DEFPROC_eatObject( this$ )
     REM allows player to eat objects
     
LOCAL n%, found%, index%
     LOCAL healthBonus% : healthBonus% = 10 : REM health gained from eating things
     
LOCAL objectError$ : objectError$ = "You are not carrying one of those!"
     WHILE n% <=numObjects% AND NOT found%
       IF this$ = object$(n%) THEN
         
found% = TRUE
         
index% = n%
       ELSE
         
n% += 1
       ENDIF
     ENDWHILE
     
:
     IF found% THEN
       
REM check that the player has the object
       
IF playerObject%(index%) THEN
         
REM player has one so can try to eat it
         REM check whether the object is edible
         
IF edible%(index%) THEN
           
REM object is one of the edible objects
           
playerObject%(index%) = FALSE REM remove from list of player's objects
           
objectx%(index%) = -1 : REM remove object from the grid
           
objecty%(index%) = -1 : REM remove object from the grid
           
PRINT "OK, you eat "prefix$(index%)" "object$(index%)
           health% += healthBonus%
           PRINT "You gain "STR$(healthBonus%)" health points!"
         ELSE
           PRINT 
"I'm not eating one of those!"
         ENDIF
       ELSE
         PRINT 
objectError$
       ENDIF
     ELSE
       PRINT 
objectError$
     ENDIF
     ENDPROC


     
DEFPROC_growApple
     REM if the apple does not exist, then grow a new apple
     
IF objectx%(1) = -1 AND objecty%(1) = -1 AND playerObject%(1) = FALSE THEN
       
appleDelay% -= 1
     ENDIF
     IF 
appleDelay% <= 0 THEN
       
REM reset the apple delay
       
appleDelay% = 10
       REM put the apple in the woods
       
objectx%(1) = 1
       objecty%(1) = 3
     ENDIF
     ENDPROC



     
DEF FN_convlc(A$)
     REM converts to lower case
     
SYS "CharLowerBuff", !^A$, LEN(A$)
     = A$


     DEFPROC_populateWorld
     REM puts some names of the spaces into the World
     
LOCAL x%, y%
     REM start with the first row
     
FOR y% = 1 TO 3
       FOR x% = 1 TO 3
         READ World$(x%,y%)
       NEXT
     NEXT
     ENDPROC
     
:
     REM the data for our 3x3 grid
     
DATA "Hills",  "Mountains", "Forest"
     
DATA "Castle", "Village", "Fields"
     
DATA "Woods",  "Swamp",  "Lake"

     
DEFPROC_createObjects
     REM puts the names of objects into a list
     
LOCAL n%
     FOR n% = 1 TO numObjects%
       READ prefix$(n%)
       READ object$(n%)
       READ objectx%(n%)
       READ objecty%(n%)
       READ edible%(n%)
     NEXT
     ENDPROC
     DATA
 "an", "apple", 1, 3, -1
     
DATA "a",  "sword", 3, 3, 0
     
DATA "a",  "cake", 2, 2, -1