Jump to content

1994 Dos games book techniques

James Cat

Recommended Posts

I found Andre LaMothe's 'Teach Yourself Game Programming in 21 days' from 1994 in my local charity shop:



Along with 'Tricks of the Game Programming Gurus' also from 1994'



Since I'm new to game programming (not to programing in general) I thought they'd be a nice introduction, so I downloaded DosBox and Visual C++ 1.5 and started playing.


I decided to port things over to Java Script, which isn't too hard as using the underlying UInt8ClampedArray is pretty similar to writing into the VGA buffer (I'm sure everyone here read the trick of using a UInt32 view so elements correspond to pixels)


unfortunately, despite the books bold claims to make you a game programmer,  after some chapters on blitting, it only covers tile-based collision detection 'in theory' and provides no code for that, so this demo really only shows sprite-blitting, scrolling a tile based world and a simple parallax/infinite scrolling background.




Still it seems quite fast on my old netbook, and very fast on the mac I use at work.


Since it has no mouse/touch events you can't really see anything on mobile, but I have made another version that simply acts 'as if' you held down the right arrow until you get to the end of the scroll then goes all the way back




I would *really appreciate* very much anyone with a mobile who can load the second URL and just give me a basic feedback about whether it works at all, and roughly how many seconds it takes the little man to get from one end to the other.


I will be blogging about eveything I found out, plus hopefully another experiment which is a javascript port of a 6502/Acorn game 'Ghouls' from the 80s (I have the source code and have dabbled in 6502 assembler)


if you do look at the code in the link you will see there are lots of globals and no real attempt at OO code, but that's as close to the C as I could get it, it's just an experiment so please don't go all Volvo estate and elbow patches on me about code maintenance.


many thanks for any attention


James Cat

Link to comment
Share on other sites

Hah that's really quite neat. I think it's always worth taking old books and even listings from old computer magazines and just coding them up and seeing what happens. Sometimes the results can be really surprising. Your game above ran REALLY fast on my PC. Much too fast. Shame the book didn't have a chapter on delta timers :)

Link to comment
Share on other sites

Thanks! I think if I make the screens bigger, put some proper enemies in and collision detection it will slow things down, it's interesting to get a peak into the logic of the code written for different platform, but 'extract' relevant parts, also it's fun (and nostalgic if you're old enough to remember dos based pc games), the CD that comes with the book (teach yourself game programming in 21 days) comes with 20 shareware games, from dire to very entertaining, found it quite inspiring!

Link to comment
Share on other sites

  • 2 weeks later...

On the topic of good old books, I'm a big fan of Abrash's "Graphics Programming Black Book."   It is a huge collection of his articles and writings.  Most of it was probably written in the 90s and contains a fair amount of low level code.   Lots of the concepts are very outdated, but still are fascinating and enlightening to read about.  There is a lot of C and Assembly, but much of the talk on 3D rendering, BSP Trees, and code optimization still can apply fairly well even to someone working in Javascript.  


The physical book is huge.   Here are the PDFs:


Link to comment
Share on other sites

It really appeals to me learning old languages. When I was a kid I had an amstrad cpc 464, it came with a book containing the code for Pontoon, and I would type it all out and play it. Not really paying any antention to what the code meant. I would love to see that code again now to see if I could work out what it meant. Haven't found anything online yet.


I don't have a mobile but I checked out the desktop version. He walks fast!

Link to comment
Share on other sites

Heh, I'm thinking it might be fast enough to do a top down scrolling racing game - in the style of MicroMachines, going to try figure out a good 'mobile one touch' control for that. The only thing I'm sceptical about is that if it takes a year to finish (i'm doing this 2 days a week) then all phones will maybe have webGL and I should have just used something like pixi.js - however I suppose a good chunk of the game code will be the stuff that is not rendering so I should be able to swap it to a webgl based game, hitting a moving target is just part of the deal with html5 games I guess...

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...