More type in goodness…Half-Byte Tiny Basic type in game, Zapp the Moon Man, take 2

zappthemoonmanRelease three of Half-Byte Tiny Basic ate up about eight more bytes of memory than the previous release, so there are now 938 bytes free for user code to reside.  My last version of Zapp the Moon Man—previously unpublished—featured the Moon man’s ability to move down the screen and attack as well as the user’s ability to move the cannon back and forth.  Sadly, for this release, I’ve had to remove the downward mobility of the Moon Man, but I have left in the user’s ability to move and also made the ‘hit box’ better, resulting in a somewhat easier game play.

This game shows off just how versatile Tiny Basic can be, how speedy the ATMega 328 is and how quickly Tiny Basic can interpret your code.

At any one time in the game, both your cannon and the Moon Man can be moving as well as the torpedo you are shooting at the moon man.  Three objects to track on the screen. In interpreted BASIC. Running on a microcontroller that was meant for turning relays on and off, not playing video games. And, it does it rather smoothly.  The jerkiness that is there is there by design, to mimmick those games from the 1970’s.

The game is pretty primitive. It resembles Space Invaders, but there is only one ‘invader’, the Moon Man, and there are no protective shields…heck, the Moon Man does not even shoot at you…yet.  It does feature some primitive, character based, animated graphics.  The Moon Man sort of looks like a Space Invader. As it moves back and forth, its antennae move and its ‘feet’ swivel side to side.  You use a Wii Nunchuck’s thumb stick to move and the Z button to fire your torpedo. The game keeps a score…10 points for every Moon Man you destroy.  You hear a launch tone when you fire and, when you hit a Moon Man, you see a little explosion like effect. And…that’s it.  Simple and not earth shattering (that will be in a future update.)

So, with out any further delay…(One note: when typing in the code, do not put in extra spaces.  Use one space between the line number and the code, and one space before line numbers in things like GOTO or GOSUB.  The listing below inserted additional spacing, you can ignore it.)

100 CLS:ECHO 0
110 A=0:B=0:O=75
120 X=10:Y=10:Z=5:F=0:D=1:S=0
140 LINE 0,48,80,48,1
150 GOSUB 700
160 GOSUB 900
170 P=PAD(3):Q=PAD(0)
180 IF P=1 F=1:TONE 200,100
190 IF F=1 GOSUB 1000
192 IF Q>200 GOSUB 600
194 IF Q<100 GOSUB 600
200 A=A+D
210 IF A>15 D=-1
220 IF A<3 D=1
230 GOSUB 1200
290 GOTO 140
600 CURSOR X,Y:?”  “;
610 IF Q>200 I=1
620 IF Q<200 I=-1
630 X=X+I
640 IF X<2 X=2
650 IF X>17 X=17
660 GOSUB 900
690 RETURN
700 IF D=1 CURSOR A,B:?CHR(152);:DELAY O:CURSOR A,B:?CHR(153);:DELAY O:CURSOR A,B:?”  “;
710 IF D=-1 CURSOR A,B:?CHR(153);:DELAY O:CURSOR A,B:?CHR(152);:DELAY O:CURSOR A,B:?”  “;
790 RETURN
900 CURSOR X,Y:?CHR(150);
990 RETURN
1000 CURSOR X,Z:?”|”;:DELAY 20:CURSOR X,Z:?” “;:DELAY 20
1050 Z=Z-1
1060 IF Z=0 IF A=X Z=5: GOTO 1100
1070 IF Z=0 IF A=X+1 Z=5: GOTO 1100
1080 IF Z=0 Z=5:F=0
1090 RETURN
1100 CURSOR A,B
1110 ?”***”;:DELAY 180:CURSOR A,B:?”XXX”;:DELAY 170:CURSOR A,B:?”   “;:A=0:B=0:F=0
1190 S=S+10
1200 CURSOR 0,5:?”SCORE:”,S;
1290 RETURN

 

If you come up with any improvements, optimization, etc., please let us know.

Oh, one big caveat…as it does use up all but 15 bytes of RAM, your keyboard buffer is limited to 15 bytes…Tiny Basic does not set aside a dedicate memory for keyboard input. It dwindles as you use up memory.  So, keep in mind that you may have to delete a long line and split it up—which will use at least three bytes plus the content of the line.

UPDATE:  Since this was posted, I have made a few improvements to the game AND saved even more RAM, about 90 bytes total.  Among the improvements: a random speed for the moon man, the ability of the moon man to descend on you and…you can lose the game.

The updated code is below.

100 CLS
110 A=0:B=0:O=RND(100)
120 X=10:Y=8:Z=5:F=0:D=1:S=0
140 LINE 0,48,80,48,1
150 GOSUB 700
160 GOSUB 900
170 P=PAD(3):Q=PAD(0)
180 IF P=1 F=1:TONE 200,100
190 IF F=1 GOSUB 1000
192 IF Q>200 I=1:GOSUB 600
194 IF Q<100 I=-1:GOSUB 600
200 A=A+D
210 IF A>16 D=-1:B=B+1:if b>=Y CLS:?”You lose!”:Delay 3000:goto 100
220 IF A<1 D=1
230 GOSUB 1200
290 GOTO 140
600 CURSOR X,Y:?”  “;:X=X+I
640 IF X<2 X=2
650 IF X>17 X=17
660 GOSUB 900
690 RETURN
700 CURSOR A,B:?CHR(152);:DELAY O:CURSOR A,B:?CHR(153);:DELAY O:CURSOR A,B:?”  “;
790 RETURN
900 CURSOR X,Y:?CHR(150);
990 RETURN
1000 CURSOR X,Z:?”|”;:DELAY 20:CURSOR X,Z:?” “;:DELAY 20
1010 Z=Z-1
1060 IF X=A IF Z=B GOTO 1100
1070 IF X=A+1 IF Z=B GOTO 1100
1080 IF Z=0 Z=5:F=0
1090 RETURN
1100 CURSOR A,B
1110 ?”***”;:DELAY 180:CURSOR A,B:?”XXX”;:DELAY 170:CURSOR A,B:?”   “;:A=0:B=0:F=0
1120 Z=5
1190 S=S+10:O=RND(100)
1200 CURSOR 0,5:?”SCORE:”,S;
1290 RETURN

Advertisements

More type in goodness…Half-Byte Tiny Basic type in game, Zapp the Moon Man, take 2

zappthemoonmanRelease three of Half-Byte Tiny Basic ate up about eight more bytes of memory than the previous release, so there are now 938 bytes free for user code to reside.  My last version of Zapp the Moon Man—previously unpublished—featured the Moon man’s ability to move down the screen and attack as well as the user’s ability to move the cannon back and forth.  Sadly, for this release, I’ve had to remove the downward mobility of the Moon Man, but I have left in the user’s ability to move and also made the ‘hit box’ better, resulting in a somewhat easier game play.

This game shows off just how versatile Tiny Basic can be, how speedy the ATMega 328 is and how quickly Tiny Basic can interpret your code.

At any one time in the game, both your cannon and the Moon Man can be moving as well as the torpedo you are shooting at the moon man.  Three objects to track on the screen. In interpreted BASIC. Running on a microcontroller that was meant for turning relays on and off, not playing video games. And, it does it rather smoothly.  The jerkiness that is there is there by design, to mimmick those games from the 1970’s.

The game is pretty primitive. It resembles Space Invaders, but there is only one ‘invader’, the Moon Man, and there are no protective shields…heck, the Moon Man does not even shoot at you…yet.  It does feature some primitive, character based, animated graphics.  The Moon Man sort of looks like a Space Invader. As it moves back and forth, its antennae move and its ‘feet’ swivel side to side.  You use a Wii Nunchuck’s thumb stick to move and the Z button to fire your torpedo. The game keeps a score…10 points for every Moon Man you destroy.  You hear a launch tone when you fire and, when you hit a Moon Man, you see a little explosion like effect. And…that’s it.  Simple and not earth shattering (that will be in a future update.)

So, with out any further delay…(One note: when typing in the code, do not put in extra spaces.  Use one space between the line number and the code, and one space before line numbers in things like GOTO or GOSUB.  The listing below inserted additional spacing, you can ignore it.)

100 CLS:ECHO 0
110 A=0:B=0:O=75
120 X=10:Y=10:Z=5:F=0:D=1:S=0
140 LINE 0,48,80,48,1
150 GOSUB 700
160 GOSUB 900
170 P=PAD(3):Q=PAD(0)
180 IF P=1 F=1:TONE 200,100
190 IF F=1 GOSUB 1000
192 IF Q>200 GOSUB 600
194 IF Q<100 GOSUB 600
200 A=A+D
210 IF A>15 D=-1
220 IF A<3 D=1
230 GOSUB 1200
290 GOTO 140
600 CURSOR X,Y:?”  “;
610 IF Q>200 I=1
620 IF Q<200 I=-1
630 X=X+I
640 IF X<2 X=2
650 IF X>17 X=17
660 GOSUB 900
690 RETURN
700 IF D=1 CURSOR A,B:?CHR(152);:DELAY O:CURSOR A,B:?CHR(153);:DELAY O:CURSOR A,B:?”  “;
710 IF D=-1 CURSOR A,B:?CHR(153);:DELAY O:CURSOR A,B:?CHR(152);:DELAY O:CURSOR A,B:?”  “;
790 RETURN
900 CURSOR X,Y:?CHR(150);
990 RETURN
1000 CURSOR X,Z:?”|”;:DELAY 20:CURSOR X,Z:?” “;:DELAY 20
1050 Z=Z-1
1060 IF Z=0 IF A=X Z=5: GOTO 1100
1070 IF Z=0 IF A=X+1 Z=5: GOTO 1100
1080 IF Z=0 Z=5:F=0
1090 RETURN
1100 CURSOR A,B
1110 ?”***”;:DELAY 180:CURSOR A,B:?”XXX”;:DELAY 170:CURSOR A,B:?”   “;:A=0:B=0:F=0
1190 S=S+10
1200 CURSOR 0,5:?”SCORE:”,S;
1290 RETURN

 

If you come up with any improvements, optimization, etc., please let us know.

Oh, one big caveat…as it does use up all but 15 bytes of RAM, your keyboard buffer is limited to 15 bytes…Tiny Basic does not set aside a dedicate memory for keyboard input. It dwindles as you use up memory.  So, keep in mind that you may have to delete a long line and split it up—which will use at least three bytes plus the content of the line.

64 bit graphical hand held

I read a post on Hackaday about a ‘64 bit graphics’ hand held game system powered by the atmel 328…an Arduino Uno like handheld.  Well, the headline was a bit deceptive, the 64 bit part was correct, as there is an 8×8 LED matrix being use for the ‘screen’. 

WP_20160702_03_18_57_Pro (2)This is actually something I had toyed with building for quite a while now.  I had seen several (Super Pixel Brothers being the first) and, after seeing this particular build, I thought…why not?  I have a lot of those matrices lying about, so I took my last unbuilt matrix (it was a ‘kit’) and used it as the basis of my console.

I used my previous handheld build as the basis for this one, which was also very similar to the Hackaday build.  I guess there aren’t many different to do this.

My build has four buttons: Reset, left, right and action.  I deviated from the article’s build and used a battery pack that has three AA batteries.  The unit ran nearly 24 hours on those three batteries.

While I have the hardware complete, I am working on software. The article’s build has six games: space invaders, pong, racing and three others.

So, I now have a piece of nice hardware and nothing running on it.  I’m thinking about adapting the Super Pixel Brothers to the handheld or doing a Space Invaders type game.  Not sure yet. Heck, I WP_20160630_21_10_14_Promay just put several pre-programmed messages and use the buttons to select them. 

What would you do?  Thoughts on software/games?  Leave them in the comments below.

 

Link to the Hackaday article: http://hackaday.com/2016/06/25/this-arduino-console-has-64-bit-graphics/

Windows Mobile 10: Alcatel OneTouch Fierce XL

5055w_front_back-groupI’ve been using the Fierce XL with Windows Mobile 10 for almost a month now.  I bought the phone from T-Mobile to temporarily replace my now ailing Lumia Icon from Verizon.  As Verizon no longer considers Windows a viable platform for them, I went to T-Mobile who is still friendly toward the mobile operating system. 

The Fierce XL from Alcatel OneTouch was $140 (US) to buy out right.  No contract and a $40 a month plan made it a nice deal.  So, how does it compare to my old Icon?

Well, not very well.  And that is just fine.  The Icon was a ‘flagship’ , that is, it was considered a premium phone with premium features.  The Fierce XL is not.  It does, however, have some features that were, previously, a premium feature, like 2GB of RAM and a large HD display. It also came with Windows Mobile 10.  So, it is not quite a slouch but no high end phone either.  I knew this going in.

In most respects, it is a good device.  Not as fast as the Icon, not as slow as my even older Lumia 521 or iPhone 4.  In terms of performance, it is closer to an iPhone 5.  The 2GB of RAM helps a lot.   The OS is fluid, but does hiccup once in a while. I am running a ‘Redstone 1’ insider build, so there are OS issues, but they are the result of running beta code.  However, that code does bring out features that were not in the shipping release of Windows Mobile 10, like a quasi Continuum feature. More on that in a bit. 5055w_back-left

The camera is, perhaps, the weakest point of the device. The rear camera is only eight megapixels and has poor low light ability.  The images are not very crisp and color tends to be more on the muted side of things. Coming from my Icon, it is a huge let down.  Again, I was aware of this when I got the phone, but it was still a big let down.  Almost enough to take the phone back to T-Mobile, but, alas, my poor Icon’s battery is on life support. As is the body of the phone. 

Which brings me to the best and worst aspect of the Fierce XL: it’s body is all plastic.  The back is a funky shade of blue that has grown on me, but is also now covered up by an overpriced rubbery shell that the salesguy sold me at T-Mobile.  The plastic case looks cheap and feels cheap, but it likely will not break or dent, like the Icon’s all metal body did.  I don’t mind the plastic all that much, but it does feel cheap, which makes me think I would not like it on, say, the Lumia 950.

Overall, the hardware-except for the camera-is decent. Performance is good, considering the price.  While it feels cheap, the build quality is quite good. 

As I mentioned earlier, the latest Windows 10 insider builds unlock a nice Continuum feature. To 5055w_front-rightuse it, both the phone and the computer must be running the latest builds of Windows 10 Insider (the ‘Redstone 1’ builds) as the feature needs the PC to have the plumbing for Continuum.  So, what does it do?  Well, it lets you, via the ‘connect’ feature on the device, to allow the phone’s screen to be shown on the PC’s monitor and allows the PC’s keyboard and mouse be recognized by the phone. This lets you use the phone as if it were the computer.  The difference, though, between this and the ‘real’ continuum is that you cannot do something else on the phone while using Continuum, and it does not scale the phone’s screen to fit the monitor. It is the same as the old ‘connect’ or project my screen feature.  It is a nice feature, though one that I don’t see myself using all that much.  Perhaps I will if I use my phone at my job to take notes or start work on a document or spreadsheet.  Though, I generally just save to my OneDrive and use my PC and its apps.  So, while this is cool and nice, and all that, I’m not sure that I’d use it all that much.

Windows 10 runs very well on this hardware and gives me hope that Alcatel Onetouch will bring some of its better hardware to Windows Mobile, like the Idol 3.  It also gives me hope that other manufacturers will follow. Indeed, HP, Acer and HTC all have or will have Windows Mobile devices out very soon, if not now.

The Fierce XL with Windows 10 is available from T-Mobile for $139.95.

Non-Tech Fun: Vacationing in the Mid-Atlantic Area

It’s that time of year when vacations are starting and you are looking for great places to take your family and relax and have some fun.  And, what better places to take them than to the amusement parks, right?  Well, sure, but there are new types of amusement parks that do not involve rollercoasters or ferris wheels.  First, though, I am going to talk about rollercoasters.  BIG ONES, at that.

Overview of Carowinds entranceThe tallest giga-coaster on the East Coast, and one of the tallest in the country, is called Fury 325 and is located in the very nice Carowinds theme park located near Charlotte, North Carolina.  This thing is 325 feet tall, has an 85 degree first drop and is over 6600 feet long. It towers over the park.  Now, Carowinds isn’t a one trick wonder. No, it also has another tall coaster: the Intimidator. Named after the late, great Dale Earnhardt, this out and back coaster features a first drop of over 200 feet and, prior to Fury 325, was the south easts tallest and fastest roller coaster.  Rounding out Carowinds collect are Nighthawk, a coaster where you lay down and Flightdeck, a hanging rollercoaster that is very fast and features many inversions.  Carowinds is a delightful place to take your family and won’t break the bank.Overview of Carowinds entrance

Charlotte is also home to an NFL team and, of course, NASCAR.  The NASCAR Hall of Fame is located in downtown Charlotte, just minutes from the theme park.

Travelling north, to Virginia, you will find not one, but two world class theme parks, lots of museums, and history, a ton of history from the revolutionary war era, to the Civil War and both World Wars. 

Griffon, at Busch Gardens WilliamsburgStarting in Williamsburg, you have Busch Gardens, a true world class park.  It’s theming, food, service and, of course, its rides, all make it THE best theme park to visit, period.  For its rides, you have Alpengeist, a daring hanging coaster that was the tallest of its type for many years.  The Loch Ness Monster, which, when it opened, was the tallest and fastest coaster in the country. Then, there is the Griffon. Griffon takes you up 205 feet, dangles you over the edge and then lets you drop down an almost 90 degree drop.  It’s a real heart stopper.  Apollo’s Chariot is hypercoaster that will never cease to thrill.  Busch Gardens has terrific food as well.  Oktoberfest lets you sample German cuisine while Festa Italia gives you a taste of Italy.  Down the road from the park you will find Water Country, USA, a huge water park.

Also in Williamsburg, you will find Colonial Williamsburg for a sampling of life in the 1700’s.  There’s also shopping, fine dining and more touristy things to do like the Ripley’s Believe it or Not Odditorium. Finally, there’s mini-golf, go kart parks and the famous Williamsburg Pottery Outlets.

Oh, yeah, I’d me remiss if I neglected to mention Great Wolf Lodge.  This nice resort features a good sized indoor waterpark, included in the price of your room. 

And, don’t forget, to the east is Virginia Beach, about a forty minute drive. And Norfolk, which contains even more things to do, including an aquarium and battleship.  Virginia Beach also features an even better aquarium that also has zip lines and a rope course.

Loch Ness Monster, BGWJust north and west of Williamsburg is Richmond.  Richmond is rich in history, culture, fine arts and food. Lots of restaurants with everything from soul food, to country food to anything European, Korean, Japanese or Chinese.  There’s also a tremendous amount of Thai food restaurants.  You name, you can likely find it in Richmond.  In addition to shopping and food, you’ll find many art museums, history museums and the Edgar Allen Poe Museum.

There’s minor league Baseball, NASCAR twice a year (in April and September) and several short tracks for that weekly dose of speed.  There’s adrenaline junky places like Jumpology, a trampoline fun house.  Coming soon to the area is an indoor park featuring an American Gladiators type course, several zip lines and rope courses. 

A few minutes north of Richmond takes you to Virginia’s second world class theme park, Kings Dominion.  Kings Dominion is a sister park to Carowinds and, as such, contains many of the same types of rides and attractions.  It includes a nice collection of Dominator Rollercoaster, KDrollercoasters, including what was the tallest and fastest giga coaster on the east: Intimidator 305.  This 305 foot tall beast, also named for Dale Earnhardt, gives you the feeling of the high banked turns of Talledega and Daytona.  The first drop takes you into a sharp right turn that may cause a momentary ‘grey out’ in which you lose vision for a fraction of a second. This is normal and is not harmful, just weird. It is caused by blood flow and is harmless. 

Edgar Allen Poe MuseumThe park also features many ‘launch’ style coasters, where, instead of the train being pulled up a hill and released, linear induction motors propel the train forward at tremendous speed.  One of them, the Volcano, shoots you out of the station, around the base of a volcano mountain and then up and through the Volcano itself.  Quite thrilling and was my favorite coaster until I rode Fury 325.

Kings Dominion also features a nice but small collection of wooden rollercoasters, including the Rebel Yell, which is featured in the motion picture ‘Rollercoaster’. 

In addition to nice collection of rollercoasters, the park also features shows and a good collection of flat rides including a Ferris Wheel, a Carousel from the 1920’s and a smaller replica of the Eiffel Tower (this one is one third size at 300 feet.)  For thrills, there is the 300 foot tall Drop Zone tower and the 305 foot tall Windseeker, a swing that takes you up nearly 300 feet.

Richmond, VA - richmondcitybook.comRichmond is nicely located with Washington DC to the north, the beautiful Skyline Drive to the north and west and, of course Williamsburg and Virginia Beach to the east.  All of these destinations are within a two hour drive.  The Outer Banks of North Carolina are just three hours from Richmond.  But, there’s certainly plenty to do in the city and one could spend a week here doing it all.

The East Coast from Myrtle Beach, South Carolina all the way up to Ocean City, Maryland (two of my favorite vacation spots as well) offer up a tremendous opportunity for a fun filled vacation pretty much any time of the year (the amusement parks are seasonal, however) and none of it will break the bank either.

Tiny Basic Programming Lesson: talking to the real world

12419231_974683622601393_320731550894605287_oUsing HalfByte Tiny Basic to interface with the external world is pretty easy to do. There are already built in interfaces for temperature and humidity, but, using AREAD, AWRITE, DREAD and DWRITE, we can access a variety of sensors and modules that do not need specialized libraries in order to talk to them.  Sensors such as the touch sensor, IR reader and the light sensor I talked about in previous posts can easily be used by HB Tiny Basic.  The key to using them is to know the range of values they return.  Since documentation for them can be difficult to obtain, the best way to figure it out is to connect them and experiment.  Once you get a feel for the range of values and what they mean, you can easily incorporate them into a project.

Lets consider the following code:

100 CLS
110 A=AREAD(0)
120 CURSOR 0,2
130 PRINT “Light level: “;
140 IF A=0 PRINT”Pitch Dark”:GOTO 500
150 IF A>0 IF A<100 PRINT “Dark    “:GOTO 500
160 IF A>100 IF A<300 PRINT “Low     “:GOTO 500
170 IF A>300 IF A<600 PRINT “Moderate”:GOTO 500
180 IF A>500 PRINT “Bright”:GOTO 500
500 GOTO 110

All this code does is read the sensor, determine a range for light level and output the results.  300 and above is about what you have in a living room in the even with one or two lamps turned on.  Over 500 and you are talking some bright light.  The higher the value, the brighter the light.  Zero, of course, is a total lack of light.

Looking at the code, you will notice that we are reading the A0 analog pin.  That’s the pin the light sensor is connected to. In HB Tiny Basic, A0 to A7 is represented by the integer portion-0,1,2 and so on.  To designate that you want to use the Analog pin, use AREAD.  The same rules apply for the Digital pins…use DREAD and 0 to 13 for the pins.  Line 110 above, A=AREAD( 0 ) to read A0 into the variable ‘A’.  That value, in variable A, becomes static until the pin is read again. This allows us to use the value, as captured at that moment, to do what ever we want.  In this case, we use it to determine if the light level is pitch dark to bright. 

Because HB Tiny Basic lacks such operators as ‘and’ and ‘or’, we have to use multiple IF statements. So, for line 150, instead of something like:

150 IF A>0 AND A<100 PRINT “Dark    “:GOTO 500

we have to use:

150 IF A>0 IF A<100 PRINT “Dark    “:GOTO 500

All it is saying is ‘if the value in A is greater than zero AND less than 100, then print the Dark to the output device and skip to line 500’.

Once we are done  evaluating the light level, we just go back and do it again.  A real world use of this could be like ‘if the light level goes below 300, set pin 10 to high so it turns on a light; if the level goes above 600, set the pin to low to turn off the light’.

There are maximum and minimum values and they are determined by both Tiny Basic, which allows for –32767 to 32767, and the sensor itself.  Some will return a non zero value to indicate an ‘on’ value and a zero for ‘off’.  Or, as in the case of the touch sensor, the values switch between 22 and 1023.  Your mileage may vary.

I wrote a short little game, loosely based on Flappy Bird, that uses the light sensor as the controller. The code is posted here and shows a real world use for using AREAD to retrieve data from an external source.  You could take the code and fancy and add code to trigger a buzzer when the bit hits a pipe (using either AWRITE or DWRITE.) 

There all kinds of things you can do with these four simple functions and statements.  A future modification to the language might be the ability to auto run code from eeprom, which would allow HB Tiny Basic to then be used as a control language.  You can do a lot with few resources.

Flappy Bit: writing a Tiny Basic game that uses a light sensor and you as the game controller

FlappyBitPhotoHere’s a very rough, very crude game, in HalfByte Tiny Basic, of Flappy Bird. I call it Flappy Bit. You use the Light Sensor to control your bit. Cover the sensor and your bit moves up, shine light on it and you go down. As I have not built much logic into it, weird things happen, like sometimes the pipes blend together and you will hit it, sometimes, you go through the pipe, etc. It only uses about 400 or bytes, so there is plenty of room to play with.

Game Features:

  • Use your hand as the controller!
  • Ultra realistic blocky graphics!
  • Stunning sound!
  • Full Color Black and White!
  • True to physics!

100 CLS
110 X=1:Y=20
120 P=50:Q=0
130 L=RND(20):M=RND(20)
135 W=-1
140 A=0:Z=0
150 S=0
160 D=1
170 C=0
200 LINE P,0,P,L,1
210 LINE P,44,P,44-M,1
220 SET X,Y
225 DELAY 50
230 Z=AREAD(A)
240 IF Z<300 K=-1
250 IF Z>299 K=1
260 IF GET(X,Y+K)=1 GOTO 500
270 RESET X,Y
280 X=X+D
290 IF X>75 X=1:D=1
300 LINE P,44,P,44-M,0
310 LINE P,0,P,L,0
320 P=P+W
330 IF P<1 P=RND(75):M=RND(20):L=RND(20)
340 IF M<15 M=M+10
345 IF L<15 L=L+10
350 Y=Y+K
360 IF Y>40 Y=40
370 IF Y<1 Y=1
380 DELAY 50
385 IF X=P+1 C=C+1:TONE 2000,200
386 CURSOR 0,6:?C;
390 GOTO 200
500 CLS
510 ?”You hit the pipe!”
520 DELAY 5000
590 GOTO 100