Hacker News new | past | comments | ask | show | jobs | submit login
Pinball Fantasies assembly source code (github.com/historicalsource)
125 points by velmu on Sept 27, 2021 | hide | past | favorite | 50 comments



Pinball Dreams and Pinball Fantasies were my favourite pinballs games on Amiga (and then Psycho Pinball on PC). I know that nowadays e.g. Pinball FX3 provides so many bells and whistles and boards... but I often find all these boards to be kind of overloaded and so busy with animations, sounds and flashing lights... Maybe it is like with football games - I understand that FIFA or PES are much more complete games but the arcade charm of Sensible Soccer makes it a winner for me.

This or just a nostalgia factor...


Pinball FX3 is so hostile to regular gamers too. The level select screen makes it really hard to see which tables you own and which you don't (to incentivize you to buy more), until you go and find them and add them to favorites column. There is no way to filter the list by tables you own. I am so sick of this upsell bullshit when I have already given them my money, and even worse most of the list is licensed franchise bullshit for properties I do not care about.

Also their ball physics feel weird. It has gotten better from FX -> FX2 -> FX3, but still feels off. Their remakes of actual tables seem to have a different physics model and ball interactions feel a lot more plausible


This is why I don't play much virtual pinball. Its different enough subtly to wreck the physics model in your brain about IRL pinball.

I have a friend who streams Pinball Arcade on Twitch--and he's very good at it but he relies on a lot of nudging which is very difficult to do IRL. It involves physical strength and you have to have clearance around the machine-- but its just a button on the controller.

The real hobgoblin is how consistent the game play is. The table never dents, parts are never misaligned, there's never a playfield protector on that subtly changes how the ball acts in certain places. The timing of the shots are always exxacctllyyy the same.


Same here, I loved those two games, graphics was excellent, music too, and motion was incredibly fluid for a 8MHz machine. The linked .asm code however seems rather x86 than M68K to me, it's probably a late x86 DOS port. The PC port of the above games was not bad, but it lacked the same smoothness of the Amiga version and, if memory serves, music was a lot worse.

> but the arcade charm of Sensible Soccer makes it a winner for me

+1. It was damn fun, as Kick Off had been a couple years before. I have great memories of tournaments with friends; good old times.


Maybe you were playing on the PC speaker, the music on that was definitely lot worse. If you had a real soundcard though, the music was definitely up to par with Amiga or maybe even better quality, and most probably better if you were using the GUS that did it's mixing on the hardware.

The game was also very smooth on a 386 SX 25 MHz, one of my favorite games from that era. The PC version also had 256 -color support, making it a better looking version than the standard Amiga ECS version.

Interesting tidbit from Wikipedia, Pinball Fantasies was hailed in the magazines also:

"In 1994, PC Gamer US named Pinball Fantasies the 33rd best computer game ever. The editors hailed it as "the best and most realistic pinball action ever seen on a PC screen".[97] That same year, PC Gamer UK named it the 19th best computer game of all time. The editors wrote, "[I]f Pinball's your thing, there's currently nothing on the PC (or any home system, for that matter) better than this".[96] In 1995, PC Gamer US presented Pinball Fantasies with its 1994 "Best Arcade Game" award.[98]"


I've never played the Amiga version but the PC version was very smooth even on my old 286.


>but I often find all these boards to be kind of overloaded and so busy with animations, sounds and flashing lights

No, i think you're quite right - especially tables that don't have a "real world counterpart" often don't make a lot of sense to me, rules wise and also, have way too much going on, too many gimmicks etc...

Real world emulations on the other hand most of the time have really well thought out gameplay and lots and lots of replay value.

I miss the days being able to go to an arcade or some random pub and play a few balls...


https://pinballmap.com/ is a great resource for finding games in your area though it's mostly US based


Which of the boards in Pinball FX3 you think are not overloaded? Triggered by my recent visit in some pinball 'museum' (me and my family spent like 3 hours playing on various tables) I did a quick research about available pinball games, then I played a little a bit those 2 tables available for free in Pinball FX3 and demoed a couple of others. But it was easier to achieve some 'competence' and understanding and select favourite ones when you had 4 boards in Pinball Dreams/Fantasies then in FX3 when you had few dozens of them...


the nostalgia factor for Dreams & Fantasies for me is mostly the music & sfx. the game was fun, but the atmosphere from the music brought it to a new level.

I still hear the laughing from Haunted Mansion [1] in my head quite often.

[1] https://youtu.be/y6xfzwO8GdA?t=933


This is cute:

    DB " HI HACKER!  PLEASE DON'T CRACK THIS PROGRAM! IT WAS MADE BY"
    DB " THE DEMO GROUP TSP. WE NEED THE MONEY TO BE ABLE TO KEEP ON"
    DB " CODING GAMES FOR THE PC! THIS PROGRAM ISN'T HARD TO CRACK, SO"
    DB " MAKE A DEMO INSTEAD TO PROVE YOUR SKILLS... IF YOU CRACK IT"
    DB " WE WILL HATE YOU 4EVER!  HAVE A NICE DAY! :-) "
I remember back in the day I always loved seeing these little messages in hexdumps of programs I was trying to understand.


I always particularly loved the tech scroller shown in-game:

    TECHSCROLL DB 21 dup(1),'YEAH     YOU ARE PROBABLY WONDERING HOW IT IS POSSIBLE TO MAKE A GAME LIKE THIS ON THE PC'
      DB '                         FIRST OF ALL THE GAME IS CODED IN 100 PERCENT ASSEMBLER LANGUAGE              '
      DB '      WE RUN IN A SPECIAL VGA   320 X 240   OR   360 X 350   IN 256 COLOR MODE                        HARDWARE IS USED FOR SCROLLING THE TABLE           '
      DB '      THE FLIPPERS AND DOT MATRIX SCOREPANEL ARE DELTA ANIMATED AND TO MAKE THE GRAPHICS RUN FLICKER FREE WE ARE USING RASTER INTERRUPTS                      THE PALETTE IS USED FOR FLASHING THE LIGHTS      '
      DB '                     THE MUSIC ROUTINE HAS FEATURES SUCH AS SOFT CLIPPING AND INTERPOLATIVE MIXING          '
      DB '                  ALTOGETHER THIS MAKES THE GAME POSSIBLE TO RUN ON A 12 MHZ 286 WITH SOUNDBLASTER MUSIC AT 16KHZ IN EACH FRAME'
      DB 21 DUP (1),255


TSP = The Silents PC?


The Space Pigs, known for this demo among others https://www.pouet.net/prod.php?which=3972


For reference: https://www.youtube.com/watch?v=S-VT8Hs3OhY

It is so obvious from the style and music that a demo group (The Silents) were behind this game. I'm still loving it to this day. Missing getting boxes of demo discs :)

Also: https://www.youtube.com/watch?v=o96I_UfSdIU Man, Jesper Kyd was great back then already...


Developed 30 years ago and in Sweden, judging by the code comments :)

https://github.com/historicalsource/pinballfantasies/blob/ma...


It also seems that there are some text conversion issues in comments, since e.g. "anv„nd" is not a word, but "använd" is.


Looks like it might be encoded in code page 850, which was commonly used in DOS at the time for non-English locales, at least in parts of Europe.

On another note, it's interesting to see what appear to be some kinds of todo items or task assignments in the comments of fantasie.asm: things like testing on different kinds of displays and computers. I guess the project management toolbox was a bit less refined at the time.


Project managing in assembler code, I love it. One of Gabriels assignments is that he should test if the game runs well on his dad's laptop.


I remember reading about the development of Baldur's Gate II - around 2000 I suppose, a rather big game, especially for its times - and they supposedly tracked all bugs using some kind of physical board and paper notes. I'm not sure if that is true of course.

Pinball Fantasies was likely developed probably around 1991-1992, so 8 years earlier. We are really rather spoiled by nowadays tools (when we are not complaining about Jira etc. of course). I also still remember rather horrible crudeness of tools like Bugzilla or Mantis which were one of the first tools in this area I worked with.


The whole set of credits for the original Amiga version is less than ten people: two programmers, one artist, one musician, and a couple of producers. This port was done by "FrontLine Design", who seemed to be three more people, according to the text in intro.asm.

I'm not sure you need a complex project management toolbox for a team that size.

(Digital Illusions grew into DICE, who certainly does need complex project management tools; I wonder how many of the original members are still there.)


"FrontLine Design" was also known as The Space Pigs in the early PC demo scene (90-93).


I am completely not surprised that the PC port of a game by Amiga demo sceners was handled by PC demo sceners :)


And of course the PC demoscene legends Future Crew did Epic Pinball in 1993, so there's definitely some kind of fixation on pinball by demosceners!

Not that that's a bad thing by any means.


Epic MegaGames tried to recruit Future Crew, but they declined. I remember reading from somewhere that one of the coders from FC made a technically impressive pinball game in a weekend out of spite and showmanship and showed it to Tim Sweeney that they could do it, but wont.

Wikipedia says this:

"Tim Sweeney saw some impressive 3D demos done by a group of Finnish developers that were members of the PC demogroup Future Crew and sent Mark Rein to Finland to recruit them. They declined except for Misko Iho who travelled to the US with Mark, bringing back an unfinished version of a pinball game.[5] Unable to convince them to allow Epic MegaGames to finish the game, Tim showed the unfinished game to James Schmalz in Canada. James developed Epic Pinball (with six pinball tables) from scratch in nine months while he was in college. Tim and Mark kept in touch with James to ensure he was on the right track.[6] The graphics were created using Deluxe Paint II and the music was composed using Scream Tracker.[7]"


The "conversion issue" is merely a display issue on GitHub - I myself appreciate that the source files were uploaded as-is and not converted to UTF-8. They are true relics of their time and will look correct when viewed in the programs they were intended to be used with.


> FELHANTERINGEN CP! (TMINSTONE OUT OF MEM)

The error handling is retarded! (At least out of mem)

> TONINGEN SKA INTE SLUTA P BAJSBRUNT UTAN P SVART!

The fade should not stop on poop-brown, but on black!


Ooh, this is neat. Long time since I've had to read assembler. The first thing that jumps to mind is wanting to read the tests for this, which of course don't exist. In retrospect, creating this seems herculean; there's so much knowledge about how it should work that lives only in somebody's head, and only as long as they can hold it all there.


The nice thing about game development (at least back then) is that once you ship the game, you can expunge all that info from your brain. So as long as the game works when you ship it, no need for tests to catch regressions.


This model of development also meant cross-platform ports were practically rewrites.

In practice it wasn't really possible to reuse code unless the target platform had the same CPU and at least equal graphics features (as was the case with e.g. porting from Atari ST to Amiga). So every port started from scratch.


That is, until your boss says "Great job everyone! Time to get started on Pinball Fantasies 2"


Better hope it fails :D


Well in a way it was also much more simpler, you had in DOS days a direct interface to the video memory and you most probably understood more accurately how the whole operation worked. So developers could map the hardware in their head more easily, vs nowadays where you have in many cases at multiple layers of abstraction between the code and the computer, having to figure out cryptic black boxes like OpenGL drivers and what not that are difficult to debug and make it hard to understand how things work.

Back in the day of course challenge was more not having widespread documentation and figuring things out as you went, especially with these pioneers.


Instead of documented OpenGL drivers which could have cryptic bugs they used undocumented VGA modes which could have cryptic bugs. Seems nothing's changed then ;)


Well thats true :)


The subroutine "set_360x350" (in fantasie.asm) brings me back to teenage VGA hacking.

It starts with the standard 320x200x256c MCGA mode (13h), then proceeds to tweak a few dozen video card registers into a combination that produces a 360*350 frame buffer.

Just don't fry your CRT while trying to come up with the magic register combo!


Great news, even if it's not the Amiga version, which is the one I'd really love to read the sources for.


Yeah I was really excited expecting to see m68k Amiga code. Oh well, maybe next time!


I played that game a lot as a kid. Especially Party Land ... because I liked the colors and the music.

And I wasn't that good.


How are the graphics created? Were they actually encoded as bitmap values, or were they binary type files shipped with the game?


They don't seem to be part of the repository. In the final game, they were part of the individual tables' exectuables, my guess would be that commands like `INCLUDELIB STONES.LIB` are responsible for linking the graphics into the executable.


Isn’t that what STONES.ASM assembles to?

Skimming it, it has lots of data (or, possibly, bytecode that gets interpreted) and has a section called “animations” (starting at line 2259)


If that was the case, STONES.ASM would assemble to STONES.LIB and CLEAR.LIB at the same time. The assembler they used must use this keyword differently than MASM. The data in this ASM file isn't nearly enough to represent the rich graphics of Pinball Fantasies.


It's really a shame since that means you can't compile this to a functional executable without significant effort.


For both preservation and nostalgia, this is fantastic to see. Several of my formative years were consumed by Pinball Fantasies on the Amiga. I still play it regularly on FS-UAE and a (seemingly unmaintained / defunct) port on iOS.


I was not familiar with this one - https://www.youtube.com/watch?v=o3mQqdvm6lI


So weird. Todays ModernVintageGamer episode features this game and then this pops up!


This code base is a treasure trove of Swedish 90s demo scene profanities...


> (ILLEGAL SPARNING?)


1984!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: