Jump to content


Photo
- - - - -

Pixel Perfect Collisions V4.0


  • Please log in to reply
51 replies to this topic

#41 sargunster

sargunster

    GMC Member

  • New Member
  • 449 posts

Posted 29 November 2009 - 04:15 AM

What changes does the version made by flexaplex have?
  • 0

#42 aKtimelli

aKtimelli

    GMC Member

  • New Member
  • 57 posts

Posted 19 February 2010 - 12:27 PM

Is there any way to implement gravity into this engine? It would be really cool.

Otherwise, nice engine.

Edited by aKtimelli, 19 February 2010 - 12:27 PM.

  • 0

#43 borut

borut

    Courage Wolf Productions

  • GMC Member
  • 1152 posts
  • Version:GM:Studio

Posted 19 February 2010 - 02:14 PM

awesome example. I'll use it!
  • 0

#44 anselm

anselm

    GMC Member

  • GMC Member
  • 239 posts

Posted 22 February 2010 - 12:04 AM

Ah. Thanks a ton for this! This saved me lol. I couldn't get the walls to work as precise as I wanted them to
  • 0

#45 Mad_Scientist

Mad_Scientist

    GMC Member

  • New Member
  • 79 posts

Posted 27 June 2010 - 06:45 PM

In the ISOMETRIC, can you fix it so that it "snaps" to the grid square where the mouse was clicked?

Usually it stands crossing over the lines.

Thanks.

Edit:
Also, in ISO view, if we click on the LEFT of the top-left GREEN obj_cylinder_iso, the obj_player keeps circling it forever.

Edit: Actually, if you click CLOSE to any obstacle, since the obj_player is NOT snapping to grid, it runs around that obstacle infinitely. So in essence, snap to grid is missing! :P

Edited by Mad_Scientist, 27 June 2010 - 06:53 PM.

  • 0

#46 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 19 September 2010 - 06:37 PM

In the ISOMETRIC, can you fix it so that it "snaps" to the grid square where the mouse was clicked?

Usually it stands crossing over the lines.

Thanks.

Edit:
Also, in ISO view, if we click on the LEFT of the top-left GREEN obj_cylinder_iso, the obj_player keeps circling it forever.

Edit: Actually, if you click CLOSE to any obstacle, since the obj_player is NOT snapping to grid, it runs around that obstacle infinitely. So in essence, snap to grid is missing! :P


I don't see the point to putting the grid snapping, cause then you wouldn't need a collision script like the one in my engine, it would not make any sense. You could definitely find a more effective way to move around while being snapped to the grid with a simpler collision detection system, since you only have to check the grid you want to go in, not every pixel. As for the player circling around forever if you click on an obstacle, as I stated before, there is no point to add a function to stop it from doing so since it's not part of this collision engine. Sorry about that,
-Rixeno
  • 0

#47 Wazaq

Wazaq

    GMC Member

  • New Member
  • 6 posts

Posted 03 November 2010 - 05:10 AM

This is a awesome engine, When i tested it from the file above it worked exactly as I wanted. However when I tried to use the script and the step code with my player on my game, it won't detect the walls and I cannot figure out why.

I am using GM8 Pro. I'm not getting any errors, and I copied the script codes exactly as in the gmk.

EDIT: I'm not sure why, but i got it to work with the 1st file and not the 2nd one. Not sure why it made a difference though because the 2nd file was basic it seemed.

Edited by Wazaq, 03 November 2010 - 05:26 AM.

  • 0

#48 MegasGamer

MegasGamer

    GMC Member

  • New Member
  • 84 posts

Posted 10 November 2010 - 08:03 PM

Does this engine also account for making a character move up and down slopes?
  • 0

#49 Ruub

Ruub

    GMC Member

  • GMC Member
  • 442 posts
  • Version:GM:Studio

Posted 14 December 2010 - 02:27 PM

hey there!

I tried it out and It's quite fancy ;D

though I hoped using the bullet collision way of life, it didn't work for me
My game uses 1 pixel thin lines which which your bullet go straight through! huh!

If you care enough to give any suggestions, pm me please :)

Edited by Ruub, 14 December 2010 - 02:28 PM.

  • 0

#50 _174413

_174413

    GMC Member

  • New Member
  • 22 posts
  • Version:GM8

Posted 06 April 2011 - 11:59 PM

Hey there. I've been studying the code in your example and am a novice GML user trying to learn more about the language.

Could someone explain what the 'argumentx' is in the move_step script?
  • 0

#51 _174413

_174413

    GMC Member

  • New Member
  • 22 posts
  • Version:GM8

Posted 07 April 2011 - 08:46 AM

Hey there. I've been studying the code in your example and am a novice GML user trying to learn more about the language.

Could someone explain what the 'argumentx' is in the move_step script?


Or at least, could someone direct me to a topic which covers scripts extensively enough for me to learn more?
  • 0

#52 Rhuidean

Rhuidean

    GMC Member

  • New Member
  • 1 posts

Posted 08 April 2011 - 10:06 AM

I tried this out for my little tank game, but im having some issues getting this working on the tank itself.
It works perfectly on the bullets the tank fire, but the tank either moves on its own and stops when it hits a solid, or let me move it and just pass trough all solids.
Not sure what im doing wrong, so any help would be greatly appreciated. :)

Here's the movement code i use for the tank if its any help.

if (keyboard_check(ord('A'))) { direction += 5; }
if (keyboard_check(ord('D'))) { direction -= 5; }
image_angle = direction;

if (keyboard_check(ord('W'))) {
    friction = 0; 
    if (speed < 6) {
        speed += 0.3;
    }
}

if (keyboard_check(ord('S'))) {
    friction = 0; 
    if (speed > -6) {
        speed -= 0.3;
    }
}

if (!keyboard_check(ord('W')) && !keyboard_check(ord('S'))) {
    friction = 0.3;
}


- Rhuidean

Edited by Rhuidean, 08 April 2011 - 10:07 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users