The MSX version is almost like the commodore version, with some little changes for the msx system,
very similar to the IBM version (CLS, INKEY$, LOCATE).
Tested in a emulator, the game goes VERY slowly. So I tried to optimize it a little... with few results, and I am afraid I messed up a few things in this
intermediate version.
Anyway, it is an intermediate version, playable more or less.
Some changes:
-TIME is variable to see the speed of the game. Delete the 465 line or it will only play a screen and then show the "speed" of the game.
-LB LC LD are variables to try to optimize a little, some constant calculation can be done at the start, I believe.
-I added a little music at the start (or each time you pass to a new screen). The PLAY instrucion in 4510 line. Delete it if you want. Also you can use BEEP instruccion (in the colision rutine perphaps?, as you wish)
If I have time I would add it a sea noise, from the noise chip MSX has (I read it in a book I have) (*).
-I did not like/understand the character some time the food/air bubbles is used for, so, I believe in this version , the food and bubble are hardcoded (line 5160 and 6690). Change them as you wish.
-I am afraid in some places, instead of variable=. (is this the same as variable=0 ? Is it faster?) I misstyped and entered variable=0!. This even may be slower, I dont know very much about data type in MSX.
-I changed some if ... then goto... to something equivalent, I read it is faster this way. Also I changed some FOR... NEXT variable to FOR...NEXT. Same reason.
-MAXFILES is a instruccion to try to free some memory.
-I dont use the keyboard routine, same reason, to try to speed up somethings. The use of LOCATE can be changed also.
-The nice GAME OVER text, I tried to entered it and it gave me a memory -I believe- error, so I use a simple/boring version.
Pending to test: SCREEN 1? Would it be faster? Sound? General improvement
Probably this version has some bugs I did not realize. Sorry.
Feel free to change as you wish, and tell us :-)
(*)Update:forget about that. I thought I had some magical instruction to emulate the sound of sea.... but it is almost just noise.Forget it, sorry.
SOURCE:
http://justpaste.it/h0qs
Some Reference
https://sites.google.com/site/msxpage/msx-programming/msx-basic-tips
http://map.grauw.nl/articles/basic_tips_tricks.php