H-Tron

General games-related topics
User avatar
RobertK
Posts: 39
Joined: Tue Dec 19, 2017 4:29 pm
Location: Vienna

Re: H-Tron

Post by RobertK » Sun Mar 04, 2018 11:48 am

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.
Last edited by RobertK on Sun Mar 04, 2018 2:27 pm, edited 1 time in total.

User avatar
zx81jens
Posts: 184
Joined: Sat May 10, 2008 8:26 am
Location: a Basement in Nienburg / Germany

Re: H-Tron

Post by zx81jens » Sun Mar 04, 2018 1:23 pm

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 20 times
Last edited by zx81jens on Sun Mar 04, 2018 5:03 pm, edited 1 time in total.
eyerything will be okay in the end.
if it´s not okay, it´s not the end.

and: uıɐbɐ ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ɹǝʌǝ ɹǝʌǝu ןןıʍ ı

User avatar
RobertK
Posts: 39
Joined: Tue Dec 19, 2017 4:29 pm
Location: Vienna

Re: H-Tron

Post by RobertK » Sun Mar 04, 2018 2:43 pm

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... ;)

User avatar
RobertK
Posts: 39
Joined: Tue Dec 19, 2017 4:29 pm
Location: Vienna

Re: H-Tron

Post by RobertK » Tue Mar 06, 2018 4:07 pm

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!

User avatar
Andy Rea
Posts: 1471
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: H-Tron

Post by Andy Rea » Tue Mar 06, 2018 8:21 pm

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
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

User avatar
gammaray
Posts: 475
Joined: Sun Apr 17, 2016 2:44 am
Location: Texas

Re: H-Tron

Post by gammaray » Tue Mar 06, 2018 10:18 pm

I wondered if they could be a algorithm for the sequences...

I only setup lookup tables for directions 1(North) counterclockwise to 8(315deg).
Finish what you start. Truth is over the mountaintop or six feet under.
4 x TS1000, 2 x TS1500 , 2 x timex 2040 printer, 1/2 x timex 2020 cassette deck, ZXPAND+AY, ZeddyNET, ZXBlast..., unfinished Spectrum...Still no life!

User avatar
RobertK
Posts: 39
Joined: Tue Dec 19, 2017 4:29 pm
Location: Vienna

Re: H-Tron

Post by RobertK » Thu Jun 14, 2018 12:01 pm

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.]
Last edited by RobertK on Mon Jun 25, 2018 11:36 am, edited 1 time in total.

dr beep
Posts: 1107
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: H-Tron

Post by dr beep » Thu Jun 14, 2018 3:38 pm

I used a plot in my hidden pictures.
Bit 4 was set with a xor 135.

Fabrizio
Posts: 10
Joined: Sun Aug 19, 2018 11:59 pm

Re: H-Tron

Post by Fabrizio » Tue Aug 21, 2018 8:46 pm

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

Post Reply