IOMBCC - Explained (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 35 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - IOMBCC - Explained

Ir a la página ( Página anterior 1 | 2 )
Autor

IOMBCC - Explained

ricbit@work
msx friend
Mensajes: 3
Publicado: Marzo 21 2005, 16:37   
This is previously published work, so I don´t think it qualifies for IOMBCC. Anyway, it´s a fun program
Snake-game with music in two lines of msx-basic:
1 K=-1-RND(-TIME):COLOR3,1,1:SCREEN3:D=
636:DIMA(D):A(0)=D:A(1)=K:A(2)=K:E=256:
LINE(0,0)-(E,191),,B:F=2:S=1:M=3:Q=511:
Z=64:P$(3)="L6O5CDECCDECEFG3EFG3":P$(2)
="L12GAGFE6C6GAGFL6ECDO4GO5C3DO4GO5C3":
FORB=0TO9:B=STICK(0):S=Z*((B=1)-(B=5))-
(B=3)+(B=7)-S*(B=0)
2 I=I-1ANDQ:D=D+4*S:X=DMODE:P=POINT(X,D
\Z):PSET(X,D\Z):A(I)=D:IFP=3THENSCREEN0
:PRINTWELSEPSET(A(F)MODE,A(F)\Z),1:H=P=
6ORW=0ORU*H:K=RND(1)*E:L=RND(1)*192:G=P
OINT(K,L):J=G=1:W=W+J*H:U=J+1:PSET(K,L)
,U*G+6*H*J:F=F-1-HANDQ:T=1+PLAY(0):PLAY
P$(M*T):M=MXORT:NEXT

ricbit@work
msx friend
Mensajes: 3
Publicado: Marzo 21 2005, 16:38   
More basic two-liners are available at:
www.700km.com.br/mundobizarro/twoliners/
dvik
msx master
Mensajes: 1376
Publicado: Marzo 21 2005, 17:41   
Nice snake ricbit I like the other two liners you have too

Here is my snake game in a two liner version as well. It requires some more characters of code since I had to put in a couple of ELSE and NEXT statements that aren't needed in the six line version:

1 SCREEN1:KEYOFF:FORR=0TO9:R=0:COLOR5,1
,1:LOCATE8,11:PRINT" s to start":M=32:S
=-10:IFINKEY$<>"s"THENNEXTELSECLS:FORD=
0TO737::D=D+(D+1AND2ANDD>MANDD<704)*15:
F=6176:VPOKED+F,7:NEXT:H=6480:T=H-D:FOR
C=ATOF:S=S+10:L=F+RND(1)*D:IFVPEEK(L)-M
THENNEXT
2 Y=Y-10*(S>Y):R=3ANDASC(INKEY$+"C")+R+
1:VPOKEL,15:U=M^(RAND1)*(1-(RAND2)):C=0
:VPOKE2^13,6:VPOKEH-D,U+M:H=H+U:O=VPEEK
(H):VPOKEH,9:IFO-MANDO-15THENNEXTRELSEL
OCATE1,0:PRINT"SCORE"S,"HI"Y:IFO=15THEN
NEXTELSEVPOKET+D,M:T=T+VPEEK(T)-M:GOTO2


 
Ir a la página ( Página anterior 1 | 2 )
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation