Retrochallenge 2015/01 – Finished

Publishing of the listing is now complete in both paper and electronic format.

If anyone wants a physical copy then we will be taken some printouts to the Retro Computer Video Game Market 2 in Leeds on February the 7th.

If you would like a copy reserved for collection at the above event then please tweet @oldcomputerclub and let me know.


Retrochallenge 2015/01 Publishing

I was just starting publishing preparations when I noticed a REMmed line reminding me of something I hadn’t finished.

Once done this changed the game dynamic but a little too much as it became a touch too difficult too early on.

I made some adjustments and mentally signed off the project (always a nice feeling). Next was the publishing which I (foolishly) thought would be straightforward.

I looked through the worldofspectrum archives to remind myself of how the publications of the time published these listings and like I thought the replicated ZX-Printer style output in columns was the order of the day.

I had two ideas in my head of how I was going to publish, the first (ambitious) idea was to fire up an old Macintosh running an old version of PageMaker. However I think that would take too long, so my second idea was to create a HTML5 layout and I can then physically print plus print to PDF for paper-less distribution.

CSS3 has had colums support within it for a while so I thought this would be ideal to help me layout the pages.

How wrong was I!

It took me longer than I thought it should have to get the columns layed out like I wanted. Column widths, word wrapping, multiple spaces all getting messed up in the layout. Eventually I managed to get the correct Alchemy to match the 32 column width and with the ZX font thrown in I was very happy with it.

All I have to do now is print…

This was when my problems really started.

It seems Chrome doesn’t support multi column layouts when you print, so I thought not a problem I am on a Mac I’ll try Safari. Again no column support on print. After reading lots online about people with similar issues, I read that Internet Explorer (modern at least) does support column printing.

So I booted up a Windows 8.1 PC and loaded my HTML into Internet Explorer. Of course I had to make some markup changes, hack the ZX Font so it would load etc. But in the end all was good and I had my layout on screen how I wanted.

I printed to PDF and there were the columns, now I’m getting somewhere…


Retrochallenge 2015/01 Nearing completion

Happily I am nearing completion of the BASIC code now.

Scoring and a high score table is in place.

An instruction screen (doubling up as the high score screen) is done.
sub rescue title screensubrescue play
Some between level sounds are in place to fill the time while the Spectrum clears screens and variables etc.

I am starting to consider the publishing method for the type-in listing.

I want to look at producing something physical in print, so I need to remind myself the sort of style that was used in the old magazines.

I also want to produce something electronic but I don’t want to output just the text as that could easily be copied and pasted (defeating the joy of the type-in).

Before I get to this point I need to test on some other Spectrum models though.

I booted up the Fuse emulator on my Mac, and configured the Spectranet emulated interface. This allowed me to directly access the code. My initial tests with this emulator everything seemed OK.

So now I need to dig out some of the other physical models of Spectrum in order to tick off the verify stage.

Retrochallenge 2015/01 Halfway

The halfway report.

Now it is about halfway through the challenge time to take stock on where I am.

I have changed the game idea since the start.
A lot of the Game Play is functioning.

To do:
Finish the game play, especially the higher difficulty levels.
Hall of Fame
Title / Instructions screen.
Improved graphics around play field.
Between level sounds.
Testing on other ZX Spectrum models.

And of course the final part is to publish the type in listing.

Retrochallenge 2015/01 Progressing Well

Progress is continuing well with the development.

I have added increasing difficulty as we progress up the levels, some tweaks to the gameplay too. Performance is still not what I would like and I’m sure if I could get it faster the gameplay would feel better.

I need to improve some more of the graphics, and see if there are any chances of optimising some of the code. However I’m forbidding myself the use of Machine code in this challenge.

I have an idea for a twist in the gameplay on higher levels which I need to try out, and hopefully the performance hit wont prevent me from using it.

On a side note I am enjoying the development experience and I am getting proficient at using the ZX Spectrum’s BASIC editor, The keyword system can actually be an aid to speedy editing when you begin remembering what keys they are all on.

Retrochallenge 2015/01 play testing fail

After some play testing I have decided that the game concept wasn’t right so I have decided to ‘pivot’ and come up with another idea with some similarities, which I have started to implement. In fact I quickly managed to get a lot of the new ideas into the game in one session.

I am happier with this current concept so much so that I am already moving away from the simple standard ZX characters and starting to design the game graphic UDGs.

Hopefully I can get some more productive sessions like this going forward.

On another tangent meanwhile…

Something I don’t remember is the lack of LEFT$, RIGHT$, or even MID$. I cannot remember if the ZX-81 had these missing too (I assume it must have)? Instead you have to treat strings as arrays (like C), however it is important to remember that things start at 1 and not zero with arrays!

Retrochallenge 2015/01 Getting stuck in

It seems the performance of the Spectrum with BASIC is slower than I hoped (Don’t know what I was expecting!).

To determine roughly how long my loop was now taking I quickly displayed the FRAMES value on screen. I have yet to develop the game logic, collision detection etc. so still a fair bit to do, but currently my FRAMES is sitting at 10 to 11. which at 20ms per tick is coming in at 220ms almost 1/4 of a second.

I have opted to ‘interlace’ some tasks so not everything gets done in each iteration of the game loop. For example the Player can move within each game loop, but I am only animating the ball every other iteration. Not sure if this is how I’m going to continue handling things but is my strategy for now.

Note: after some test run trials I have reverted back as the Ball was moving far too slow.

Retrochallenge 2015/01 Printing Everywhere

Decided I need to start getting some real code laid down, rather than just experimenting with things.

So I have started with the code to draw the game screen, so I am now learning about BORDER, PAPER, INK, and BRIGHT, etc. Also the Spectrum screen is split into two sections. The top part is 22 Lines and the bottom part is 2 Lines. I want to use the last two lines but PRINT AT doesn’t reach down there.

Lesson: Don’t go poking around with the System Variables when you have unsaved code!

I have changed the variable ‘return’ to just ‘ret’ to avoid issues with BASiN and potentially the Spectrum interpreter itself.

I vaguely recall reading somewhere that the bottom of the screen is accessed via channel 1.

I tried:

PRINT #1;"*";

And this printed the ‘*’ at the bottom, however it was right at the bottom, ie. the 24th line and not the 23rd line that I wanted. Reading through the character set (Appendix A) I found that CHR$(22) was ‘AT control’ so I tried the following which luckily does what I wanted:

PRINT #1;CHR$ (22);CHR$ (0);CHR$ (0);"*";

By changing the values in the two CHR$(n) sections I can effectively PRINT AT on the bottom part of the screen.

To simplify things I have created a Function using DEF FN to generate the 3 CHR$:

DEF FN p$(x,y)=CHR$ (22)+CHR$ (y)+CHR$ (x)

It seems that FN definitions can only be single letters (making them fairly limited) and you need to remember if it is returning a string that it needs the $ at the end.

Another thing I have discovered is that though I am using the BRIGHT 1 statement, the items I am printing in the bottom portion are not, and in fact apart from the PAPER the rest of the Attributes are wrong.

The solution is to again use special control codes printed to channel 1, however you cannot pre-setup the attributes and need to output the control characters at the beginning of each print to channel 1.

Retrochallenge 2015/01 Updated Input Test / Game Loop

Revised Game Loop

I have opted to use the BREAK disable ‘hack’ and so I have revised the Sample Game Loop code to eliminate GOSUBs.

To do this I have simply opted to use a variable called ‘return’ that I set before I GO TO a subroutine. Then instead of a RETURN the subroutine simply does a GO TO to the line number in the ‘return’ variable.

This has another slight advantage in that I can set a completely different line to return to which I take advantage of at the end of the game loop allowing me to return directly to the top of the loop eliminating an extra GO TO line.

Retrochallenge 2015/01 User Input continued

I tested the input code with the Kempston joystick interface removed and as I expected it caused an issue. However a small change soon sorted this.

Next step was can I disable the BREAK feature? Though pressing left and right together in the game isn’t really a valid option it can happen and so disabling BREAK would be useful if possible.

An initial scan of the System Variables didn’t give me any clues. In fact the only way I can find is to modify ERR SP (23613). However there is a big drawback of this approach and that is GOSUB destroys the ‘hack’ re-allowing BREAK to work again.

So I need to decide if I do require disabling of break I need to avoid using GOSUBs (at least within the game loop).

You can see an example of the BREAK disable code in action here: