10 UFO Chase (Commodore 64) by Arturo Dente
A downloadable game
* * * 10 UFO CHASE * * *
Category: PUR80
Platform: C64
Emulator: Vice is fine
NOTE: THE .PRG FILE IS BASIC COMPILED
AIM OF THE GAME
Survive the much long as possible in your run without colliding the 2 enemies
CODE
0d=255:?"{clear}{green}":pO53280,0:pO53281,0:v=53248:pOv+21,d:pO2040,13:pO2041,14:n=75:x=50 1fOt=0to10:fOs=0to30:?"V";:nE:?:nE:fOt=0to59:rEa:pO832+t,a:pO896+t,a:pO960+t,a 2nE:w=d:z=y:j=d:k=70:pO2042,15:c=53270:dEfny(q)=-(q>=0)*(-q*(q<n)-n*(q>=n)):dA0 3dEfnx(x)=(-d*(x<0))-x*(x>=0aNx<=d)*-(x<=d):dA56,0,1,255,0,15,255,224,31,255,240 4fOt=6to0stE-1:pOc,(pE(c)aN248)+t:m=pE(56320):y=y+2*(m=126)-2*(m=125):y=fny(y) 5b=pE(53278):goS9:nE:x=fnx(x+2):w=fnx(w-rN(.)*16):z=fny(z+rN(.)*8+-rN(.)*8) 6j=fnx(j-rN(.)*16):k=fny(k+rN(.)*8+-rN(.)*8):on1+(pE(53278)aN1)gO4:eN:dA55,255 7dA216,59,255,184,125,255,124,126,254,252,127,131,252,255,57,254,255,109,254,255 8dA57,254,127,131,252,126,254,252,125,255,124,59,255,184,55,255,216,31,255,240 9pOv,x:pOv+1,52+y:pOv+2,w:pOv+3,52+z:pOv+4,j:pOv+5,52+k:reT:dA15,255,224,1,255,0
COMMENT
LINE 0:I use the value 255 many times,so better to assign it to a variable.So d=255. Follows some sprites pokes and other inits.
LINE 1:the 2 for cycles are here to print the grid. The other for cycle reads data in order to make the shapes of the 3 sprites involved in the game, the UFOs starships.
LINE 2:variables w,z,x,y,j,k are the x and y of the 3 sprites. Here I define the function y(q) that is used to make sprites' Y stay in the interval 0-75.
LINE 3:similarly as for Y, I define a function to make X stay into an interval, the x(x) function. Basically it makes X to stay into 0-255. If x<0 then x becomes 255, and if x>255 it becomes 0. It manages the player's UFO (going towards the right direction) and the opponents (going opposite direction)
LINE 4:main cycle here. The for is used to change the x register hardware scroll in order to have a "smooth" horizontal scrolling. Then I catch the joystick movement into variable m, and, accorgin to its value, I move the player up or down using the y(q) function.
LINE 5:the first peek of 53278 is to reset the collision register.The gosub 9 updates sprutes positions.The following calls to fnx() update sprites X positions, moving randomly the enemies on X assis.
LINE 6:Random y for enemies with calls to fny(), then collision check and ending of the game in positive case ,using the ON .. construct
LINE 7 and 8: datas for sprites.
LINE 9 as said, updates sprites positions
Status | Released |
Author | BASIC 10Liner |
Genre | Action |
Tags | 10liner, 8-Bit, basic, Commodore 64 |
Development log
- Added d64-Image41 days ago
Leave a comment
Log in with itch.io to leave a comment.