I have made a new release of my little game CROSS CHASE for the Jupiter Ace, ZX80, ZX81, Lambda 8300, ZX Spectrum, Sam Coupé, etc... (and more than 120 different systems).
You can follow the project at:
Jupiter Ace version:
Who wants to give it a try and let me know?
The ZX80 is a problematic one as you may guess.
You may have seen that I use the VERY SAME code for more than 120 different systems with different CPUs (Motorola 6809, 6502, Z80 and even current modern Intel/AMD CPUs). The game code is then compiled through a tool-chain (see Makefile in the GitHub page) and 120 different versions of the game are AUTOMATICALLY generated.
This is possible because my game is coded in ANSI C (+ my universal 8-bit library "Cross Lib", which provides the required abstraction layer).
The Z80 is experimental and ONLY in turn-based mode. This is because of the FAST mode.
It is playable but it does flicker a bit and you get a black screen while some text is supposed to appear (between levels, initial screen, etc.)
In theory I could get rid of the black screen but making a real-time flickerfree version is close to impossible in C.
In C I cannot control timings and interrupts. Nevertheless I can mitigate the flicker and avoid it in some cases.
With significant effort I could make a flickerfree version of the game, but I would need to use different code and this is against the very idea of my project.
I will keep on trying to reduce the flicker and black screens but I am also working on extending my tool-chain to MANY more systems.
Please report any issues.
I am now working on adding joystick support to many versions.
Currently Spectrum version works with I J K L SPACE.
The goal of the game in non-boss levels is to lure the white enemies into the mines/bombs.
In boss levels, the goal is to kill the skull with the gun (many hits).
You can UNLOCK SECRET ITEMS if you use the gun in non-boss levels against the skull and/or missile bases/holes.
Secret items are very powerful and fun to see.
There are 20 levels and 10 items to discover.
I have to admit that I learned a few things from your source when I started porting my game H-Tron to other Z80-based machines.
In the meantime, z88dk has improved a lot, for example new targets have been added. I noticed that the following targets are not yet supported by your game (while my game supports them):
Mitsubishi Multi 8
Triumph Adler Alphatronic PC
These should probably be easy to add for you.
Another thing that I'm not sure if you have noticed this already: msleep(msec) should now be available on all z88dk targets, so there is no need to busy loop anymore for correct timing.
Regarding a potential ZX80 version: did you try Stefano's DStar game for the ZX80? It has smooth animation without any flickering. It does nothing more than what needs to be done in theory, see here: first call gen_tv_field_init() once, and then within the game loop call gen_tv_field() to make the screen visible. I tried this in my game, but the game screen still flickers heavily, so I gave it up. I wanted to start a discussion on that topic on the z88dk forum one day.
I am well aware about the new Z88DK targets. I am constantly adding new ones and checking old ones.
They can be added by just:
- creating a new makefile entry
- adding a line or two of config info into the initialization files
No game code is ever changed. Only new config is added into the library.
Old targets are sometimes broken or partially broken (because of bugs in Z88DK like KC 85/2/3/4, etc...).
Z88DK is moving very fast (which is very nice) but this comes at a price of breaking things often.
I am sort of working as a tester for them.
If your game is written in C, you could support other CPUs, as well.
I support all common 8 bit architectures: Motorola 6809 (CMOC), MOS 6502 (CC65), Zilog 80 (ZSDCC or SCCZ80)
and even modern Intel/AMD CPUs (GCC).
I am considering support 16/32 bit architectures. I just need to find a usable cross-compiler.
By the way, Cross Chase is just one game that uses CrossLib. I can make other games with the same universal library.
I have started coding a new universal game...
ZX80 flickerfree in C is possible in very simple games that loop over the same instructions all the time.
Cross Chase, despite the simple graphics and sounds, is complex.
The main loop has many different possible branches and gen_tv_field() produces horrible results:
more flicker, image off the screen, etc...
So I have made a turn_based version of my game.
I have tried to put gen_tv_field() in many places and things only get worse or much worse.
I can remove the flickering in some of the game's animations but not in in-game.
If you find the right place where to put gen_tv_field(), please let me know.
I may try to get less flickering in the TINY version of the game, though...
But without any success - on loading mine LCD monitor turns off and never turns on after loading(and doesn't react on pressing space and anything other). But there maybe some volume tuning problems or something like it.
Does turn-based ZX81 version works in FAST mode? I may try to load it.