homeputerium's BASIC Tenliner Contest 2016

homeputerium's BASIC Tenliner Contest 2016

van JohnHassink op 06-02-2016, 00:43
Onderwerp: Challenges
Labels: contest, tenliners, BASIC
Talen:

Quite similarly to what we organised a few years ago, Germany-based homeputerium is organising a BASIC Tenliners contest, open to all 8-bit computer systems. All line-orientated BASIC dialects are allowed. Read all about it at their site.

Relevant link: homeputerium - BASIC Tenliner Contest 2016

Reacties (27)

Van Samor

Prophet (2220)

afbeelding van Samor

07-02-2016, 14:04

nice and familiar picture ;-)

Van Paulo Garcia

Rookie (18)

afbeelding van Paulo Garcia

08-02-2016, 05:12

Here is my MSX BASIC entry: http://www.vintageisthenewold.com/2016-basic-tenliners-conte...

And it was my first MSX program ever!

Van meits

Scribe (6571)

afbeelding van meits

08-02-2016, 11:54

Can you copy/paste your entry here as well? I couldn't find a way to see the complete listing.

Van snout

Ascended (15187)

afbeelding van snout

08-02-2016, 12:20

@paulo: Nice one! Good to see MSX represented in this competition, congratulations on sending in the first entry and writing your first ever MSX program.

@meits: The code is there, you can select & copy/paste it, it's just running off-screen a bit without showing scrollbars.

As for representing MSX in the competition, maybe we should wake up Nyyrikki and dvik to make Rally-X II.

Van anonymous

incognito ergo sum (116)

afbeelding van anonymous

08-02-2016, 14:46

Maybe I'll have to try another browser then, since this is what I get:

10 CLS:WIDTH40:DIM L$(10),R$(10):FOR I=1 TO 10:L$(10)=STRING$(10.32):LOCATE 1,17:PRINT STRING$(14,255); 20 PS=200:LF=10:CL= 2:SC=0:LOCATE 26,17 :PRINT STR1NG$(14,255);:LOCATE17,1:PRINT"TYPE HERO":C$="&" 30 FOR 1=1 TO 10:LOCATE15,I+14:PRINTL$(I);:NEXT 40 K$=INKEY$:IF K$<>"" AND K$=R$(2) THEN SC=SC+10:ELSE IF K$<>"" THEN LF=LF-1 50 P=INT(RND(1)*5)+4:R$(10)=CHR$(RND(1)*5)+49):MID$(L$(10),P,1)=R$(10) 60 FOR 1=2 TO 10:L$(I-1)=L$(I):R$(I-1)=R$(I):NEXTI:L$(10)=" " 70 IF NOT PLAY(0) THEN PLAY"L16O4GO5CO4BAGFGGGFGABO5L4C" 80 IFLF=0THEN LOCATE 17,8:PRINT"GAME OVER!!":END:ELSE:LOCATE1,6:PRINT"LIFE: ";STRING$(LF,198);STRING$(10," ") 90 IF SC>0 AND ((SC/100)-INT(SC/100)=0) THEN PS=PS-20:CL=CL+1:COLOR1,CL:IF CL=15 THEN CL=2 100 LOCATE 1,5:PRINT"SCORE: ";SC:FORP=1TOPS:NEXTP:GOTO 30 - See more at: <a href="http://www.vintageisthenewold.com/category/msx/#sthash.1ChaZcXP.dpuf" title="http://www.vintageisthenewold.com/category/msx/#sthash.1ChaZcXP.dpuf">http://www.vintageisthenewold.com/category/msx/#sthash.1ChaZ...</a>

That goes for FF and IE

Van snout

Ascended (15187)

afbeelding van snout

08-02-2016, 15:17

Meits wrote:
Maybe I'll have to try another browser then, since this is what I get:
10 CLS:WIDTH40:DIM L$(10),R$(10):FOR I=1 TO 10:L$(10)=STRING$(10.32):LOCATE 1,17:PRINT STRING$(14,255); 
20 PS=200:LF=10:CL= 2:SC=0:LOCATE 26,17 :PRINT STR1NG$(14,255);:LOCATE17,1:PRINT"TYPE HERO":C$="&" 
30 FOR 1=1 TO 10:LOCATE15,I+14:PRINTL$(I);:NEXT 
40 K$=INKEY$:IF K$<>"" AND K$=R$(2) THEN SC=SC+10:ELSE IF K$<>"" THEN LF=LF-1 
50 P=INT(RND(1)*5)+4:R$(10)=CHR$(RND(1)*5)+49):MID$(L$(10),P,1)=R$(10) 
60 FOR 1=2 TO 10:L$(I-1)=L$(I):R$(I-1)=R$(I):NEXTI:L$(10)=" " 
70 IF NOT PLAY(0) THEN PLAY"L16O4GO5CO4BAGFGGGFGABO5L4C" 
80 IFLF=0THEN LOCATE 17,8:PRINT"GAME OVER!!":END:ELSE:LOCATE1,6:PRINT"LIFE: ";STRING$(LF,198);STRING$(10," ")
90 IF SC>0 AND ((SC/100)-INT(SC/100)=0) THEN PS=PS-20:CL=CL+1:COLOR1,CL:IF CL=15 THEN CL=2 
100 LOCATE 1,5:PRINT"SCORE: ";SC:FORP=1TOPS:NEXTP:GOTO 30 

Just needed some newline loving Smile

Van Paulo Garcia

Rookie (18)

afbeelding van Paulo Garcia

08-02-2016, 15:38

I've got problems trying to extract the basic program from the DSK image. Can you guys tell me how to do that?

Since I couldn't I captured the image and OCR'd it, fixing the typos Hannibal

I will add the DSK file as soon as possible on my post as well.

Thanks!

Van Paulo Garcia

Rookie (18)

afbeelding van Paulo Garcia

08-02-2016, 15:47

Here is the link for the DSK file:

http://www.vintageisthenewold.com/files/msx/msx/games/typehe...

I tested it using http://webmsx.org/ and it works there. For some reason, it failed to load with some machine profiles on CocoaMsx emulator (it works with Gradient_Expert_DD).

Cheers

Paulo

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

12-02-2016, 21:06

I got the second submission in BASIC Tenliners contest for MSX computers :-)
Happy to see some MSX games in the contest!

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

11-03-2016, 21:08

Now 5 Tenliners for MSX!




Van Paulo Garcia

Rookie (18)

afbeelding van Paulo Garcia

11-03-2016, 21:46

Nice to see I started it! Smile

Sad to see all the other that followed look way prettier than mine Sad

Cheers!

Van anonymous

incognito ergo sum (116)

afbeelding van anonymous

17-03-2016, 07:28

Here is my entry a simple TicTacToe

1 S1$="T3-TicTacToe":S2$="Select a number 1-9":S3$="or S to stop":S4$="'s turn":S5$=" Won":S6$="Another game? "
2 S7$=" (0=You;1=MSX)":H$="-+-+-":DIMT$(1):T$(0)="X":T$(1)="O":DIMG$(8):DEFFNT3(A,B)=(G$(A)=G$(A+(B-A)/2)ANDG$(A)=G$(B))
3 DIMP(1):P(0)=1:P(1)=1:DEFFNGT=(FNT3(0,2)ORFNT3(3,5)ORFNT3(6,8)ORFNT3(0,8)ORFNT3(0,6)ORFNT3(1,7)ORFNT3(2,8)ORFNT3(2,6))
4 V$="|":X=RND(-TIME):KEYOFF:CLS:GL=0:FORI=0TO8:G$(I)=CHR$(49+I):NEXTI:LOCATE0,0:?S1$,S2$:?,S3$:?:FORGL=0TO9
5 IFGL=0THEN?,"Who X?";S7$;:P(0)=VAL(INPUT$(1)):GOTO 7 ELSEIFP(T)=1THENK=INT((RND(1)*9)+1):K$="M"ELSEK$=INKEY$:K=VAL(K$)
6 IFK$=""ORK<1ORK>9THEN 5 ELSEIFK$="S"ORK$="s"THEN 10 ELSEIFG$(K-1)<="9" THEN G$(K-1)=T$(T) ELSE BEEP:GOTO 5
7 T=GLMOD2:LOCATE0,5:FORI=0TO2:?,G$(I*3);V$;G$(I*3+1);V$;G$(I*3+2):IFI=2THEN?ELSE?,H$:NEXTI
8 LOCATE0,12:IFFNGTTHEN?,T$((GL-1)MOD2)+S5$;SPC(3):GL=9:GOTO10:ELSE?,T$(T);S4$;:IFP(T)=0THEN?" (You)"ELSE?" (MSX)"
9 NEXTGL:LOCATE0,12:?,"A Draw";SPC(9)
10 LOCATE0,14:?S6$:K$=INKEY$:IFK$=""THEN 10 ELSEIFK$="y"ORK$="Y"THEN 4 ELSEIFK$="n"ORK$="N"THENCLS:KEYON:ENDELSE 10

Van alfa1992

Supporter (2)

afbeelding van alfa1992

18-03-2016, 10:03

Usage
The Classic TicTacToe game. The target is to get a three in a row (horizontal, vertical or diagonal)
After the start, the player is asked who is playing 'X'
Input 0 for player self, 1 selects MSX. In the last case the MSX is playing against itself.
The player for O is defaulted to MSX.

When it is the players turn, a number in the range 1-9 must be selected, if a cell is selected which already contains a 'X' or 'O' a BEEP is given.
This is also the case when it is the turn of the computer.
S is for stopping the game. This is repeated until there is a winner or all the fields contain a 'X' or 'O'.

Breakdown of the program
Line 1 - 3
Initialize the variables and define some helper functions for the tests if there is a three on a row.
The array P in line 3 defines the player, P(0)=1 means that for the 'X' the MSX is the player, this value gets altered in line 5.
By changing the value for P(1)=1 to 0, it possible use this program as a two player game.

Line 4
Initialize the randomizer, fill the playfield and start the actual gameloop.

Line 5 - 6
If the first loop is started (GL=0) then the program asks who is playing X and sets P(0) defined in line 3.
In the case of the computer is playing a random value (no AI) is selected, or in case of the player the input is checked for valid values.

Line 7
The current player is set, and the playfield is printed to the screen.

Line 8
Test if there is a three in a row after the turn is played and printed. If there is winner he is called, or else the player for the next turn is shown.

Line 9
If the GL>9 and there is no winner, then it must be a draw.

Line 10
Ask the player for another game, if answered Y then the game starts over again

Van kotai

Master (152)

afbeelding van kotai

28-03-2016, 22:55

I send my game "Tetris 10" a remake of tetris in only 10 MSX BASIC lines.

Can download from my site: http://www.kotai.es/texto.php?P=154

Kotai.

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

02-04-2016, 22:29

Find the results of the contest on the contest homepage...

http://gkanold.wix.com/homeputerium#!results-2016/c1snz

Van Manuel

Ascended (19678)

afbeelding van Manuel

02-04-2016, 22:40

Ah, so many MSX entries and *just* no prizes for them!

Van kotai

Master (152)

afbeelding van kotai

02-04-2016, 23:24

My Tetris 10 finish 4º in EXTREM-256 category (6º for all categories) and 1º MSX game.
Probably I will create a second version of Tetris 10 for two players in only 10 lines, and more fast with X-Basic compiler.

Kotai.

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

28-01-2017, 19:33

10 ... 9 ...

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

29-01-2017, 12:17

... 8 ...

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

29-01-2017, 16:46

... 7 ... 6 ...

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

29-01-2017, 20:32

... 5 ...

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

30-01-2017, 14:56

... 4 ...

Van hamlet

Scribe (4106)

afbeelding van hamlet

30-01-2017, 15:15

Man, I´m so curious to know the reason of this countdown, I can´t wait to ask.

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

30-01-2017, 18:59

hamlet wrote:

Man, I´m so curious to know the reason of this countdown, I can´t wait to ask.

Big smile

... 3 ...

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

30-01-2017, 19:02

Excuse me for annoying you

;-)

Van Gunnar Kanold

Supporter (12)

afbeelding van Gunnar Kanold

30-01-2017, 21:55

... 2 ... 1 ... 0!