Page 2 of 2

Re: H-Tron

Posted: Sun Mar 04, 2018 11:48 am
by RobertK
Moggy wrote: Sat Mar 03, 2018 8:39 pm I don't know how this game is constructed as I don't have the brains to understand such things but what I do know is that it isn't just simply "plotting".
After every right/left turn it uses a combination of a few different printed characters for the vertical and horizontal trails not simple plots,the screen border is also constructed this way ;)
And I don't have the brains to understand what Andy's plot functions are doing. :D Never thought of that, but it could of course be done by putting the appropriate graphic characters on the screen.

Other things to do:

- Buil a ZX80 version of the game. The zx81plot.h functions probably need to be modified for this.

- Is there already any ZX81 network game out there? We could add ZeddyNet network support to the game. It would only need to constantly poll the other player's x, y and direction variables via ZeddyNet (EDIT: and send its own three values over the net). But I don't have the hardware yet nor do I have the knowledge how to do the ZeddyNet communication. Maybe I will ask over at the German-language sister forum, they seem to be very active with ZeddyNet there.

Re: H-Tron

Posted: Sun Mar 04, 2018 1:23 pm
by zx81jens
Is there already any ZX81 network game out there?
Hey Robert.

No, there isn´t...

I think this Game would be the Best Game to play online with two ZX81. But I´m not a programmer (my only Game is in BASIC and I had a lot of help from Andre*** - see below)... so maybe you can do it??

Next weekend (9.-11. March) the 22.ZX-TEAM-Meeting will take place near Fulda/Germany. We will be online via Webcam and Chat. Maybe we can make some plans there?!

Greetings
Jens
beamer.p
(2.12 KiB) Downloaded 329 times

Re: H-Tron

Posted: Sun Mar 04, 2018 2:43 pm
by RobertK
If have seen that Siggi has written some z88dk ZeddyNet libraries, so he definitively knows how to code in z88dk and how to use ZeddyNet. And my game code is rather simple and hopefully well-documented, so in theory it should be possible to join our forces and try this. However, I have no idea if the speed will be sufficient to play such an action game over the net without delay.

So, we could give this a try, but it will take some time. And don't expect to already have a LAN party at your next meeting... ;)

Re: H-Tron

Posted: Tue Mar 06, 2018 4:07 pm
by RobertK
gammaray wrote: Sat Mar 03, 2018 11:15 pm I worked on the character choices for this type of plotting. Ill find and post what I have so far.
A quick test with the "Chroma Program Enhancement Creator" reveals the secret behind Andy's plot function:

HTron_Chroma_Colour_Test.jpg

@Andy: very clever! I never thought that it would work that way. Thanks once more!

Re: H-Tron

Posted: Tue Mar 06, 2018 8:21 pm
by Andy Rea
it's no secret, imagine the character split in 4 pieces, now remember your binary ? top left is 1's , top right is 2's, bottom left is 4's and lets pretend bottom right doesn't exsist just yet....

so we set and unset the character code bit2, bit1 and bit0 which directly represent the aformentioned quadrents.

now the complicated bit the other 8 posibilties are all inverts of the first 8, however when the inverted bit is set we need to invert bits 0, 1 and 2 also

with all this in mind some jiggery pokery with logic maniplulations, and or xor and the like we can set and unset any quadrant we like... oh or test if a particular quadrant is set

regards Andy

Re: H-Tron

Posted: Tue Mar 06, 2018 10:18 pm
by gammaray
I wondered if they could be a algorithm for the sequences...

I only setup lookup tables for directions 1(North) counterclockwise to 8(315deg).

Re: H-Tron

Posted: Thu Jun 14, 2018 12:01 pm
by RobertK
Off-Topic: I have now released the first cross-platform version of this game:

https://sourceforge.net/projects/h-tron/

Currently ten eleven target systems are supported:

Sinclair ZX81
Jupiter Ace
Mattel Aquarius
Philips P2000
Philips VG5000
Robotron Z 1013
Robotron Z 9001 (KC 87)
Sharp MZ
Tandy TRS-80
EACA EG2000 Colour Genie
VZ 200 / Laser 310

As an example, here is a screenshot of the Jupiter Ace version:

Image

Note: Usability of the two-player-mode is currently very limited on all systems other than the ZX81 because the status of two buttons cannot be checked simultaneously. Maybe future z88dk versions will allow this on at least some other systems (according to the z88dk team, it should be technically possible for at least the Jupiter Ace).
[EDIT 25 June 2018: now implemented for the Jupiter Ace and the VZ]

And what about the ZX80 version that we are all waiting for? Well, it is basically complete and working, but I still couldn't get it flicker-free. I have done what in theory needs to be done, but the screen still flickers heavily, so I will need some assistance on the z88dk forum.

[EDIT 25 June 2018: new target supported: Sharp MZ. Jupiter Ace and VZ now have a useful two-player mode.]

Re: H-Tron

Posted: Thu Jun 14, 2018 3:38 pm
by dr beep
I used a plot in my hidden pictures.
Bit 4 was set with a xor 135.

Re: H-Tron

Posted: Tue Aug 21, 2018 8:46 pm
by Fabrizio
Very nice game!
I was planning a snake-like game to be written with my universal library CrossLib.

You could do it before me.
You could make a universal game in a similar way as I am doing with Cross Chase:
https://github.com/Fabrizio-Caruso/CROSS-CHASE

You just separate all the Z88DK-dependent commands into one or more files where you implement
abstract commands (whose implementation will depend on Z88DK, CC65, CMOC, GCC or any other C compiler).
Then you should replace all the Z88DK commands with the abstract ones and you will be able to compile your game
with any C compiler.

Fabrizio