3D Chess 2K18
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
No rest....another -4 bytes this time shaved off the base part, and surprisingly, well in my opinion anyway, makes it look better.
Now at 547 bytes = 508
Now at 547 bytes = 508
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
I am interested to know if the source makes an sense to anyone perhaps more familiar with source code listings?
I generally comment mine extremely badly or not at all. I'm probably not alone in the fact that when you write something, it reads just fine to you without lengthy explanations. I do appreciate however, that the older I get, the more helpful the comments are when I revisit some past projects.
If any parts do need further explanation, then I will oblige of course.
I generally comment mine extremely badly or not at all. I'm probably not alone in the fact that when you write something, it reads just fine to you without lengthy explanations. I do appreciate however, that the older I get, the more helpful the comments are when I revisit some past projects.
If any parts do need further explanation, then I will oblige of course.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
.TAP file to load and mess with.
https://dl.dropbox.com/s/ud9urfxww0giq7 ... a.tap?dl=1
Small 'cheat' added in the basic loader to swap the White king and queen for now. Will be fixed very soon, promise!
https://dl.dropbox.com/s/ud9urfxww0giq7 ... a.tap?dl=1
Small 'cheat' added in the basic loader to swap the White king and queen for now. Will be fixed very soon, promise!
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: 3D Chess 2K18
In my case, if I don’t comment everything like I’m explaining to a child, I tend to forget what I do in about a week if I’m lucky. Usually, though, I can’t recognize my own routines and optimizations about two days later, if I don’t comment them.arkannoyed wrote: ↑Fri Feb 15, 2019 3:17 pm when you write something, it reads just fine to you without lengthy explanations. I do appreciate however, that the older I get, the more helpful the comments are when I revisit some past projects.
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.
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.
Re: 3D Chess 2K18
This is stunning arkannoyed. If I could have two wishes, they would be:
1. Tie Peter Jennings 1k MicroChess to this beautiful interface.
2. tie the infamous 1k ZX chess to this beautiful interface.
I wish I wish.
KB
1. Tie Peter Jennings 1k MicroChess to this beautiful interface.
2. tie the infamous 1k ZX chess to this beautiful interface.
I wish I wish.
KB
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Thanks.
Actually, all this is currently is a board display engine. It’ll display the results of any chess program provided the pieces have the correct codes and it’s based upon a 64 byte board. An interpreter interface could also be used to substitute piece codes though. I will be moving on to the actual game logic eventually. A few more ideas to save more space first though!
Actually, all this is currently is a board display engine. It’ll display the results of any chess program provided the pieces have the correct codes and it’s based upon a 64 byte board. An interpreter interface could also be used to substitute piece codes though. I will be moving on to the actual game logic eventually. A few more ideas to save more space first though!
Re: 3D Chess 2K18
I'm sticking with my earlier assertion that this is witchcraft. Any sufficiently advanced technology is indistinguishable from magic after all.
The mind boggles at how you've done so much in so little. Genuine genius.
The mind boggles at how you've done so much in so little. Genuine genius.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Fascinating read about Peter Jennings development of Microchess. The hand coding process is still alive in my case! I may well take a few pointers from the way it evaluates moves too.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
One change I am considering is to move all the pieces up 1 line to show more of the square it sits on. This would help with the GUI I’m considering. Any thoughts?
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Well the source code is there, have a go at deciphering it. It is surprisingly straightforward. It’s far simpler than when it was 924 bytes.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Peter Jennings talks about a program being a piece of art. I totally get that, that’s what I’m creating, it becomes more beautiful the smaller it gets. It’s approaching a very pure state now.
Re: 3D Chess 2K18
I completely agree.arkannoyed wrote: ↑Tue Feb 19, 2019 7:46 pm Fascinating read about Peter Jennings development of Microchess. The hand coding process is still alive in my case! I may well take a few pointers from the way it evaluates moves too.
Today I've been testing a great KIM-1 emulator on c64 and Jennings Microchess on it.
It's not easy to make moves with his notation, it has its own shortcomings, but it's still an impressive piece of code.
Lots of information about this old MOS Technology computer, Microchess and other KIM-1 software, here:
https://www.floodgap.com/retrobits/kim-1/
Re: 3D Chess 2K18
I love the purity of Microchess, but to me it's interface (notation) obfuscates the play. When I play it I have to mentally translate. It is much better with a VT-100 terminal.
As for moving the pieces up, I agree, at least 1 line. Really amazing.
KB
As for moving the pieces up, I agree, at least 1 line. Really amazing.
KB
Re: 3D Chess 2K18
I mentioned ZX chess because I love the way it cycles through the possible moves, and with actual pieces it would be a fascinating visualization of the engine at work.
KB
KB
Re: 3D Chess 2K18
Yes, its very difficult to play that way, its literally necessary to have a code table and translate every move to its notation.
However, for a computer from 1976, this is a remarkable achievement.
I played Lander for KIM-1 yesterday, only 6 characters on display, but still pure fun.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Though I had to add 1 byte, which I can tell you caused untold personal turmoil, I then saved one elsewhere, so still at 547 bytes, and now prints everything 1 line higher to show more of the square beneath thus;
Not a massive difference, but it'll make itself apparent more when the GUI is up and running. I'm looking at a few other areas of the code too so that additional functionality can be added in with less of an effort later.
Not a massive difference, but it'll make itself apparent more when the GUI is up and running. I'm looking at a few other areas of the code too so that additional functionality can be added in with less of an effort later.
Re: 3D Chess 2K18
Is that not identical to the image you posted on 15th Feb?
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
Re: 3D Chess 2K18
Ah, you've reused the URL so the older image is in fact the new one as well.
Just looking at the line of black pawn bases, it looks like they alternate up and down a pixel. It looks slightly odd to my eye.
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Indeed, my mistake, I did reuse the url and replaced just the file. Silly me!!
The anomaly regarding the bases looking like that is just being on a black or white square. Also they’re masked so perhaps that gives an odd look too. I can assure you they’re the same level relative to the square.
Took over an hour to figure a way to move them up 1 line and not use an extra byte!!
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
The code as it is now feels finally pretty much as optimised as it can be aside from any new ideas I manage to come up with to reduce it further. So at last I’ve begun looking at adding the functionality to select and move the pieces. At first this will be purely human input, but will allow for properly ironing out any potential difficulties with making an eventual computer evaluating system making moves for itself. Plenty to cram into 477 bytes!
I think it just about runs fast enough to allow for square and piece selection to be on-board rather than a keyboard input. Chances are the building will happen off screen and then it’ll be copied from a buffer. Otherwise animating certain things will look clumsy. Speed isn’t an essential ingredient and I think I can add in some easy to use functions without them being memory hungry. Need to leave a few hundred bytes to have some chess logic in there for a suitable playing experience I guess!
I think it just about runs fast enough to allow for square and piece selection to be on-board rather than a keyboard input. Chances are the building will happen off screen and then it’ll be copied from a buffer. Otherwise animating certain things will look clumsy. Speed isn’t an essential ingredient and I think I can add in some easy to use functions without them being memory hungry. Need to leave a few hundred bytes to have some chess logic in there for a suitable playing experience I guess!
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Experimental Piece test no.1
A little slower than I'd hoped, but this is using very small copy and clear routines which could be unrolled a bit to speed up.
A little slower than I'd hoped, but this is using very small copy and clear routines which could be unrolled a bit to speed up.
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
Obviously you'll only get to choose from either Black or White pieces as available selection to move on a given turn, which will only give a maximum number of 16 pieces to cycle through. I have that working now and with a simple switch to select which colour. I also think to keep it as simple as possible, I'll just use maybe Space to scroll through and Enter to select the piece. Then it will keep the selected piece held up while the user selects the square to move to, again Space to move and Enter to select. Then a simple write 00 to the piece square and copy the piece to its newly selected position. Later there will be validation involved which will only allow you to select the squares that are possible to move to.
It does get a lot faster when there are fewer pieces on the board fortunately!
It does get a lot faster when there are fewer pieces on the board fortunately!
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
I did have board rotation working quite a while ago, which will also hopefully be incorporated. I think that was about 30 bytes-ish. That will help with square selection when there are more pieces crowding certain areas. There will also be an undo function as thats fairly easy to add too with a simple move stack system.
Re: 3D Chess 2K18
In an actual game, I would like to quickly choose the piece to move, may I suggest inverting the color of each piece as you go through your options? Once the piece is chosen, it rises, then I choose the destination square?
- arkannoyed
- Manic Miner
- Posts: 438
- Joined: Mon Feb 05, 2018 9:56 am
- Location: Northamptonshire
Re: 3D Chess 2K18
I find that to be confusing, or is that just me? Inverting the colour surely makes it match the opposition? That’s actually not any quicker than raising the piece anyway. Still have to reconstruct the board for every change.
Once this gets a little further along I’ll release a demo to try then a decision can be made as to whether it’s ok to run with.
Once this gets a little further along I’ll release a demo to try then a decision can be made as to whether it’s ok to run with.