Closed Cheelax closed 2 weeks ago
@Cheelax I'd love to work on this
Hi @Cheelax, I'm a web3 dev. I would love to work on this.
Hi @Cheelax can i work on this .
@Cheelax I am applying via OnlyDust Platform
Implement Screenshot Capture: Develop a utility function that captures the final game grid as a high-quality image, ensuring it accurately represents the game's final state.
Retrieve Leaderboard Position: Create a function to efficiently fetch the player's current leaderboard position without causing delays, to be included in the tweet.
Create Tweet Sharing Functionality: Implement a function that constructs and sends a tweet, incorporating the screenshot, game score, mode, and leaderboard position, while considering options for customizable tweet text.
Update the GameBoard Component: Add a ref to the game grid for screenshot capture, and modify the game over handler to include the screenshot, leaderboard position retrieval, and tweet sharing functionality.
Design and Test the Tweet Sharing UI: Add a "Share on Twitter" button to the game over screen, ensuring it is visually integrated with the existing UI, and thoroughly test the feature across various devices to verify that tweets are accurate and the user experience is smooth.
I am applying to this issue via OnlyDust platform.
I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet community🇷.
import html2canvas from 'html2canvas';
const captureGameGrid = async (gameGridRef: React.RefObject<HTMLDivElement>): Promise<string> => {
if (gameGridRef.current) {
const canvas = await html2canvas(gameGridRef.current);
return canvas.toDataURL('image/png');
}
throw new Error('Game grid element not found');
};
const getLeaderboardPosition = async (playerId: string): Promise<number> => {
const response = await fetch(`/api/leaderboard/position?playerId=${playerId}`);
if (response.ok) {
const data = await response.json();
return data.position;
}
throw new Error('Failed to retrieve leaderboard position');
};
const shareOnTwitter = (image: string, position: number, score: number, mode: string) => {
const tweetText = `I just finished a game in ${mode} mode with a score of ${score}, ranked #${position} on the leaderboard! Check out my final game grid:`;
const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}&hashtags=GameName&url=${encodeURIComponent(image)}`;
window.open(twitterUrl, '_blank');
};
const gameGridRef = useRef<HTMLDivElement>(null);
const handleGameOver = async () => {
try {
const screenshot = await captureGameGrid(gameGridRef);
const position = await getLeaderboardPosition(playerId);
shareOnTwitter(screenshot, position, score, mode);
} catch (error) {
console.error('Error sharing on Twitter:', error);
}
};
I am applying to this issue via OnlyDust platform.
As an experienced Full Stack Blockchain Developer, I'm excited to contribute my expertise to Edition 7 of the OnlyDust hackathons. With a strong background in Next.js, TypeScript, JavaScript, React, Node.js, Solidity, and Cairo, I've honed my technical skills across the blockchain development landscape. My journey with OnlyDust began at Edition 2, and I've since made 28 contributions across 11 projects. This extensive experience on the platform has allowed me to develop a keen understanding of delivering high-quality solutions under tight deadlines. My track record includes being a major contributor to building out the Pistols Web game by Underware and demonstrates my ability to adapt quickly and contribute effectively to diverse challenges. I'm confident in my capacity to tackle new problems and drive innovation in the blockchain space. As we embark on Edition 7, I'm eager to leverage my hackathon experience and technical skills to push the boundaries of what's possible in blockchain development. With a passion for creating cutting-edge solutions, I'm excited to collaborate with the OnlyDust community and contribute to the advancement of the blockchain ecosystem.
To solve this issue, i would:
Implement Screenshot Capture Create a utility function to capture the game grid as an image using the HTML Canvas API. This will involve rendering the game grid elements onto a canvas element, ensuring the canvas size matches the game grid dimensions, and converting the canvas to a base64-encoded image data URL. Ensure the captured image is of high quality and represents the final state accurately by setting the canvas resolution to a higher pixel density and applying any necessary styling or post-processing. Implement Leaderboard Position Retrieval Create a function to fetch the player's current position on the leaderboard. This will involve making an API call to the game's backend to retrieve the current leaderboard data, parsing the response, and finding the player's position. Ensure this function is efficient and doesn't cause significant delays by implementing caching or other optimization techniques and using efficient data structures and algorithms. Create Tweet Sharing Functionality Implement a function to construct and send a tweet with the game screenshot and leaderboard position. This will involve composing the tweet text, including the game score, mode, and leaderboard position, attaching the game screenshot image, and using a third-party Twitter API library to post the tweet. Ensure the tweet text fits within the character limit and includes all the relevant game information. Update GameBoard Component Add a ref to the game grid element to be used by the screenshot capture utility function. Implement a game over handler that includes screenshot capture, leaderboard position retrieval, and tweet functionality. When the game ends, this handler will call the necessary functions to capture the screenshot, fetch the player's leaderboard position, and share the results on Twitter. Create UI for Tweet Sharing Add a "Share on Twitter" button to the game over screen or modal. This will involve creating a new UI component for the button, positioning it in a prominent location, and ensuring the button's design is visually appealing and consistent with the game's UI. Ensure the button is visually appealing and fits with the existing UI by using appropriate colors, typography, and icons, and implementing hover and active states. Testing Test the screenshot capture on various devices and screen sizes to verify the image quality and accuracy. Verify the tweet posting functionality with different game results and leaderboard positions to ensure the tweet text and attached image are correct. Ensure proper user feedback by providing clear feedback when the tweet is successfully posted and displaying appropriate error messages if the tweet posting fails.
I am applying to this issue via OnlyDust platform.
I am a Full Stack blockchain Developer with expertise in Next.js, Nest.js, TypeScript, JavaScript, React, Node.js, Three.js, and Solidity. My journey with OnlyDust hackathons began at Edition 1, and I've since made 47 contributions across 11 projects. With my extensive experience on the OnlyDust platform (profile: https://app.onlydust.com/u/Ugo-X), I've honed my skills in delivering quality solutions under pressure. I bring a unique blend of technical proficiency and user-focused design to every project, whether it's crafting immersive 3D experiences or developing smart contracts. My track record shows I can adapt quickly and contribute effectively to diverse challenges. As we surf through Edition 7, I'm excited to leverage my skills and hackathon experience to push the boundaries of blockchain development. I'm confident in my ability to tackle new challenges and drive innovation in this space.
I will approach the issue of implementing a feature that allows players to share their game results on Twitter, including a screenshot of their final game grid and their position on the leaderboard, when a game ends, as follows:
Implement Screenshot Capture: a. I will create a utility function to capture the game grid as an image. b. I will ensure the captured image is of high quality and represents the final state accurately. c. I will consider using a library like html2canvas or canvas-to-blob to capture the game grid. d. I will optimize the screenshot capture process to minimize performance impact on the game.
Implement Leaderboard Position Retrieval: a. I will create a function to fetch the player's current position on the leaderboard. b. I will ensure this function is efficient and doesn't cause significant delays in the game flow. c. I will consider caching the leaderboard data to improve the retrieval speed. d. I will handle edge cases, such as players with the same score, to ensure the leaderboard position is accurate.
Create Tweet Sharing Functionality: a. I will implement a function to construct and send a tweet with the game screenshot and leaderboard position. b. I will include relevant game information (score, mode, leaderboard position) in the tweet text. c. I will use a Twitter API client library or the Twitter Oauth flow to handle the tweet posting. d. I will ensure the tweet posting is asynchronous and doesn't block the game flow.
Update GameBoard Component: a. I will add a ref to the game grid element for screenshot capture. b. I will implement a game over handler that includes screenshot capture, leaderboard position retrieval, and tweet functionality. c. I will ensure the game over handler is called at the appropriate time and doesn't interfere with the normal game flow.
Create UI for Tweet Sharing: a. I will add a "Share on Twitter" button to the game over screen or modal. b. I will ensure the button is visually appealing and fits with the existing UI. c. I will consider adding options for players to customize their tweet text.
Testing: a. I will test the screenshot capture on various devices and screen sizes. b. I will verify the tweet posting functionality with different game results and leaderboard positions. c. I will ensure proper user feedback, such as success or failure messages, for the tweet posting. d. I will write comprehensive unit and integration tests to ensure the feature works as expected.
By breaking down the issue into these steps and stages, I can ensure a thorough and organized approach to implementing the Twitter sharing feature for the game. I will collaborate with the team, gather feedback, and iterate on the implementation to deliver a high-quality feature that meets the acceptance criteria and user needs.
I am applying to this issue via OnlyDust platform.
I am a web developer with over 6 years experience building applications both personal and professional projects. I started contributing to open source via onlydust in march this year and I have contributed to a couple of issues, you can see them in my profile.
Create a screenshot function to capture the game grid and fetch the player's position on the leaderboard. Will then proceed to implement a send a tweet functionality with the game screenshot and the leaderboard position and include more relevant information in the tweet text. Update the gameboard component to have the screenshot, leaderboard position and a button to share as a tweet. I will ensure to test this on numerous devices and screen sizes to make sure it works as intended. I will also add a toast notification to let the user know if their tweet was posted successfully. I will add the option for the user to be able to customize their tweet. This will take an estimate of 3 days if assigned to me
I am applying to this issue via OnlyDust platform.
Hi @Cheelax
I can work on the "Share Game Results on Twitter" feature. My name is Benjamin, and I have extensive experience in implementing features that enhance user interaction and integrate with external platforms. I’ve worked on various projects where I focused on creating seamless user experiences and incorporating social media functionalities.
The goal is to enable players to share their game results on Twitter, including a screenshot of their final game grid and their position on the leaderboard, when a game ends. This will allow players to showcase their achievements and engage with the community.
I am applying to this issue via OnlyDust platform.
Hello @Cheelax I am Joseph Chimebuka I'm a full-stack software developer with 4+ years of experience in crafting innovative products. I've built a range of projects, including https://mattedsgn.vercel.app/ and https://metacrypt.vercel.app/ showcasing my expertise in React, Next.js, and blockchain technologies. I'm also an active contributor onlydust. here's my account https://app.onlydust.com/u/josephchimebuka.
I will use html2canvas to capture a screenshot of the final game grid when the game ends.
I will create a text message that includes the player's position on the leaderboard and any other relevant details.
I will use the Twitter API to open a pre-filled tweet that includes the text message and the screenshot as an image.
I will add a "Share on Twitter" button on the game end screen that triggers the above functionality when clicked.
Hi everyone. There is a new process for the ODHack, now you must apply to the tasks directly from Onlydust: https://app.onlydust.com/hackathons/odhack-70 We will only look at application made via this process.
The maintainer Cheelax has assigned Ayoazeez26 to this issue via OnlyDust Platform. Good luck!
Description: We need to implement a feature that allows players to share their game results on Twitter, including a screenshot of their final game grid and their position on the leaderboard, when a game ends.
Tasks:
Acceptance Criteria:
Additional Considerations: