A downloadable game

===================================

     M I N I  M A R S  P L U S      

===================================

   Title: Mini Mars Plus

Platform: Commodore Plus/4

  Author: Giuseppe Mignogna

Language: BASIC 3.5

Category: PUR-120

===================================

Intro

-------------------

This game has been written using CBM prg Studio 3.13. It has been tested with the emulators Yape 1.2.1 and Plus4emu 1.2.9.2. Vice should be OK too, but I didn't try it. The original .prg file has been compiled using Austrospeed for PLus4. Source and compiler are available in the folder "source".

How to run

-------------------

To run it, simply drag and drop the .d64 file into Yape -OR- attach it to drive 8, type DLOAD"MMP" and then type RUN. 

How to play

-------------------

To play, use a joystick in port 2 (left, right and fire). The goal of the game is to smoothly land the spacecraft on the ground base. Values of Angle of inclination (A), Vertical velocity (V) and Angular Velocity (VA) must be kept as lower as possible and will be shown if you crash.

Code

-------------------

========================================

COMPRESSED CODE MAX 120 CHARS PER LINE

========================================

1colO0,1:colO1,6:colO4,1:sC:chA1,0,0,"minimars+ by giuseppe mignogna 2023     use joy 2 - wait...":dIc(1,200)
2vO8:fOy=0to99:r=6.22*y/99:c(1,y)=sI(r)*6:c(1,y+100)=c(1,y):c(0,y)=cos(r)*6:c(0,y+100)=c(0,y):chA1,19,1,stR(y):nE
3colO1,3,5:gR1,1:x=160:y=50:vx=0:vy=0:a=0:d=0:q=0:w=0:e=0:j=0:b=rN(0)*280:bO1,b,190,b+40,199:dR1,0,190to319,190:colO1,2
4j=jO(2):ifj>127tHvx=vx+c(1,a)/10:vy=vy-c(0,a)/10::k=rN(0)*0.5+1.5:j=j-128:sO3,0,0:sO3,550,10
5q=x:w=y:e=a:ifj=3tHd=d+0.5:sO3,0,0:sO3,750,5:eLifj=7tHd=d-0.5:sO3,0,0:sO3,750,5
6cI0,q,w,3,6,,,e*3.63,120:f=e+50:dR0,q+c(1,f),w-c(0,f)toq+c(1,f)*u,w-c(0,f)*u:a=a+d:ifa>99tHa=0:eLifa<0tHa=99
7x=x+vx:y=y+vy:vy=vy+0.1:cI1,x,y,3,6,,,a*3.63,120:ifk<>0tHf=a+50:dR1,x+c(1,f),y-c(0,f)tox+c(1,f)*k,y-c(0,f)*k:u=k:k=0
8ifx<-10orx>330ory<-10tHsO3,300,100:chA1,0,0,"ouch! a:"+stR(a)+" v:"+stR(vy)+" va:"+stR(d):sO3,100,50:gO3:eLify>184tH10
9gO4
10ifx>baNx<b+40aN(a<4ora>95)aNvy<2aNaB(d)<2tHchA1,0,0,"well done!":sO1,400,10:sO1,600,40:gO3:eLx=-20:gO8

========================================

UNCOMPRESSED CODE

========================================

1color0,1:color1,6:color4,1:scnclr:char1,0,0,"minimars+ by giuseppe mignogna 2023     use joy 2 - wait...":dimc(1,200)
2vol8:fory=0to99:r=6.22*y/99:c(1,y)=sin(r)*6:c(1,y+100)=c(1,y):c(0,y)=cos(r)*6:c(0,y+100)=c(0,y):char1,19,1,str$(y):next
3color1,3,5:graphic1,1:x=160:y=50:vx=0:vy=0:a=0:d=0:q=0:w=0:e=0:j=0:b=rnd(0)*280:box1,b,190,b+40,199:draw1,0,190to319,190:color1,2
4j=joy(2):ifj>127thenvx=vx+c(1,a)/10:vy=vy-c(0,a)/10::k=rnd(0)*0.5+1.5:j=j-128:sound3,0,0:sound3,550,10
5q=x:w=y:e=a:ifj=3thend=d+0.5:sound3,0,0:sound3,750,5:elseifj=7thend=d-0.5:sound3,0,0:sound3,750,5
6circle0,q,w,3,6,,,e*3.63,120:f=e+50:draw0,q+c(1,f),w-c(0,f)toq+c(1,f)*u,w-c(0,f)*u:a=a+d:ifa>99thena=0:elseifa<0thena=99
7x=x+vx:y=y+vy:vy=vy+0.1:circle1,x,y,3,6,,,a*3.63,120:ifk<>0thenf=a+50:draw1,x+c(1,f),y-c(0,f)tox+c(1,f)*k,y-c(0,f)*k:u=k:k=0
8ifx<-10orx>330ory<-10thensound3,300,100:char1,0,0,"ouch! a:"+str$(a)+" v:"+str$(vy)+" va:"+str$(d):sound3,100,50:goto3:elseify>184then10
9goto4
10ifx>bandx<b+40and(a<4ora>95)andvy<2andabs(d)<2thenchar1,0,0,"well done!":sound1,400,10:sound1,600,40:goto3:elsex=-20:goto8

Code explanation

-------------------

Line  1: sets colors; prints a message; initializes the array c

Line  2: precalculates valus for sin and cosin (100 values)

Line  3: opens the graphic screen; sets some variables; draws the ground and the base at a random position

Line  4: checks if fire has been pressed and increases the velocity value; var. k keeps the lenght of rocket fire

Line  5: stores spacecraft old position; checks if left or right joy has been pressed and increaes or decreases angular velocity

Line  6: deletes old spacecraft and rocket fire; updates angular inclination

Line  7: updates spacecraft position; draws spacecraft and rocket fire at new position

Line  8: checks if the spacecraft is going to outer space

Line  9: go back to line 4

Line 10: checks if the spacecraft succesfully landed or crashed

-end-

Download

Download
minimarsplus.d64 170 kB
Download
MiniMarsPlus_Read_Me.txt 4 kB

Leave a comment

Log in with itch.io to leave a comment.