Magic Cups

Copyright © 2018 by Víctor Parada


This is a little game for the 2018 NOMAM's BASIC 10-liners Contest. This program fits in the PUR-120 category, and it was written using TurboBASIC XL for the 8-bits ATARI XL/XE.


Do not stop looking at where the little ball is. Whoops! Can you find out where it is now?


MAGICCUP start The ball is covered by a cup.
MAGICCUP mixing The cups are mixed some times. Follow your cup with your eyes.
MAGICCUP choose Use the keyboard numbers to choose the cup where you think the ball is.
MAGICCUP check The cups are raised to check for your selection.
MAGICCUP harder If you were right, the ball is covered again, the cups are mixed faster, and from time to time, more cups are added.
MAGICCUP gameover The game is over when you lose the ball.

Development of the game

I was thinking in a simple animation that could be performed in Atari BASIC for the PUR-80 category, and the idea of the sliding cups came into my mind. But using large objects is not something that could be done with single instructions and DPOKE was not available in that flavor of BASIC.

Anyway, I wanted to see how it performed a single swap animation using TurboBasic XL and then evaluate alternatives for Atari BASIC. After a couple of hours, I had a animation working in TurboBasic XL, but the size of the routine was larger than the expected for a PUR-80 category, so I continued the development for PUR-120 category, where TurboBasic XL is allowed.

MAGICCUP prototype

Mixing prototype

The mixing routine worked so well, that any number of cups could be used. It was only required to identify the position of the first cup in the row and the distance between them to span smoothly in the screen. That gave me the idea of the game concept: few cups at the beginning and many in higher rounds. Also the number of swaps and the speed of them should be increased in the following rounds.

MAGICCUP prototype 2

Many cups

The next step was to add some graphics, so I designed very simple sprites. The game looked very different and that required the suitable sound effects, so I tried some variations and picked the best ones.

MAGICCUP prototype 3

First version of sprites

To complete the game, I selected 2 color palettes, one for PAL and one for NTSC. I also added the title and game over message, and adjust the sprites a little to add a better 3D effect.

A trivia of this game is that no IF-ENDIF conditional structures were used. The flow control is managed by a REPEAT-UNTIL and some FOR-NEXT loops, and other conditional behaviors are managed in expresions.

Return to my 10-liners page.

© 2018 by Víctor Parada - 2018-03-01