Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: revamp phaser #380

Merged
merged 1 commit into from
Jan 24, 2025
Merged

feat: revamp phaser #380

merged 1 commit into from
Jan 24, 2025

Conversation

MartianGreed
Copy link
Collaborator

@MartianGreed MartianGreed commented Jan 22, 2025

Summary by CodeRabbit

  • New Features

    • Added a Phaser 3 TypeScript template using Vite
    • Integrated Dojo Engine SDK for game development
    • Implemented game scenes including Boot, Game, GameOver, MainMenu, and Preloader
    • Added wallet connection and entity management functionality
  • Documentation

    • Created comprehensive README with project setup and usage instructions
    • Added MIT License
    • Included detailed TypeScript configuration
  • Configuration

    • Set up Vite development and production configurations
    • Configured TypeScript compiler options
    • Added environment and type definition files
  • Chores

    • Updated dependency versions
    • Improved project structure and code organization

Copy link

coderabbitai bot commented Jan 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces a comprehensive example project for a Vite-based Phaser game integrated with the Dojo SDK. The project includes a complete setup with configuration files, TypeScript definitions, game scenes, and build configurations. It provides a template for developers to create web-based games using Phaser 3, Vite, and the Dojo blockchain framework, with a focus on modularity, type safety, and ease of development.

Changes

File/Directory Change Summary
.gitignore Added comprehensive ignore patterns for development artifacts, build outputs, and editor-specific files
LICENSE Added MIT License file
README.md Created detailed project documentation with setup, usage, and deployment instructions
src/ Added game scenes (Boot, Game, GameOver, MainMenu, Preloader) and TypeScript configurations
package.json Defined project metadata, scripts, and dependencies for Phaser, Vite, and Dojo SDK
vite/ Added development and production Vite configurations

Sequence Diagram

sequenceDiagram
    participant User
    participant MainMenu
    participant Preloader
    participant Game
    participant DojoSDK

    User->>MainMenu: Select Wallet
    MainMenu->>Preloader: Transition with Wallet
    Preloader->>DojoSDK: Fetch Predeployed Accounts
    DojoSDK-->>Preloader: Return Accounts
    Preloader->>Game: Transition with Wallet Context
    Game->>DojoSDK: Initialize Game State
    Game->>Game: Setup Player and Interactions
Loading

Possibly related PRs

Suggested reviewers

  • ponderingdemocritus

Poem

🐰 A Rabbit's Game Dev Tale 🎮

In Vite's embrace, Phaser takes flight,
Dojo's blockchain, a developer's delight!
Scenes dance, configs align,
A game template, simply divine!
Code hops, the rabbit cheers tonight! 🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f289e9 and 653b97b.

⛔ Files ignored due to path filters (7)
  • examples/example-vite-phaser-sdk/package-lock.json is excluded by !**/package-lock.json
  • examples/example-vite-phaser-sdk/public/assets/bg.png is excluded by !**/*.png
  • examples/example-vite-phaser-sdk/public/assets/logo.png is excluded by !**/*.png
  • examples/example-vite-phaser-sdk/public/favicon.png is excluded by !**/*.png
  • examples/example-vite-phaser-sdk/screenshot.png is excluded by !**/*.png
  • examples/example-vite-react-phaser-recs/src/dojo/generated/generated.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • examples/example-vite-phaser-sdk/.gitignore (1 hunks)
  • examples/example-vite-phaser-sdk/LICENSE (1 hunks)
  • examples/example-vite-phaser-sdk/README.md (1 hunks)
  • examples/example-vite-phaser-sdk/dojoConfig.ts (1 hunks)
  • examples/example-vite-phaser-sdk/index.html (1 hunks)
  • examples/example-vite-phaser-sdk/log.js (1 hunks)
  • examples/example-vite-phaser-sdk/package.json (1 hunks)
  • examples/example-vite-phaser-sdk/public/style.css (1 hunks)
  • examples/example-vite-phaser-sdk/src/dojo/context.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/main.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/scenes/Boot.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/scenes/Game.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/scenes/GameOver.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/scenes/MainMenu.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/scenes/Preloader.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/typescript/contracts.gen.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/typescript/models.gen.ts (1 hunks)
  • examples/example-vite-phaser-sdk/src/vite-env.d.ts (1 hunks)
  • examples/example-vite-phaser-sdk/tsconfig.json (1 hunks)
  • examples/example-vite-phaser-sdk/vite/config.dev.mjs (1 hunks)
  • examples/example-vite-phaser-sdk/vite/config.prod.mjs (1 hunks)
  • examples/example-vite-react-app-recs/tsconfig.json (1 hunks)
  • examples/example-vite-react-app-recs/vite.config.ts (1 hunks)
  • examples/example-vite-react-phaser-recs/package.json (1 hunks)
  • examples/example-vite-react-phaser-recs/src/dojo/createSystemCalls.ts (2 hunks)
  • examples/example-vite-react-phaser-recs/src/phaser/systems/controls.ts (2 hunks)
  • examples/example-vite-react-phaser-recs/tsconfig.json (1 hunks)
  • examples/example-vite-react-phaser-recs/vite.config.ts (1 hunks)
  • packages/sdk/src/__tests__/state.test.ts (1 hunks)
  • packages/sdk/src/__tests__/zustand.perf.test.ts (1 hunks)
  • packages/sdk/src/experimental/index.ts (2 hunks)
  • packages/sdk/src/react/hooks.ts (3 hunks)
  • packages/sdk/src/react/provider.tsx (2 hunks)
  • packages/sdk/src/state/index.ts (1 hunks)
  • packages/sdk/src/state/zustand.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MartianGreed MartianGreed marked this pull request as ready for review January 24, 2025 07:55
@MartianGreed MartianGreed merged commit c842833 into main Jan 24, 2025
5 checks passed
@MartianGreed MartianGreed deleted the feat/phaser-revamp branch January 24, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant