this post was submitted on 18 May 2024
8 points (83.3% liked)

Game Development

2814 readers
2 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 1 year ago
MODERATORS
 

I'd like to start developing a board game I love playing. There's an iOS implementation of it, but none for android. I don't even know where to start and which principles I could possibly follow. I've been working as a (business) software dev for the last 20 years, so I have some clue about programming.

I don't want to care too much about the graphics, it's the computer opponents and the game rules I am interested in.

No language constraint ;-)

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 month ago (1 children)

You could start with a multiplayer server that handles the game logic, and a command line client that that can interact with it, create a game room and invite someone to it. You can handle realtime communication with socket.io. Once you have the client and some game rules, you can implement the client on a frontend using a canvas or game engine. You could then add the bot opponents using simple random number generation and some basic strategies.

[–] [email protected] 1 points 1 month ago (1 children)

Are there patterns for rules and logic?

[–] [email protected] 2 points 1 month ago

I think the command pattern would be useful. The user requests to perform a command. The command implementation can define preconditions and actions that mutate your game state.

[–] [email protected] 4 points 1 month ago (1 children)

Hi. I work at a conpany that makes digital card games.

Start by making the rules work. We generally use a callback implementation. We have a class that handles the game and enforces rules and dictates flow, classes that represent players, and then a rendering class.

The game will call relevant functions to prompt the players for an action, passing the game state with them. The players respond with what they want to do. The game calls the renderer to draw it out, and the renderer will then call the passed callback action. Repeat until the game is over.

When a human is involved then you just hook actions to buttons and pieces and clickable elements that the game catches and responds to if needed.

Really you can use any principle or design paradigm you want, but since you are making a "simple" turn based game just having it simple and well segmented is an easy way to keep a handle on it.

[–] [email protected] 1 points 1 month ago

Thanks for this. I realise again how different this is from writing business applications...

[–] [email protected] 0 points 1 month ago

For those interested: https://dogapp.ch/ - not affiliated at all.