Jump to content

Photo

BASIC Ten-Liners - Contest 2014

BASIC ABBUC NOMAM Competition

363 replies to this topic

#1 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Tue Feb 11, 2014 2:57 PM

After the fun and success of last year at the NOMAM there is another programming competition this year. This year Turbo Basic XL is allowed. Besides speed advantages there are a few other advantages in Turbo Basic.

Here are the conditions of the competition:
- 10 lines of Turbo Basic XL code (pure Atari Basic is also allowed)
- It must be a game
- Input medium of the game arbitrarily (joystick , paddle , keyboard, ... )
- Abbreviations may be used to increase the maximum line length
- No reloading of data or parts of the program
- Call of machine language programs is not permitted ( X = USR ( 1536) )
- POKing is allowed (eg change the DL, PM graphics)
- Deadline: Saturday 26 April , 11 pm (remote posts : Wednesday, April 22)
- Voting: Saturday 26 April , 11.30 pm , Awards Ceremony : Sunday, 27 April , 0 am
- Only physically Attendants may vote
- Remote contributions are nevertheless allowed. They have to arrive until Wednesday 22 April 11.59 pm at GKANOLD - äht - GMAIL dot COM

(all times CET - central european time)

We also have some donated prizes, more donations are still gladly accepted .



#2 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,244 posts
  • Location:knoxville, TN

Posted Wed Feb 12, 2014 10:50 AM

Question:  I know USR calls aren't allowed, but what about VBI routines that don't use USR calls ... that is, you set the VBI pointer to execute code every VBI.  Are these allowed?



#3 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Wed Feb 12, 2014 1:27 PM

Bobby, I would say: allowed. Example?

 

So far there are already 3 entries.

 

Jumpsheep by fdingler

Paddleship by Bill Kendrick

Sijmen by me



#4 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,244 posts
  • Location:knoxville, TN

Posted Wed Feb 12, 2014 1:35 PM

Well, the idea was, I wanted to use a Super IRG style mode which runs off of a VBI., and to use this in Graphics 2.  The idea is, it would save space (1K needed for font) and help the game to run faster.  It wouldn't use USR calls, just a change to the VBI pointer.

 

To get to less than 10 lines will be a challenge to be sure. :)



#5 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Wed Feb 12, 2014 1:41 PM

Bobby, rules above allows it, I think.



#6 Sikor OFFLINE  

Sikor

    Stargunner

  • 1,289 posts
  • Location:Warsaw/Poland

Posted Wed Feb 12, 2014 3:37 PM

Only source-code are allowed? With no external data? (for example: font set)?
=====================EDIT:
One more question: can we use POKE 82,0 to edit sources?

Edited by Sikor, Wed Feb 12, 2014 4:07 PM.


#7 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,244 posts
  • Location:knoxville, TN

Posted Wed Feb 12, 2014 4:11 PM

Any trick you can think of to squeeze code into one logical line is allowed, I am sure.  This includes abbreviations, POKE 82,0, removing unneeded spaces.  As for font set, I have a program which can fix that, called CONVERT.BAS ... converts your font set into either DATA statements or string assignments.  Only prob is, those string assignments can eat up a lot of lines, unless you are working in Graphics 1 or 2 which only allows you 512 bytes for your char set.  That will still eat up 5 lines of your code tho. 



#8 Rybags ONLINE  

Rybags

    Quadrunner

  • 14,830 posts
  • Location:Australia

Posted Wed Feb 12, 2014 7:31 PM

I should think no USR also means no VBI or DLIs.

 

In 10 lines using ASCII in DATA, an assembler routine of ~ 1K could be fitted, that would be an extreme unfair advantage.

VBI or main loop, little difference - and a VBI routine could quite easily just break out and become the mainline program anyway.

 

I might have to whip something up... I have a trick or 2 to cram more stuff in 10 lines.



#9 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 7,175 posts
  • High Score Club New Season Starting
  • Location:Join in!

Posted Thu Feb 13, 2014 6:20 AM

Thanks for the invite Bunsen :thumbsup:

 

This contest is a great way for anyone to learn to program on the Atari 8)   

 

If there is anyone needing any help getting started just post, there are lots of people who can help. Don't be put off by some of the tecnhical discussions you only need a few commands to have something moving around the screen, and before you know it you will have a little game running; it's all a bit of fun  :)

 

p.s. I'm in :grin:



#10 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Thu Feb 13, 2014 8:48 AM

Now I am a lttle bit unsure of myself. Bobby, I don't know exactly what you mean. As Rybags explains use of VBI is some kind of machine language use and similar to USR calls.

 

But on the other hand I think it makes no sense to draw too many rules, because it should be a fun contest. It also does not really matter whether one is first, third or fifth.

Maybe it is better to allow machine calls? But then it is not likely a basic contest.

 

Paweł, yes POKE 82,0 is allowed and yes, only source code is allowed, no loading of fonts or other data.

 

Jason, great that you are in :)



#11 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Thu Feb 13, 2014 9:01 AM

4th game registered

 

Jumpsheep by fdingler

Paddleship by Bill Kendrick

Sijmen by me

Squirrel by fdingler



#12 Sikor OFFLINE  

Sikor

    Stargunner

  • 1,289 posts
  • Location:Warsaw/Poland

Posted Thu Feb 13, 2014 1:42 PM

O.K. Thx for info. In 90% I'm in it too :)

#13 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Thu Feb 13, 2014 1:47 PM

Fine Sikor! :)


Edited by Bunsen, Thu Feb 13, 2014 1:47 PM.


#14 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,244 posts
  • Location:knoxville, TN

Posted Thu Feb 13, 2014 1:59 PM

I think I will stay away from VBI's.  Don't think I can fit it into mine anyway. :)



#15 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Fri Feb 14, 2014 2:17 PM

5th game registered

 

Jumpsheep by fdingler

Paddleship by Bill Kendrick

Sijmen by me

Squirrel by fdingler

Shmup by Bill Kendrick



#16 Rybags ONLINE  

Rybags

    Quadrunner

  • 14,830 posts
  • Location:Australia

Posted Fri Feb 14, 2014 11:34 PM

I've got one in the pipeline - 8 lines so far but hoping to compact down a bit.

 

There's some exploits that can be used to cram more into a line and some programming trickery that can help too:

 

- normal limit with E: is only 120 bytes input to a line.  Actually, BASIC allows 256 bytes to be input but this limit is rarely approached and can only occur when doing something like ENTER "<filespec>".  To get such large lines, an editor on the PC can be used, then use the H: device in the emulator with ATASCII translation to get the lines into memory.  There are downsides though, changing the program will be tedious and including special characters somewhat harder.  Best method is probably to do the program e.g. as 30 lines of code then combine lines in an editor once finalized.

Note also that there's a limit to a stored line of program (256 bytes?) and it's fairly easy to overrun this.  Especial case is if there's lots of numeric constants in a line.

 

- use boolean logic.  e.g. in the game I'm doing, speed/size advantage for moving something vertically:

S=STICK(0) : V=(S=13)-(S=14) : Y=Y+V

- use infinite loop, change loop variable to break out.  The problem with using GOTO for program control within the main loop is that the main loop will start at the beginning of the line and the end of the main loop with the GOTO can't have anything following it.

FOR L=1 TO 2 STEP 0
<rest of main loop>
IF C=1 THEN L=2 : REM set breakout condition so we can get out of loop
NEXT L

Edited by Rybags, Fri Feb 14, 2014 11:35 PM.


#17 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 7,175 posts
  • High Score Club New Season Starting
  • Location:Join in!

Posted Sat Feb 15, 2014 5:47 AM

I think using PC editor/emulator tricks might be outside the spirit of the contest; should just be the margin poke and abbreviations ;)



#18 Rybags ONLINE  

Rybags

    Quadrunner

  • 14,830 posts
  • Location:Australia

Posted Sat Feb 15, 2014 6:10 AM

I'll do what's needed to keep it in the 10 lines... equally you could do the same trick using legacy Atari gear only, so it's not really cheating.

 

I might have a handicap anyway - I'll probably only use the standard Basic, so you lose out a little there.



#19 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Sat Feb 15, 2014 10:52 AM

Hey, you guys fight with all means :lolblue:



#20 Irgendwer OFFLINE  

Irgendwer

    Stargunner

  • 1,129 posts
  • Location:Germany

Posted Sun Feb 16, 2014 1:33 PM

 

- use infinite loop, change loop variable to break out.  The problem with using GOTO for program control within the main loop is that the main loop will start at the beginning of the line and the end of the main loop with the GOTO can't have anything following it.

 

 

You can use remaining line space for DATA:

 

1 IF A=B THEN 3:DATA 1,2,3,4,5,6

 

Does not look nice, but helps to work within the given limit...



#21 fadix OFFLINE  

fadix

    Space Invader

  • 47 posts

Posted Sun Feb 16, 2014 3:41 PM

I don't get how poke 82,0 helps with this contest. Doesn't it just make the left margin disappear (be 0 pixels)?



#22 Sikor OFFLINE  

Sikor

    Stargunner

  • 1,289 posts
  • Location:Warsaw/Poland

Posted Sun Feb 16, 2014 3:52 PM

I don't get how poke 82,0 helps with this contest. Doesn't it just make the left margin disappear (be 0 pixels)?

You has longer lines. Atari Basic (and Turbo Basic XL) get maximum line lengths 3-lines. So, you has 6 letter more for each line (60 at all). Only few? Example: PL.0,0 - one instruction more in line.

#23 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 7,175 posts
  • High Score Club New Season Starting
  • Location:Join in!

Posted Sun Feb 16, 2014 5:06 PM

Be sure to use line numbers 0-9 too ;)



#24 billkendrick OFFLINE  

billkendrick

    Chopper Commander

  • 120 posts
  • Location:Davis, CA

Posted Mon Feb 17, 2014 12:38 PM

I can't help myself! I've written two more!

  • "Planets"
    two-player, joystick-controller 'artillery game' with planets and orbital gravity
  • "Slice"
    one-player, Touch Tablet-controlled (paddle should work, too, but might be difficult) game where you collect dots before they fly off the screen. ("Fruit Ninja", but not really; kinda also like "Stampede" or "Kaboom!")

I've got 2 or 3 more ideas, and apparently have some small amount of free time lately to work on these. :)  So you may see more!  If it turns out that I have too many submissions (there was no limit mentioned in the rules, but I'd fully understand) then I'm happy to pick one or more games that I'd like to submit. (I'd pick one(s) that I think have a chance at winning the contest, of course ;) )

 

I have to say, this has been devilishly fun. My day job involves numerous huge Linux servers and giant databases on systems with 16GB of RAM each, so trying to fit 11 lines of code for a working game down into 10 lines, so that it adheres to the rules, is a very different kind of puzzle. ;)



#25 Bunsen OFFLINE  

Bunsen

    Dragonstomper

  • Topic Starter
  • 834 posts
  • Location:Dithmarschen/ Germany

Posted Mon Feb 17, 2014 2:41 PM

8th game registered :thumbsup:

 

Jumpsheep by fdingler

Paddleship by Bill Kendrick

Sijmen by me

Squirrel by fdingler

Shmup by Bill Kendrick

Colfusion by Irgendwer

Planets by Bill Kendrick

Slice by Bill Kendrick







Also tagged with one or more of these keywords: BASIC, ABBUC, NOMAM, Competition

2 user(s) are browsing this forum

0 members, 2 guests, 0 anonymous users