How to create a board game - Printable Version +- NaaLaa (https://www.naalaa.com/forum) +-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html) +--- Forum: NaaLaa 7 Questions (https://www.naalaa.com/forum/forum-3.html) +--- Thread: How to create a board game (/thread-74.html) Pages:
1
2
|
How to create a board game - aliensoldier - 02-11-2024 I was thinking about how I could create a game similar to the game of checkers but I have no idea how to start. Does anyone know how to create this type of game or something similar to have a base and be able to create more games of that style. I put a link to a video in case I was not understood correctly. https://www.youtube.com/watch?v=r-7R2sCW3Ro RE: How to create a board game - Marcus - 02-13-2024 I implemented Connect Four (https://en.m.wikipedia.org/wiki/Connect_Four) and Sudoku in some early version of naalaa, but that's about it. The biggest difficulty with most of these games is creating a good computer opponent (well, not in Sudoku). RE: How to create a board game - aliensoldier - 02-13-2024 My question is not very specific, I start from scratch with something simpler. How do I move the pieces diagonally on a board? RE: How to create a board game - johnno56 - 02-13-2024 My first guess... Imagine the player is at coordinates 0,0 on an x,y grid. Move x to the left: negative. Right: positive Move y up: negative. Down: positive. up-left would be x-1,y-1 up-right would be x+1,y-1 down-left would be x-1,y+1 down-right would be x+1,y+1 I hope this helps... RE: How to create a board game - aliensoldier - 02-14-2024 (02-13-2024, 09:12 PM)johnno56 Wrote: My first guess... Imagine the player is at coordinates 0,0 on an x,y grid. It might work yes, thanks johnno56 RE: How to create a board game - johnno56 - 02-14-2024 We are both learning on this particular topic... I have never "created" a board game (programmed from scratch) before. But, since you have raised the subject, I have been researching board games and how they are coded. I can see how this could be quite addictive! Making games like Checkers and Chess etc. have always been on my "to do" list, but have never really summoned up enough courage, to actually make a commitment... lol I am hoping this will change... I had a weird idea about board design and player movement... N7 has a "TileMap Editor" that could be used to both create the board and move the player(s)... Not exactly sure how to do that, but I imagine that it could be done... Could save a LOT of work... more research!! Cool... Yes. Quite addictive... RE: How to create a board game - aliensoldier - 02-14-2024 (02-14-2024, 07:10 PM)johnno56 Wrote: We are both learning on this particular topic... I have never "created" a board game (programmed from scratch) before. But, since you have raised the subject, I have been researching board games and how they are coded. I can see how this could be quite addictive! Right now I'm trying to make a platform game, I have about half of the first scene. I just need to touch up the collisions, add enemies and the camera, I do everything manually without using the editor, which is something I haven't tried yet. I like doing it this way better. I will 100% get into the board game when I finish the platform game, my idea is to make something similar to the checkers game and then with that base I can create other games with similar gameplay. I am subscribed to a YouTube channel where there are many abstract board games with a base similar to checkers and since these games are not available for PC, it seemed like a good idea to design them myself. I don't show a link because the channel is in Spanish. RE: How to create a board game - johnno56 - 02-14-2024 Platformers? The TileMap Editor is ideal for creating platformers but I am not that familiar with it. I still use the old school method of creating a text-based "map". The game "reads" the map and "translates" each text character to the desired "tile" image. That's the fun part... the "real" work is coding movement, collisions, scores etc... I tried using this method to create a clone of Mario brothers, which include "camera" movement, but that was a long time ago using sdlbasic. Not even sure if I still have it... (the game only had Mario moving across the game area - no enemies or collectables etc) - no promises... I will see if I can find it and try to reproduce it using N7 - assuming I can of course... lol Looking forward to seeing your game. Gotta love platformers... RE: How to create a board game - aliensoldier - 02-23-2024 I'm going to share the code I've made because I'm at an impasse and I don't know how to continue. I have three problems: 1-there is a cursor that moves around the board and if you stand on top of a player's piece and press "z" it picks it up and you can drop it on another square with the "x" key, but the problem is that it drops it anywhere box and I want it to only be able to be dropped in the dark boxes and I don't know how to do it. 2-when I grab a player token you can grab other player tokens at the same time and I only want it to grab one token at a time but I haven't been able to do it. 3-When I have a player token I should only be able to move one square per turn but it can be moved to any square, as could be done. RE: How to create a board game - Marcus - 02-23-2024 (02-23-2024, 04:34 PM)aliensoldier Wrote: I'm going to share the code I've made because I'm at an impasse and I don't know how to continue. I made two posts but deleted them now, after looking up the rules of Checkers. Hopefully this code can help you: Code: constant GRID = 8 ' number of rows and columns. As it is now, both players can always move backwards or forwards diagonally. But according to the rules, only "kings" can move backwards. board[x][y] is now either: 0 = empty, 1 = player 1 piece or 2 = player 2 piece. I guess you can simply add two more values: 3 = player 1 king piece and 4 = player 2 king piece, and make it so that only kings can move backwards. Edit And I'm sorry for not basing my code on yours. I'm just showing you how I would do it myself, and hopefully it can help you modify your own code |