New games for the Gigatron
Posted: 23 May 2021, 21:51
After it somehow with the software (games) does not really go on I tried to make something myself.
First I thought of something time uncritical. So I tried myself in a Sokoban for the Gigatron.
I still have many questions about the basic compiler, I list them below. It is not finished yet but it should be good to try it, I add the files.
I tested it on the emulator and on real hardware. The arrow keys move the player, Start (Del) restarts the level and A (PageUp) changes to the next level.
The As said it is not finished yet. It is still missing undo moves. Goto level would be perhaps also not bad. The 32k version has 81 levels, the 64k version 90.
Here first what I have so far:
To program with the Basic compiler. I fished my way through the forum as best I could and looked at the examples. A command reference with the possible options would help me.
Here are my questions/comments:
1. bug?
What stopped me a bit was the bug, if you insert a comment on the line of a lab/mark, then the program is translated without errors, but when you get to the point the program does a restart. I mean in the form:
if a>b then goto lable
...
lable: ' this comment leads to a restart
...
2. there are possibilities for conditional compilation.
it would be useful for debugging or for 32k and 64k versions in one file
About the game code itself, it's not very perfect I still don't understand the compiler enough. Shift functions I didn't find right away, I did it with division and multiplication, that might be slower?
With arrays, due to the compression of the levels they are of different length. In a two dimensional array, I give away memory because of this, since I have to go by the largest.
Because of this I don't get all levels in the 32k version. Since I have as first byte the number of following bytes in the level I could hail me also well by a one-dimensional array.
Are there any restrictions on the length of one-dimensional arrays?
First I thought of something time uncritical. So I tried myself in a Sokoban for the Gigatron.
I still have many questions about the basic compiler, I list them below. It is not finished yet but it should be good to try it, I add the files.
I tested it on the emulator and on real hardware. The arrow keys move the player, Start (Del) restarts the level and A (PageUp) changes to the next level.
The As said it is not finished yet. It is still missing undo moves. Goto level would be perhaps also not bad. The 32k version has 81 levels, the 64k version 90.
Here first what I have so far:
To program with the Basic compiler. I fished my way through the forum as best I could and looked at the examples. A command reference with the possible options would help me.
Here are my questions/comments:
1. bug?
What stopped me a bit was the bug, if you insert a comment on the line of a lab/mark, then the program is translated without errors, but when you get to the point the program does a restart. I mean in the form:
if a>b then goto lable
...
lable: ' this comment leads to a restart
...
2. there are possibilities for conditional compilation.
it would be useful for debugging or for 32k and 64k versions in one file
About the game code itself, it's not very perfect I still don't understand the compiler enough. Shift functions I didn't find right away, I did it with division and multiplication, that might be slower?
With arrays, due to the compression of the levels they are of different length. In a two dimensional array, I give away memory because of this, since I have to go by the largest.
Because of this I don't get all levels in the 32k version. Since I have as first byte the number of following bytes in the level I could hail me also well by a one-dimensional array.
Are there any restrictions on the length of one-dimensional arrays?