Jump to content
IGNORED

BASIC 10 Liner Contest 2022


vitoco

Recommended Posts

From the BASIC tenliners contest's home page

 

Quote

11th Edition of BASIC 10 Liner Contest

 

Legal systems:

All 8-bit computer systems

 

Authorized BASIC dialects:

All line orientated BASIC dialects are allowed with a restriction in the category "PUR-80"

 

Since the jurors do not have the original hardware of all approved systems available, all systems must have an available emulator. The authors must provide a recommendation for an emulator and briefly describe how to start the game. Additionally, they must include a screenshot in jpg or png format or an animated screenshot in gif format.

 

Category "PUR-80":
Program a game in 10 lines (max 80 characters per logical line, abbreviations are allowed).
Attention: In this category, only factory built-in BASIC variants are allowed
 
Category "PUR-120":
Program a game in 10 lines (max 120 characters per logical line, abbreviations are allowed)
 
Category "EXTREME-256":
Program a game in 10 lines (max 256 characters per logical line, abbreviations are allowed)

 

Category "SCHAU":

Code a program in 10 lines (max 256 characters per logical line, abbreviations are allowed)

The program can be a demo, a tool or an application program

 

Further rules for the aforementioned categories:
 
1. Loading of data or program parts from mass storage is not allowed
 
2. The 10 lines must not contain any machine programs

 

3. Programs may be compiled (source must still be submitted)
 
4. All code must be visible in the listing: self-modifying code or hidden initializations are not allowed

 
5. POKEs are allowed

 
6. Deadline for submissions: Saturday, March 26, 2022, 6 p.m. CET

 
7. Award ceremony: Saturday, April 9, 2022 at NOMAM

 
8a. Voting by a panel of judges

 

8b. "Public's Choice" special award. Give hearts to your favorites on BASIC 10Liners twitter account @Basic10L

 

9. The program must be submitted on a disk or tape image appropriate for the system

 

10. The program must be listable (The LIST command must produce a readable program listing)

 
11. Include the following in a ZIP file with your submission:  The program (on disk or tape image file); a text file with the program description and instructions; a short description of how to start the game via emulator;  a screenshot in jpg or png format (or an animated screenshot in gif format); a program listing, proving that the program does not have more characters than allowed in the category. 
 
12. For program descriptions and code explanations there can be up to 0.5 bonus points in the rating
 
13. The contest entrants agree to a publication of the programs, the descriptions and the instructions by the organizer
 
14. Send to GKANOLD-at-BASIC10LINER dot COM, receive a confirmation per E-Mail or in the 10Liner Forum

There is a change in the presentation. A detailed overview of the submitted programs can be found at bunsen.itch.io. The information is presented in a reduced form on the homepage. Every programmer can choose whether the program is published immediately or only after the deadline

 

Submitted programs that do not comply with the rules are summarized in the "WILD" category.

 

Ready, set, go!!!!

 

Edited by vitoco
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

It's rather unfortunate I've been working on a game for the PUR-80 category and have stripped all formatting down to the user defined graphics and it's still 12 lines long! ? If I remove those graphics the game won't be recognisable, there maybe another way, though it always seems my games do too much for that category.

Link to comment
Share on other sites

1 hour ago, AMSDOS said:

It's rather unfortunate I've been working on a game for the PUR-80 category and have stripped all formatting down to the user defined graphics and it's still 12 lines long! ? If I remove those graphics the game won't be recognisable, there maybe another way, though it always seems my games do too much for that category.

I hear you brother! 

 

  • Like 1
Link to comment
Share on other sites

I had a bit of a daft idea last night.

 

What if I wrote an interpreter in FastBASIC for a very simple language, let's say 16 commands covering load&store basic loops and branches - essential a cut down version of assembler.  I could then write a program in this language and compress it into data.

 

My 10liner would consist of data, a decompression routine, and the interpreter.  Assuming I could write the interpreter short enough, I could get a much more complex program running due to space efficiency of the language and compression - although speed would take a massive hit.


This may break the spirit of the competition but would it break rule 4?

Quote

4. All code must be visible in the listing: self-modifying code or hidden initializations are not allowed


I'm not even sure if this is viable, and even if it is, I won't be doing it this year.  Just a little flight of fancy I had while fallng asleep last night.
 

Link to comment
Share on other sites

It wouldn't be the 1st time I've seen a Language been written with BASIC.

 

I started writing my own Language in 2020 in BASIC and ROM Library with the thought of creating 10 Liner type games which need speed. 

The Language itself is a prompt with no means of Editing line numbers since lines are not stored only converted to Machine code, which would leave me create something to type in lines or read something from a file. 

I don't know if it would qualify for the Contest, although this year announced the use of Compilers, the language would have to demonstrate the use of taking a Source Code File and then doing something with it, perhaps for something that's short and fits within 10-Lines, perhaps making it a specific routine that's useful from a Machine Code perspective?

  • Like 1
Link to comment
Share on other sites

5 hours ago, Preppie said:

What if I wrote an interpreter in FastBASIC for a very simple language, let's say 16 commands covering load&store basic loops and branches - essential a cut down version of assembler.  I could then write a program in this language and compress it into data.

 

My 10liner would consist of data, a decompression routine, and the interpreter.  Assuming I could write the interpreter short enough, I could get a much more complex program running due to space efficiency of the language and compression - although speed would take a massive hit.


This may break the spirit of the competition but would it break rule 4?

Quote

4. All code must be visible in the listing: self-modifying code or hidden initializations are not allowed

 

Since the first year I'm here, some of my games include routines to unpack initialization data. The routines are not hidden, and the packed data is just that, data: pointers to system registers and values, screen coordinates to draw images, bitmaps, etc, but not code. The unpacking routine and the data together usually are shorter (use less bytes of source code) that a series of POKE, PLOT, DRAWTO or POSITION, but also slower. This kind of routines can be reviewed in my "Where's my cheese?", "Space Ranger", "Defensor", "Mini Bros", "Repeat after Simona" and "The Children". The contents of the data and their format is also explained in their pages.

 

Then, could you also use data for flow control? I guess so. It won't break rule 4 if data contents is also documented, and the routine to interpret that data is still BASIC. But speed will be an issue... unless you compile it as per new rule 3:

On 2/5/2022 at 4:20 PM, vitoco said:

3. Programs may be compiled (source must still be submitted)

... which leads to my following posts...

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, AMSDOS said:

It wouldn't be the 1st time I've seen a Language been written with BASIC.

 

I started writing my own Language in 2020 in BASIC and ROM Library with the thought of creating 10 Liner type games which need speed. 

The Language itself is a prompt with no means of Editing line numbers since lines are not stored only converted to Machine code, which would leave me create something to type in lines or read something from a file. 

I don't know if it would qualify for the Contest, although this year announced the use of Compilers, the language would have to demonstrate the use of taking a Source Code File and then doing something with it, perhaps for something that's short and fits within 10-Lines, perhaps making it a specific routine that's useful from a Machine Code perspective?

FastBasic's history is somehow like that: a BASIC parser and interpreter that converts its source file in a set of tokens like in Atari BASIC, but using integers instead of floating point (BCD) for speed, with some instructions and functions to simplify and speed up actions (like in TurboBasic XL, such as MOVE and DPOKE), and a better way to write shorter code, and all of that was with a target in mind: tenliners.

 

FastBasic can be extended to add complex routines into a single instruction, for example UNPACK to uncompress LZ or similar data. Could that be "legal" for the contest? Of course not... unless it is included in an official and stable release of the language. P/M graphics instructions to simplify the setup (saving source code space) and DLI management from the latest versions are features that really help to develope high quality tenliners.

 

BTW, the FastBasic editor that runs in the Atari was also written in FastBasic!!! From there, you can edit, save, load, parse and run your source code. @dmsc is a genious!

  • Like 2
Link to comment
Share on other sites

Thinking about Rule 3 as both @Preppie and @AMSDOS talked about compilers:

On 2/5/2022 at 4:20 PM, vitoco said:

3. Programs may be compiled (source must still be submitted)

 

Does this mean that I could use MMG Basic Compiler over an Atari BASIC entry for the PUR-80 category? That could solve the speed issue, but there still be the problem of the lack of coding space, as you need to use lots of sentences for string and array initialization, MOVE, DPOKE and DPEEK essential statements and function.

 

To solve this space issue, could I write my own parser to pick a standard Atari BASIC source file and convert it to TurboBasic XL and then process it with TurboBasic compiler/linker to get the executable? You might say that it won't gain nothing as TurboBasic XL already runs Atari BASIC programs, but faster, and the coding space would be the same. Well, what if my parser do some statement/function conversions before giving them to the compiler? For instance, let SETCOLOR mean MOVE, INPUT mean DPOKE, LOG() mean DPEEK() and so on. Will the source code of my program be listed by LIST (Rule 10)? Yes. Will it run in Atari BASIC? It will probably fail with ERROR 3 on some statements or behave in an unexpected way if not.

 

Will any of this ideas be a "legal" solution to the Atari restrictions we have for the PUR-80 category?

 

I can think about some other "exploits" for Rule 3.

 

@Bunsen?

 

Anyway, I'm shocked with @Preppie's entry. I got an idea of something similar, but I'll give up as I don't want to have similar entries, worst if they are for the same category.

 

  • Like 1
Link to comment
Share on other sites

TBH I'm not certain how rule 3 and rule 10 are compatable with each other, unless there were complaints about FastBASIC not being a truely interpreted language and this rule was put in to stop complaints.

 

Given that PUR-80 is for factory built-in BASIC my gut says no messing around and just code it and run it as normal.

 

17 minutes ago, vitoco said:

 

Anyway, I'm shocked with @Preppie's entry.

 

 

Assuming that's a good form of shocked, thanks :)

 

 

  • Like 1
Link to comment
Share on other sites

Re:Compression, I think if you have the tools, anyone would have no choice but to take advantage of it. Is it hidden? Not really because it's all within the code, the algorithm simply extracts it back into what it needs to be. Compression would cross the line if the 1st line read 'Decode' followed by 9 lines of Gibberish and submitted to the contest and once that 10-liner is Decoded it's no long a 10-Liner.

 

Some of my earlier 10-Liners deal with some form of Compression to produce something which wouldn't seem to be possible normally to do in 10 Lines. The only compression I haven't used, but have examples of is UUEncoded, though I've only used it within Machine Code, I don't see why it couldn't be used as room data or data for a maze.

 

Re:PUR-80 Category, I knocked up something yesterday afternoon, I kinda felt like it's the sort of category where you put what you need in and then your left with one last thing to do, add a nastie to the game and by then you've got a PUR-80 game on your system. Any elaborate ideas need to be thrown out the window because it won't fit. Having said all that, I may get something in which is along the lines of you finding the exit before the Following Love Heart catches you, though I don't see it being anywhere as good as @Preppie's.

 

Edited by AMSDOS
  • Like 1
Link to comment
Share on other sites

Ok, so I played around with the idea this morning.  The way I was thinking about it, the interpreter would be way too big to give a significant improvement to the size of a program - certainly not enough to componsate for the reduction in speed.  Maybe it could be made to work with more thought, but I don't have time atm as I need to actualy write something that I know will work for the extrem-256

 

Link to comment
Share on other sites

18 hours ago, Preppie said:

Assuming that's a good form of shocked, thanks :)

No, it's not in a good form... I'm really frustrated because I haven't been able to make a good game in that category since the Atari BASIC restriction. The one I was working on is not as good as yours!!!! I can now feel what you felt last year after I submited Patrol :lol:

 

5 hours ago, AMSDOS said:

Any elaborate ideas need to be thrown out the window because it won't fit.

That's why there are two versions of the "pill" game in last year's contest. Even on some EXTREM-256 games I had to discard some features to fit.

 

5 hours ago, AMSDOS said:

Compression would cross the line if the 1st line read 'Decode' followed by 9 lines of Gibberish and submitted to the contest and once that 10-liner is Decoded it's no long a 10-Liner.

In my opinion, compression would cross the line if it decompress runable code. Some of my games start decompressing predefined screens or sprites into RAM, then the game just show those screens in the propper sequence as game goes, like in both of my Simona games.

 

5 hours ago, AMSDOS said:

The only compression I haven't used, but have examples of is UUEncoded

Well, UUEncede is not a compression method but a way to send byte streams through a channel with less than 8 bits-per-byte, so data actually increases in length.

 

Fortunately, BASIC listings in the Atari allow to store the binary data as it is in strings, except for two exceptions: the EOL character (ATASCII 155 or $9B) and the doublequote (") itself. Both TurboBasic XL and FastBasic allow to use a double doublequote inside a string as an escape method.

 

The compression method to use depends on the data you want to store. Usually, the most simple method is RLE (Run Length Encoding), where you store a sequence of data and a repetition count for that data. The way you can store that list of tuples depend of what you want to pack. If it's a B&W image, you could only save the pixel counts, as you know that the next count is for the other color. For 4 color images, you can use 2 bits for the color and 6 bits for the count, using only one byte for both parts. If you need more that 64 pixels of the same color, just add another byte with the same 2 bits and the remaining count in the other 6 bits. If data are tiles, you can use 3 or 4 bits for the tile number and the remaining bits for the count.

 

In my The Children game, I used a complex method, where I mixed RLE and LZ type of compression algorithms. LZ algorithms use dictionary and/or repetition of previous data. Of course, I used a lot of time analyzing the best compression algorithm for the game puzzles, and I also analyzed how the puzzle design affected each algorithm. I could write a very simple decompression algorithm in BASIC and modify some puzzles to save few bytes in each, in order to add more puzzles!!! Of course, I had to write a compression tool for the puzzles. The puzzle size was 160 bytes, and I could store 20 puzzles in just 757 bytes instead of 3200 (24%). The description of this algorithm is in The Childen's page.

 

  • Like 2
Link to comment
Share on other sites

8 minutes ago, vitoco said:

I can now feel what you felt last year after I submited Patrol :lol:

 

And then you went and submited 'The Children', a genuinely good game regardless of code size.  If that had been released in the 80s by Mastertronics for £1.99 and have been a happy teen :) far better than some of the stuff they released.

 

Ok, that's enough patting each other on the back lol

 

  • Haha 2
Link to comment
Share on other sites

5 hours ago, Preppie said:

And then you went and submited 'The Children', a genuinely good game regardless of code size.  If that had been released in the 80s by Mastertronics for £1.99 and have been a happy teen :) far better than some of the stuff they released.

 

Ok, that's enough patting each other on the back lol

 

 

If you like "The Children", take a look at "Johnny the Ghost"... 

  • Like 1
Link to comment
Share on other sites

18 hours ago, vitoco said:

That's why there are two versions of the "pill" game in last year's contest. Even on some EXTREM-256 games I had to discard some features to fit.

I just meant I normally have a simple idea for a game, though if there's too much happening in a game, it becomes PUR-120 or EXTREM-256.

With the PUR-80 category, I feel like I'm in straight jacket and have to scrap any idea to just write the bare and see what I can do from that. 

 

Quote

Well, UUEncede is not a compression method but a way to send byte streams through a channel with less than 8 bits-per-byte, so data actually increases in length.

Yes I agree, UUEncode isn't Compression. I only mentioned it because of the compact state of the Data when compared with numeric values (Hex or Decimal). In small quantites, numeric values would have an advantage because reading UUEncode and Decoding is more involved than reading numeric values to memory. 

Edited by AMSDOS
Link to comment
Share on other sites

  • 2 weeks later...
4 hours ago, Preppie said:

I'm still playing around with ideas for extreme-256, can't seem to settle on one atm.

What about "Advanced Zombie Apocalypse" in FastBasic? :-D

 

Out of jokes, I'm also stuck, out of fresh ideas. I'm about to submit a port of 1nvader I wrote some months ago, but I have nothing new.

 

 

Link to comment
Share on other sites

11 hours ago, Preppie said:

4 weeks to get your entry in.

They'll probably all start gushing in towards that deadline.

 

All I have is some entry which is a simplified form of the Zombie Simulator. I think it can fit in the PUR-80, though uses the same formula from Zombie Simulator:

 

r=(a<b)-(a>b)

 

to produce a following effect. I have an alternative method which produces the same result, though it's simply too long because of it being a series of IF statements to shift the directional variable. So I've been trying to find an alternative (even if it's a few more keystrokes), though it doesn't seem to be one. ?

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...