Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Lander 2D

Author
Message
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 1st Oct 2002 22:41
The original game called LANDER that used moves per cases.

Here is the source code for the game :
rem **********
rem * lander *
rem **********
Rem
rem Based on the original game from Laser200
Rem code-source book made by Sybex
Rem 19 source code lines !!!!
Rem
Rem define all resolutions settings
set display mode 640,480,16 : sync rate 60 : sync on : hide mouse
Rem Load graphics and setup background
load image "images\ship.jpg",1 : load image "images\lander.jpg",2 : load image "images\ship_crash.jpg",3 : paste image 2,0,0
Rem Define default values
SCORE=0 : playerxcase=rnd(40) : playerycase=2 : set sprite 1,1,1
Rem beginning of the game loop , Now we look if player go left or right . . .
Repeat : playerycase=playerycase+1 : playerxcase=playerxcase+movex : if playerxcase38 then playerxcase=38
movex=0 : playerxpos=playerxcase*16 : playerypos=playerycase*16 : sprite 1,playerxpos,playerypos,1
Rem If player is on a landing place . . .
if playerycase=27 then if playerxcase=2 or playerxcase=13 or playerxcase=25 or playerxcase=36 then gosub _gagne
Rem If the player landed on bad area . . .
if playerycase=28 then PERDU=1
Rem Display the current score :
ink rgb(0,0,0),rgb(0,0,0) : box 0,0,320,16 : ink rgb(255,255,255),rgb(0,0,0) : set cursor 0,0 : print "SCORE : ";score
Rem Check keyboards for player moves. . .
VITESSE_DE_JEU=30-(score/50) : if VITESSE_DE_JEU0 then movex=movexinit
if downkey()=1 then if boucle
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 1st Oct 2002 22:43
Sorry , error during post , here is the full source code.
That use 19 line of code :



Here is the link for medias :
http://cordierfr.free.fr/bin/laser200-15-lander2D.zip

Login to post a reply

Server time is: 2024-04-14 15:23:41
Your offset time is: 2024-04-14 15:23:41