showPicture crash

The repro not always rendering is probably just a simple logic error: you're using player coordinates in it, but show image uses screen coordinates (i.e. 0,0 will always draw on the top-left of the screen), so depending on the player's position it will sometimes try to draw it outside the screen.

I think it maybe the graphics not updating because when I put "show text" to same event the showpics started appearing
upd.jpg



(And why is the window on top left corner now)
I think it maybe the graphics not updating because when I put "show text" to same event the showpics started appearing
The plot thickens. So, now the images show up unreliably if you just use the script you posted earlier, but reliably if you add a show text message after them? For me they showed every time (unless of course the player was too far away from 0,0).

(And why is the window on top left corner now)
I'm not sure what that refers to.
The plot thickens. So, now the images show up unreliably if you just use the script you posted earlier, but reliably if you add a show text message after them? For me they showed every time (unless of course the player was too far away from 0,0).

that was just the repro, in the project the pics appear as supposed to, though laggy (takes a moment for them to appear)

I'm not sure what that refers to.

the game window
though laggy (takes a moment for them to appear)
Well, that's a lot of images you're showing at once. You could speed it up by just drawing a shape directly rather than loading a file over 50 times, or manually make an image for each possible range, and just show that one image.
the game window
Interesting. Mine's still in the middle of the screen by default.
You could speed it up by just drawing a shape directly rather than loading a file over 50 times

shouldn't the engine only load the image once though?
still having some problems with showPicture

If I run this code the RM freezes/crashes with GL_OUT_OF_MEMORY error message


Code:
for(let i = 1; i < 60; i++)

{

$gameScreen.showPicture( i, "Move", 0, ($gamePlayer.x + i) * 48, ($gamePlayer.y + i) * 48, 100, 100, 155, 0);

}


to test I used 100x100 map and placed player in the middle


with fewer iterations such as 10 instead of 60 it wont crash
shouldn't the engine only load the image once though?
Well, it probably should, but I'm not entirely sure how the cache interacts with images loaded through direct calls to $gameScreen.showPicture.

If I run this code the RM freezes/crashes with GL_OUT_OF_MEMORY error message
I don't think I can really help you here - I've ran that code earlier with a couple more 0s added to the iteration count and it worked fine. If this is in your main project, it's likely something else there interfering with it. If it's in a completely fresh project, I have no idea what could that be.
If this is in your main project, it's likely something else there interfering with it. If it's in a completely fresh project, I have no idea what could that be.

well I started this project like month ago. not sure if i need to update other things like the pixi library?
i tried with new project and everything works there. strange
Found out the reason, it's the TDDP_BindPicturesToMap plugin that causes the freeze

I mean not even using it (in the test project) but as long as its activated the game freezes
Found newer version of the plugin and now it works!
=D

@Jar1, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/showpicture-crash.162857/