Buongiorno Gruppo, tutti conosciamo Elon Musk, ma forse non tutti sanno che nel lontano 1984, quando aveva 12 anni, scrisse un piccolo e semplicissimo gioco per lo Spectravideo SV-328, Blastar.Nel 2020, il listato è saltato fuori, ed il gioco è stato convertito anche per il nostro Vic20 inespanso.
Si tratta di un gioco molto semplice e banale, un bell’esercizio in Basic da studiare.
Vi lascio le osservazioni scritte dal traduttore del programma da SV-328 al nostro amato Vic20.
Observations:The SV-328 version uses Sprites and ON INTERVAL type commands to force periodic calls to the game code. In reality, that kind of functionality doesn’t provide any advantages over the straightforward video game pattern: Render, Take Input, CalculateNextPositions and in fact probably made the game a bit more complex for Musk, because it means he could never be sure exactly which part of the program was running as one part could ‘interrupt’ another.Secondly, the game really is super-simple. With a bit more programming experience, his version can be reduced to less than half the length (though some of this is because my UDGs were in decimal rather than binary). I fixed an issue in his code whereby the STATUS BEAM that will certainly kill your ship was, I think meant to track your ship as it fell, but in fact it didn’t. In this Improved version, the status beam does track the ship!The VIC-20 version is particularly challenging for several reasons. Firstly, it’s possible, but really tricky, to set up a graphics mode so that you only allocate space for the graphics characters you need (in my case 5 characters) and are also able to access normal text characters.The solution is to allocate one page of memory for the graphics chars starting at 7168 (28*256), and it turns out that inverse characters appear as normal upper case + some block graphic characters. Because I only wanted 5 graphical chars, I used video (not ASCII) characters 59 to 63. I then set the end of BASIC to point to the address 7640, which meant that BASIC in fact could encroach on the character set! The second major problem for the VIC-20 version is that it’s tricky to print at any location on the screen. I chose to poke the printing position to where I wanted it, which needed 3 pokes, but subsequent testing shows that using cursor controls is much neater and faster. This had the onsequence that the VIC-20 version of the game is slower than the ZX Spectrum version, though ironically the sluggishness and keyboard buffering on the VICE emulator makes the game more fun and challenging to play.
Vi allego il file d64 con il programma e un’immagine con il listato (anche se potete listarla direttamente dal dischetto).
Elon Musk è sempre top. Buono studio