Hi everyone,
Long time no see. I hope everyone is well.
I've decided to take a break from writing books to create an online chess game, so I thought I'd stop by to see how everyone's doing.
The chess game is currently built on the Wire Frame Rain demo I did a while ago, but it'll use flat shaded polygons when it's done.
So far I've got every piece finished apart from the King: http://fx.barcodebattler.co.uk/wf/Chess.htm
The individual chess pieces are object oriented and the 3d-2d rendering has become a lot more streamlined than the original demo, so I've definitely improved over time.
When it's done, the game will be a fine blend of HTML5 Canvas / Ajax / PHP / MySQL, so in theory anyone can play low-poly chess against anyone else in the world. Mwahahahaaaa!
I know I shouldn't double-post, but this is a considerable update:
All 6 character shapes are finished, though I may go back and redo the Knight at some stage.
The back-face culled wireframe has also been replaced by the flat shaded polygons, so now I need to experiment with the board layout.
I know it only runs at 10fps, but when it's finished it'll be an almost static chess board, so it'll only need to update the graphics when the pieces are moved.
I've added ears to the Knight, optimised the drawing routines to get it running at 25fps on my low-spec laptop and implemented a 2D map for the interface.
Next up I'll be improving the look of the 2D symbols, but it still won't use any pre-rendered graphics. EVERYTHING is being drawn procedurally.
I've moved the project to its own sub-domain, http://chess.barcodebattler.co.uk so I'll put a redirect from the old address.
A lot of features are now working, but I still need to add Check / Checkmate conditions and online play.
I can do this!
Keep it up mate, it's looking nice already. :)
Thanks RBZ,
I'll be adding some new features during my time off work. Hopefully I'll have online play working in the next week or so.
Check(mate) testing is really quite complicated!
I just need to finish off the predictive Check(mate) test to prevent the player putting themselves into Check.
It's just about up and running, at least in off-line mode. I'm going to start tinkering with some AJAX for a live online experience.
I wonder if it'll be impressive enough to a potential employer. I'll definitely need to annotate the code.
OK, I've rigged the JavaScript / HTML5 Canvas front end to create an AJAX call to a PHP script, which then requests information from a database using MySQL, then returns it in a format which the JavaScript can use!
The game itself isn't using the connectivity yet, but it's working as a simple test.
The next stage is to set up a handshake between the front end and the server, associate them with a board record in the database and start the game once 2 players are connected!
Progress is slow at the moment, between work and looking after my kids I barely get much time to get my brain in gear.
I also have to keep switching between PHP and JavaScript, but it's gradually coming together.
Cool project ck, keep it up! The start button for an offline game doesn't seem to respond (yet?), I tried it on chrome and puffin for ipad.
There was an issue with the event handling a few days ago, but it should be fixed now.
That said, I haven't done much testing with touch screen devices, so I'll need to find one and see if there's anything I can code that can fix it.
Major update! Online Guest Mode is now working!
Of course, it only works if someone else is online at the same time as you are.
Quote from: combatking0 on January 19, 2018
Major update! Online Guest Mode is now working!
Of course, it only works if someone else is online at the same time as you are.
I can create a second guest in another browser.
But there's quite a bit of delay between two moves.
Can you have different angles for the 3d view?
Maybe you can also pick the field in 3d.
Because it's shared hosting, I've set the ajax calls to 10 second intervals. There's nothing stopping me switching to a shorter interval I guess, especially while the site isn't very popular.
If you click and drag the 3D view horizontally, you can rotate the board. Although I have yet to get this working with touch screens.
Picking the field in 3D would be a major step, but definitely one to consider.
Awesome ck, looks really cool! played it on ipad. :clap:
Maybe automatically select the king on check.
Love the King / Check idea, I can already imagine which lines of code I need to add / alter to make this work!