FORTRAN Computer Games


FORTRAN is almost as easy to learn as BASIC, and there is much evidence to show that it is still a viable language for programs of any complexity. Outside the field of commercial data processing, where COBOL reigns supreme, there is no doubt that the majority of large systems are implemented in FORTRAN. This is particularly true of simulators which of course have much in common with simulation games.

-- Eric Solomon: Game Programming (1984)

Games & Fun in FORTRAN

A collection of source code listings of small games & programs in FORTRAN 77, mostly ports of BASIC type-in programs:

  1. Acey Ducey -- simple card game
  2. DELMAR -- horse race simulation
  3. Guess -- guess a number
  4. Hamurabi -- ancient city management game
  5. Jackpot -- slot machine
  6. Magic 8-Ball -- fortune telling
  7. Penney’s Game -- sequence prediction
  8. Pi -- Spigot algorithm
  9. Rock, Paper, Scissors -- play against the computer
  10. ROT-13 -- encoder/decoder
  11. Russian Roulette -- virtual revolver
dragon

You have access to a real computer? There is a FORTRAN 77 compiler available!

More FORTRAN Games

Slightly more complex text games, written in FORTRAN 77:

And even more FORTRAN games.

Random Numbers in FORTRAN 77

The ANSI FORTRAN 77 standard does not include any pseudo-random number generator (PRNG). Most compilers provide extensions. In any case, we can link PRNG procedures written in FORTRAN 77:

In Fortran 90, we have access to the intrinsic subroutines RANDOM_SEED() and RANDOM_NUMBER().

Early Computer Games in FORTRAN

There are many examples of early computer games and simulations originally written in or later ported to FORTRAN:


Home

Last Update: Tue, 14 Sep 2021 17:16:32 +0200
Created: Mon, 06 Sep 2021 21:56:26 +0200