performance

  1. J

    SOLVED How to store Sprite in variable? best way??

    Hello everyone, I'm new to GameMaker (not programming) and I would appreciate advice for how and where to save sprites definition for use. Right now I have them in an global variable like this: #macro DIRECTION_UP 0 #macro DIRECTION_DOWN 1 #macro DIRECTION_LEFT 2...
  2. Frykaeshi Master

    GMS 2.3+ Does using get functions every step decrease performance?

    Checking get functions every step: if (surface_get_width(shad_surf) != _cameraW) | (surface_get_height(shad_surf) != _cameraH) {} Or creating two non local variables and checking/updating them every step: if (cameraPrevW != _cameraW) | (cameraPrevH != _cameraH) {} cameraPrevW = _cameraW...
  3. flyinian

    SOLVED Assign object to variable or not to assign to variable?

    Would assigning an object that is used often to a variable of any kind be faster than referencing it's full name? I understand that each time the object is referenced somewhere, it has to be looked up first. If this is faster, would it be good practice to assign the object to a variable? If...
  4. flyinian

    SOLVED Question about performance/other using instances in a room.

    Is there any difference between using an object w/ code and placing it into a room multiple times vs. using said before mentioned object and making a child for it and placing the child into a room multiple times? Would both methods result in the same? As in performance wise and anything...
  5. S

    How to draw dynamic tile-based background?

    I have a room divided into lots (1000+) of square tiles, the tiles can be things like grass or dirt. The tiles are dynamic because if I have an explosion or something of the sort the grass tiles become dirt tiles. How can I draw these tiles while maximizing performance?
  6. H

    GML Trying to improve the performance of drawing Isometric tiles

    Hello! I am very new with gml. I am trying to create an Isometric world with the use of a ds_grid. But if I try to create a very big room that is filled with isometric tiles I get major performance issues. Since I am very new with gml I don't know all the options to increase performance of...
  7. M

    Lag from too many instances with for loops

    I've searched high and low but can't seem to find how performance heavy FOR LOOPS are. I have an object that runs a for loop with no issue, but as soon as I create 10+ instances of the same object, the FPS drops below 60fps. The more instances on screen, the lower the FPS - all the way down to...
  8. mbeytekin

    GMS 2.3+ Still high CPU usage nightmare persists.

    High CPU usage persists even in a still blank project. Isn't there really a solution to this? I am in a very difficult situation because most of our users complain about it on Steam. That's why there are refunds. Please I urgently need help with this. I tried to research everything related to...
  9. C

    High range of depths vs small range depth

    Does anyone know if there is a difference in performance for using a high amount of depth layers vs a low amount. Say I have 3 layers, a foreground, middleground and background. I can set these layers to depth value: -10 0 10 or I can set them to: -1 0 1 Is there any difference in these...
  10. 1peck

    GML Collision: One object to handle map collsion using tiles layer.

    GM Version: Studio 2+ Target Platform: Windows Download: see link below Links: see link below Summary: Build an object from tile layer to handle map collision Tutorial: Hello, First time I m doing a tutorial (and english is not my primary language) so sorry in advance! Pro: - Spend less time...
  11. flyinian

    SOLVED Difference in Performance between the given examples.?

    var aa, bb, cc, dd, ee, ff,....; aa = abc1 >= abc2; bb = abc3 >= abc4; cc = abc5 >= abc6; dd = abc7 >= abc8; ee = abc9 >= abc10; ff = abc11 >= abc12; ... if(aa && bb && cc && dd && ee && ff && ...) { //code }; VS. // Create Event aa = abc1 >= abc2; bb = abc3 >= abc4; cc = abc5 >= abc6; dd =...
  12. M

    GMS 2.3+ Performance questions. Strange behaviour?

    Hi guys, I'm creating a mobile game. It's NOT pixelart so I require a high res output. For some reason performance on both my Mac and my Android device (Samsung A50) has been less than great, so I decided to do some experimentation. Here is what I found, and I'm wondering if you guys see the...
  13. E

    Performance Issues

    Hi everyone! Over the past few days, I've been doing a lot of investigation into my game's performance, specifically with regard to keeping a steady 60 fps. The debugger & profiler have been pretty helpful, but I have a few questions about some problems I've been having. How much are memory...
  14. AllCrimes

    Performance testing (Including structs)

    I put together another performance test for my own sanity. DISCLAIMER: There's no perfect way to test structs (that I can think of) without using the variable_struct_get and variable_struct_set from within the for loop and the performance hit of these as opposed to dot notation is unknown. This...
  15. MartinK12

    GML Checking logical statements vs calculating variables – performance wise?

    I heard somewhere that logical statements like if take more time to process then calculating variables so I wonder if I should leave all variable calculations alone or put them inside if statements. For some basic example in step event - is the first way faster then the second? Is it even worth...
  16. Fluury

    GMS 2 Bizarre performance decreasing, random-number related Issue

    I had posted a thread earlier about my issues, but unfortunately to no avail. Given there was a lot of information to write, I just put it in a video. The gist is that as it appears, in some context, using random number generation just seems to cause some internal, permanent (until you close...
  17. Fluury

    Performance decreases the more levels are generated/the longer the game is played, but it isn't a memory leak/ or instance count.

    Heya. The project I am working on uses procedural generation to generate it's levels. In said levels, NPCs and everything spawn. After the level is done, we wipe the current level setup, and create a new one over it. Sounds simple enough - this isn't a new concept. The problem I am running...
  18. Pretorg

    SOLVED Tiled background size and performance

    I have been using in my project 4 600x600 backgrounds tiled (as they are smaller than the room), the first is just a solid colour, the other backgrounds have some scattered sprites. I am implementing random events on the game and one of them requires a different background which is a radioactive...
  19. T

    GMS 2 Question about deactivating instances out of camera view

    So, I understand that to improve game performance, it is a good idea to deactivate any instances outside of the camera view (plus some offset), so that the game does not need to work out the code for all these instances every single frame. My question is, besides regular objects, do I need to...
  20. F

    Cutscene Performance: Sprites versus Layer Changes

    My game performs fine but I see value in learning optimization now for future application. I have some segments of the game which are simple animated scenes that react to very limited inputs (space to start, space to stop... that sort of thing) and so far I have been building them like old...
Top