Point n' click game WIP lagging at one specific section

VERSION USED: 1.19.4

PROBLEM:
I made a short demo for a point n click adventure fangame in wick. It’s completely functional without crashes, and everything appears to be in order… EXCEPT, that when the character enters one specific part of the map, the game starts to lag a bit. At first I thought it was just a problem with my computer and the wick editor in general, but upon uploading a ZIP of my demo to itch for friends to play, they confirmed the issue was also prevalent in the uploaded build.

THE DETAILS:
I’m by no means an expert coder, so I only have two ideas for why this may be the case.

  • The first is that it could be due to the amounts of assets on screen; I’m using the VCam to track the character across a map, and a majority of the animated clips are composed of PNGs (this is an MSPaint Adventures fangame, so pixel art is par for the course.) It may just be that the editor can’t handle the amount of assets once a certain area loads in.

OR:

  • It could be related to the coding for the groundwork mechanic that has somehow gone awry. If you look at the wick file, there’s a clip on the main stage set to 0% opacity that I use to determine the bounds of where a player can walk; This file is separated into five “sections”- An upper section (green), a lower section (blue), and a middle section (pink) that bridges the two with small “connector” sections (red). This was implemented so that, if the VCam were to have both the upper and lower areas on screen at the same time, the player couldn’t accidentally skip out of bounds.

I’m a little lost, because it seems like the lag only occurs when the player is in the lower area, but it runs fine in the upper area-- however, the code on the two areas are the same.

I’ve added the current demo file in its entirety, and an image of the map for clarity (in the file, this is the only clip on the “WALK AREA” layer on the main timeline, but it’s at 0% opacity to remain “hidden” from the player’s view. Unlocking the layer and clicking on the area should let you access the edit timeline function, which will reveal the areas).

If it matters, here’s also a link to the itch upload I shared with friends.

Any help would be massively appreciated!

1 Like

I am not good at coding yet, so I can’t help you here, HOWEVER, you may want to share a WICK file so others can see the problem

@Moh_Animator I included it as a link in the bold “current demo” bit (file is too large to upload manually, sadly)

1 Like

Oh, sorry I must have missed it.

wow wow wow, super cool

1 Like

It may be that all your scripts are in the update function

1 Like

I won’t be able to see the file yet though. In a few hours I can

1 Like

I have to share that the forum’s max is 4mb, I modified the hitbox you created for the map that had too many points, I simplified them and now it shouldn’t lag anymore, also because I tried both on itch and this one directly from wick

1 Like

Ohhhh, thank you so much! Never would have guessed it was due to the amount of points on the hitboxes, but it makes so much sense now (something I’ll need to keep in mind as the project continues!)

Also, re: file limit max, it’s almost definitely because I’m using PNGs for the art assets to retain their pixels and opacity. If I were to need help with a later part of the project (which I’m hoping won’t be the case, but regardless…), is there a method you’d recommend for compressing the file(s)?

Again, thank you so much for the help!!! :smiley:

1 Like

The number of points is almost never a problem. If you’re making an animation, you can overdo it, but in this case, there were really a lot of points (making matters worse was that you used it for collisions), I think you used a PNG to VSG converter or something…

To compress the files, you can simply redraw some sprites over them with the svg brush. The quality of the shapes will suffer a bit because if you have a graphics tablet, the variable pen pressure doesn’t work. Or you use the mouse and make the shape point by point

1 Like