in reply to Re: newbie learning perl
in thread newbie learning perl

Your changes worked! Blessed are you among monks. At work I use Linux but use c shell for all my scripting. Virtually all of my peers use perl so thought I should see what everybody likes so much. I wanted to introduce my 9 year old to programming and thought this would be a simple program that he could play with. Thus I'm creating it with windows since my son is in a windows world. When I wrote this in basic many moons ago I used peek to return a value that would tell me if the V had hit a location with a T thus a collision. Any thoughts on how I could accomplish this with perl? The goal of the game is to move the V and avoid hitting the Ts as the scrolling slowly speeds up. I need a way to tell if a location has a character in it before the V is put in the location. If no way to do this I'll need to create a list of x,y locations that have a character. Prefer a peek type solution if anybody has one.

Replies are listed 'Best First'.
Re^3: newbie learning perl
by Anonymous Monk on Feb 18, 2015 at 23:24 UTC

    The skiers view: notice the V (skier) is placed 50 lines up the screen ($skiery = $y - 50;) while the Ts show up at the bottom and scroll upward so the skier can see whats coming with time to avoid. Until other obstacles show up like "YELLOW SNOW" which is a wall of characters to avoid or "ROCK" which is only 4 characters to avoid. This to come after I work out how to tell if the V hits an existing character. :P

    I think my 9 year old and his henchmen will be amused. (For about 5 minutes)