3D Chess 2K18

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

Re: 3D Chess 2K18

Post by arkannoyed » Thu Mar 07, 2019 4:52 pm

fast;

Image
0 x

User avatar
arkannoyed
Microbot
Posts: 196
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Thu Mar 07, 2019 4:53 pm

Ast A. Moore wrote:
Thu Mar 07, 2019 4:48 pm
I kind of want the base outline to be a tad more solid. The dotted line look just doesn’t work for me.
Ok, give me a little more info, what would you alter? I'll try anything if it fits!

I think I get what you mean, but that adds another 4 bytes, which just isn't Cricket!
0 x

User avatar
arkannoyed
Microbot
Posts: 196
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Thu Mar 07, 2019 6:37 pm

Spotted an encoding mistake where the new base design should be 4 bytes smaller, so if this alteration were to stay, or at least a variant of it, the size now stands at 498 bytes
0 x

Bizzley
Dizzy
Posts: 90
Joined: Thu Nov 16, 2017 10:47 am

Re: 3D Chess 2K18

Post by Bizzley » Thu Mar 07, 2019 9:25 pm

I agree with Ast A. Moore in that these new diddly base pixels don't work for me either. To be specific what you have now appears for all the world to look to me like inconsistent highlighting, especially on the black pieces i.e.if the light is coming from the left then why is there a highlight on the right? Please don't fall into the all too-common trap that coders make that just because you understand what things are meant to represent everyone else will understand also. To you it's a bevelled ridge, to me it's a highlight.

I have difficuly understanding why you won't even approach getting a rough idea of how much the code will take other than working on an assumption that a byte saved on the graphics is one that can be used for game code. Have you considered that if the completed game code comes in under 512 bytes then you don't need to bother shaving bytes from the graphics and that you'll be able to go back to the better looking ones from several weeks ago rather than ones that "don't quite look as nice as before" - your words.

So blunt question to you. If the current code does not include any of the following then what is your total estimated non-optimised code size for handling: intial pawn 1 or 2 square movement, en passant, castling, piece promotion, logic of duplicate pieces because of promotion, testing for being in check, testing for invalid movements due to being in check, testing for mate, conceding the game, the GUI and the computer AI routines?

This 1K chess program program has the capability of being something truly unique, something that would transcend this Forum and make an impact outside the narrow field of Spectrum coding. But if you think what I've written is negative in any way or you feel I'm not being constructive in these replies then just say so and I'll bow out and leave you to carry on without any more interruptions.
Last edited by Bizzley on Thu Mar 07, 2019 11:19 pm, edited 1 time in total.
1 x

User avatar
arkannoyed
Microbot
Posts: 196
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Thu Mar 07, 2019 9:36 pm

To be honest, in logic and gameplay terms, I think you’re ahead of me!
0 x

User avatar
Ast A. Moore
Manic Miner
Posts: 910
Joined: Mon Nov 13, 2017 3:16 pm

Re: 3D Chess 2K18

Post by Ast A. Moore » Thu Mar 07, 2019 10:07 pm

Hey, buddy, as a programmer myself, I know how you feel. I too have struggled with making a decision that would neat up the code at the expense of the game itself. One way of avoiding that trap is to move onto another aspect of the code, which is, in your case, the actual game logic. When you have the game basically finished, you can get back to fine tuning the graphics, drawing routines, et cetera. I know I’m stating the obvious, but it’s easy to forget those things when you’re deep inside the coding world.

Also, the white knight looks like a camel now. :lol:
2 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
Pegaz
Microbot
Posts: 188
Joined: Mon Nov 13, 2017 1:44 pm

Re: 3D Chess 2K18

Post by Pegaz » Thu Mar 07, 2019 10:10 pm

@Bizzley

I hope you stay on this topic, because I think your approach is more than constructive.
This project is one of the most exciting things on the Spectrum scene for a long time and I'm always looking forward to every new post.
As a chess fan (not as a programmer), I can only say that I really enjoy this discussion.
1 x

User avatar
Einar Saukas
Manic Miner
Posts: 633
Joined: Wed Nov 15, 2017 2:48 pm

Re: 3D Chess 2K18

Post by Einar Saukas » Thu Mar 07, 2019 10:49 pm

If you are still enjoying the challenge of reducing code size, by all means keep doing it! This is a hobby, not a commercial project, so you don't have to make sacrifices to meet a deadline.

However I must confess I also prefer the old design with larger pieces. I don't think it's worth it to gain a few bytes, if it makes the board look less impressive.
1 x

User avatar
arkannoyed
Microbot
Posts: 196
Joined: Mon Feb 05, 2018 9:56 am

Re: 3D Chess 2K18

Post by arkannoyed » Fri Mar 08, 2019 8:48 am

Thanks for the support. I'm not sure its the most impressive thing out there, but I do enjoy seeing it develop and on a personal level, finding new ways to approach a problem and do it more efficiently/ faster is always pleasing.

I've added a line, so they're currently only 1 line shorter than before and only 1 byte less;

Image

I think the bases look more balanced, not as heavy as before. They're only 2 px narrower too. Remember, the graphics are a result of a very restricted set of parameters. Only a finite amount of possibilities exist for their design really, so you I have to be creative, otherwise, they could look a lot nicer. Take the top of the bishop for example. A long time ago, he looked much nicer. Now its a bit odd really. But that might change soon.

From a coding point of view and to improve the eventual experience there are 2 key areas I'm working on before I'll be happy to leave it and move to the next stage.
1. The board printing. That is bit-wise. Needs to be byte-wise to speed it up. Efforts so far have not managed to get close to the 39 bytes it currently takes up. I think 46 is my best effort so far.

2. Printing of the Left side of the pieces is also still bit-wise, as the buffer is mirrored due to restrictions in the way its formed. To flip it, auto mask and print is no easy task and currently happens in 23 bytes. I do have a version that is faster but is 24 bytes. Needs more work and a new approach.

So, when both those aspects have been addressed, then the speed should be good enough to achieve some better gameplay results. A GUI has to be responsive, and even though its small size doesn't allow for all bells and whistles, there has to be a satisfactory feel to it for me to be happy.

I'm glad I never worked in the software industry, I'm too picky to be any use to anyone! :lol:
1 x

User avatar
Ast A. Moore
Manic Miner
Posts: 910
Joined: Mon Nov 13, 2017 3:16 pm

Re: 3D Chess 2K18

Post by Ast A. Moore » Fri Mar 08, 2019 10:06 am

The bases definitely look better now.
1 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.

Post Reply