ID:78887
 
Keywords: bgc, chess, development
Today's work was mostly on the superficial display system made entirely of images that I concocted about 24 hours before making a working model. My plan involved having only one of each game board in the map file (such as one checkerboard) and using a slew of channel-specific /image objects to represent the gameplay. This way, resources are constrained to a tiny amount (by having only one game board and one pool of icon resources) while allowing as many simultaneous games as a host machine can support. Through a lot of headaches caused by myself having forgotten I left a bunch of testing elements in the code while the actual intended interface was being built, I managed to create a working model as described above. Each channel is allowed one game (so far, chess or checkers) and the gameboard layout is unique to that channel, complete with realtime updates.

This is pretty much a glimpse of what I intend the window to look like once finished (sans the info control that I'm only using as a quick and lazy way of accessing testing verbs):



All of the pieces displayed on the map there are /images, as described above.

After I switch channels:



Don't be deceived by appearances, that's some high tech trickery, right there -- the "graphics" set was swapped out upon my entrance into this new room.

This comes to one of the things I struggled with avoiding the most: determining what piece the client was presently holding. I was doing my best to avoid having a variable attached to the client that had any sort of info about that, since I wanted to keep the clients as detached from the game processes as possible, I ended up taking the MouseDrag/MouseDrop approach, which allows me to know which client is involved in the process the entire time without ever having to find them. This is what happens when you want to move a piece (the piece "disappeared" because the mouse pointer is set to the piece's graphic during this process, and print screen doesn't capture the mouse):



Those (toggle-able) "legal movement" highlights are only visible to the client repositioning the piece, complete with the piece existing on the game board disappearing during the process for full effect.

All of the pieces have been tested to have accurate "legal movement" collectors, so essentially all that's missing is the structure of the game (since presently anyone can move any piece they can see).
Nice work. I've been going through a lot of similar design choices with Cathedral.

I opted to create a whole new instance per session but your idea seems much better.

ts
I was going to fan-up so I can monitor your progress but I can't. :|
Tsfreaks wrote:
I was going to fan-up so I can monitor your progress but I can't. :|

Can't? o_O
Option to do that should be This Site->Add to Favourites.
Tiberath wrote:
Option to do that should be This Site->Add to Favourites.

Ah, thanks.

ts
Tsfreaks wrote:
Ah, thanks.

You're welcome. My services cost a scamp fifteen dollar investment per bit of accurate advice given. If at any time you need further assistance, don't be shy to pay me in advance. ;)


Tiberath wrote:
Tsfreaks wrote:
Ah, thanks.

You're welcome. My services cost a scamp fifteen dollar investment per bit of accurate advice given. If at any time you need further assistance, don't be shy to pay me in advance. ;)


Do you have payment plans?
A lifetime subscription will cost you a minimal $100.00. A fantastic investment if you ever need to ask me more than six and a half questions.