 So several weeks ago, I started on this game project of a game. I call churse CH RSS like chess but with a typo and The core idea is it's like a chess game hybrid with a card game That is the concept and so here I've loaded up a new match This is my dev version of the page. So it's showing both sides of playing the game This is the white players perspective and this is the black players perspective. So normally you don't see this repeated but anyway, so I'm gonna play both sides and The nature of the game is you have four special pieces You have a king and his vassals the the rook bishop and the knight those are the vassals and These pieces are special in that to win you kill the enemy's king or you kill two of the enemy vassals and so that's why you see their HP up here is because you want to know what their current state is and The way the game is played is in rounds First thing every round is you place your king down if the king is not already on the board So here my white player I'm gonna place my king down and the black player will also place their king down in the opposite corner and Having placed your kings down Then you and your opponent take turns playing cards and these are your cards I have a long list of cards right now because in dev mode it just gives me all the possible cards Normally you would have to draw like several cards rather than all these Anyway, so you have your vassal cards which you can place Here I'll have the black player What do they want to play they will play their knight and so you can see the Information on the pieces they have their attack power in the top left the green and then the red and the top right is the their HP and This negative 14 means that the this pawn right now is being hit for 14 damage points Or at least it will be when combat happens combat does not happen until both Players pass in succession. So white passes and then black immediately passes after or vice versa That is when the the card playing of the round ends and then the combat is performed then the pieces hit each other Based upon their targeting and their positioning So like this pawn is hitting this diagonally pieced diagonally placed other pawn in front of it just like in chess So you don't attack by moving We're not gonna move pieces around. We're just gonna play them and put them down Okay, so that's how they target each other I'm just gonna show I'll have the white pass and then black will pass nearly after So you can see all those pieces that had a skull icon indicating that they were gonna get killed They got removed at the board So the last thing you do in the round though is you have an option to reclaim up to two pieces You can pick zero one or two pieces. I'll pick for the white. I'll pick the rook and The king and reclaim them now It's waiting for the opponent for black to do the same to pick pieces and they'll pick a king and a And a pawn just reality making choices here When you reclaim your king, you'll just put them back down first thing next round So the reason you reclaim your king is to move it and you also Pick up your vassals because you want to move them as well. You just get a card back in your hand What I pick up my brook now I can play my my work again. I have to put my king down first Excuse me. Now I can now it's black's turn So when you reclaim kings and vassals you get them back in your hand They don't disappear, but if you reclaim any other kind of piece, they just get wiped out They just get destroyed So the reason you reclaim something other than a king or vassals just because you want to get it out of your way Really, that's the only reason to do so So again, you do three things in a round you place your king if it's not already on the board You take turns playing cards until both players pass in succession and then you optionally can reclaim up to two pieces The full rule though for every round is some things happen automatically first your man as replenished Ponds will spawn according to a set of rules I can talk about and then you draw cards then you place your kings then you play cards And then the combats resolved automatically and last thing is you reclaim pieces So that currently is how the game is played and I have about 25 cards implemented obviously a card game you want to have generally a lot of cards like a hundred plus if not more So there's quite a bit more to add into the game But right now as it stands, I'm worried about two things about the game I'm worried first if the game is too complicated both in just its general rules and also all the logic of choices that you make and I'm worried that the game might be too random Because a lot of these abilities only actually have two cards currently that represent Pieces to place down other than the standard ones you can place a queen You can place a jester and other than that is just your vassals and your king So all the other abilities are things that Do actions or like casting spells in a sense like for example I can amplify the damage output by This pawn and now he's a status effect that is affecting his attack on this other pawn the white pawn So most of the cards right now are that I'm thinking where I want to go is because the the core idea of the game The interesting thing is the targeting about The pieces hitting each other according to the lines of attack and all that stuff That's the interesting thing. So I'm thinking where I want to go with the game is adding Many more kinds of pieces to place down and as of yet, there's no deck building aspect to this game That's usually what you have in card games If I ever were to have such an aspect in the game Then you would build your deck primarily around what kinds of Pieces are in your deck and there could be a variety of different kinds of ways of targeting and special effects for those Pieces so for example, I have this just your piece one of the only Interesting pieces in the games so far you place them down and everyone immediately in front of two sides In that everything occupying that square is Distracted meaning they they don't attack this round So he doesn't do any damage himself, but he stops other units from attacking So a lot of interesting things you can do with peace ideas So that's where I want to focus instead of all these spell effects I mean, I won't take out the spell effects So I'll keep them in and add some new ones, but that's my current thinking This is just not enough emphasis on interesting pieces as for complexity This is all too complicated these seven steps So first thing I'm going to do as I'm going to get rid of the entire concept of mana right now it shows you your current mana up here in the scoreboard and It starts out three in the first round increases every round and it's it's cribbed straight from artifact and And hearthstone the concept of mana that escalates because it effectively is just a simple way to Make sure the round escalates so the more interesting big cards in the big plays come out later in the in the match So that's a good idea. I'm thinking instead of mana Cards will simply just have a rank. They'll have a level number and in early rounds when you draw cards You only get cards that are of a certain rank and as the match progresses every round you get every every round you get higher rank cards That you can draw Something like that. I'm thinking that's a better solution and because right as it is you have too many choices to think about you have too many possible cards you might get drawn and You know a lot of these cards. There's a lot of choices about Which piece to select so there's just a lot of stuff going on just even in this simplified Notice the six by six grid chess, of course is on the eight by eight grid even on six by six board It just feels already like we just have too many possibilities too many complications So we get rid of mana. We just give the cards a rank and draw based on their rank number or their level number Whatever you want to call it Other thing to do spawn pawns. I think that's basically okay as it is the rules are kind of complicated the way it works is first round you get four pawns randomly placed on your side of the board and Every round after you get an additional pawn up to the total of five And if you have zero pawns of the start of the round you get two as a special case and their placement They're never placed in the back row so they would never go back here and They're never placed in a call they're never placed in the same column as each other and they're never placed in a column where there's Something in either the front or middle row so they can be something in the back row but that as long as these first two squares of A column are unoccupied then a column then a pawn might spawn spawn there Yeah, so they're kind of complicated rules about that But I I think it's basically the right choice there because the role of the pawns is to sort of randomize things up They serve as obstacles so you're not dealing with the exact same board every single time Yeah, they're they're an important randomization element Even though I'm worried about the game being too random It's not terribly clear what impact your your choices are gonna make where I think they're the whole pawn placement This is actually not a big problem though Okay, so We'll keep the whole King placement business It's important that you are required to put your King down because the whole point of the game is to kill your enemy King And if your enemy King is not on the board you would have nothing no goal to to attack So it's important that the King has to go down first thing in every round. That's fine Unless you're playing cards, I think the whole concept of passing is actually maybe Well, not the passing itself The problem is you don't know how long the round is going to go on like you have no idea how many play How many cards your your opponent has left? Well, you kind of know based on their mana, but like it's just you don't know if I've passed now How many more moves does my enemy have that that can You just can't predict enough about what your enemy might do. I think it's part of the problem So I'm thinking you we should just have a fixed number of turns in every round I'm thinking five at the moment, and I'm also thinking as a rule That you're required to play two vessels So every round you always play two vessels plus three other cards place your King down play two vessels and plus three other cards That's what you do every round and then there's no Reclaiming phase instead of having the reclaiming phase where you make a choice of what to pick off the board It just automatically reclaims your King and your vassals and so Because originally the whole reclaim concept the idea was otherwise Then it's mostly just ponds on the board and the ponds themselves don't give enough continuity from one round to the next But now I'm thinking if I add in a bunch of other pieces like this Jester and the Queen and other new other pieces That stay permanently until they're killed Then you get continuity on the board Regardless of whether the King and the vassals get reclaimed every round. So that is my thinking And also it's just nice to cut down on the length of the match just having to that reclaim phase It's just another extra step Just need to simplify there in that respect So get getting rid of the mana getting rid of the concept of Manually reclaiming pieces those two things would cut down on the match length considerably in complexity Oh, and the last thing I'm considering doing is again the game might just feel a bit too random Like you don't have enough control or you're not really able to anticipate what might happen I'm thinking that maybe it should just show you your enemy's cards So in addition to showing you your cards here your list of cards It would show you also your enemy cards right now. That's that's kept private so the player can't see what cards enemy has but the games maybe just complicated enough that That it would it would make the game too solvable if you can see your enemies cards. Let's put it that way So if you want to play the game yourself, you can get my repo you can call my repo and then to actually build the thing you just go build and You're gonna want to set an environment variable for port To I usually just use 5,000 but whatever works for you Just have to set it to something and then you actually run the game by Running executable now. It's running on port 5,000 and so now you can navigate to that in your browser If you're curious about the code, maybe want to modify play around with yourself or something There are four main files. It's about 4500 lines of code. I think at the moment There's the main file here, which is all the the kicking off the server business and managing of matches and and serving the pages and all that Not terribly complicated stuff here It's where we establish the the web socket connections You you navigate to the page and establishes for both players that establishes a web socket That's where all the communication with the server happens Here's the types definitions all in this one file. That's the thing I like to do is put my type definitions all in one file and The logic is about 2,000 lines. Yeah, it's about 2,000 lines So this is where most of the magic happens This is the game logic and then you have about another 600 lines of AI code. Yeah, this is AI stuff. The AI is currently very very crude. Let's see. I'll show you the AI in action Create an AI match Sometimes it does surprisingly smart things other times it does really dumb things. I think partly just because of bugs it can also be a little disorienting because You make a move and then black just automatically makes a move immediately And so it's kind of disorienting because you don't see what they're doing. There is the log down here It's it so it can kind of give you a hint sometimes if it if something happens. It's a little perplexing So I'm just gonna place my work down the way that I currently works is it's um it doesn't think ahead at all really it just looks at all its possible moves all the cards they can play and It gives the current state of the board a score And then all the possible moves it might makes also get scores for what the state of the board would be after that play and and the score is based on like The whether its own pieces are getting hit and whether any pieces are getting hit and for how much and that is how it Computes a score and so it decided that of the moves it can make this is the most damaging move it can make but it's not doesn't it's not thinking about like Where to place pieces that in a less exposed fashion like it's reckless about putting pieces where they can get hit by Your own pieces so it doesn't think about that at all at the moment so that's something obviously to work on but you know I'm gonna do all those logic changes first and then worry more about an AI it's Just nice to have something that right now can Can just we can have some Basic crude matches I can I can at least try the game to some extent without having to play with someone So that's the AI and that's the game. That's really all there is to say at this point though Obviously, I mean right now this is all just programmer art Once I get the game in a shape where it seems reasonably balanced and fun, of course Once there is an actual game then I'll think about investing the time to like actually Make some decent art make it look better have some animations because especially without the animations and the AI like you make a Move and the enemy makes a move and you don't even see them making the move so that's not very Usable it kind of makes it hard to follow what's going on and also makes the game a bit confusing I think for learners But anyway, that's something to put off into the future once we actually have a proper game