kozennnn / scuti-renderer Goto Github PK
View Code? Open in Web Editor NEW๐ฆ Habbo rendering engine made with HTML5 canvas using PixiJS and TypeScript
Home Page: https://scuti.netlify.app/
๐ฆ Habbo rendering engine made with HTML5 canvas using PixiJS and TypeScript
Home Page: https://scuti.netlify.app/
The wired selection filter doesn't work anymore due to the implementation of the layering system.
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
When running ``npm run start` and loading http://localhost:1234/ i get the following error:
RoomCamera.ts:198 Uncaught TypeError: Cannot read properties of undefined (reading 'emit')
at HTMLCanvasElement._tilePointerMove (RoomCamera.ts:198:20)
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.
It can be seen on the Door example at http://localhost:6006/?path=/story/scuti-room--door
It can be seen on the Angled Room example http://localhost:6006/?path=/story/scuti-room--angled-room
src/objects/rooms/parts/Cursor.ts(43,43): error TS2551: Property 'layer' does not exist on type 'RoomObjectLayer'.
https://github.com/kozennnn/scuti-renderer/blob/dev/src/objects/rooms/parts/Cursor.ts#LL43C39-L43C39
To not break
To improve performance the cursor object should be shared and moved between tiles rather than creating and destroying it on each hover.
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)
It doesn't seem to happen if i don't hover the "initial"/starting tile where the avatar was.
Shouldn't happen
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.
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
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)
When an avatar have a direction included between 4 and 7, the arms are flipped but are not correctly positioned like on Habbo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.