97

When adding or subtracting fractions, you need to find the least common multiple of the two denominators. That's an expensive operation, much more expensive than adding or subtracting floating points, which just requires shifts. Multiplication is also more expensive, because now you need to multiply two numbers instead of just one. Similarly for division. ...


86

This is most certainly a myth. There was no conspiracy by Steve Jobs or Apple to prevent third-parties from engaging with the ecosystem that would eventually flourish for Classic Macintosh applications. Interestingly, one of the earliest, significant, 3rd party applications to be released for the Macintosh was Microsoft Word in 1985. Microsoft had already ...


77

The one-word answer to your question is "badly". The way to create random numbers quickly is via a Pseudorandom number generator (PRNG). That Wikipedia page gives the history of PRNGs and in particular notes that linear congruential generators are/were common, with quite a few failings including periodicity (i.e. it cycles through the same sequence of ...


68

Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin — John von Neumann The method that RAND used to calculate their A Million Random Digits with 100,000 Normal Deviates is described in this brief paper: History of RAND's Random Digits: Summary from 1949. In summary, the gated output of a gas-filled ...


58

In Super Mario Bros, you can access warp zones in three areas of the game. There are two of these that are important for the minus world glitch: the one at the end of World 1-2 (following the exit pipe) and the one at the end of World 4-2 (also following the exit pipe). The first warp zone takes you normally to World 2, 3, and 4, while the second one only ...


54

Simply yes. And not just a few instructions, but whole CPUs have been developed with languages in mind. Most prominent maybe Intel's 8086. Already the basic CPU was designed to support the way high level languages handle memory management, especially stack allocation and usage. With BP a separate register for stack frames and addressing was added in ...


51

Warp zones exist at the end of some levels. In order to access them, you have to break through blocks at the top of the level, then run along the top until a secret area becomes visible. In order to access the warp zone below you, you have to fall through a gap at the right-most side of the level. The loading of the right-most wall is what triggers the ...


51

My question is, why not use fractions? Quick answer: Too much code needed Dynamic storage needed Long representation even for simple numbers Complex and slow execution And most prominent: Because floating point is already based on fractions:Binary ones, the kind a binary computer handles best. Long Form: The mantissa of a floating point number is a ...


50

There are only seven fruit in Pac-man. The way the game calculates the number of fruit to draw is as follows: LD A,(#4E13): Load the level number (at memory address 0x4E13) into A. INC A: Increment A. CP #08: Is A < 8? JP NC,#2C2E: If not, jump to large-number fruit handling code. LD DE,#3B08: Load the address of the cherry into DE. Start the fruit-...


47

Interesting question with an interesting answer. First let me get one thing out of the way: One example from this answer mentions how C pointers were, at least in part, influenced by the design of the PDP-11 It's a myth to suggest C's design is based on the PDP-11. People often quote, for example, the increment and decrement operators because they have ...


44

One interesting example of programming languages driving hardware development is the LISP machine. Since "normal" computers of the time period couldn't execute lisp code efficiently, and there was a high demand for the language in academia and research, dedicated hardware was built with the sole purpose of executing lisp code. Although lisp machines were ...


42

BBC BASIC, first shipped in 1981, includes the EVAL keyword, which means "ask the interpreter to evaluate this string as an expression". Since strings can be mutated, a program can mutate what will be evaluated at runtime. The BBC MOS also provides *SPOOL (write screen output to a file) and *EXEC (read text from a file and act as if it had been typed), if ...


34

The reason for this glitch is rather obscure; it's not surprising that the developers didn't catch it. It all starts with the tunnels on the sides of the screen. These tunnels allow Ms. Pac-man and the ghosts to move from one side of the screen to the other. But, somewhere in development, somebody decided that the ghosts were moving too quickly through them. ...


33

Elite used procedural generation. There's a good description of the algorithm on the Elite Wiki and although the original 6502 source code archives are available on Ian Bell's Elite site he also converted the procedural generation code into C for "Text Elite", so that's probably easier to read. This extract from the book "Backroom Boys: The Secret Return Of ...


33

The Commodore 64 had a built-in audio processor, called the SID chip. This chip would generate sounds based on (among other things) a frequency (e.g. 440 Hz) and a wave shape (square, sawtooth, etc.). One of the options was to generate "white noise", which is basically a random series of volumes. Now the fun bit about this is that you could read a ...


33

The first game sold for use on the IBM PC was Microsoft Adventure, which was available on the day the IBM PC was released (it was part of the launch, along with VisiCalc, Easywriter etc.). It was developed by Gordon Letwin (later of OS/2 fame) in 1979, based on the Colossal Cave mainframe game. It didn’t run on DOS though, it was a “booter” — you booted the ...


31

The premise of his argument was that Apple could have ruled the world with the Macintosh (as in, Windows/IBM Compatibles wouldn't have had a 90% or whatever market share) but Steve Jobs was just too hard headed and wouldn't let anyone, except maybe Adobe, develop for it. This is actually a distortion of the real argument. Apple never stopped other ...


30

There's actually two versions IO.SYS and COMMAND.COM used with Windows ME. The normal "crippled" versions used to boot from hard disks, and the "Emergency Boot Disk" versions use to boot from floppies. It's those later EBD versions that are embedded in diskcopy.dll under Windows XP, Windows Vista, Windows 7 and Windows 8. The EBD versions are crippled in ...


28

Hardware-wise, the Commodore 64, like most early computers, was synchronized to its graphics output: in the case of the C64, the CPU clock was derived from the timing crystal in the video hardware. From a game-programming standpoint, the most important timing element is the vertical refresh rate: the 50 Hz (PAL) or 60 Hz (NTSC) rate at which the screen ...


28

This website might help. A guy (Chris Covell) picked up a children's picture book in Japan which shows kids how NES games were made. (Mostly focussing on Super Mario Bros. 3) Chris actually scanned the whole book and translated it so you can read it on the website! The book shows many things such as designing (with Shigeru Miyamoto smoking), programming, ...


28

Dig Dug stores the positions of objects in tables in memory. There are two tables for this: an enemy table containing the positions of up to four Pookas and four Fygars, and a rock table containing the positions of up to six rocks. There is also a table containing tunnel data, but this is stored in a different way. The game divides the playable area into ...


28

Interesting question. After all, it's the main job of a computer to come up with deterministic results, which is pretty much the opposite of pure randomness. In reality, coming up with a series of non-deterministic numbers from a digital circuit only is considered technically impossible. Modern computers use "known noise" in their peripheral devices or even ...


27

While I don't know the first software to be referred to as an engine, it seemed useful to check Google's Ngram Viewer: As can be seen, database engine slowly began being to be used around 1979, while game engine took another decade to begin catching on. Checking a few books using software engine, they were using the phrase generally, in titles like Best ...


25

There is a mathematical problem with your idea. If you choose to store fractions with a fixed-length numerator and denominator, that's works fine until you try to do arithmetic with them. At that point, the numerator and denominator of the result may become much bigger. Take a simple example: you could easily store 1/1000 and 1/1001 exactly, using 16-bit ...


23

I worked with one and it was a pain to use. It was a cartridge made of static ram; the computer would write the contents to the cartridge and you would manually reset the console. it was slow, the upload would sometimes fail and there was no way to communicate anything back to the computer. We were using an assembler under MSDOS to make the games. On the ...


22

These programs usually had a mono-color background with very little text. By setting the color of the screen as "black ink on black paper" or "white ink on white paper", it is possible to relocate the whole software in video RAM and hide it from view. These programs were tiny asm utilities (they used 1 or 2 kilobytes or RAM) which copied themselves to ...


22

On some games like "Super Mario 64", the randomness was determined by simply XORing the value whenever it's called (technical detail can be found here). This allowed it to be exploited, especially on places where it's never called naturally, like Peach's castle, but by doing moves that generate dust (which calls the RNG function itself), it can be exploited. ...


22

The first set of Inside Macintosh books was about 1000 pages of documentation covering everything you needed to write a Macintosh application, and was available from the beginning. It didn't only cover the APIs, but also gave advice on how to design the user interface, since it was one of the first GUIs. Folklore.org has a story about the process of writing ...


21

Yes. Case in point, the VAX. The instruction set design was influenced by the requirements of the compiled languages of the day. For example, the orthogonality of the ISA; the provision of instructions that map to language constructs such as 'case' statements (in the numbered-case sense of Hoare's original formulation, not the labelled-case of C), loop ...


20

Bootable media were in fact the primary means of spreading certain kinds of viruses, but self-booting games on write-protected media were safe because no software company would distribute games with viruses on them, and if the viruses weren't on the disks when manufactured they were unlikely to get there later unless someone's drive had the write-protect ...


Only top voted, non community-wiki answers of a minimum length are eligible