A downloadable game

#################################
# BASIC Tenliners Contest 2021  #
#                               #
# Chuck's Challenge             #
# (c) 2021 Roman Werner @romwer #
# email: roman.werner@gmail.com #
#################################

Let's turn back time to 1980.

You are Chuck Peddle, the great engineer of the MOS 6502 and you have set up a meeting with Jack Tramiel to get funding for the next revision of your CPU!

This is a fictional dialog, but may just as well have happened like this... ;)

Jack : "You want some maaaney for the next rrrrevision of your cheap design? Ok! Cheap sounds good. I give you 10 dollars. Now leave my office!"

Chuck: "No Jack. I said 'Chip' design". I have some wonderful ideas. And it will cost you some dollars, I'm afraid."

Jack : "Whoooot? Can't you just make something up from scrap? I need the budget for the next Commodore commercial. It goes like "Are you keeping up with..."

Chuck: "Sorry, Jack. We have already used all scrap material to pimp the CEO restroom so you can play Jupiter Lander while..."

Jack : "All right, all right. Let's see. One of my sons made a game that needs to be tested. It is a Tenliner. To keep costs low, you know."

Chuck: "And...?"

Jack : "Well it has platforms where you need to collect coins. I'm a bit of a gambler, so let's say, one collected coin stands for $50'000. Equal to one revision."

Chuck: "I need to play a game to get funded my next CPU revisions? What's the catch?"

Jack : "You only have one go. That's it. Let's see how well you love your team. After that no more money. Everrrrrr!"

Chuck: "Ok. Looks like this is my last chance to get some money. I can do that. Let's focus..."

Now do your best to assure many many more years of Research & Development for your 65xx CPU architecture and help MOS and Commodore to stay ahead of the growing competition.

Task and Goal

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

Try to collect as many coins as possible. You can only use the black platforms to stay in the game.

While one platform disappears with your own gravitation momentum another one will appear from the top.

Try to estimate the best route to get to the coin but also to land again on a platform in reach.

You can also leave the screen to the left or right to enter the screen again from the other side.

Good luck (and focus)!

Control:

========

Use Joystick in Port 2 for moving left and right.

Fire button to restart the game.

Chuck's Challenge BASIC program code:
=====================================
0v=53248:j=56320:f=255:u=f*8:l=16:pokev+21,7:pokeu,13:pokeu+1,14:pokeu+2,14:print"{yellow}{clear}{down*3}"
1poke210,208:print"44{right*5}100{home}";:x=136:y=90:m=x:n=126:g=-1:pokev+2,m:fori=.to23:poke920+i,f
2printtab(30)"{reverse on}{light gray}{cm w}{black}{space*6}{gray}{cm q}":poke833+int(i/3)*3,f:next:poke833,n:poke854,n:print"{home}{down}"tab(32)"{reverse on}{black}6502{down*2}"
3printtab(32)"{up}{reverse on}r"q:q=q+1:pokea,32:a=peek(v+31):a=1224+int(rnd(.)*5)*40+rnd(.)*29:b=34:c=66
4d=peek(j):x=x+(dand4)*2-(dand8)andf:z=g<.:y=y+g:g=g+1:pokev+1,yandf:pokev,x:ifz<.goto7
5ify>nthenify<n+gthenifx>=m-lthenifx<=m+ltheng=-g+1
6ify>pthenify<p+gthenifx>=o-lthenifx<=o+ltheng=-g+1
7c=147-c:pokea,c:onz+1goto9:n=n-gandf:p=p-gandf:ifn<bthenn=b:m=rnd(.)*216+24andf:pokev+2,m
8pokev+3,n:pokev+5,p:ifp<bthenp=b:o=rnd(.)*216+24andf:pokev+4,o
9onpeek(v+31)and1goto3:on-(y<f)goto4:printtab(11)"{down*6}game over":waitj,l,l:pokev+3,.:pokev+5,.:run
Chuck's Challenge BASIC program code (PUR-80 version using command abbreviations):
==================================================================================
0v=53248:j=56320:f=255:u=f*8:l=16:pOv+21,7:pOu,13:pOu+1,14:pOu+2,14:?"{yellow}{clear}{down*3}"
1pO210,208:?"44{right*5}100{home}";:x=136:y=90:m=x:n=126:g=-1:pOv+2,m:fOi=.to23:pO920+i,f
2?tA30)"{reverse on}{light gray}{cm w}{black}{space*6}{gray}{cm q}":pO833+int(i/3)*3,f:nE:pO833,n:pO854,n:?"{home}{down}"tA32)"{reverse on}{black}6502{down*2}"
3?tA32)"{up}{reverse on}r"q:q=q+1:pOa,32:a=pE(v+31):a=1224+int(rN(.)*5)*40+rN(.)*29:b=34:c=66
4d=pE(j):x=x+(daN4)*2-(daN8)aNf:z=g<.:y=y+g:g=g+1:pOv+1,yaNf:pOv,x:ifz<.gO7
5ify>ntHify<n+gtHifx>=m-ltHifx<=m+ltHg=-g+1
6ify>ptHify<p+gtHifx>=o-ltHifx<=o+ltHg=-g+1
7c=147-c:pOa,c:onz+1gO9:n=n-gaNf:p=p-gaNf:ifn<btHn=b:m=rN(.)*216+24aNf:pOv+2,m
8pOv+3,n:pOv+5,p:ifp<btHp=b:o=rN(.)*216+24aNf:pOv+4,o
9onpE(v+31)aN1gO3:on-(y<f)gO4:?tA11)"{down*6}game over":wAj,l,l:pOv+3,.:pOv+5,.:rU
Tip: Copy/paste the program-Code into CBM prg Studio (http://www.ajordison.co.uk/).
There you can see the commands in nice color highlighting and you can directly execute the game in an emulator of your choice.


Chuck's Challenge Tenliner explained (000=row 0/100=row 1/...):

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

000 v=53248: rem vic ii base address

001 j=56320: rem cia joystick port 2

002 f=255: rem konstant 255

003 u=f*8: rem konstant 2040

004 l=16: rem 

005 pokev+21,7: rem enable sprite0, sprite1 and sprite2

006 pokeu,13: rem set sprite0 pointer to address 832 (white ball)

007 pokeu+1,14: rem set sprite1 pointer to address 896 (black platform)

008 pokeu+2,14: rem same for sprite2

009 print"{yellow}{clear}{down*3}": rem clear screen and fill screen color with yellow

100 poke210,208: rem print into vic ii mirror address room starting at offset 53408...

101 print"44{right*5}100{home}";: rem sets frame, background and sprite colors

102 x=136: rem initial x-pos of white ball

103 y=90: rem initial y-pos of white ball

104 m=x: rem sprite1 has same x-pos as white ball

105 n=126: rem bit sequence %011111110 to make top and bottom of white ball

106 g=-1: rem gravity

107 pokev+2,m: rem set sprite1 x-position

108 fori=.to23: rem for 24 lines...

109 poke920+i,f: rem fill sprite 14 addressroom to create black platform

200 printtab(30)"{reverse on}{light gray}{cm w}{black}{space*6}{gray}{cm q}": rem draw cpu on right side

201 poke833+int(i/3)*3,f: rem fill sprite 13 adressrom to create white ball body

202 next

203 poke833,n: rem set top and...

204 poke854,n: rem ...bottom of white ball

205 print"{home}{down}"tab(32)"{reverse on}{black}6502{down*2}": rem label cpu

300 printtab(32)"{up}{reverse on}r"q: rem show revision no (initial 0)

301 q=q+1: rem increase revision no

302 pokea,32: rem write space at location of last coin position

303 a=peek(v+31): rem clear background/sprite collions flag by reading it

304 a=1224+int(rnd(.)*5)*40+rnd(.)*29: rem choose random screen position for next coin

305 b=34: rem initial sprite y-position when new platform is added at the top

306 c=66: rem poke value for coin (side view)

400 d=peek(j): rem read joystick value

401 x=x+(dand4)*2-(dand8)andf: rem add left/right direction to white ball's x position

402 z=g<.: rem if gravity is in the minus (ball going up) then z is -1 otherwise z is 0

403 y=y+g: rem add gravity value to white ball's y position

404 g=g+1: rem increase gravity acceleration 

405 pokev+1,yandf: rem update white ball's sprite y position

406 pokev,x: rem update  white ball's sprite x position

407 ifz<.goto700: rem if ball is going up skip checking platforms

500 ify>nthenify<n+gthenifx>=m-lthenifx<=m+ltheng=-g+1: rem revert gravity if ball has same x/y as platform1

600 ify>pthenify<p+gthenifx>=o-lthenifx<=o+ltheng=-g+1: rem revert gravity if ball has same x/y as platform2

700 c=147-c: rem toggle coin char between 81 and 66 (animation)

701 pokea,c: rem poke to screen position

702 onz+1goto900: rem if gravity is positiv (ball is moving down) then skip move of platforms

703 n=n-gandf: rem add gravity value to platform 1 y position

704 p=p-gandf: rem add gravity value to platform 2 y position

705 ifn<bthenn=b:m=rnd(.)*216+24andf:pokev+2,m: rem when platform1 y position is wrapping (255>0) then assign new x-position

800 pokev+3,n: rem set sprite1 y position (platform1)

801 pokev+5,p: rem set sprite2 y position (platform2)

802 ifp<bthenp=b:o=rnd(.)*216+24andf:pokev+4,o: rem when platform2 y position is wrapping (255>0) then assign new x-position

900 onpeek(v+31)and1goto300: rem when white ball sprite collides with coin background then collect coin and update revision no

901 on-(y<f)goto400: rem continue with game loop as long as white ball's y position is less then 255 (=bottom of screen)

902 printtab(11)"{down*6}game over": rem print game over message

903 waitj,l,l: rem wait for fire button

904 pokev+3,.: rem hide platform1 sprite

905 pokev+5,.: rem hide platform2 sprite

906 run: rem restart game

2021 rem basic 10liners contest / (c) roman werner @romwer roman.werner@gmail.com

Trivia

======

Chuck Peddle and his team engineered the low-cost 6502 CPU in 1976 and as a result helped to make (home) computers affordable.

After differences with Jack Tramiel, Chuck left Commodore in 1980 to start his own company Sirius.

https://www.commodore.ca/commodore-history/the-legendary-chuck-peddle-inventor-o...

The CPU 6510, which was later used in the C64 is a minor revision of Chuck's original 6502 design.

The only major differences between the two processors are bytes 1 and 2 of the 6510 (the 6510 allows you to bank switch memory).

https://en.wikipedia.org/wiki/MOS_Technology_6502

Jupiter Lander - a clone of Atari's 1979 arcade game "Lunar Lander" - was one of the first games for the VIC-20 made by the Japanese company "HAL Laboratories".

HAL Laboratories continued to make games for Nintendo (e.g. many Kirby games) up to this day.

https://en.wikipedia.org/wiki/Jupiter_Lander

https://en.wikipedia.org/wiki/HAL_Laboratory


Download

Download
chuckschallenge.prg 654 bytes
Download
Chuck's Challenge.txt 9 kB

Install instructions

Game Requirements:
==================
- C64/C128* with BASIC 2.0 runtime environment (or compatible)
- 1 Player

*Also playable on Windows/MacOS/iOS/Android (C64 Emulator required)

Starting in VICE: C64 emulator (http://vice-emu.sourceforge.net/):
==================================================================
Start the emulator and then drag and drop the "chuckschallenge.prg" into the VICE window.
-or-
Load the program with the command: load "chuckschallenge.prg",8
Then start the program with:       run

Development log

Leave a comment

Log in with itch.io to leave a comment.