Skip to content

Commit

Permalink
Started to add descriptive text for each of the patches
Browse files Browse the repository at this point in the history
Text is displayed in the frontend when Jumpman faces a machine.
  • Loading branch information
10yard committed Oct 18, 2022
1 parent f1bd922 commit dd2135f
Show file tree
Hide file tree
Showing 20 changed files with 194 additions and 7 deletions.
1 change: 1 addition & 0 deletions dk_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
WHITE = (254, 252, 255)
PINK = (255, 210, 190)
GREY = (128, 128, 128)
DARKGREY = (40, 40, 40)
DARKBLUE = (4, 2, 220)

# Alpha channel value for faded/locked arcade machines
Expand Down
1 change: 1 addition & 0 deletions dk_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
competing = False # Jumpman is chasing a minimum score to gain points on the current game
awarded = False # Awarded coins are dropped and in play
cointype = 0 # Type of coin being grabbed by DK (0=No Coin, 1 Low Value, 2=High Value)
gametext = [] # Game specific text

# Sprites
icons = [] # List of icons and screen locations
Expand Down
9 changes: 9 additions & 0 deletions dk_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ def apply_skill(base_score):
return base_score


def load_game_texts():
# load game texts
texts = []
for filename in glob(os.path.join(PATCH_DIR, "*kong*.txt")):
with open(filename, 'r') as f_in:
texts.append([os.path.basename(filename).split(".")[0], f_in.readlines()])
return texts


def read_romlist():
# read romlist and return info about available roms (and shell scripts)
romlist = []
Expand Down
8 changes: 4 additions & 4 deletions fonts/tom-thumb.bdf
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ STARTCHAR underscore
ENCODING 95
SWIDTH 1000 0
DWIDTH 4 0
BBX 3 1 0 0
BBX 6 1 0 2
BITMAP
E0
FC
ENDCHAR
STARTCHAR grave
ENCODING 96
Expand Down Expand Up @@ -1079,7 +1079,7 @@ BITMAP
8B
91
22
03
43
ENDCHAR
STARTCHAR bar
ENCODING 124
Expand All @@ -1103,7 +1103,7 @@ BITMAP
90
A5
27
01
41
ENDCHAR
STARTCHAR asciitilde
ENCODING 126
Expand Down
23 changes: 22 additions & 1 deletion launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,15 +914,35 @@ def process_interrupts():
# Purge coins
_g.coins = [i for i in _g.coins if i[0] > -10]

# Pauline shouts out the launch options
if _g.ready:
# Pauline shouts out the launch options
if since_last_move() % 4 <= 2:
write_text("Push P1 START for options...", x=108, y=38, bg=MAGENTA, fg=PINK, bubble=True)
write_text("P1 START", x=128, y=38, bg=MAGENTA)
else:
write_text("or push JUMP to play", x=108, y=38, bg=MAGENTA, fg=PINK, bubble=True)
write_text("JUMP", x=140, y=38, bg=MAGENTA)

# Display game text
sub, name, *_ = display_icons(detect_only=True)
selected = sub if sub else name
for rom, text_lines in _g.gametext:
if rom == selected and text_lines:
# Text appears above or below Jumpman based on his Y position
text_y = _g.ypos - (len(text_lines)+2) * 6 if _g.ypos >= 138 else _g.ypos + 32
# Clear a space for text and draw border
pygame.draw.rect(_g.screen, DARKGREY, (0, text_y-5, 223, len(text_lines)*6+8))
pygame.draw.rect(_g.screen, GREY, (0, text_y - 5, 223, 14))
pygame.draw.rect(_g.screen, GREY, (0, text_y-5, 223, len(text_lines)*6+8), width=2)
# Display the game text
for i, line in enumerate(text_lines):
text = line.replace("\n","").replace("\r","")
if i == 0:
# Center align the title
text = " "*int((55 - len(text.strip())) / 2)+text.strip()
write_text(text[:55], x=4, y=text_y+(i*6))
break


def get_prize_placing(awarded):
"""Return the awarded prize placing e.g. '1', '1st'"""
Expand Down Expand Up @@ -1034,6 +1054,7 @@ def main(initial=True):
detect_joysticks()
check_patches_available()
build_menus(initial=True)
_g.gametext = _s.load_game_texts()

# Launch front end
check_roms_available()
Expand Down
11 changes: 11 additions & 0 deletions patch/ckongpt2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CRAZY KONG

This Donkey Kong clone retains all of the gameplay
elements of Donkey Kong, but has the graphics redrawn
and re-colorised. There are some quirks with the game.

If something moves, don't touch it. If it doesn't
move, it's either a hammer for bashing barrels or a
bonus item for picking up umbrella, purse, etc..

A Donkey Kong Clone Developed by Falcon
12 changes: 12 additions & 0 deletions patch/dkong.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DONKEY KONG

This is where it all started in 1981.

Jumpman attempts to reach the top of a construction
site where Pauline is being held captive. He can walk
along platforms, jump, and climb ladders as well.
Donkey Kong hinders Jumpman from a higher location by
throwing barrels at him. Jumpman has the ability to
jump over obstacles or destroy them using a hammer.

Developed by Nintendo
13 changes: 13 additions & 0 deletions patch/dkong3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DONKEY KONG 3

Help Stanley gets rid of Donkey Kong, and the bugs
by using his bug spray, if Donkey Kong comes down,
or you get touched by a bug, you will lose a life.

Stanley must shoot insect repellent at Kong to drive
him to the top of the screen while avoiding/shooting
insects. He must protecting five plants at the bottom
of the screen from being carried off by the various
insects.

Developed by Nintendo
12 changes: 12 additions & 0 deletions patch/dkongcb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Donkey Kong Crazy Barrels Edition

You play the barrels screen over and over again. But
the internal difficulty starts where the original
stops: at level 5. This is called the Agitation Level
of Donkey Kong, displayed on the screen as A=5 and
goes up with each board that you clear.

Donkey Kong throws a lot more wild barrels than in the
original game.

Hack Developed by Paul Goes
13 changes: 13 additions & 0 deletions patch/dkonggalakong.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GALAKONG

Jumpman is assisted by an accompanying ship which can
take out enemies. Bonus points are awarded for
destroying multiple barrels, pies, springs, fires etc.

The jump button also shoots.

Your ship follows Jumpman's position automatically.
The ship can be controlled independently when you are
on a ladder.

Hack Developed by Jon Wilson (10yard)
12 changes: 12 additions & 0 deletions patch/dkonghalf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
HALF KONG

A shorter game of Donkey Kong.

You play half of a regular game with twice the points
awarded.
The game starts at level 12-1 with 1 life plus a
bonus life.

Can you get to the Kill Screen with 1 million points?

Hack Developed by Jon Wilson (10yard)
12 changes: 12 additions & 0 deletions patch/dkonghrthnt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Donkey Kong Heart Hunt

Pauline has placed three hearts on each board. Jumpman
will only be able to finish after he has collected all
three hearts.

The hearts make the final ladder to Pauline appear on
barrels. On pies it makes the retractable ladders
start moving. On rivets it breaks the chains that hold
up Donkey Kong.

Hack Developed by Paul Goes
13 changes: 13 additions & 0 deletions patch/dkongjr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DONKEY KONG JUNIOR

The game's basic concept is the same as Donkey Kong
except the good guys and bad guys have changed places.
The player controls Donkey Kong Junior, a small ape
who must rescue his father, Donkey Kong, from his
nemesis Mario.

The game has several distinct levels with similar
goals. Fruit can be dropped on enemies leg traps and
birds to kill them.

Developed by Nintendo
9 changes: 9 additions & 0 deletions patch/dkonglava.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Donkey Kong Lava Panic!

Jumpman must keep his cool and move quickly up the
platforms to avoid rising Lava. Don't let the lava
rise above Jumpman.

...and try not to panic!

Hack Developed by Jon Wilson (10yard)
10 changes: 10 additions & 0 deletions patch/dkongoctomonkey.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
OCTO MONKEY

An extremely short game of Donkey Kong.

You play 1/8 of a game with x8 points awarded.
The game starts at level 19-4 with 1 life.

Can you get to the Kill Screen with 1 million points?

Hack Developed by Jon Wilson (10yard)
11 changes: 11 additions & 0 deletions patch/dkongquarter.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
QUARTER KONG

A short game of Donkey Kong.

You play quarter of a regular game with 4x the points
awarded.
The game starts at level 17-1 with 1 life.

Can you get to the Kill Screen with 1 million points?

Hack Developed by Jon Wilson (10yard)
7 changes: 7 additions & 0 deletions patch/dkongvector.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Vector Kong

A hack of the original arcade game which suppresses
the normal video output completely and renders high
resolution vectors to the screen instead of pixels.

Hack Developed by Jon Wilson (10yard)
9 changes: 9 additions & 0 deletions patch/dkongwho.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DK Who and the Daleks

Jumpman has regenerated as the next Dr Who. Help him
rescue his assistant from the clutches of Donkey Kong.
The Daleks have destroyed her rocket ship and you're
her only hope for escape. Use the Tardis to teleport
Jumpman through dimensions in spacetime.

Hack Developed by Jon Wilson (10yard)
12 changes: 12 additions & 0 deletions patch/dkongwizardry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DONKEY KONG WIZARDY

You play as Jumpman the Wizard trying to rescue his
girlfriend, Witch Pauline. As Wizard you have a spell
at your disposal to temporarily halt the fires when
they come too close. You can use this spell once on
each board and activate it by hitting the P2 button.

In this game there is more pressure from fireballs,
so use your magic wisely ...

Hack Developed by Paul Goes
3 changes: 1 addition & 2 deletions romlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dkongjr,,DK Junior,DK Junior,3,1,2,,10000,15000,30000
dkong,dkongpies,DK Pies,DK Pies Only,3,1,2,,10000,15000,30000
dkong,dkonggalakong,GalaKong,GalaKong Shoot 'Em Up,5,1,2,,20000,40000,60000
dkong,dkongoctomonkey,DK Octo,OctoMonkey,7,1,2,1000,20000,40000,65000
dkong,dkongwizardry,DK Wiz,DK Wizardry,9,1,2,1000,10000,20000,40000
dkong,dkongwizardry,DK Wizard,DK Wizardry,9,1,2,1000,10000,20000,40000
dkongx11,dkongspooky,Spooky,DK Spooky Remix,10,1,2,2000,10000,15000,30000
dkong,dkong40,DK 40!!,DK Anniversary Edition,11,1,2,4000,10000,25000,40000
dkong,dkongspringy,DK Springy,DK Springs Only,12,1,2,6000,10000,15000,30000
Expand Down Expand Up @@ -39,7 +39,6 @@ dkong,dkongwbh,DK Wild,,44,1,2,54000,1000,2000,5000
dkong,dkong2nut,2NUT,2NUT Kong,45,1,2,56000,10000,25000,50000
dkong,dkongallen,AllenKong,Allen Kong,46,1,2,58000,,,
dkongpe,dkongpauline,DK Pauline,DK Pauline Edition,47,1,2,58000,8000,15000,25000
dkong,dkonghalf,1/2Kong,Half Kong,99,1,2,,,,
dkong,dkongbarrels,DK Barrels,DK Barrels Only,99,1,2,,,,
dkong,dkongpies,DK Pies,DK Pies Only,99,1,2,,,,
dkong,dkong2600,DK 2600,DK Atari 2600 Graphics,99,1,2,,,,
Expand Down

0 comments on commit dd2135f

Please sign in to comment.