? Rotated Sprite Collision (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Rotated Sprite Collision

  • #1 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies So, I'm making an UnderTale style boss fight test, and I am working on implementing laser cannons. So I have it so that it fires the laser and stuff. Before it had the problem where it would only ever hit you with one phase of the laser, and also this problem. I fixed it and you get hit by all phases. But there was also always this problem where you could only get hit if the laser is almost directly verticle. I have everything I know I need, even the SPCOL 0,1 and the IF SPHITSP and stuff, but it only reacts when the laser is close to verticle. I always have the cannons pointing at the center of the screen, and they spawn at random places around the middle, but the player only gets hurt when the laser hitting it is almost verticle or directly veritcle. Please help. Posted
  • #2 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies I did more testing an also found out the X of the laser seems limited for collision, while the Y is free. If the X coordinate of the laser origin is further away than about 30 pixels from the center, collision is not detected. Idk why, can anyone help? Posted
  • #3 ✎ 1791 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Sprite collision ignores rotation Posted
  • #4 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    Sprite collision ignores rotation
    Is there a way I can change that?
    Posted
  • #5 ✎ 1791 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself you have to write your own collision detection algorithm Posted Edited by 12Me21
  • #6 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    you have to write your own collision detection algorithm
    Oooh never done that before lol Time to have fun
    Posted
  • #7 ✎ 655 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength
    you have to write your own collision detection algorithm
    Oooh never done that before lol Time to have fun
    well, you could also take friendly pellet rain's algorithm. I'm just saying you COULD, not that you SHOULD.
    Posted
  • #8 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    you have to write your own collision detection algorithm
    Oooh never done that before lol Time to have fun
    well, you could also take friendly pellet rain's algorithm. I'm just saying you COULD, not that you SHOULD.
    I'm trying to do this attack tho
    Posted
  • #9 ✎ 655 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength
    you have to write your own collision detection algorithm
    Oooh never done that before lol Time to have fun
    well, you could also take friendly pellet rain's algorithm. I'm just saying you COULD, not that you SHOULD.
    I'm trying to do this attack tho
    woah are those gaster blasters? or, uh, Dragon Blasters?
    Posted
  • #10 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    you have to write your own collision detection algorithm
    Oooh never done that before lol Time to have fun
    well, you could also take friendly pellet rain's algorithm. I'm just saying you COULD, not that you SHOULD.
    I'm trying to do this attack tho
    woah are those gaster blasters? or, uh, Dragon Blasters?
    Yes but the collision doesn't work because of the rotation thing, and I need to make an algorithm that supports that.
    Posted
  • #11 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies btw how do I do this? What I was thinking is to draw a line and check if the player is on the line (of course you can't see it) But I don't know how I would do that. Posted
  • #12 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies YES I made it work. What I did is I made a fast-moving sprite go along the laser every time the laser phase changed, therefore making you get hurt when you touched the object (or seemingly the laser) Posted
  • #13 ✎ 1791 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself oh, that's a good idea what you might be able to do is just use SPCOLVEC rather than actually moving the sprite, or even just set the laser's hitbox to be a square and use SPCOLVEC on the laser sprite. Posted
  • #14 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    oh, that's a good idea what you might be able to do is just use SPCOLVEC rather than actually moving the sprite, or even just set the laser's hitbox to be a square and use SPCOLVEC on the laser sprite.
    Good ideas. I'm to lazy to do them because I'm already done and it shouldn't effect me much, I won't have any other sprites than the player and things to dodge. Here is the key for a small demo: BR5E3WKV There are 3 attacks:
    1. Random Cannon: cannons go random places around the center and shoot. This is hard to dodge at high speeds.
    2. Circle Cannon: Cannons move around the center in a 32 pointed star, one after the previous. This one can be hard to dodge at high speeds, but you should be fine if you know how to dodge this properly.
    3. Star Cannon: Shoots a spray of stars! A slow-rotating 4-pointed star. It shoots the 4 sides one after another, offsets it, and shoots again one after the last.
    Posted Edited by random_god
  • #15 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies Gimme your suggestions for attacks. Posted
  • #16 ✎ 1791 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Remember to add some 1-hit-kill attacks that are random and impossible to dodge Posted
  • #17 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    Remember to add some 1-hit-kill attacks that are random and impossible to dodge
    YES I will add a mode called Impossible mode that features this
    Posted
  • #18 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies Ok I have made 2 new attacks: Death Ray (that insta-kill attack) and Sidecannon, where the box goes as wide as you and you get shot from the sides. Also, I added box size changing. Screenshots: Posted Edited by random_god
  • #19 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies Try to survive this! No lag!!! (this is because I managed my sprites carefully lol) Posted
  • #20 ✎ 749 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies New and improved version key: 5CEDKNV Includes: New and improved files (.CREEPY and the other one without CREEPY in it but with a period at the beginning), Improved BBTEST, challenge/joke creepies (HCREEPY starts off faster, IMPCREEPY starts at top speed and stops only when you die (right at the beginning, over and over.) Also includes: 3D spheres graphic screen generated from Realistic Raytracer I've been working on this just a little bit, and working on other stuff too. Posted Edited by random_god