Code Monkey home page Code Monkey logo

emojimon's Introduction

emojimon's People

Contributors

holic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

emojimon's Issues

forge dependency hell

looks like forge is used by SNAP on ubuntu, which means it's blocking everything in the process:

[contracts] Error:
[contracts] FORGE - training program for SNAP (version 2006-07-28)
[contracts]
[contracts] usage: forge [options] [options]
[contracts] options:
[contracts] -help
[contracts] -verbose
[contracts] -pseudocount [1] (absolute number for all models)
[contracts] -pseudoCoding [0.0] (eg. 0.05)
[contracts] -pseudoIntron [0.0]
[contracts] -pseudoInter [0.0]
[contracts] -min-counts [0]
[contracts] -lcmask [-fragmentN]
[contracts] -utr5-length [50]
[contracts] -utr5-offset [10]
[contracts] -utr3-length [50]
[contracts] -utr3-offset [10]
[contracts] -explicit [250]
[contracts] -min-intron [30]
[contracts] -boost (file of ID )
[contracts] Error running "forge clean"

how to fix this?

ERR_UNKNOWN_FILE_EXTENSION

When trying to build the tutorial from a fresh clone, I get the following error message related to unknown file extension

Node version: v16.14.2
pnpm version: 8.6.12

Trace:

[contracts]
[contracts] > [email protected] dev /emojimon/packages/contracts
[contracts] > pnpm mud dev-contracts --tsgenOutput ../client/src/mud
[contracts]
[client]
[client] > [email protected] dev /emojimon/packages/client
[client] > wait-port localhost:8545 && vite
[client]
[client] Waiting for localhost:8545..node:internal/errors:464
[contracts]     ErrorCaptureStackTrace(err);
[contracts]     ^
[contracts]
[contracts] TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".json" for /emojimon/node_modules/.pnpm/@[email protected][email protected]/node_modules/@latticexyz/world/abi/World.sol/World.json
[contracts]     at new NodeError (node:internal/errors:371:5)
[contracts]     at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:87:11)
[contracts]     at defaultGetFormat (node:internal/modules/esm/get_format:102:38)
[contracts]     at defaultLoad (node:internal/modules/esm/load:21:14)
[contracts]     at ESMLoader.load (node:internal/modules/esm/loader:359:26)
[contracts]     at ESMLoader.moduleProvider (node:internal/modules/esm/loader:280:58)
[contracts]     at new ModuleJob (node:internal/modules/esm/module_job:66:26)
[contracts]     at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:297:17)
[contracts]     at ESMLoader.getModuleJob (node:internal/modules/esm/loader:261:34)
[contracts]     at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:81:21) {
[contracts]   code: 'ERR_UNKNOWN_FILE_EXTENSION'
[contracts] }
[contracts]  ELIFECYCLE  Command failed with exit code 1.
[contracts] cd packages/contracts && pnpm run dev exited with code 1

Unlike address components, playerEntityId is not checksummed

To use playerEntityId in HasValue you have to make it checksummed first (via ethers' getAddress for example)

My component in question is essentially an AddressComponent in solidity, and an Entity component in ts
(there's no Type.Address in recs, and using Type.String instead doesn't change the fact that the address component's values are checksummed in ts)

import { defineComponent, Metadata, Type, World } from "@latticexyz/recs";

const Entity = {
  value: Type.Entity,
} as const;

export function defineEntityComponent<M extends Metadata>(
  world: World,
  options?: { id?: string; metadata?: M; indexed?: boolean }
) {
  return defineComponent<typeof Entity, M>(world, Entity, options);
}

I think if my address component were a uint256 instead, then its values might not have been checksummed. It should probably be normalized on the netwoking end, rather than changing playerEntityId

edit: confirmed it, address and uint256 components will be parsed by network differently, so I have to manually getAddress(playerEntityId) if I'm using it in HasValue of an address component

Neither Windows nor Linux(Ubuntu) can spawn Players after step 1(Players and movement)

This is the error I saw in the console when I executed "pnpm run dev" after step I've tried this many times, and sometimes I can spawn player in step 1 (without this error), but after i finish the step4, the map will go black, or i cant spawn player

Error

The player icon flashed when I clicked on the map with my mouse, but it didn't actually spawn

I've been trying for a few days now, but changing the operating system doesn't fix the problem

v2 checklist

  • rebase to remove useMapConfig (changed approach)
  • remove MapSystem from the starter kit?
  • rename Encounter.tsx to EncounterScreen.tsx to not conflict with Encounter RECS component
  • fix encounter animation bug
  • update mud
  • use escaped double quotes in dev scripts for windows

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.