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

Advertisements

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 250
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 100
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

Half-Byte Tiny Basic Type In Game: Invader

WP_20140719_003Yep, I use ‘Invader’ a lot. Here’s a version, just for Half-Byte Tiny Basic. It features Wii Nunchuck support, sound and AWESOME graphics! Just awesome!

100 CLS
110 X=0:Y=0:D=1:Z=75
120 LINE 0,38,79,38,1
130 B=9:C=5:U=4:V=0
140 CURSOR 0,7:?”Score:”;
150 GOSUB 800
160 GOSUB 900
170 P=PAD(3)
180 IF P=1 S=1
185 IF P=1 TONE 1024,100
190 IF S=1 GOSUB 700
290 GOTO 150
700 CURSOR B,U:?CHR(142);
710 DELAY Z:CURSOR B,U:?”  “;
720 U=U-1
730 IF U<1 IF B<>X U=4:S=0
740 IF U<1 IF B=X GOSUB 1000
790 RETURN
800 CURSOR B,C:?CHR(151);
890 RETURN
900 CURSOR X,Y:?CHR(152);:DELAY X:CURSOR X,Y:?CHR(153);:DELAY Z:CURSOR X,Y:?”  “;
910 X=X+D:IF X>17 D=-1:X=17
920 CURSOR X,Y:?”  “;
930 IF X<2 D=1:X=2
990 RETURN
1000 CURSOR B,U:?”*”;:DELAY 3*X:CURSOR B,U:?” “;:DELAY 3*Z:?”*”;:DELAY 3*Z:CURSOR B,U:?” “;
1010 S=0:V=V+100
1020 CURSOR 0,7:?”Score:”,V;
1030 U=4
1040 TONE 2,400
1090 RETURN

There’s room let to add code to move your ‘tank’ and, perhaps, have the moon guy shoot back.

It is a simple little, but I found it a bit difficult to shoot the moon guy.  The rules are simple: use the ‘Z’ button on the Wii Nunchuck to fire a missile at the moon guy. You get 100 points for each hit. Play continues until you get bored.  Tinker with the code, add more gameplay and share it with us.

Have fun!

Tech Nerdvana: Xbox One, PS 4 and iOS 7

It’s been a big few days in the world of tech and for geeks like us.  Microsoft showed off more of the follow up to both Windows 8 and the XBOX 360, Apple unveiled iOS 7 and Sony shows off its me-too prowess with an unveiling of the PS4. Me too seems to be the prevailing train of thought for all three companies: elements of each other’s tech and that of other companies have made it into each of these products.  There’s even a nostalgic flare to some of them.

I have already talked about some of the changes to Windows 8, so I’ll talk about. No, I will talk about the XBOX One, iOS 7 and a little PS4.

First, however, lets get iOS out of the way. 

iOS7webOSMultitaskAs it is from Apple, it has already been ably covered here and here. However, I want to through my two and half cents in as well.  So…here goes…

First, from what I’ve seen, it looks fantastic. They have taken the better parts of the current flavor of iOS, mixed in some Windows Phone/Windows 8 and even a bit of webOS.  The operating system appears to be a little more customizable, though not much more. It has a flatter, cleaner appearance and, best of all, it is backward compatible all the way back to the iPhone 4, iPad 2 and iPod Touch gen 4.

One of the more frustrating aspects of iOS is its poor multitasking. Well, it looks like that has finally been rectified by borrowing a page from the webOS playbook. Multitasking is handled more like the ‘cards’ feature of Palm’s webOS. You get a horizontal scrolling view of the open apps and you can then flick through them from side to side and flick up to dismiss an app. This is pretty much how webOS handled it.iTunesRadio

One of the more vaunted services that Apple fankids have wanted (though they poo-poo the notion from others) is some kind of Zune like subscription service. Well, Apple unveiled its iTunes Radio, an ad supported free Pandora like service. It will be available on all iOS 7 devices. An ad free version is available to iTunes Match customers.

There are other interesting aspects of iOS 7, like some of the photography related features (filters, better panoramics and more. Hit up one of the links above to find out more. 

I have to admit, I am actually looking forward to upgrading my iPhone 4 to this version of iOS.

Apple also showed a bit of its ridiculously named OS X Mavericks.  Not much to say, other than the AirPlay capability of adding a large screen TV as a second or THIRD display via Apple TV looks pretty nice.  APPLE.COM has more on the new OS and the complete keynote by Tim Cook and company.

Now, onto the video games.

E3 started and, with it, the two big keynotes from Microsoft and Sony.  I’m going to be brief with both, especially Sony, but want to hit what I think are the highlights.

First, lets just get Sony out of the way.

They ‘revealed’  PS4 waaaaay back in FEBRUARY. However, they really didn’t say too terribly much and did not even show off the hardware. They talked games and showed the controller. This time, they were more revealing. The console was on display and…it’s very similar to the XBOX ONE. Yep. SO, it seems both companies have taken a page from the 1970’s consumer electronics design playbook (which lived well into the 1980’s) and came up with retro designs, sans the faux wood. Hey, that might make the PS 4 look a little better.

Ok, Ok, enough ragging on Sony (it’s so much fun.)  This time, however, PS 4 looks a little interesting. The style and the guts are, dare I say, pretty cool…

Inside, you will find a beast of a machine:

  • An eight-core X86 AMD Jaguar CPU ps4
  • 1.84-teraflop AMD Radeon graphics engine
  • 8GB of GDDR5 memory
  • Hard-drive storage (not SSD)
  • Blu-Ray drive
  • Three USB 3.0 ports
  • 802.11 b/g/n Wi-Fi
  • Ethernet
  • HDMI
  • Bluetooth 2.1
  • optical audio and analog AV out

Sony says there will be no restrictions on used games and you will not be required to ‘phone home’ like you will on XBOX at least once a day to play your games…the games that you bought either on disk or download.

The graphics from this monster look impressive and the game line up looks equally impressive. Oh, and the most impressive part? The retail price is going to be…$399.  Ummm…Microsoft…

Speaking of Microsoft

xboxoneMicrosoft unveiled the XBOX One several weeks prior to E3. The hardware looks great, the entertainment features look great, it is based on Windows and is, essentially, a beast Windows computer. Don’t let that fool you, this thing does not work like your standard desktop. Boasting three operating systems (XBOX OS for the games, Windows 8 kernel for the entertainment and apps and a controller to keep the two working together. It wants to be your internet appliance, your video game console and your entertainment and set top cable box. A bit ambitious, yes.

The games, like PS 4, look stunning.  Fluid motion, realistic water and fire (something that is difficult to do) and consistently high frame rates. But, with all of the goodness, come the badness…

The console requires that it be online at least once a day (in and of itself, not much of an issue since you will likely have it connected to your home network anyway) and the there are a ton of restrictions on games once you acquire them: can only be given away once, publishers get to decide if the games can be resold, etc. Rather draconian. And, then there is the price: equally monstrous at $499. And, with these two downsides (price, game restrictions) I think it likely that Microsoft just handy Sony the ‘win’ for the next gen consoles.

As much as it may pain me to say it, I’m thinking I might be inclined to get a PS 4 long before an XBOX ONE…if at all.

Call of Duty Elite: rip off or massive deal? Depends

Activision. A great name in gaming. An early ‘third party’ game developer, Activision developed an entire genre…the platformer…with Pitfall!. Indeed, this company pioneered or popularized many different genre’s and games.  It’s most successful, though, is Call of Duty.

Call of Duty has endured and, through time, has had many great and not so great games.  Recent editions, however, have sort of staled. Oh, there are minor differences and a few enhancements in the last two games.  Unfortunately, Activision didn’t actually develop them. It’s subsidiary Infinity Ward did Modern Warfare, Modern Warfare 2 and parts of Modern Warfare 3.  Black Ops was done, mostly, by Treyarch. Try as you may, though, the games suffer from a sameness that Activision seems to want to acknowledge and set right.

The answer is Elite.  Elite is a service that started with MW3 that provides, among other things, enhanced stat tracking, and the ability to look at said stats from a multitude of devices.  Elite has a free and a paid version.  The paid version, which costs fifty dollars (US) give additional perks like clan management and a ‘season of exclusive downloadable content’ such as map packs. They promise nine months of the DLC.  Elite members get the DLC weeks or months before ‘normal’ users.  Most map packs are in the $15 range and they said three to four such packs would be released, so $50 seems like a good deal. Right?

Not so fast.

If only one person in your household plays the game, then, yes, awesome deal. BUUUUT…..

If, like me, you have two more people (or more) in your household who also like the game, well, you best be ponying up Fifty bucks per person because those map packs ONLY work with paid memberships. Yep. They are not CONSOLE oriented like the other map packs, no, they are PER USER.

I made the mistake of purchasing Elite, thinking that the new maps that came out a few days ago, would be made available for all users.  I remember reading that early on. They would be CONSOLE tied, not user tied. Well, guess what? They are tied to the USER.

Of course, I was not going to spend another $100 in addition to the $50 I had paid for Elite and the $60 that the game cost.  $210 is quite a bit of money for a shoot them up game. Hell, it is a lot for any game.

So, unhappy with the situation, I attempted to contact Activision. I found NO phone number on their web site and, seemingly, no other good way to contact them.  I finally found a support page on FACEBOOK!  So, I posted my complaint and, surprisingly, got a response fairly quickly.  I was told that  I would need to contact MICROSOFT for a refund since I bought Elite from XBOX Live Marketplace. 

Well, calling Microsoft would have meant a forty five minute wait on the phone but I could get help immediately if I used the online chat. So, I did.  I got some dude named ‘Marc’.  He was very helpful and, in fact, did refund the full fifty dollars plus gave me a one month XBOX Live Gold Membership. He apologized for the inconvenience and that was that. 

Not so quite, though. Back on Facebook, the Activision rep responded again and was sort of sympathetic. They said that Activision was aware of my situation (I’m guessing they got LOTS of complaints) and were going to address it. Not only that, my complaint was being forwarded to the appropriate departments.  So, maybe they will offer a ‘family’ membership option. As long as it is reasonably priced, I would probably buy it.  Reasonable being up to twenty dollars more. 

At any rate, be sure you know exactly what you are getting into before purchasing such memberships.

And, Activision? You won’t have my loyalty again unless you fix this.  I used to think you all were the best. No longer.  You aren’t any better than EA.

Digg This

Retro-Gaming: Emerson Arcadia

This week is the Consumer Electronics Show in Las Vegas. The latest in consumer technology will be displayed.  Numerous televisions, computers, MP3 players, Blu-Ray disc players, automobile accessories, you name it, they will be displayed.  Microsoft gave its last (for now) keynote address in which they showed off the latest version of Windows, Windows Phone and, of course, XBOX.

Arcadia boxXBOX represents the current state of home video games.  It has innovative controllers like Kinect and high resolution graphics. It is the penultimate gaming console for this generation.  Now, let’s rewind some thirty years and take a look at gaming in the early 1980’s, specifically, the Emerson Arcadia.

Emerson Arcadia?  I bet you’ve not heard of that one. Well, that’s OK.  Most people probably won’t either. 

Emerson has long been a brand in the United States.  For quite some time, in fact, it was as ubiquitous as General Electric or RCA.  Your parents or relatives may recall watching Emerson TV’s or listening to an Emerson console radio.

Well, during the early 80’s, video games were hot.  The management at the company decide that it, too, needed a console. They wanted to compete with Atari, who was still cashing in on the VCS, THE console to have at the time. Arcade games were all the rage and Atari was cashing in with home versions of those games.  Emerson saw a huge market.  The Arcadia would be more powerful than the Atari and, at least on paper, on par or a little better than Atari’s competition, the Intellivision.

So, in 1982, the Arcadia hit the market.  To build up the library of games, and hoping to cash in on the arcade phenomenon, Emerson brought out copies of hit games. Problem was, most were not licensed and licensing the arcade games for home use was becoming a lucrative deal.  Companies began to sue and win.  The most famous such case was against Magnavox and the KC Munchkin game.  KC was an Odyssey 2 game based loosely on Pac-Man, THE hottest game at the time. Fearing the lawsuits, Emerson exec’s panicked and many of the clones were either reworked or cancelled. As a result, Arcadia had few games at launch that anyone would recognize.  The system was cancelled almost as soon as it was released. It hit clearance bins almost immediately.  Couple that with the release of the Colecovision, which featured arcade quality graphics and sound, and you can see that Arcadia was obsolete before it got going.

Arcadia failed right away and Emerson withdrew from the market.  I cannot say that had they stuck with it, we might be playing EmersonStations today, but I think the system COULD have found a following. It wasn’t all that bad and was superior to the VCS.  It more closely resembled the Intellivision. It’s graphical ability was similar and the controllers were near copies except they had little screw on joysticks for the controller discs.

Cattrax The games for the system were mostly re-worked clones, of which a few are standouts like CatTrax, a Pac-Man like game. There were a few actual licensed titles like Jungler, but those were games that were not nearly as popular (and probably why Emerson could license them, they were probably cheap to license.)  In fact CatTrax and two other games were ported to the Atari VCS and were moderately successful on that system (probably more so than on the console for which they were developed.) I have played CatTrax and love the game.

I don’t know how collectable the Arcadia really is, I’ve not yet been able to acquire one, though I would love to so.  I have played around with the games via emulation and they are mostly mediocre, but the CatTrax game is clever and fun. 

Arcadia 2001 gamesComparing this console to something like the XBOX or the Wii is not fair to either system. But, there is something to be said about the rather simple nature of the Arcadia (and, indeed, most of the games from that time) games. I may be addicted to Call of Duty, but I get just as big a kick from CatTrax.  Emerson is no longer a household name (nor a standalone company for that matter) and their only true contribution to video games is a console that went straight to the bargain bin yet there is that question ‘what if’. What if they had done things right? What if they had not out and out lied about the abilities of the system (claiming it had 28K memory when it like 2k) or what if they had more hit games to sell the system.  What if…

As was the case with the Magnavox Odyssey 2, this system was sold overseas and actually did fairly well in some areas, though it still did not have a long life.  The system was sold with strange design changes and, worse, the cartridges were not always electrically compatible with the US counterpart. I guess that just confirms most people’s opinion of the console: Odd. It was an odd console. It was odd for Emerson to put so much effort into the product, only to pretty much abandon it at launch.  Very odd, indeed.

Digg This

Pioneers: Ralph Baer and Odyssey

270px-Magnavox-Odyssey-Console-SetDuring the gift giving season known as Christmas, video games will be one of the most given gifts.  Today’s game console, such as the Nintendo Wii and Microsoft XBOX 360, owe their existence not to Atari or Nolan Bushnell, but to Ralph Baer and something called the Brown Box.

The humble beginnings of the home video game market actually go further back than Baer, but for our purposes, we will ignore Higginbotham’s ‘Tennis for Two’ as it was just a computer demo, on an oscilloscope and never commercialized. As Baer was actually able to see his creation hit the market, his will be considered the first home video game console.

Shot in 1968, Baer and associate are playing with the Brown Box.

Baer, an engineer for Sanders Associates, came up with the idea for a video game device in the mid 1960’s and built several prototypes beginning in 1966.  Sanders was a defense electronics company and had no interest in manufacturing the game, but allowed Baer to continue working on the device with the hopes of licensing the technology to a proper consumer company. 

Many companies were pitched the idea and Magnavox had the foresight to take out a license and actually market the device.

The Brown Box, the codename for the prototype, was primitive by today’s standards.  It consisted of discreet parts, no microprocessors (none were available at the time of the prototype development) so it was built of transistor technology. It employed several ‘spot’ generators which created two ‘players’, a ball and vertical or horizontal lines. The controllers allowed for vertical, horizontal and ‘english’, which applied a curve to the path the ‘ball’ would take. It had a ‘fire’ button as well. The prototypes were capable of color and sound, but the final product was monochrome and sound was absent. Baer proposed adding sound a year later, but the idea was rejected.

The game cards were really jumper boards that configured which spots were to appear and where.  There were twelve initial cards that could be used to play hockey, baseball, football, roulette, etc.  The ‘graphics’ for each game were really just plastic overlays in two sizes for the most common television screen sizes. They clung to the CRT screens via static electricity. It was a clever, but cheesy solution.  Packed in the console were playing cards, chips, the game cards, and various other accessories that were needed to play the game. In effect, the package was more traditional board game play with the television aspect thrown in.  The only game to actually resemble what it was, was the ‘ping pong’ game on card 1. 

Higginbotham’s Tennis for Two demo

Baer’s services  were called upon time and again to fix issues with Odyssey, Magnavox’s product name for the device.  Since Magnavox was a licensee, it was in Sander’s best interest to guard the patents and make sure that no one used the ideas without paying.  Unfortunately, other companies would try.  The most notable, at least early on, was Atari.

The story goes that Nolan Bushnell had attended a demo of the Odyssey and signed the guestbook.  When Atari introduced its Pong home console in 1974, they were sued. Baer trotted out his notes, patents and, most importantly, that guest book with Bushnell’s signature.  Atari settled out of court and got one of the most lucrative deals: perpetual rights to the home console for little money.  More important, for Sanders, was the precedent: they never lost a case.  I suppose one could argue that consoles like the Fairchild Channel F and the Atari VCS did not violate the patent since they were microprocessor based.  I don’t believe anyone did, though.

Baer went on to serve as consultant for Magnavox on the follow up Odyssey II, which was microprocessor based. In between, there were numerous ‘Odyssey’ labeled devices, but they were all variations on Pong and used a generic chip that was popular at the time.  Baer also invented the popular Simon game and other handheld games, but his contribution to video games is what he is best known for and deservedly so. 

Nolan Bushnell tends to get the credit for the home video game and not Baer.  Bushnell’s contributions were, no doubt, important-arguably there would be no market without him, but it was Baer who started it.

Odyssey was never a huge seller for Magnavox, though it was not a failure either. Magnavox sold the console only through its dealers, who knew nothing about how to market the device and Magnavox further muddied the waters by only demoing the console on Magnavox televisions, giving the image that one needed to own a Magnavox television in order to use the device.  And the accessory gun and games were almost never displayed along with the console, so they did not sell well at all.

I was lucky enough to own the console and the rifle.  It provided hours of fun back in the late 1970’s and led to an Odyssey 2 a few years later. I was a huge Magnavox fan and was delighted to find out, years later, that my Odyssey was a piece of history. Unfortunately, it did not survive one of my moves and has long since disappeared. (I did manage to score an Odyssey 2 last year via eBay.)

There were many pioneers who got the home video game market going, like Baer, Bushnell, Al Alcorn and others.  (And, no, again, Willy Higginbotham does not count.) Each one made significant contributions but it was Baer who got his ideas turned into an actual product for the home and, thus, the home video game came of age.

Digg This