Code Monkey home page Code Monkey logo

scuti-renderer's Introduction

information

about me

scuti-renderer's People

Contributors

kozennnn avatar marcus-sa avatar tetreum avatar walidoux 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

scuti-renderer's Issues

Build command not working

D:\projects\scuti-renderer-dev>npm run build

> [email protected] build
> parcel build public/index.html

ร— Build failed.

@parcel/namer-default: Target "main" declares an output file path of "dist\index.js" which does not match the compiled bundle type "html".

  D:\projects\scuti-renderer-dev\package.json:5:11
    4 |   "description": "",
  > 5 |   "main": "dist/index.js",
  >   |           ^^^^^^^^^^^^^^^ Did you mean "dist\\index.html"?
    6 |   "source": "src/index.ts",
    7 |   "scripts": {

  โ„น Try changing the file extension of "main" in package.json.

If i change it :

D:\projects\scuti-renderer-dev>npm run build

> [email protected] build
> parcel build public/index.html

ร— Build failed.

@parcel/core: Unexpected output file type .html in target "main"

  D:\projects\scuti-renderer-dev\package.json:5:11
    4 |   "description": "",
  > 5 |   "main": "dist/index.html",
  >   |           ^^^^^^^^^^^^^^^^^ File extension must be .js, .mjs, or .cjs
    6 |   "source": "src/index.ts",
    7 |   "scripts": {

  โ„น The "main" field is meant for libraries. If you meant to output a .html file, either remove the "main" field or choose a different target name.
  โ„น Learn more: https://parceljs.org/features/targets/#library-targets

Parcel disagrees with itself :S

The only way it works is if i simply remove "main" attr from package.json

Allow tile clicking while interacting with a furniture

Rework the interactions in order to be able to click the tiles/stairs while we have the cursor on a furniture or an avatar. For example on habbo, when we click on a chair it also click on the tile behind it in order to move the user on the chair.

Reduce tiles footprint

Right now it seems that all tiles have 3 graphics: top, left & right. Even when they are not in a corner:
image
image

If we don't render the unnecessary faces, it will improve all mouse related events, as there will be less items to iterate on.

Error when clicking empty spaces/background

RoomCamera.ts:175 Uncaught TypeError: Cannot read properties of undefined (reading 'emit')
    at HTMLCanvasElement._tilePointerDown (RoomCamera.ts:175:81)

RoomCamera.ts:185 Uncaught TypeError: Cannot read properties of undefined (reading 'emit')
    at HTMLCanvasElement._tilePointerUp (RoomCamera.ts:185:81)

Resources url shouldn't be hardcoded

Resources url is hardcoded to localhost, leaving no room to actually use the renderer. The url should be customizable:
https://github.com/kozennnn/scuti-renderer/blob/dev/src/Scuti.ts#L92

        Assets.add("room/materials", "http://127.0.0.1:8081/generic/room/room_data.json");
        Assets.add("room/room", "http://127.0.0.1:8081/generic/room/room.json");
        Assets.add("room/cursors", "http://127.0.0.1:8081/generic/tile_cursor/tile_cursor.json");
        Assets.add("furnitures/floor/placeholder", "http://127.0.0.1:8081/generic/place_holder/place_holder_furniture.json");
        Assets.add("furnitures/furnidata", "http://127.0.0.1:8081/gamedata/furnidata.json");
        Assets.add("figures/figuredata", "http://127.0.0.1:8081/gamedata/figuredata.json");
        Assets.add("figures/figuremap", "http://127.0.0.1:8081/gamedata/figuremap.json");
        Assets.add("figures/draworder", "http://127.0.0.1:8081/gamedata/draworder.json");
        Assets.add("figures/actions", "http://127.0.0.1:8081/generic/HabboAvatarActions.json");
        Assets.add("figures/partsets", "http://127.0.0.1:8081/generic/HabboAvatarPartSets.json");
        Assets.add("figures/animations", "http://127.0.0.1:8081/generic/HabboAvatarAnimations.json");

I've used GitHub pages to host the resources at https://psociety.github.io/scuti-resources/ it that helps. At least it would be more accessible than expecting localhost self serving. It should also be done at https://github.com/kozennnn/scuti-resources so it can officially be used.

Double CPU usage when moving the mouse over tiles

Seems like some part of the process is quite expensive as even the game goes slow when moving the mouse.

Tested on:
CPU: i9
RAM: 32GB
GPU: 1080GTX

The RAM usage is also quite high, while other solutions take 500MBs, Scuti takes 1.7GBs

Random error when hovering furniture

It does not alwayss happen, but it happens a lot on moving furnis like doors

HitTexture.ts:93 Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
    at HitTexture._generateHitMap (http://localhost:1234/index.91126d5d.js:34670:35)
    at HitTexture._getHitMap (http://localhost:1234/index.91126d5d.js:34651:48)
    at HitTexture.hit (http://localhost:1234/index.91126d5d.js:34715:29)
    at FurnitureLayer.containsPoint (http://localhost:1234/index.91126d5d.js:34615:125)
    at EventBoundary.hitTestFn (http://localhost:1234/index.91126d5d.js:16363:63)
    at EventBoundary.hitTestRecursive (http://localhost:1234/index.91126d5d.js:16345:28)
    at EventBoundary.hitTestRecursive (http://localhost:1234/index.91126d5d.js:16337:40)
    at EventBoundary.hitTestRecursive (http://localhost:1234/index.91126d5d.js:16337:40)
    at EventBoundary.hitTestRecursive (http://localhost:1234/index.91126d5d.js:16337:40)
    at EventBoundary.hitTestRecursive (http://localhost:1234/index.91126d5d.js:16337:40)

Avatar flip issue

When an avatar have a direction included between 4 and 7, the arms are flipped but are not correctly positioned like on Habbo.

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.