Jump to content
slx

BASIC Ten-Liners are back for 2018!

Recommended Posts

I finally sent my pixeled version of Defender:

 

Defensor

 

DEFENSOR.PNG

 

https://youtu.be/SNsqI7rie50

 

This is my second game written in FastBasic, which was enhanced to support this game... :-D - Thanks dmsc!

 

It is also a EXTREM-256 entry.

 

 

 

Defensor looks awesome vitoco! Very cool you fit the radar in! :)
The contest reminds me of books like 101 BASIC Games from 1973:
The book even has the same spec:
This book is the only collection [of BASIC games] that contains both a complete listing and a sample run of each game along with a descriptive write-up.
These amazing contest entries could make an excellent educational book like that with screenshots on the cover showing incredible BASIC games that can be written in 10 lines; these programs are small enough that people can learn to program from typing them in without the time investment of long listings that Programming books (and magazines) typically have.

post-30777-0-23252000-1522002595.jpg

  • Like 6

Share this post


Link to post
Share on other sites

Thank you for the compliments...

 

These amazing contest entries could make an excellent educational book like that with screenshots on the cover showing incredible BASIC games that can be written in 10 lines; these programs are small enough that people can learn to program from typing them in without the time investment of long listings that Programming books (and magazines) typically have.

 

At least with my games, I'm not sure that they could be used for educartional purposes for many reasons:

 

  • They seem to be 10 lines long, but they don't! Defensor actually has 220 statements packed to fit in those 10 lines. That's an average of 22 statements per phisical line!
  • There are many, many, many optimizations to reduce the number of statements, so some things got mixed together, obfuscating the code.
  • To fit the 10 lines, some statements are not placed in the "logical" order. Sometimes, part of the code has to be moved somewhere else to get the most from the max allowed length of a line.
  • They are tied to the hardware. Without knowing the hardware, you cannot say which is the effect of a single POKE.

Anyway, all of my games have a description page with an explanation of what a statement or group of them does (*). Most of the times, it took me more time to write the docs than to code the corresponding program. Sometimes, I've found some bugs while I'm trying to explain the sources, and I had to update the game.

 

I've read some BASIC listings for C64, MSX and even 2600 for these contests, and sometimes I didn't understand the reason of the code or how something worked. There are many common statements in their syntax, but when graphics animations are the backbone of a game, it does not matter if the BASIC dialect has string functions or structured programming elements. Each machine has its own way to do things.

 

(*) The description pages for my 2018 entries won't have the source code listing until the end of the NOMAM event. Bunsen has the full docs anyway.

 

  • Like 3

Share this post


Link to post
Share on other sites

Thank you for the compliments...

 

 

At least with my games, I'm not sure that they could be used for educartional purposes for many reasons:

 

  • They seem to be 10 lines long, but they don't! Defensor actually has 220 statements packed to fit in those 10 lines. That's an average of 22 statements per phisical line!
  • There are many, many, many optimizations to reduce the number of statements, so some things got mixed together, obfuscating the code.
  • To fit the 10 lines, some statements are not placed in the "logical" order. Sometimes, part of the code has to be moved somewhere else to get the most from the max allowed length of a line.
  • They are tied to the hardware. Without knowing the hardware, you cannot say which is the effect of a single POKE.

Anyway, all of my games have a description page with an explanation of what a statement or group of them does (*). Most of the times, it took me more time to write the docs than to code the corresponding program. Sometimes, I've found some bugs while I'm trying to explain the sources, and I had to update the game.

 

I've read some BASIC listings for C64, MSX and even 2600 for these contests, and sometimes I didn't understand the reason of the code or how something worked. There are many common statements in their syntax, but when graphics animations are the backbone of a game, it does not matter if the BASIC dialect has string functions or structured programming elements. Each machine has its own way to do things.

 

(*) The description pages for my 2018 entries won't have the source code listing until the end of the NOMAM event. Bunsen has the full docs anyway.

 

 

All excellent points, agree BASIC listings become obfuscated by the compression techniques and poked memory addresses.

I put an emphasis on learning from the BASIC listing for GATES by using whitespace to increase readability and avoiding poking memory addresses in favor of using friendly names for the graphics registers and space consuming BASIC constants like the verbose scrollvirtualworldtoggle.
Doing Defender in 10 lines understandably benefits from as many compression and obfuscation techniques as could be applied for being such an ambitious project, but I think it is still very educational coupled with your write-up analysis of the code. And motivational for students to learn for being Defender :)
  • Like 1

Share this post


Link to post
Share on other sites

I entered a late EXTREM-256 post of Sky Diver, inspired by/copied from the VCS. I remember playing this on my friend's VCS as a teenager.

 

Looking at the other posts here it will need some enhancements (like sound) for V.2.0 if it doesn't get accepted this year :-o. I did start early this year but still ran out of time at the end.

 

post-4219-0-30555700-1522042464_thumb.jpeg

SkyDiverSD.atr

 

I did not use machine language but needed Turbo BASIC XL to have a MOVE function for the player vertical movement as well as the necessary speed to handle two players. It's a pity Turbo BASIC XL doesn't have true functions as that would really benefit two-player games. I first tried this in pure character graphics like Bill Kendrick's 1990s version but soon switched to P/M graphics for smoother animation.

 

I do agree that the 10-line requirement does not really benefit readability. With one statement per line the program has 105 lines. A commented version is included although my code is not particularly inspired.

 

  • Like 9

Share this post


Link to post
Share on other sites

Every year, I am consistently impressed by the out-put of our intrepid band of coders, across various plat-forms, endeavoring to find the inspiration to code something usable and ... fun, out of the wee-small bits. Somehow, given a common barrier, it winds up being as or more cooperative, knowledge and "tricks"pooled, as it is competitive. Kudos everyone. :)

  • Like 4

Share this post


Link to post
Share on other sites

 

 

The book even has the same spec:
This book is the only collection [of BASIC games] that contains both a complete listing and a sample run of each game along with a descriptive write-up.
These amazing contest entries could make an excellent educational book like that with screenshots on the cover showing incredible BASIC games that can be written in 10 lines; these programs are small enough that people can learn to program from typing them in without the time investment of long listings that Programming books (and magazines) typically have.

attachicon.gif1001_Things_to_do_with_your_Personal_Computer.JPG

:grin: WIP

  • Like 3

Share this post


Link to post
Share on other sites

It is supposed that no more entries are allowed, so I'll give some stats:

 

Total number of entries: 64

Total number of Atari 8-Bits entries: 17

Total number of Atari 2600 entries: 1

 

Number of different platforms: 13

Number of different BASIC dialects: 13

 

Per category (Atari/Total):

- PUR-80: 4/25

- PUR-120: 7/17

- EXTREM-256: 5/17

- FREI: 0/0

- WILD: 1/5

 

Most used dialects:

- Commodore BASIC V2: 22 (20 C=64 and 2 Vic-20)

- TurboBasic XL 1.5: 11

- Locomotive BASIC 1.0: 9

 

Plattforms with many dialects:

- Atari 8-bit: 3 (Atari BASIC, TurboBasic XL, FastBasic).

 

Number of different authors: 41

 

  • Like 8

Share this post


Link to post
Share on other sites

The irony that what most people think is a horrible BASIC with no support neither for graphics & sound nor any form of structured programming, still is the one with most number of entries. :)

  • Like 1

Share this post


Link to post
Share on other sites

Two ATRs with the ATARI entries (and menu) are available on http://atarionline.pl/v01/index.php?ct=nowinki&ucat=1&subaction=showfull&id=1523136810

 

And attached here.

 

As I´m not familiar with Fast Basic, I´ve put the XEX´s of Defensor and Lapeste on the TurboBasic Disc. You have to load them from DOS. Have fun!

 

Unfortunatelly, I discovered from the screenshot for "Deep Canyon" in that article that I sent an older version of the game to the contest. That screenshot does not match with the YouTube video!

 

The latest version of this game can be downloaded from its page.

Share this post


Link to post
Share on other sites

The irony that what most people think is a horrible BASIC with no support neither for graphics & sound nor any form of structured programming, still is the one with most number of entries. :)

 

You can't argue with 17 million units sold ;) There's simply more of them, so per computer built we Atarians far exceeded the Commodoreans' output...

Share this post


Link to post
Share on other sites

The official contest results are online now!

 

(I am proud to have scored closer to the middle of the field than to the end this year :blush:)

Edited by slx
  • Like 1

Share this post


Link to post
Share on other sites

Two ATRs with the ATARI entries (and menu) are available on http://atarionline.pl/v01/index.php?ct=nowinki&ucat=1&subaction=showfull&id=1523136810

 

And attached here.

 

As I´m not familiar with Fast Basic, I´ve put the XEX´s of Defensor and Lapeste on the TurboBasic Disc. You have to load them from DOS. Have fun!

 

I've put all the games in a single ATR with a simple menu that allows to load any of them, including the FastBasic ones. It must boot with Atari BASIC enabled (without OPTION key), but it swaps to the other BASIC dialects as required.

 

post-20192-0-51060200-1523297400.png

 

The order of the games in the menu is based on their entry number at the contest.

 

I made this ATR to include it in my 10-liners page, but I'm also attaching it here for your convenience.

 

BTW, this ATR has the latest and official version of Deep Canyon.

 

NOMAM2018.atr

  • Like 12

Share this post


Link to post
Share on other sites

The attached zip file includes the code and docs for both of my 10-liner entries for NOMAM 2018.

 

SWITCHBACK (PUR-80) and BOSS INVADER (EXTREM-256)

 

In addition to the 10-line versions of each program, I also included "flattened" versions with only one command per line. The flattened versions are identical from a code standpoint, and fully functional, but much easier to read and understand.

 

The excel files have detailed line-by-line and command-by-command code explanations.

 

I also included the "users instructions" which are in the word doc files.

 

A couple of additional reminders and call-outs...

 

SWITCHBACK is coded in Atari BASIC (which was a requirement for PUR-80 this year). HOWEVER, it is also fully compatible with both Turbo Basic XL and Altirra Basic. That actually "cost me" a precious line of code to enable this compatibility, but I really wanted it to work on all three just for the heck of it! It's fun to see it run really fast in TBXL and Altirra Basic. :grin:

 

An interesting mod, if you run it in TBXL, is to add this at end of line #1 :PAUSE (R<4) This simple mod will make the game play closer to the Atari BASIC speed (slower) during rounds 1-3 but then speed up dramatically for final rounds 4 and 5. This is actually my favorite way to play the game. :thumbsup:

post-38281-0-53327300-1524093993.jpg

 

BOSS INVADER is coded in Turbo Basic XL. Don't forget that you can "wrap" your player around the left and right boundaries of the screen. This is key to getting a high score! :)

post-38281-0-45368100-1524094007_thumb.jpg

 

-Eric

 

 

Henneke10Liners2018.zip

  • Like 7

Share this post


Link to post
Share on other sites

I got my very cool SIO2BT dongle (by Montezuma) as my Basic 10 Liners prize!

 

I still need to get it all set up and working with my Android phone.

post-38281-0-50430600-1525578516_thumb.jpg

 

You can find out more about the SIO2BT here...

http://atariage.com/forums/topic/228860-sio2bt/?p=3055430

and here...

https://www.dropbox.com/s/h7nc00ctmaxkwyy/SIO2BT_new.zip?dl=0

 

 

Oh, and I bought a Basic 10 Liners t-shirt (in the pic) too because I really like the graphics illustration this year. Turned out to be a really nice high-quality t-shirt. This is where I ordered it from...

https://www.teepublic.com/t-shirt/2302550-basic-10-liner-contest

 

-Eric

 

  • Like 7

Share this post


Link to post
Share on other sites

Oh, and I bought a Basic 10 Liners t-shirt (in the pic) too because I really like the graphics illustration this year. Turned out to be a really nice high-quality t-shirt. This is where I ordered it from...

https://www.teepublic.com/t-shirt/2302550-basic-10-liner-contest

 

That shirt looks nice!

 

BTW, a local meetup was carried out yesterday in Santiago, where vhzc (who made that illustration) and I shared a table to show our 8-bit jewels.

  • Like 6

Share this post


Link to post
Share on other sites

 

 

BTW, a local meetup was carried out yesterday in Santiago, where vhzc (who made that illustration) and I shared a table to show our 8-bit jewels.

 

Without you and vhzc BASIC 10Liners would not be what it is :-). I didn't know that you know each other personally.

 

Last year you won the sio2bt, so I had to find a new prize for you: And that's a funny little story. I talked to a guy from Chile if he could design a Logo for the contest. He did that and offered his design at an online shop in the U.S.

I bought a couple of these and got it sent from the U.S.

Then I've sent it to you to Chile. Virtually it traveled twice around the world to reach a neighbor.

  • Like 7

Share this post


Link to post
Share on other sites

Hey! I've just received my prize: a nice contest's logo sticker. As a bonus, the package also included a black t-shirt with the same logo... ;)

 

post-20192-0-86327200-1527172078.jpg

 

Thank you, Bunsen!

 

  • Like 13

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...