3D Chess 2K18

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
djnzx48
Manic Miner
Posts: 433
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: 3D Chess 2K18

Post by djnzx48 » Wed May 15, 2019 9:11 am

That's pretty cool. How does it look with the ULA colour ramping thing enabled?
0 x

User avatar
arkannoyed
Manic Miner
Posts: 350
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Wed May 15, 2019 9:18 am

Do you mean the one from our friend d2010?

He'd probably get quite excited by all that shading going on! :lol:

I'm not sure its entirely practical as a workable option, but certainly a surprise as I still can't entirely figure out why its doing it :oops:

Oh, and by the way, the White pawn at the Left most end of the line is raised as its the selected piece. I have changed from 8 lines in that example to 16 lines as it gives a much clearer indication of whats selected.
0 x

User avatar
Ast A. Moore
Dynamite Dan
Posts: 1037
Joined: Mon Nov 13, 2017 3:16 pm

Re: 3D Chess 2K18

Post by Ast A. Moore » Wed May 15, 2019 9:44 am

arkannoyed wrote:
Wed May 15, 2019 9:00 am
which looks amazingly effective!
Hmm. I’m not sure about this. It’s too fuzzy and distracting. :? I’d stick with the good-old black and white.
0 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

User avatar
arkannoyed
Manic Miner
Posts: 350
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Wed May 15, 2019 9:55 am

Oh I will be sticking with the traditional simple look, but if space allows, there may be options available if they're simple enough to add into it. The more functionality available, the more impressive it'll look hopefully.
0 x

User avatar
djnzx48
Manic Miner
Posts: 433
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: 3D Chess 2K18

Post by djnzx48 » Wed May 15, 2019 9:58 am

arkannoyed wrote:
Wed May 15, 2019 9:18 am
Do you mean the one from our friend d2010?
Well no, I was referring to this: https://www.worldofspectrum.org/forums/ ... ce-demo/p1

Transitions between colours (especially black and white) look different on a real machine than on some emulators due to stuff going on in the ULA. I was just wondering whether this example would be particularly affected due to the stippling. Did you figure out what was causing it?

Some kind of textured board would be interesting, if there were enough spare bytes left over. Maybe some shading at the corners of the squares near one end of the board. And a border like in your original design would be very nice.
0 x

User avatar
arkannoyed
Manic Miner
Posts: 350
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Wed May 15, 2019 10:12 am

Aaah, I see what you meant now. I've no real hardware readily available to test it on and no CRT TV anymore, but looks great on an Emulator!

If there was sufficient memory available, then any number of options for squares shading might be possible, but anything I might be able to add would have to be a simple addition to the masking code. I've a better idea now of what caused it, but its still a nice effect for the addition of just 3 bytes! :lol:

The shaded squares are controlled by a bit being set (currently BIT 7) of the board square. The contents of that square are stored in the R register, as that can hold BIT 7 continuously without being corrupted. if the square is solid black, then BIT 7 of R must be '0' and the subsequent test of the current square number must give a result that its a Black square (BITs 0 and 3 control this). If its a shaded square then the mask is set to 55h but inverted to AAh according to the flip-flop of BIT 0 of the line counter. Sounds complicated perhaps, but actually its fairly low level.

the strange shading happened when I attempted inverting BIT 7 of R, which was intended to make the square turn on/off, sort of flashing. However, the process needed to be done after each completion of the routine to make it work, whereas in a moment of early morning stupidity I plonked an inversion after each line pass.....I'll get my coat! :lol:
0 x

User avatar
Pegaz
Manic Miner
Posts: 233
Joined: Mon Nov 13, 2017 1:44 pm

Re: 3D Chess 2K18

Post by Pegaz » Wed May 15, 2019 11:05 am

arkannoyed wrote:
Wed May 15, 2019 10:12 am
Aaah, I see what you meant now. I've no real hardware readily available to test it on and no CRT TV anymore, but looks great on an Emulator!
Yes, you can test this ULA behavior with SpecEmu, which fully supports it, as well as some version of Spin.
In SpecEmu, you must enable Ula Artefact in the Display Option menu and you can see this four shades effects.
This old topic is very interesting to read.
As you can see, some didnt even believe that it was really possible on Spectrum, but Woody did a great job and managed to implement that ULA quirk into SpecEmu in just a few days. :)
0 x

User avatar
arkannoyed
Manic Miner
Posts: 350
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Wed May 15, 2019 3:45 pm

I'm trying to decide upon the best balance between total direct access, i.e. with some sort of mouse type pointer, or cycling through the pieces as I've demonstrated before. Both seem to eat up memory, but they have to be in there to make it work. Heres a quick example of in progress, which uses Space to choose the piece, with Enter to select. Then followed by the same keys to choose the square to move to, which when the legal move checking is in there will likely show the available squares to move to and let you cycle through them with Space, then select with Enter. Not lightening quick by any means, but there are key areas in the routine that if space allows can be speeded up a fair bit.

Image
1 x

Post Reply