GithubHelp home page GithubHelp logo

cygnusfear / laputa Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 4.0 26.5 MB

☁️🏯 a world of floating cities 🏰☁️ - EthGlobal 2023

License: MIT License

Shell 0.08% HTML 0.50% TypeScript 76.19% CSS 2.96% JavaScript 0.06% Solidity 19.88% Dockerfile 0.34%

laputa's Introduction

LAPUTA

☁️🏯 a world of floating cities 🏰☁️ - EthGlobal 2023

Sign up for the waitlist

Development

Install dependencies:

mud

mud quick start

Prerequisites

  • Foundry
curl -L https://foundry.paradigm.xyz | bash
  • Node.js
  • pnpm
# after installing node
npm install --global pnpm

Available Scripts

In the project directory, you can run:

pnpm run <script>
Script Description
build Builds the app using pnpm.
dev Runs both contracts and client in development mode concurrently.
dev:client Runs the client development script.
dev:contracts Runs the contracts development script.
foundry:up Downloads and runs foundry, bash, and foundryup.
mud:up Sets the mud version to main and installs dependencies.
prepare Installs husky and optionally runs foundryup.
test Runs tests recursively on all packages.
preview Compiles TypeScript, builds, and previews the app with Vite.
lint Runs linting recursively on all packages.
type-check Runs type-checking recursively on all packages.

References / useful

laputa's People

Contributors

cygnusfear avatar singyiu avatar ivcained avatar

Stargazers

 avatar  avatar linchuan avatar seek avatar  avatar

Watchers

 avatar  avatar

laputa's Issues

figure out if we actually want this to be async or if we should render something else in the meantime

// TODO: figure out if we actually want this to be async or if we should render something else in the meantime
setup().then(async (result) => {
root.render(
<React.StrictMode>
<MUDProvider value={result}>
<App />


This issue was generated by todo-issue based on a TODO comment in 4a0833a. It's been assigned to @Cygnusfear because they committed the code.

Feature shortlist

Resources

  • put player resource data in Zustand
  • create UI for player resource data
  • cursor show can't build

Implementing Player

  • read player resource data from wallet
  • building ownership is added to player

Resource generation

  • player can build a mine facility next to a resource (-1 tile)
  • player receives resource upon building
  • player can build scaffolding (cheap)

Want to have

  • players can choose building color
  • players can rotate building (using R)
  • players can pick a different variation (using Spacebar)
  • facility is previewed in mouse cursor

implement a better solution than looping through all players

//TODO: implement a better solution than looping through all players
function defiDistributeRewardsToPlayers() public returns (uint256) {
uint256 totalAmount = defiGetTotalRewardBalance();
if (totalAmount == 0) return 0;
uint256 totalResidence = GameSetting.getTotalResidence();


This issue was generated by todo-issue based on a TODO comment in 31fb99f. It's been assigned to @singyiu because they committed the code.

design reward distribution mechanism among players, i.e. depends on players' buildings

for now, calculate the distribution off chain and use this call to distribute reward to a specific player account


//TODO: design reward distribution mechanism among players, i.e. depends on players' buildings
//for now, calculate the distribution off chain and use this call to distribute reward to a specific player account
function mockReleaseRewardToPlayer(address account, uint256 amount) public {
ILapuVault lapuVault = ILapuVault(GameSetting.getLapuVaultAddress());
lapuVault.transfer(account, amount);
uint256 currentTotalRewarded = GameSetting.getTotalRewarded();


This issue was generated by todo-issue based on a TODO comment in bb809a0. It's been assigned to @Cygnusfear because they committed the code.

GameLoaded logic breaks when the map has zero entities

// TODO: GameLoaded logic breaks when the map has zero entities [bug]
for (const facility of facilities) {
const { entity, typeId, position } = facility;
if (!getEntityByPosition(position)) {
const building = Object.values(EntityData.facilities).find(
(f) => f.entityTypeId === typeId || ""


This issue was generated by todo-issue based on a TODO comment in 8aad88d. It's been assigned to @Cygnusfear because they committed the code.

Extract build conditions, can't build 1 tile below gravity well, only gravity well can build at y==1, etc

// TODO: Extract build conditions, can't build 1 tile below gravity well, only gravity well can build at y==1, etc
const canBuildAtPosition = (position: Vector3) => {
const {
input: { building },
} = getState();
if (position.y < 0) return false;


This issue was generated by todo-issue based on a TODO comment in d118bea. It's been assigned to @Cygnusfear because they committed the code.

extract input logic from construction system

Should accept a building type as arg


// TODO: extract input logic from construction system [refactor]
// Should accept a building type as arg
const buildFacility = (position: Vector3) => {
const {
input: { cursor, building, setInput },
world: { addEntity },


This issue was generated by todo-issue based on a TODO comment in 2261ebc. It's been assigned to @singyiu because they committed the code.

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.