Why are my objects keep multiplying and making a path in gamemaker? - game-maker

I am new to GMS2 and was coding up a game when this happened:
enter image description here
It would be of great help if anyone could help me

Most likely it's not objects that are multiplying, but that you don't have a background in your room, so whatever was drawn during the last frame stays there.

Related

How would I make sure that the player has to be near a shelf to search it in my game

I have been making a game in Game maker 1.4 and can't figure out how to make it so that it is required for a player to have Collison with a specific object such as a shelf, desk, Etc. To search the items in it. I'm trying to implement a inventory system. im using the Gamemaker engine language to program this game. I have my player able to walk left and right to interact with objects. If anyone has any info about how I could check for player position/ Collison from my object please help me.
You should check for collision with objects in front first, if that works well, then you can reuse that check to see if it collides with a specific object.
If you use wall objects to check collission with, then you can make an "interactable object" using the wall object as a parent.
Collision by itself is complicated though, there are many ways you can go with it.
I use collision_point() myself to check if objects are colliding in front (and side/back) of the character. https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/collision_point.htm
But that's just the start, you may want to search up collision handling for the game you're making to handle it smoother.

Getting odd color pattern while implementing ESRGAN

I'm implementing ESRGAN on PyTorch. However, I'm getting some weird color pattern, and the result does not seem better than the low-resolution picture. What could possibly be the cause of this? Thanks in advance.
Without seeing the code of the network my first thought is that you should check the post-processing of the image. Maybe values are getting clipped somewhere, or denormalized incorrectly.
Also look at images over different checkpoints of training. Is the artifact consistent? When did it appear?

JavaFX Game Issues with wall boundaries

I am having trouble getting my simple JavaFX Maze Game to work. I just wanted to do this to test how much I knew, and I have gotten almost to the end.
All I want to do now is see if there is a way for me to combine all of the Rectangle2D Boundaries into a single bounding shape for me to do collision detection with.
Right now, I have maze walls set up like
this, and I have to check for collision against every single one of the wall objects, which I have contained in a list.
What I want to know is there anyway of turning that into a single shape that I can check collision against. That would make my job so much easier when it comes to finishing my game.
EDIT 1: The red boxes in the image are just there to represent the Rectangle2D bounding boxes. They will not actually be there in the final product.
EDIT 2: All of these have been created using a simple black square sprite, and all of the bounding Rectangle2D boxes are using the javafx.geometry package, not the javafx.scene.shape package.
Any help would be appreciated. Thanks in advance!
Do you mean union many shapes into one?
Thanks to the help of the comment thread on Powercoder's answer, I was able to get it figured out. Instead of using javafx.geometry classes, I was able to switch to javafx.scene.shape classes, which allowed me to finish everything I was trying to do.
Here is my old code: https://pastebin.com/1DBXuq79
and here is my new code: https://pastebin.com/uXTrcsZ2
For anybody who wants to compare and figure out how I changed it.

Change in OCR Result?

I'm now seeing the full text found in the image in the first "textAnnotation" value, and then each word again in a new textAnnotation (so effectively everything is duplicated). I wasn't seeing this behavior just a couple days ago, so I assume this is an intentional change. Does anyone know if I can just rely on the first textAnnotatation as being the full result? Thanks.

javafx alternative Impl_getURL();

Hello i ran across a problem in my code. i used a line
view.getSpeler1Kaarten()[i].getImage().impl_getUrl().contains("WippenGame/View/Images/BlancoKaart.png")
but its giving me warnings when i start my program.
Also i looked up why impl_getUrl() had a stripe trough it and it said it is sometimes dangerous to use it and that most of the time there is a better alternative for it. Has anyone an idea what the alternative could be? i basicly have to see if imagview contains a certain image.
Thanks in advance.
Just don't use the URL to compare the images like that.
You presumably load that particular image somewhere in your code:
Image blancoKaart = new Image(...);
and it is (almost always) good practice to ensure you only load it once.
So now you can just do
view.getSpeler1Kaarten()[i].getImage() == blancoKaart ;

Resources