Welcome to Hearthpebble, the ultimate medieval card game where strategy meets fantasy! In this captivating game, you'll be able to customize your character and deck of cards to go against other online players. Sharpen your wits and step into the arena to claim your place among the legends of Hearthpebble!
- typesafe
- implements redux actions for state management
- uses Material UI Icons for design
- protects users accounts using hashed passwords
- built in retry logic for ratelimited requests
- able to let two players in one room to communicate via Socket.io
- 3D animations using Three.js
Code Samples:
const handlePlayCard = (updatedCard) => {
console.log("pressed");
socket.emit("play-card", updatedCard)
socket.on("receive-card", cardname => {
console.log("client " + cardname)
setCardName(cardname)
})
};
const myCardsPositions = [
new Vector3(0.5, 6.004, 4.21),
new Vector3(0.25, 6.003, 4.17),
new Vector3(0, 6.002, 4.15),
new Vector3(-0.25, 6.001, 4.17),
new Vector3(-0.5, 6, 4.21)
];
// more card positions
const card2 = new Mesh(cardGeo, card2Mat);
maximum1 = myCardsPositions.length - 1;
randomNumber1 = Math.floor(Math.random() * (maximum1 - minimum + 1)) + minimum;
configureCard(card2, myCardsPositions, myCardsRotations, randomNumber1, 'hand playerCard2 citizen');
Within Hearthpebble Project directory
npm run dev
Runs on port 3000.
Future Improvements
I have decided to start working on remake of this version, as many of the current implementation's technologies are outdated, causing version conflicts and delayed animation time.
Hearthpebble 2 coming soon...