• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

collision

  1. erys

    collision problem

    does someone knows why it happens ? // controls press_right = keyboard_check(vk_right) press_left = keyboard_check(vk_left) press_jump = keyboard_check_pressed(vk_space) // mouvements var move = press_right - press_left; hspd = move * walkspd; vspd = vspd + grav; if (place_meeting(x, y +...
  2. erayzesen

    Simple Raycast Script

    Hi all. I released a raycast code to use your any projects; Note: It support Game Maker Studio v2.3 and new versions; Check it out: (with online demo): https://erayzesen.itch.io/simple-raycast The method; var...
  3. S

    GMS 2.3+ Game Maker 2.3 Trial version!

    Hi. I am hoping if you can tell me if it is possible to do collisions and make them work after pressing play and compiling, if you are using the trial version. Because i am following a course about Game Maker 2.3 and have copied the code exactly but it isn't working. There is no error in my...
  4. S

    SOLVED Hi. My space ship and lasers are not colliding with and destroying the asteroids.

    Hi. I have triple checked my code for the collision of my ships and lasers with the asteroids, and destruction of the asteroids. There isn't anything wrong with it that i can see. The asteroids themselves seem to be floating on top of the space ships and lasers, as if they are on a layer on top...
  5. Writerstix77

    Player getting stuck on moving enemy

    I have an enemy that moves towards a player when near. When close enough to the player it animates a swinging axe. If the player and the enemy are colliding and the enemy is drawing frames 4, 5, and 6 (of 8 axe-swinging animation frames), the member takes damage. Sometime, the player will...
  6. anjai

    Windows SOLVED // how do I respawn an object on the place it got destroyed?

    I tried to find it out myself but all of the tutorials explain how to randomly respawn after some time and I need my object to respawn on the exact same place it got destroyed and just after it got destroyed and not at a certain amount of time :) If someone could tell me how to do it or where to...
  7. R

    GMS 2 need help with collisions!

    So I'm totally new to Gamemaker, and I've been having issues with collisions. The code I'm currently using doesn't work because it causes the player to move slowly behind it (like friction) instead of actually colliding with the object. I don't want to use collision events because it makes the...
  8. Coded Games

    GMS 2 Optimizing Collisions

    So I have been working on optimizing my game today and noticed that the largest portion of runtime is the Engine's HandleCollision category (around 40% of total runtime). It make sense, as my game is a bullet hell it can have up to thousands of bullet instances at a time. I have tried being...
  9. J

    How to make colliding object not get stuck with another one?

    I'm using the code below to move sprite's eye towards the mouse, but the problem is that I'm using collisions to keep the eye inside the sprite. This causes the eye to move in unwanted manner since when it is colliding with the edges of the player, it stops moving entirely until mouse is pointed...
  10. A

    /// @arg x /// @arg y return place_meeting(argument0, argument1, oCollision); not working

    Hello I have oCollision and everything prepared but it just gives me this error when I try to run it and Idk what to do please help I did everything properly and the red signal error doesn't show up it shows as it works but then it gives me this error telling me it's wrong please help...
  11. S

    GML Calculating a non-axis aligned bounce/reflection vector for collision resolution

    Non-axis aligned 2D reflection vector GM Version: 2.3 (demo is for 2.3 but the concept would work in any version) Target Platform: All Download: A link to the freely available source code and project is available here: Links: Tutorial Video and Github link Summary This video tutorial builds...
  12. FullCup

    SOLVED The Moving Platforms Trouble.

    I finally made a 'one-way block' right. Here is the collision code without the 'movement': //Instance var plat = collision_rectangle(bbox_left,bbox_bottom,bbox_right,bbox_bottom +abs(vspd) +1,argument0,1,0); //Condition if (vspd >= 0) and (plat != noone) and...
  13. W

    SOLVED precise collision problem

    So in my game, when a player hits a wall with a weapon, it makes a spark when and where the player hits wall. In the following code, everything works as intended EXCEPT that the spark is never made at the right y coordinate (i in the for loop). The sprite stops at the good time (ie it doesn't...
  14. paulog

    Legacy GM Check collision with all objects but self?

    Hello! I'm making a simple game in GM1.4 and I want to check if an object is colliding with any other object but not with itself. This is the code I'm using: if position_meeting(x,y,all) { global.free = 1 } if !position_meeting(x,y,all) { global.free = 0 } Tha variable global.free is always...
  15. Dilawlaw

    SOLVED Problem with my mask position

    Hi guys, I am working on an 8-bit game and I have a problem with the collision mask of the player where it's not situated exactly as I see it on my sprite. I wrote a code to draw a rectangle showing my collision boundaries ( bbox_left, right top, and bottom). here is a zoomed picture of how the...
  16. P

    SOLVED How to compare return of the parent_get function

    Hello everybody, probably the heading for this thread sounds strange but I Really have troubles when dealing with function object_get_parent and object_index variable, so what I want to achieve is simply make one object perform the action depending on what it collided with, so For Example, if...
  17. J

    GML Odd Numbered Mask Dimensions and Tile Collisions

    Hi all, Context: Getting back into a game maker project after over a year and was playing around with some code and functionality I have posted below (not sure what happened to my old forum account but had to register again even though I have on here for at least 5 years now?). The code...
  18. Queble

    2D Tile Collision help

    So I'm making a game where the player needs to collide with walls and stuff, right? I watched every tutorial online, but there are none that show what i want (a player that can collide with tiles using his bounding box) So I came up with this code, and the X dimension collisions work most of...
  19. mizugori

    GMS 2 Need help with tilemap for collision (when I create the tileset, it does not show my colored tile)

    Sorry if this is a dumb question. I am trying to have large curving walls in a scene, and I want collision on them (no objects should be able to pass through them.) At first I tried just putting a huge object, complete with it's own massive sprite, into the room for each wall. However, none of...
  20. mcglubski

    GMS 2 Array for Collisions HELP! [SOLVED]

    Can someone help me simplify this into an array or something else? Even with years of experience with GMS I still struggle to understand simple arrays, especially after coming back to it since buying GMS2. I feel like this should be easy but everything I try doesn't work. If someone could...
Top