3D Chess 2K18

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

When I've integrated the GUI, you should be able to just set BIT 7 of all the board squares and when you build it, they will all be grey, ok?
d2010
Dizzy
Posts: 79
Joined: Tue Mar 26, 2019 9:19 am

Re: 3D Chess 2K18

Post by d2010 »

arkannoyed wrote: Thu May 09, 2019 2:51 pm When I've integrated the GUI, you should be able to just set BIT 7 of all the board squares and when you build it, they will all be grey, ok?
Yes,yes **
I do not need exactly grey-color, I need any texture (BIN 101001010), or (BIn 1100110011) of board-color-black.
The texture is mix 11--00-pixels inside the byte...i replay to you at PM.
First Step you. make easiest tasks , send to private message... :|
Second Task,only if you can make texture-board-game.
then you inject :!: hard-task.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

d2010 wrote: Thu May 09, 2019 3:20 pm
arkannoyed wrote: Thu May 09, 2019 2:51 pm When I've integrated the GUI, you should be able to just set BIT 7 of all the board squares and when you build it, they will all be grey, ok?
Yes,yes **
I do not need exactly grey-color, I need any texture (BIN 101001010), or (BIn 1100110011) of board-color-black.
The texture is mix 11--00-pixels inside the byte...i replay to you at PM.
First Step you. make easiest tasks , send to private message... :|
Second Task,only if you can make texture-board-game.
then you inject :!: hard-task.
......anyone? :?
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: 3D Chess 2K18

Post by Pegaz »

Maybe I'm wrong, but I think he wants any kind of checkered pattern, instead of solid black fields on board.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

I just about got that much, but all this talk of Cheats and pokes! This is a highly tuned piece of procedural graphics work, that doesn't poke well! :D

Shaded squares will be available further down the line. More testing and experiments are being conducted at the moment, along with saving more bytes from the core.
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: 3D Chess 2K18

Post by reeagbo »

Einar Saukas wrote: Fri May 03, 2019 12:51 pm
arkannoyed wrote: Fri May 03, 2019 12:20 pm A DEFB is all ok from an assembler point of view for a one off game, but to copy 32 bytes of data and clearing the board would still be bigger. As its going to be replayable, it needs a board reset routine.
I know.

I was suggesting DEFB for chesSkelet only, since it doesn't clear the board and it's not replayable.
Yes, that's the case for Chesskelet: DEFB board setup. With my routine, I was trying to give some ideas, but Arkannoyed has something at least as small as that routine.
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: 3D Chess 2K18

Post by reeagbo »

Einar Saukas wrote: Fri May 03, 2019 5:38 pm On another subject...

The classic 1K Chess by David Horne was never intended to be the SMALLEST POSSIBLE chess. It was the opposite. The author was trying to PUT AS MUCH CONTENT AS POSSIBLE (full chess rules, good AI, etc) within the memory limitations of the original 1K ZX81.

David Horne wasn't saving bytes to make his program smaller. He was doing it so he could have enough room to improve AI logic, for instance.

Nowadays there are several even smaller chess programs (I mentioned a few here at the time). They are all certainly impressive, but their AI is typically so bad they are not fun to play.

Your 3D chess will never be smaller than those existing 2D versions anyway. Therefore I see no point in just adding a simplistic AI to the code you already have. Instead, I suggest your goal should be achieving the BEST POSSIBLE chess game in exactly 1K. Which means supporting 100% of chess rules, and the smartest possible AI you can fit.

It seems both chesSkelet and David Horne's 1K chess play better than others. I would first play a few rounds between them to compare AIs, then use the best players as starting point to implement yours...
That would be super-lovely. I totally respect 1K Chess. If anyone sees my chesSkelet website you can read that I think it's nearly impossible what he did with the 80's infra. Now, with emulators and all we can run programs 100 times per hour and see. I can't imagine how much time it would have taken for me to do chesSkelet in such conditions.

If you need any input from me to run those games, let me know.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: 3D Chess 2K18

Post by ZXDunny »

d2010 wrote: Thu May 09, 2019 3:20 pm
arkannoyed wrote: Thu May 09, 2019 2:51 pm When I've integrated the GUI, you should be able to just set BIT 7 of all the board squares and when you build it, they will all be grey, ok?
Yes,yes **
I do not need exactly grey-color, I need any texture (BIN 101001010), or (BIn 1100110011) of board-color-black.
The texture is mix 11--00-pixels inside the byte...i replay to you at PM.
First Step you. make easiest tasks , send to private message... :|
Second Task,only if you can make texture-board-game.
then you inject :!: hard-task.
You are Roger Jowett AICMFP.
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: 3D Chess 2K18

Post by Pegaz »

I thought the same for a moment when I saw his wierd video for the first time, but I still wanted to hope. ;)
At some point he had to come here, it was simply inevitable...
It's important that arkannoyed focuses on real challenges, not on gray board fields. :)
Later, when everything is done, he can do the SamCoupe port, especially for Roger. ;)
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

@d2010, is this what you wanted?

Image
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: 3D Chess 2K18

Post by ZXDunny »

Actually, that doesn't look half bad.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

I know right?! Maybe he’s onto something! Option maybe?
Shouldn’t be too hard to implement, as it’s only masking and can be swapped by changing 1 byte.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

As far as general use is concerned, is it safe to use the R register? i.e. if I'm utilising it to store BIT 7, which in R remains unchanged as far as I can see, would that interfere with anything like attached peripherals that I'm not aware of?
User avatar
Metalbrain
Microbot
Posts: 107
Joined: Thu Feb 15, 2018 2:14 pm

Re: 3D Chess 2K18

Post by Metalbrain »

AFAIK bit 7 of register R is perfectly safe to be used. Jonathan Smith (aka Joffa) did use it as a flag in several of his games.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: 3D Chess 2K18

Post by Ast A. Moore »

arkannoyed wrote: Mon May 13, 2019 3:54 pm As far as general use is concerned, is it safe to use the R register? i.e. if I'm utilising it to store BIT 7, which in R remains unchanged as far as I can see, would that interfere with anything like attached peripherals that I'm not aware of?
Perfectly safe. Go ahead.
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: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

Good, shame its a 2 byte instruction though! :x

I've utilised it to hold the status of the current square being printed to set the mask that shades it or leaves Black etc. The whole process has added 21 bytes to the routine, however it works nicely and with no messy writes to memory addresses as was the case in the earlier attempts.

Now to make a final decision as to whether the piece selected to move will raise up or have a great big arrow pointing at it. Not really much in it in terms of size to graft into the routine, probably slightly less for making the piece float in the air.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

Amazing how quickly all this extra stuff eats into the spare bytes. Whereas there was 520 available, thats already dropped to 434 now that all of the visual extras are in. That might improve a little once I've tweeked a few things though.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: 3D Chess 2K18

Post by djnzx48 »

arkannoyed wrote: Mon May 13, 2019 3:54 pm As far as general use is concerned, is it safe to use the R register? i.e. if I'm utilising it to store BIT 7, which in R remains unchanged as far as I can see, would that interfere with anything like attached peripherals that I'm not aware of?
There's nothing wrong with using the full register either (if you don't write to it too much). If there are no interrupt routines running and you've run out of registers, it's sometimes possible to use R as an automatically incrementing loop counter.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

I have experimented in the past using it as a counter, but I've no need to use it for anything cleaver in this production at the moment.

I could perhaps use the EXX set for something, but to save them all (or whichever I need to use) would be a bigger overhead.
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

Isn't it great when you change something that you think will have the desired effect, but then it turns out to achieve something quite different and unexpected. I added 3 bytes to try and alternate the squares select bit so that they showed grey, however this happened, which looks amazingly effective!

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

Re: 3D Chess 2K18

Post by djnzx48 »

That's pretty cool. How does it look with the ULA colour ramping thing enabled?
User avatar
arkannoyed
Manic Miner
Posts: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

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.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: 3D Chess 2K18

Post by Ast A. Moore »

arkannoyed wrote: Wed May 15, 2019 10: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.
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: 435
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: 3D Chess 2K18

Post by arkannoyed »

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.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: 3D Chess 2K18

Post by djnzx48 »

arkannoyed wrote: Wed May 15, 2019 10: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.
Post Reply