-
Notifications
You must be signed in to change notification settings - Fork 2
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
Performance #38
Comments
1j01
added a commit
that referenced
this issue
Sep 3, 2024
- Install PIXI.js - Overlay three canvases (background, PIXI.js, and vanilla 2d canvas) - Handle PIXI.js for entity previews in entities sidebar - Add Snake entity based on a PIXI.js SimpleRope example (The texture is also from this example. The art style kinda fits, in a funny way.) I originally prototyped this PIXI.js integration in a separate project called Skelemon (which so far has only been a prototype of this). I ported it over by copying files atop the equivalent files and then reverting changes I didn't want, so I've already worked out a lot of details, like getting the canvases synced to the same frame, and generalizing code that was much easier to develop in an ad hoc fashion initially. PIXI.js should help a lot with performance, see issue: #38 Caveats: - There may be overhead in using multiple canvases, until everything is moved over to PIXI.js. - The game now requires WebGL. This could be mitigated using the pixi.js-legacy package. - Entities using PIXI.js are not reflected in the Water yet; only the vanilla 2d canvas's content is reflected. - Entities using PIXI.js cannot be sorted together with other entities in this scheme. Perhaps entities with vanilla canvas 2d drawing implementations integrated as PIXI.Sprite objects, to allow sorting.
1j01
added a commit
that referenced
this issue
Sep 5, 2024
- Overlay three canvases (background, PIXI.js, and vanilla 2d canvas) - Handle PIXI.js for entity previews in entities sidebar - Add Snake entity based on a PIXI.js SimpleRope example (The texture is also from this example. The art style kinda fits, in a funny way.) I originally prototyped this PIXI.js integration in a separate project called Skelemon (which so far has only been a prototype of this). I ported it over by copying files atop the equivalent files and then reverting changes I didn't want, so I've already worked out a lot of details, like getting the canvases synced to the same frame, and generalizing code that was much easier to develop in an ad hoc fashion initially. PIXI.js should help a lot with performance, see issue: #38 Caveats: - There may be overhead in using multiple canvases, until everything is moved over to PIXI.js. - The game now requires WebGL. This could be mitigated using the pixi.js-legacy package. - Entities using PIXI.js are not reflected in the Water yet; only the vanilla 2d canvas's content is reflected. - Entities using PIXI.js cannot be sorted together with other entities in this scheme. Perhaps entities with vanilla canvas 2d drawing implementations integrated as PIXI.Sprite objects, to allow sorting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SimpleActor
by checking if it can move all the way in one step (wouldn't this allow for tunneling?)Butterfly
, which checks 50 times per step alwaysfind_ground_angle
usingworld.collision
, move intoWorld
terrain_optimized
: could probably optimize terrain in edit mode as soon as the world loads, now that it doesn't modify the original entities (this would be more for debug views than perf)The text was updated successfully, but these errors were encountered: