Jump to content
VladR

2020 10-Liners: Petition for return of FREI category and compilers

Do you support the inclusion of FREI category in the BASIC 10-Liners Contest  

8 members have voted

  1. 1. Do you support the inclusion of FREI category in the BASIC 10-Liners Contest

    • Yes
      6
    • No
      2
  2. 2. Do you support the inclusion of BASIC Compilers in the BASIC 10-Liners Contest

    • Yes
      6
    • No
      2


Recommended Posts

I would like to serve this topic as a discussion on the BASIC Ten-Liners Contest, especially the two areas:

 

1. Removal of the FREI category this year, which I believe is unreasonable and doesn't help the contest in any way.

 

- Because the FREI category was established the previous year, this year I have been experimenting a lot with what kind of functionality I can fit into 10 lines of hexa code (about 2.2 KB of assembler code)

- I just checked my source code, and I wrote over 5,000 lines (yes, five thousand) of assembler code, figuring out the best compromise between performance&size of the code for each component of the game

- It was very exciting finding out what kind of functionality (some quite surprising and unexpected) can be fit within that limit

- Hence, it was quite frustrating to see the category removed

 

- For as long as there have been magazines with BASIC listings, inlined ASM code was always integral part of the charm of BASIC

- since it doesn't in any way affect the other categories, I really see no reason why it should be removed

- the only thing the removal achieved was two less entries for 2019 from me (and who knows how many other people were in same situation)

 

TLDR: It can open up a new uncharted territory of games possible in 10 lines.

 

 

2. Inclusion of Compilers (as a separate category)

 

- if my understanding of rules is correct, the only BASICs allowed are the ones that have an editor on the target platform (e.g. you must be able to type the program on an actual Atari (or other computer))

- this would rule out the compilers that exist on PC only

 

- because of my recent work on Lynx, 2 weeks ago I have created a PC-based 6502 compiler (by modifying my Jaguar's 68000 & GPU RISC compiler) of a high-level language that resembles C, and feeds into the cc65 linker toolchain

- it would be relatively easy to change the syntax of the language to be BASIC-like

- there would be no Atari-based editor or compiler, as I really see no point in creating yet-another editor.

- this can however bring the increased productivity of PC-based workflow (Notepad++, Photoshop, etc.) and increase the quality of the target application that is otherwise utterly impossible to achieve by purely typing program on a physical HW

 

TLDR: It can further push the boundary of 10-liners due to much higher execution speeds of compiled code and increased work productivity on PC.

 

 

It's important we know about this by the end of November, ideally. Posting a contest announcement thread on January 31 will be definitely too late for me (as I will be busy with Jaguar in Q1, especially around March) and I'm sure others would love to know too, as for us there are only 2 options:

- resume/start the ASM coding for the 10-Liners Contest

- ignore the Contest altogether

 

  • Like 2

Share this post


Link to post
Share on other sites

dirty little secret... even back in the day we used multiple platforms to create for each other...

it would be cool to have a separated category for any editor (even those not on the Atari) to produce compiled code that runs on the Atari.

Share this post


Link to post
Share on other sites

I think 10-liners are a great way to learn and improve your coding, but some people may possibly be put off by the excellent work done by the more experianced programmers.  If there were more advanced categories then maybe the more experianced guys would concentrate on those and the lower categories would be more open to the beginner/intermediate coders.

  • Like 1

Share this post


Link to post
Share on other sites

So FREI was added for 2018, received no entries and was removed for 2019 when there possibly were entries ready?

 

Regarding the requirement to be able to type in programs in the editor, I don't know if that is true. Without going through the limitations of each system, it strikes me that there were three C64 entries in 2019 in the EXTREM-256 category. The built-in BASIC editor limits lines to 80 keystrokes while the parser can handle up to 255 tokens per line, so clearly those entries were generated outside of a C64 environment. Not sure about those FastBasic entries on the Atari 8-bit, as I realize there is a native environment for that dialect. Also Mr SQL entered a game for the 2600 in Atari Flashback BASIC, which most definitely is not a native environment. I'm not familiar with if any of the other languages precompile, but since the rules count number of keystrokes per line rather than number of characters, I suppose one could go by the source code pre compiler.

 

However I realize in the end it is up to the organizer to determine the rules as it is up to them to verify all entries. If you make it too broad, it soon becomes more difficult to judge.

Share this post


Link to post
Share on other sites

seems so, it's normal for a new category to take a year or two in getting entries... it looks like it wasn't given a chance to get rolling...

Share this post


Link to post
Share on other sites

Yeah, about two months between announcement and deadline. I noticed that user AMSDOS had a CPC game in 2018 which contained a ML sprite driver that yet was categorized as EXTREM instead of FREI, whether it was by accident or by decision.

 

After looking closer at Atari Flashback BASIC, it most defintely is compiled to 6502 assembly language and then assembled with Dasm so if that was accepted, I beliieve VladR's compiler - assuming it takes a more or less traditional BASIC syntax - should work too. As a last resort there is always the WILD category where all sorts of programs should be able to go.

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, VladR said:

- because of my recent work on Lynx, 2 weeks ago I have created a PC-based 6502 compiler (by modifying my Jaguar's 68000 & GPU RISC compiler) of a high-level language that resembles C, and feeds into the cc65 linker toolchain

- it would be relatively easy to change the syntax of the language to be BASIC-like

 

A bit off topic but... please, make a BASIC for Lynx!

As written here, very good and fast modern BASICs exist for 2600 and 7800 consoles, Lynx deserves a BASIC too, especially now that many multicarts have been sold.

Share this post


Link to post
Share on other sites

Hi!

4 hours ago, carlsson said:

So FREI was added for 2018, received no entries and was removed for 2019 when there possibly were entries ready?

We joked about with FREI category last year, I think that rules were so flexible that you could send any game as a ten-liner, because you could include hidden code, see at:

 

I think this is why the category was eliminated.

 

4 hours ago, carlsson said:

Regarding the requirement to be able to type in programs in the editor, I don't know if that is true. Without going through the limitations of each system, it strikes me that there were three C64 entries in 2019 in the EXTREM-256 category. The built-in BASIC editor limits lines to 80 keystrokes while the parser can handle up to 255 tokens per line, so clearly those entries were generated outside of a C64 environment. Not sure about those FastBasic entries on the Atari 8-bit, as I realize there is a native environment for that dialect.

One of the motivations for the FastBasic IDE was being able to write ten-liners in the Atari, so they could compete in all categories. But then, rules were changed to only allow BASICs available in ROM in the original computers for the lower categories :P 

 

All entries in FastBasic submitted to the contest compile in the Atari, I specifically fixed a few bugs with long lines to allow that ;) 

 

4 hours ago, carlsson said:

Also Mr SQL entered a game for the 2600 in Atari Flashback BASIC, which most definitely is not a native environment. I'm not familiar with if any of the other languages precompile, but since the rules count number of keystrokes per line rather than number of characters, I suppose one could go by the source code pre compiler.

Also, games in Flashback BASIC did not include the sprites in the 10 lines limit :o 

4 hours ago, carlsson said:

However I realize in the end it is up to the organizer to determine the rules as it is up to them to verify all entries. If you make it too broad, it soon becomes more difficult to judge.

Yes!

 

Have Fun!

 

Share this post


Link to post
Share on other sites
9 hours ago, carlsson said:

So FREI was added for 2018, received no entries and was removed for 2019 when there possibly were entries ready?

 

Regarding the requirement to be able to type in programs in the editor, I don't know if that is true. Without going through the limitations of each system, it strikes me that there were three C64 entries in 2019 in the EXTREM-256 category. The built-in BASIC editor limits lines to 80 keystrokes while the parser can handle up to 255 tokens per line, so clearly those entries were generated outside of a C64 environment. Not sure about those FastBasic entries on the Atari 8-bit, as I realize there is a native environment for that dialect. Also Mr SQL entered a game for the 2600 in Atari Flashback BASIC, which most definitely is not a native environment. I'm not familiar with if any of the other languages precompile, but since the rules count number of keystrokes per line rather than number of characters, I suppose one could go by the source code pre compiler.

 

However I realize in the end it is up to the organizer to determine the rules as it is up to them to verify all entries. If you make it too broad, it soon becomes more difficult to judge.

Interesting, You just gave me an idea:

 

- I can embed a following scripted functionality into each executable:

- show GR.0 with cursor

- show command LIST that will display the BASIC program on screen (then wait 5 seconds)

- show command RUN that will execute the pre-compiled BASIC program (then wait 5 seconds)

 

The above is, like, 0.1% of the effort of creating a full-blown editor and a compiler, however it will create the "feeling" of the platform's BASIC, for the purposes of the competition.

Share this post


Link to post
Share on other sites
9 hours ago, carlsson said:

Yeah, about two months between announcement and deadline. I noticed that user AMSDOS had a CPC game in 2018 which contained a ML sprite driver that yet was categorized as EXTREM instead of FREI, whether it was by accident or by decision.

Well, that's probably because it's Amstrad and not Atari, so it's less known. Besides, the last thing I'd want to do is try to "sneak in" and hope to not go noticed. Way too much work for this.

Especially given the fact that the category was there, just removed after a first year of no entries. I haven't checked - but how much time was there the first year between the announcement of FREI category and deadline ? Also 2 months ? Good luck doing something in that timeframe for first time...

 

9 hours ago, carlsson said:

After looking closer at Atari Flashback BASIC, it most defintely is compiled to 6502 assembly language and then assembled with Dasm so if that was accepted, I beliieve VladR's compiler - assuming it takes a more or less traditional BASIC syntax - should work too. As a last resort there is always the WILD category where all sorts of programs should be able to go.

Isn't Flashback the 2600 platform ? I don't know from the top of my head. But perhaps that particular basic only allows compilation, so it's de-facto standard behavior ?

 

Well, the WILD category is supposed to be for everything else clumped together (programs, demos, intros, etc.), but most importantly it violates the core purpose of the competition - the 10 Lines - as the wild category allows for programs longer than 10 lines, so one might as well supply the 64 KB executable, which defeats the whole purpose in the first place...

 

 

 

 

Share this post


Link to post
Share on other sites
9 hours ago, Philsan said:

A bit off topic but... please, make a BASIC for Lynx!

As written here, very good and fast modern BASICs exist for 2600 and 7800 consoles, Lynx deserves a BASIC too, especially now that many multicarts have been sold.

I wasn't aware Lynx doesn't have BASIC, as I merely looked into the platform for first time few months ago (because of the 30-year anniversary compo), noticed it had a CC65 compiler, which was all I needed so it was good.

 

It strikes me absolutely shocking that there is no BASIC ! That's crazy!

 

 

You know what, few years ago, for a Jaguar, I created a PC-based BASIC translator (called VRBasic) that translates BASIC into C and then feeds it straight into the C compiler toolchain (to get the Jaguar binary).

 

Since we have a C compiler on Lynx, I could literally do the exact same thing. There might be some cosmetic changes, to allow for the syntax of CC65 or other 6502 idiosyncrasies, but in theory, 95% of work (parsing+translation) was already done by me.

 

I was, however, at the time, very keen on "Modern BASIC", so I went with the Microsoft's syntax. Not sure how well would that be received...

 

 

Here's one of the VRBasic samples showing the syntax:

' VRBasic Sample 06 - Screen Drawing
' Sep-2013

Module Globals
	Dim lvlData() As Byte
	Dim ImgWall As Sprite
End Module

	' Draws a specific screen from the loaded map
Sub DrawScreen (ScrCol As Byte, ScrRow As Byte)
	Dim xpos As Integer = 0
	Dim ypos As Integer = 0
	Dim idx As Integer
		' idxOffset is an offset to get to next row in the map. It should be 8* (ScreensPerMapRow-1), e.g. 8 * (2-1) = 8 in our case
	Dim idxOffset As Integer = 8

		' This is our global index into the map array
	idx = (ScrRow*(3*8)*2) + (ScrCol*8)
		' Render 3 Rows
	For row = 0 To 3
			' Render Row of 8 Sprites per column
		For col = 0 To 8
				' Check for 'X' (ASCII:88) and draw the sprite
			If (lvlData(idx)=88) Then ShowImage (ImgWall,xpos,ypos)
			Else ShowBlankImage (ImgWall,xpos,ypos)
			End If
				' Irrespective of the 'X' we move right in the increments of Sprite Width
			xpos = xpos + ImgWall.xl
			idx = idx + 1
		Next
			' Update the xpos,ypos for the next row of sprites
		xpos = 0
		ypos = ypos + ImgWall.yl
			' Move the index into map data at next row
		idx = idx + idxOffset
	Next
End Sub

Sub Main ()
	SetGraphicsMode ()

		' This is our level data in a text format. Each screen is 3 rows by 8 columns, whole level has 2 rows of screens, each row having also 2 screens
		' Base advantage of this format is that one can edit whole map in a Notepad
	LoadTextData (lvlData, "c:\jaguar\_Projects\_VRBasic\src\Samples\ArtAssets\level00.txt")
		' This is our Wall Sprite
	LoadImage (ImgWall,"c:\jaguar\_Projects\_VRBasic\src\Samples\ArtAssets\TileA2_16_Colors_Palette.gif",8)
		' Push the palette colors at index 1 (for example)
	CopyPalette (1,ImgWall)
		' Update the Image data
	OffsetImage (1,ImgWall)

		' Render all screens, one after another
	For ScrRow = 0 To 2
		For ScrCol = 0 To 2
			DrawScreen (ScrCol,ScrRow)
		Next
	Next

	Wait (5000)
End Sub

Obviously, the execution speed of that code is directly dependant on the quality of the C compiler, but I definitely noticed that cc65 produces much faster code than the jaguar's C compiler. Also, once you examine the cc65 output, it's entirely possible to write a CC65-efficient C code that will translate to almost perfect ASM (which is entirely impossible on jaguar as any C code there is just awful in ASM).

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, VladR said:

Isn't Flashback the 2600 platform ? [..] But perhaps that particular basic only allows compilation, so it's de-facto standard behavior ?

Yes, it is the Atari 2600. Since it has no built-in programming language at all, I don't know what should be considered de-facto standard but in any case the Atari Lynx falls in the same category. I'm unsure if the XEGS can be claimed to lack a BASIC environment thus requiring a compiled solution but the 5200 & 7800 for sure also have to take that approach if they wanted to enter this competition.

 

Another approach of course is to host your own challenge. I've noticed the people over at the TI-99/4(A) section, which so far has not been represented in the main 10Liners compo, during this year ran their own compo and may be ready for the main one next year, at least in PUR-120 and EXTREM-256 categories as the built-in TI BASIC only allows one statement per line which makes very simple games. The cartridge based TI Extended BASIC is better in this regard, plus that they have modern replacements as well.

Share this post


Link to post
Share on other sites

If Flashback is for 2600, then it obviously cannot have a built-in one, as it's not a computer like Atari 800.

 

But, you just mentioned XEGS and 7800. I totally have not considered those, yet because they're not computers, they, by default, require compiled code :) 

 

Did anybody submit anything for those, ever ? I checked last 2 years of entries, and nothing. Then again, it's not an 8-bit computer, so perhaps that's the reason nobody tried.

Share this post


Link to post
Share on other sites

No, I think it was a novel approach to even submit something for the 2600, whether it was written in Flashback BASIC or Batari BASIC.

 

As far as I can tell, 22 more or less different formats have been present since 2015 when the competition was opened for non-Atari computers. The first year, only Atari 8-bit, C64, C128 and Amstrad/Schneider CPC were supposed to participate, but Jim Gerrie sneaked in an entry for the TRS-80 CoCo.

 

With the risk of miscounting:

 

Acorn BBC Micro: 4
Amstrad CPC: 21
Apple II: 3
Atari 8-bit: 81 (plus 40 games from 2014)
Atari VCS/2600: 4 (all compiled as far as I can tell)

Commodore PET: 2
Commodore VIC-20: 12

Commodore 64: 78
Commodore 128: 3
Commodore Amiga: 2 (not 8-bit, so only Wild entries)
MSX: 20
MSX2: 1
Mattel Aquarius: 2
Oric: 1
TRS-80 CoCo 1&2: 3
TRS-80 MC-10: 16
TRS-80 Model 100: 2
TRS-80 Model 200: 2
Thomson MO6: 2
VTech Laser/VZ200: 23
ZX Spectrum: 15
ZX-81: 1

 

Total 298 entries in 5 years (2015-2019), average 59.6 entries per year. Obviously if the Atari only entries from 2011-2014 are added, they're far more.

 

Edited by carlsson

Share this post


Link to post
Share on other sites

Thanks for the stats, it's quite different seeing it like that, compared to just browsing it (year by year) on their site.

 

Would you happen to know how is WILD category scored ? I was checking the results page https://gkanold.wixsite.com/homeputerium/kopie-von-results-2019

However, there are no scores there for those.

 

Perhaps the scores are only internal for WILD ?

 

 

Seeing Amiga there made me realize why not submit something for Jaguar into the WILD...

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