upupgames / freecell-react

A web-based Freecell card game built with React.
GNU General Public License v3.0
0 stars 0 forks source link

Compile Existing Freecell Implementations #19

Open jialincai opened 1 week ago

jialincai commented 1 week ago

Issue Template

Summary
Research existing Freecell implementations in various languages (e.g., Unity, JavaScript) to identify design patterns, architecture, and UI/UX techniques relevant to our TypeScript and Pixi.js project.

Description
Locate and analyze parallel Freecell projects, focusing on those with robust game panel architectures. Examples may include:

Steps to Reproduce
N/A

Expected Outcome
A compiled list of resources and architectural insights that can guide the architecture of our Freecell game panel in TypeScript and Pixi.js.

Exit Criteria

Additional Context
Link to any relevant tutorials, repositories, or articles, and note any particularly innovative or useful approaches.

jialincai commented 3 days ago

Pokemon autochess uses Phasor.

There this Web Solitaire made with Phasor and the code is fairly simple. This repo has distinct classes and overall is organized well.

I also have come across some less organized codebases where game logic is in a 500-1000 line file. While I'm not sure how great of an example these repositories are they show that solitaire games should not be complex to implement. This is one of the better pixi versions.

Here is a multiplayer card game tutorial made with Phaser. NOTE: Do not use this as an good example for multiplayer games. I've seen more people use Colyseus. It's also been said by multiple devs that it's good practice to divide game/server logic and client.

I think it's worthwhile to split the game server/logic and client to two different systems for card/board games as there is no need to sync physics. This way you can use best tool available for both sides and even rewrite one side in certain situations.

Hello, recently I found myself building a multiplayer classic card game. If you are a newbie and want to start with multiplayer game dev tutorials like this are very helpful, otherwise If you know phaser and have been coding for over a year this is not the way to go. In the current file structure the client can easily inject fake data into the server, and no one is going to catch it. If you want to make such a game better create a state machine that handles the events, also it can be an authentication server. You need to move the entire game logic in the server and leave only the client handlers in the client folder. The game should NOT be played in the client, it needs to be played in the server. I love tutorials like this because they help beginners to start up, and that’s absolutely fine but when you get more experienced this is going to be bad practice and can cost your company a lot of money.