Author Topic: jump3  (Read 6625 times)

0 Members and 1 Guest are viewing this topic.

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #120 on: January 28, 2018, 06:06:24 PM »
lol i vaguely remember that.... the dream is finally real

SquareWheel

  • Administrator
  • Cutester
  • *****
  • Posts: 520
  • Cutes: 83
    • View Profile
Re: jump3
« Reply #121 on: January 28, 2018, 06:40:25 PM »
Got 'em all.  Level 5 took some thinking.



Nice game!

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #122 on: January 28, 2018, 06:43:52 PM »
nice!! thanx for playing!!  :honeydew:

hubol

  • Cutester
  • *****
  • Posts: 913
  • Cutes: 153
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: jump3
« Reply #123 on: January 28, 2018, 07:38:22 PM »
pretty cute.... i've only gotten through the tutorials so far

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #124 on: January 28, 2018, 09:48:46 PM »
i love getting comments on my grames from people.... its more addicting than drug's

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #125 on: January 28, 2018, 10:58:11 PM »
i also enjoy getting "likes" on my twitter posts.....

hubol

  • Cutester
  • *****
  • Posts: 913
  • Cutes: 153
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: jump3
« Reply #126 on: January 29, 2018, 06:58:02 AM »
yeha i cant wait to release bogus and get 6 good comments

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #127 on: January 29, 2018, 08:03:12 AM »
lol yeah thats what sucks about big games.... that time spent to comment ratio

juner

  • Cutey
  • **
  • Posts: 96
  • Cutes: 52
    • View Profile
Re: jump3
« Reply #128 on: January 31, 2018, 12:10:10 PM »
electrocat is v cute! still gotta do level 4 & 7. level 5 took me a while, but once i realised i was trying to make a similar arrangement of blocks to puzzle 3 to transport the stairs along, it started clicking into place.

i'm always really impressed at how infinitely expandable the block pusher genre seems to be

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #129 on: January 31, 2018, 10:32:56 PM »
thanx jůner!! yeha theres a lot ass of shit you can do with the concept of pushing blocks around.....

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #130 on: February 02, 2018, 05:26:06 AM »
im reading about how to implement 2d platformers in unity out of curiosity about how it works.....

seems like most people agree that using the built in physics doesnt work well, & u have to write your own shit just like in gm..... its really too bad making platformers isnt more accessible to beginners

does unity have an equivalent of place_free/place_meeting? if not is it easy to implement? (for rectangle hitboxes at least, im assuming "precise collisions" like in gm would be hard)

a lot of tutorials seem to recommend "raycasting" for collision (e.g. http://overdevelop.blogspot.ca/2013/12/2d-platformer-collision-detection-in.html) and it seems way more awkward and error-prone than checking if two rectangles overlap....

ive never written a "check if two rectangles overlap" function tho because game maker does it for you..... maybe its actually tricky

i guess another thing is that if u restrict yourself to rectangle hitboxes, it would be tricky to implement slopes..... i wonder if it would be easier to just implement gm-style precise collisions, or keep slope hitboxes rectangular and do some wacky shit to position the character correctly

i dont actually know how precise collision detection works, i think u like construct bit arrays out of the sprites or something and compare them somehow? im glad gm has that shit built in lol

vgperson

  • Cuter
  • ***
  • Posts: 225
  • Cutes: 86
  • guess i'll have to... make them fall.
    • View Profile
    • vgperson.com
Re: jump3
« Reply #131 on: February 02, 2018, 06:28:27 AM »
I did use raycasts at first, and they're used for most collision in ATGH, but they were weird and a bit unreliable (sometimes it would be one pixel off in detecting walls, so I had it to make it check if it had entered a wall and undo if so). And to get stuff like "is there something inside this door?" working well, I ended up using a separate method that would check for collision boxes in a rectangular area.

I've since switched over to using said rectangle check method (which uses Physics2D.OverlapAreaAll) for everything. Like I said in my earlier post, you can just set up a Collision Box for an object to define its hitbox, and Physics2D methods can detect those colliders. Making place_free isn't too hard - just make a function that generates the appropriate Rect for what area you're checking exactly (a ground-checking place_free would be a wide, thin Rect underneath the character), then uses OverlapAreaAll to return all Collider2Ds in that Rect, and if there are none, that area is free. That approach can be used to check any individual pixel for colliders if you want.

And I think you can technically make Unity 2D colliders be any shape you want? I haven't done much with that - I have slopes in Loverinth, but I don't actually remember how I made their colliders. I think I was able to write some code that generated the pixel-precise shape I wanted. Which I imagine is sort of what Game Maker does to create precise colliders too.

Nah, checking whether rectangles overlap is super easy; you just have to compare their coordinates. If a rectangle is fully to the left/right or above/below the other rectangle, they're not overlapping - otherwise, they are.

I think if you had a character with a non-rectangular hitbox moving around, you would just have to do a "is the area X pixels ahead free?" check from every "edge" pixel along the relevant side of the collider. That's probably sort of where the idea of raycasts comes from, except Unity's don't seem to work quite pixel-perfectly enough for 2D.
« Last Edit: February 02, 2018, 06:30:10 AM by vgperson »

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #132 on: February 02, 2018, 06:55:06 AM »
hmm i guess maybe you could use "PolygonCollider2D" to do pixel-perfect hitboxes? it seems like would be annoying to set those up if theres no way to automatically generate it from the sprite tho.....

thanx for the effort u put into responding to my random unity question post's...... :honeydew:

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: jump3
« Reply #133 on: February 02, 2018, 06:55:36 AM »
also happy 150th post.....

vgperson

  • Cuter
  • ***
  • Posts: 225
  • Cutes: 86
  • guess i'll have to... make them fall.
    • View Profile
    • vgperson.com
Re: jump3
« Reply #134 on: February 02, 2018, 07:02:34 AM »
Yeah, I think that's what I used. And in theory, since you can read the pixels from textures, you could do that and have an algorithm that generates a collider from a sprite... I just didn't bother with all that since the slopes have a simple shape.