Post Reply 
(42S) New game for HP-42S : Twix
05-03-2020, 10:54 AM (This post was last modified: 05-03-2020 07:37 PM by Gene.)
Post: #1
(42S) New game for HP-42S : Twix
Hi everybody,

Taking advantage of my extra time during lockdown, I wrote a new game for the HP-42S : TWIX, inspired by a game for HP-41 by Guillaume Tello (here, at the bottom: https://gtello.pagesperso-orange.fr/hp41_e.htm), that was itself inspired by an old game for HP-67/97 named "Super Twix".

[Image: 2Wk9Xvw]

The goal of the game is to reproduce a random combination of 9 unique numbers, by manipulating numbers with different possibilities using the top-row keys :
- shift all numbers to the left
- swap the 2 most-left numbers
- swap the 2 numbers at the extremities
- swap the 2 most-right numbers
- shift all numbers to the right
- start a new game

[Image: Twix-for-HP-42-S.jpg]

The player has a limited number of moves (depending on the difficulty level) available to reproduce the winning combination.

For each new game, the program randomly chooses a combination of 9 unique numbers forming the "goal" combination to achieve (numbers on black background), and then shuffles them to form the numbers that the player starts with (numbers on white background).
Depending on the difficulty level, this setup phase takes about 30 to 45 seconds on a real HP-42S, so it's better to switch to fast mode if possible, for a smoother experience Smile

The program uses the UFL routine to display the moves counter.

All the sources are available here : https://www.dropbox.com/sh/3q0du0okwo6id...Orvra?dl=0 (including the RAW file for Free42)

Best,
Daniel
Find all posts by this user
Quote this message in a reply
05-03-2020, 05:16 PM
Post: #2
RE: New game for HP-42S : Twix
Thanks! Funny game, and nice use of AGRAPH.
What is the use of UFL?
Find all posts by this user
Quote this message in a reply
05-03-2020, 05:58 PM
Post: #3
RE: New game for HP-42S : Twix
@Daniel
Wow, nicely done! A graphical game on a calculator for that you would expect text based games.

@pinkman
Assuming it is related to UFL on HP48 it's the "Universal Font Library" that contains fonts and text related helper functions. Didn't know it also exists for HP 42S.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-03-2020, 07:34 PM
Post: #4
RE: New game for HP-42S : Twix
Thanks Smile

Indeed, here UFL is used to display the numbers of moves left.
It’s the same concept as UFL on 48, but just for numbers.
Find all posts by this user
Quote this message in a reply
05-03-2020, 10:05 PM
Post: #5
RE: (42S) New game for HP-42S : Twix
Ok understood your version of UFL:
Y: column where to write the number
X: number to write (which is in fact a label called indirectly, the routine at the corresponding label placing the right grob bytes string in ALPHA to display the number in small font)
Then XEQ UFL.
Very clever.

I share Sammy’s opinion, perfectly rendered game.
Find all posts by this user
Quote this message in a reply
05-04-2020, 08:04 AM
Post: #6
RE: (42S) New game for HP-42S : Twix
That's right.
Although UFL is not mine, it's old, maybe from Erik Ehrling.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)