QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: codevsb12 on February 22, 2020, 07:52:18 pm

Title: collision questions and hard work
Post by: codevsb12 on February 22, 2020, 07:52:18 pm
hello again! u guys may know me as the newbie of qb64 forums, but honestly, i worked a lot on my game... sort of...

in resume i cant find a good way to collide in objects.

first, i cant go to the qb64 wiki because there's always this message like "bandwidth limit". second, i've found some collision detection methods in a site, but they doesn't fit in my game.

it took me 2 days to finally ask for help from the experienced ones.

here's the code of my sub.

Code: QB64: [Select]
  1. SUB winner
  2.     IF (xp + sx2 = xb) AND (xp = xb + r * 2) AND (yp + sy2 = yb) AND (yp = yb + r * 2) THEN win = 1
  3.  
Title: Re: collision questions and hard work
Post by: FellippeHeitor on February 22, 2020, 07:53:09 pm
You are probably trying to go to the now defunct [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] site, which was taken over by someone we don't know, for some purpose we still haven't learned.

Fix your bookmarks and visit the right wiki at www.qb64.org/wiki
Title: Re: collision questions and hard work
Post by: bplus on February 22, 2020, 07:56:57 pm
Do you want the collision of two rectangles or 2 circles?

For circles just find the distance between their centers and if it less than sum of their radii they collided.

Collision of two rectangles is this:
Code: QB64: [Select]
  1. FUNCTION collision% (b1x, b1y, b1w, b1h, b2x, b2y, b2w, b2h)
  2.     ' x, y represent the box left most x and top most y
  3.     ' w, h represent the box width and height which is the usual way sprites / tiles / images are described
  4.     ' such that boxbottom = by + bh
  5.     '        and boxright = bx + bw
  6.  
  7.     IF (b1y + b1h < b2y) OR (b1y > b2y + b2h) OR (b1x > b2x + b2w) OR (b1x + b1w < b2x) THEN
  8.         collision% = 0
  9.     ELSE
  10.         collision% = 1
  11.     END IF
  12.  
Title: Re: collision questions and hard work
Post by: codevsb12 on February 22, 2020, 08:40:38 pm
uh, no... it's actually a collision between a rectangle AND a circle.
Title: Re: collision questions and hard work
Post by: bplus on February 22, 2020, 08:55:43 pm
uh, no... it's actually a collision between a rectangle AND a circle.

LOL! I'd do two rectangles (specially if the rectangle is long and skinny) and use square sides for circle just slightly less than 2*radius OR get STxAxTIC to work his physics magic. :)
Title: Re: collision questions and hard work
Post by: STxAxTIC on February 22, 2020, 08:58:45 pm
Yeah sooooo... are you looking to simply detect the collision, or are you interested in the actual dynamics that occur when a tennis ball hits a brick?
Title: Re: collision questions and hard work
Post by: _vince on February 22, 2020, 09:07:56 pm
Hey, bplus, you need a transparent PNG for your avatar, otherwise the background colours dont match depending on if your post is odd or even. It can be worked out with
http://www.imagemagick.org/script/command-line-options.php#transparent (http://www.imagemagick.org/script/command-line-options.php#transparent)
but you also have some antialiasing
Title: Re: collision questions and hard work
Post by: codevsb12 on February 23, 2020, 05:37:56 pm
Yeah sooooo... are you looking to simply detect the collision, or are you interested in the actual dynamics that occur when a tennis ball hits a brick?
i look for simple collision detection. if the player collides with the ball then he wins
Title: Re: collision questions and hard work
Post by: STxAxTIC on February 23, 2020, 05:40:21 pm
Are you ok with surrounding the ball with a box for simplicity's sake? Then its box-on-box, my favorite internet search.
Title: Re: collision questions and hard work
Post by: codevsb12 on February 23, 2020, 06:10:41 pm
i would if the ball wasn't drawn with the CIRCLE statement

just take a look:




oh i dont know how to insert pictures in qb64 forums
Title: Re: collision questions and hard work
Post by: STxAxTIC on February 23, 2020, 06:17:56 pm
No worries, I know what a ball looks like.

I'm just worried that if you want the real thing you won't know what's going on really. A box intersecting a circle can be reduced to solving four problems of a line intersecting a circle, maybe 2 problems...

Hm... Maybe a SCREEN-based method for you...
Title: Re: collision questions and hard work
Post by: bplus on February 23, 2020, 08:25:03 pm
Code: QB64: [Select]
  1. _TITLE "Collision Rectangle versus 'Circle', move your mouse!"
  2.  
  3. '   Collision - Test 1  orig by johnno copied and mod b+ 2018-06-10
  4. '
  5. '   Bounding Box
  6. '
  7. ' 2018-06-10 mod by B+ change for x, y, w, h of images
  8. ' by readjusting all the variables and use STEP for box drawing
  9. ' Generalize the specific gosub routine from this one app so can reuse IN ANY APP using sprites / tiles / images
  10. ' 2019-08-30 rewrite this so mouse box never gets inside the sides of box for maze study
  11. '2020-02-23 mod for circle and rectangle
  12.  
  13.  
  14. SCREEN _NEWIMAGE(800, 600, 32) '<<< something more standard center is 400, 300
  15.  
  16. ' sprites / tiles / images are typically referred to by their left top corner ie X, Y  and their width and height
  17.  
  18. 'lets do the height and width first
  19. box1Width = 400 '<<< mod add this instead of above
  20. box1Height = 100 '<<< mod add this instead of above
  21.  
  22. 'now center box
  23. box1Left = 400 - box1Width / 2 'same as box1X
  24. 'box1Right = 370 '100 width
  25. box1Top = 300 - box1Height / 2 'same as box1Y
  26. ' box1Bottom = 290 '100 height
  27. bdx = 5 * (RND * 2 - 1): bdy = 5 * (RND * 2 - 1)
  28. mouseboxWidth = 40 '<<< mod add these constants  for circle radius 25?
  29. mouseboxHeight = 40 '<<< mod add these constants
  30.  
  31. f& = _RGB32(255, 255, 255)
  32. b& = _RGB32(0, 0, 0)
  33.  
  34. DIM hey$(10)
  35. hey$(0) = "Hey!"
  36. hey$(1) = "I beg your pardon."
  37. hey$(2) = "Bang!"
  38. hey$(3) = "Yikes!"
  39. hey$(4) = "Ouch!"
  40. hey$(5) = "Watch where you are going."
  41.     k$ = INKEY$
  42.     WHILE _MOUSEINPUT: WEND '<<< this is all the loop needed for mouse input
  43.     CLS
  44.     box1Left = box1Left + bdx
  45.     IF box1Left < 0 THEN box1Left = 0: bdx = -bdx
  46.     IF box1Left + box1Width > _WIDTH THEN box1Left = _WIDTH - box1Width: bdx = -bdx
  47.     box1Top = box1Top + bdy
  48.     IF box1Top < 0 THEN box1Top = 0: bdy = -bdy
  49.     IF box1Top + box1Height > _HEIGHT THEN box1Top = _HEIGHT - box1Height: bdy = -bdy
  50.  
  51.     LINE (box1Left, box1Top)-STEP(box1Width, box1Height), _RGB32(255, 255, 255), BF
  52.  
  53.     ombx = mouseboxX: omby = mouseboxy 'middle of mouse circle/square
  54.  
  55.     mouseboxX = _MOUSEX - mouseboxWidth / 2
  56.     mouseboxy = _MOUSEY - mouseboxHeight / 2
  57.  
  58.     IF collision%(box1Left, box1Top, box1Width, box1Height, mouseboxX, mouseboxy, mouseboxWidth, mouseboxHeight) = 1 THEN
  59.         COLOR _RGB32(100, 0, 85), _RGB32(255, 255, 255)
  60.         r$ = hey$(INT(RND * 6))
  61.         _PRINTSTRING (box1Left + (box1Width - LEN(r$) * 8) / 2, box1Top + 42), r$
  62.         COLOR f&, b&
  63.         mouseboxX = ombx: mouseboxy = omby
  64.         lim = 1 'delay when bump to read what the box says
  65.     ELSE
  66.         lim = 20
  67.     END IF
  68.     CIRCLE (mouseboxX + mouseboxWidth / 2, mouseboxy + mouseboxHeight / 2), 25, &HFFFF8800
  69.     LINE (mouseboxX, mouseboxy)-STEP(mouseboxWidth, mouseboxHeight), _RGB32(255, 128, 0), BF '<<< use step with width and height
  70.     _DISPLAY
  71.     _LIMIT 60 'lim '<<< save the fan
  72. LOOP UNTIL k$ = CHR$(27)
  73.  
  74. FUNCTION collision% (b1x, b1y, b1w, b1h, b2x, b2y, b2w, b2h)
  75.     ' x, y represent the box left most x and top most y
  76.     ' w, h represent the box width and height which is the usual way sprites / tiles / images are described
  77.     ' such that boxbottom = by + bh
  78.     '        and boxright = bx + bw
  79.     'so the specific gosub above is gerealized to a function procedure here!
  80.     IF (b1y + b1h < b2y) OR (b1y > b2y + b2h) OR (b1x > b2x + b2w) OR (b1x + b1w < b2x) THEN
  81.         collision% = 0
  82.     ELSE
  83.         collision% = 1
  84.     END IF
  85.  
  86.  
Title: Re: collision questions and hard work
Post by: codevsb12 on February 26, 2020, 07:49:41 pm
oh, so thats how functions work... anyway

now i need to add the spikes, and make them being generated randomly in the edges of the frame. i've heard of this function called _MAPTRIANGLE and i wondered: hmm... my spike image iis in the form of a triangle, so maybe i can use this statement to rotate it....

am i right?
Title: Re: collision questions and hard work
Post by: bplus on February 26, 2020, 08:32:23 pm
Yeah _MAPTRIANGLE works great, one of first things I learned at QB64 forums, cool way to fill a triangle check SUB ftri
here: https://www.qb64.org/forum/index.php?topic=1511.msg111300#msg111300


spikey demo
Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(800, 600, 32)
  2. FOR y = 0 TO _HEIGHT STEP 6
  3.     x = 0
  4.     x2 = 10
  5.     ftri x, y, x2, y + 3, x, y + 6, &HFFFF0000
  6.  
  7. SUB ftri (x1, y1, x2, y2, x3, y3, K AS _UNSIGNED LONG)
  8.     STATIC a&
  9.     D = _DEST
  10.     IF a& = 0 THEN a& = _NEWIMAGE(1, 1, 32)
  11.     _DEST a&
  12.     PSET (0, 0), K
  13.     _DEST D
  14.     _MAPTRIANGLE _SEAMLESS(0, 0)-(0, 0)-(0, 0), a& TO(x1, y1)-(x2, y2)-(x3, y3)
  15.  
  16.  
  17.  
Title: Re: collision questions and hard work
Post by: codevsb12 on February 26, 2020, 08:50:40 pm
that was a good code, and the link's code was amazing! but i meant a image, y'know, a bmp file containing a gray spike on it.
Title: Re: collision questions and hard work
Post by: FellippeHeitor on February 26, 2020, 09:07:09 pm
Oh, bplus. How will you get an a+ with this subpar work that doesn't meet the criteria? You better up your game man.
Title: Re: collision questions and hard work
Post by: FellippeHeitor on February 26, 2020, 09:08:39 pm
that was a good code, and the link's code was amazing! but i meant a image, y'know, a bmp file containing a gray spike on it.

Stop requesting code. Present your work so people can help debug and/or improve or, if you have nothing, try to have something first.
Title: Re: collision questions and hard work
Post by: bplus on February 26, 2020, 09:10:46 pm
Oh, bplus. How will you get an a+ with this subpar work that doesn't meet the criteria? You better up your game man.

He is pretty demanding isn't he?
Title: Re: collision questions and hard work
Post by: codevsb12 on March 01, 2020, 08:22:10 pm
Code: QB64: [Select]
  1.  
  2. spike& = _LOADIMAGE("spikeup.bmp")
  3.  
  4. xs = (RND * _WIDTH - 10): ys = (RND * _HEIGHT - 10)
  5.  
  6.     _PUTIMAGE (xs, ys), spike&
  7.  
  8.  

after that, simply asked to myself: what now?
Title: Re: collision questions and hard work
Post by: STxAxTIC on March 01, 2020, 08:39:34 pm
Stop requesting code. Present your work so people can help debug and/or improve or, if you have nothing, try to have something first.

With all due respect, you call this "trying something"?

Code: QB64: [Select]
  1. spike& = _LOADIMAGE("spikeup.bmp")
  2.  
  3. xs = (RND * _WIDTH - 10): ys = (RND * _HEIGHT - 10)
  4.  
  5.     _PUTIMAGE (xs, ys), spike&

..... right after bplus GAVE you the answer? Scroll up man.
Title: Re: collision questions and hard work
Post by: bplus on March 01, 2020, 10:05:12 pm
Where ever you can put a rectangle, you can put an image and you can do 90 degree rotations maybe better than _maptriangle  until you need rotations like 30 degrees.
Title: Re: collision questions and hard work
Post by: codevsb12 on March 02, 2020, 07:30:57 pm
alright, first: now THIS was trying something
Code: QB64: [Select]
  1. SUB rotation (xt, yt, x1, y1, x2, y2, x3, y3, sp)
  2.  
  3.     IF xt < _WIDTH / 2 THEN xt = 10
  4.     IF xt > _WIDTH / 2 THEN xt = _WIDTH - 30
  5.     IF yt < _HEIGHT / 2 THEN yt = (RND * _HEIGHT / 2)
  6.     IF yt > _HEIGHT / 2 THEN yt = _HEIGHT - 30
  7.     IF yt = 10 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  8.  
  9.  

second: is there any statement  that can replace _maptriangle in case of 90 degrees rotation? cuz i'm sure there is not, even thought its qB A S I C
Title: Re: collision questions and hard work
Post by: STxAxTIC on March 02, 2020, 07:34:41 pm
You're correct in that there is no way to rotate an underscore command by 90 degrees in any meaningful direction - so there's not a statement that does this. What you're surely needing to do is rotate the coordinates themselves, and then throw the rotated coordinates back into maptriangle to make a rotated picture.

Before understanding rotations, do you know how to say, reflect your image about the horizontal or vertical direction?
Title: Re: collision questions and hard work
Post by: codevsb12 on March 02, 2020, 07:55:49 pm
well, no. but actually yes. you guys taught me about how to flip my sprite using _PUTIMAGE.
Title: Re: collision questions and hard work
Post by: STxAxTIC on March 02, 2020, 08:04:08 pm
Okay, cool - so a quick review.

To flip an image about the vertical axis, you might let all x-points just become negative x, as in: x -> -x

Similarly to flip an image along the horizontal axis, you would have y -> -y.

Of course, you can do both, etc. etc. - and this is what paint lets you do with one click basically.

... So rotations are a little bit harder, and involve changing coordinates like reflections. Now, for maptriangle, you have to feed it three points. I don't want to confuse things, so we'd better stick to rotating one point. To finish the job we will apply the methods of one point to all three and boom, you're rotating the whole triangle.

Unfortunately, there are three ways to get you into rotations: (i) vectors, (ii) trig functions, (iii) butcher a working example. While various people will see this post and probably get right to work on (iii) (or I will later if nobody does)... how is your proficiency with (i) and (ii)?

Title: Re: collision questions and hard work
Post by: codevsb12 on March 02, 2020, 08:11:12 pm
not that much of a proficiency...
but i suppose (i) is way easier, even for my first game ever on qb64.

funny story: when i tried improve my code to this

Code: QB64: [Select]
  1. SUB rotation (xt, yt, x1, y1, x2, y2, x3, y3, sp)
  2.  
  3.     IF xt < _WIDTH / 2 THEN xt = 10
  4.     IF xt > _WIDTH / 2 THEN xt = _WIDTH - 30
  5.     IF yt < _HEIGHT / 2 THEN yt = (RND * _HEIGHT / 2)
  6.     IF yt > _HEIGHT / 2 THEN yt = _HEIGHT - 30
  7.     IF yt = 10 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  8.     IF yt = _HEIGHT - 30 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  9.  
  10.  

the spike started glitching in a certain way that made me grin
Title: Re: collision questions and hard work
Post by: STxAxTIC on March 02, 2020, 08:37:41 pm
Question: Is maptriange irreducibly necessary, or can you work with putimage? I actually forget if putimage works well with rotations. i should go look that up...

Okay we're stuck with maptriangle. I'll cook something up.
Title: Re: collision questions and hard work
Post by: FellippeHeitor on March 02, 2020, 09:07:44 pm
Might offer some insight: https://github.com/FellippeHeitor/Snippets/blob/master/rotateImage.bas

Code: QB64: [Select]
  1.  
  2. TYPE vertex
  3.     x AS SINGLE
  4.     y AS SINGLE
  5.  
  6. SCREEN _NEWIMAGE(800, 600, 32)
  7. DIM bee AS LONG
  8. bee = _LOADIMAGE("bee-12.jpg")
  9.  
  10.     CLS
  11.     i = map(_MOUSEX, 0, _WIDTH - 1, -90, 90)
  12.     IF _KEYDOWN(100306) THEN i = INT(i)
  13.     PRINT "rotation angle:"; i
  14.     putImage _WIDTH / 2 - _WIDTH(bee) / 2, _HEIGHT / 2 - _HEIGHT(bee) / 2, bee, i
  15.     _DISPLAY
  16.     _LIMIT 30
  17.  
  18. SUB putImage (__x AS SINGLE, __y AS SINGLE, image AS LONG, angleDegrees AS SINGLE)
  19.     DIM i AS LONG
  20.  
  21.     DIM center AS vertex
  22.     DIM corner(1 TO 4) AS vertex
  23.  
  24.     center.x = __x + _WIDTH(image) / 2
  25.     center.y = __y + _HEIGHT(image) / 2
  26.  
  27.     FOR i = 1 TO 4
  28.         SELECT CASE i
  29.             CASE 1
  30.                 corner(i).x = __x
  31.                 corner(i).y = __y
  32.             CASE 2
  33.                 corner(i).x = __x
  34.                 corner(i).y = (__y + _HEIGHT(image) - 1)
  35.             CASE 3
  36.                 corner(i).x = (__x + _WIDTH(image) - 1)
  37.                 corner(i).y = __y
  38.             CASE 4
  39.                 corner(i).x = (__x + _WIDTH(image) - 1)
  40.                 corner(i).y = (__y + _HEIGHT(image) - 1)
  41.         END SELECT
  42.  
  43.         rotate corner(i), center, angleDegrees
  44.     NEXT
  45.  
  46.     _MAPTRIANGLE (0, 0)-(0, _HEIGHT(image) - 1)-(_WIDTH(image) - 1, 0), image TO(corner(1).x, corner(1).y)-(corner(2).x, corner(2).y)-(corner(3).x, corner(3).y)
  47.     _MAPTRIANGLE (0, _HEIGHT(image) - 1)-(_WIDTH(image) - 1, 0)-(_WIDTH(image) - 1, _HEIGHT(image) - 1), image TO(corner(2).x, corner(2).y)-(corner(3).x, corner(3).y)-(corner(4).x, corner(4).y)
  48.  
  49. SUB rotate (p AS vertex, center AS vertex, angleDegrees AS SINGLE)
  50.     'as seen on https://stackoverflow.com/questions/2259476/rotating-a-point-about-another-point-2d
  51.     DIM s AS SINGLE, c AS SINGLE
  52.     DIM newP AS vertex
  53.     DIM angle AS SINGLE
  54.  
  55.     angle = _D2R(angleDegrees)
  56.  
  57.     s = SIN(angle)
  58.     c = COS(angle)
  59.  
  60.     p.x = p.x - center.x
  61.     p.y = p.y - center.y
  62.  
  63.     newP.x = p.x * c - p.y * s
  64.     newP.y = p.x * s + p.y * c
  65.  
  66.     p.x = newP.x + center.x
  67.     p.y = newP.y + center.y
  68.  
  69. FUNCTION map! (value!, minRange!, maxRange!, newMinRange!, newMaxRange!)
  70.     map! = ((value! - minRange!) / (maxRange! - minRange!)) * (newMaxRange! - newMinRange!) + newMinRange!
Title: Re: collision questions and hard work
Post by: STxAxTIC on March 02, 2020, 09:37:55 pm
I hate the fact that BASIC uses the wrong coordinate system in screen modes. This puts 0,0 at the center and +y means up. Requires the image attached or any image if you rename.

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(800, 600, 32)
  2.  
  3. Image& = _LOADIMAGE("QB64-1.4-Release.png")
  4.  
  5. TYPE vec2
  6.     x AS DOUBLE
  7.     y AS DOUBLE
  8.  
  9. TYPE triplet
  10.     u AS vec2
  11.     v AS vec2
  12.     w AS vec2
  13.  
  14. a = 0
  15.     CLS
  16.     a = a + .005
  17.     CALL showimage(0, 0, Image&, 1, 1, a)
  18.     _DISPLAY
  19.     _LIMIT 60
  20.  
  21.  
  22. SUB showimage (x0, y0, i&, sx, sy, ang)
  23.     DIM sc AS triplet
  24.     DIM dc AS triplet
  25.     w = _WIDTH(i&) / 2
  26.     h = _HEIGHT(i&) / 2
  27.     sc.u.x = w - 1
  28.     sc.u.y = h - 1
  29.     sc.v.x = -w
  30.     sc.v.y = h - 1
  31.     sc.w.x = -w
  32.     sc.w.y = -h
  33.     dc.u.x = x0 + (sx * w) * COS(ang) - (sy * h) * SIN(ang)
  34.     dc.u.y = y0 + (sx * w) * SIN(ang) + (sy * h) * COS(ang)
  35.     dc.v.x = x0 + (-sx * w) * COS(ang) - (sy * h) * SIN(ang)
  36.     dc.v.y = y0 + (-sx * w) * SIN(ang) + (sy * h) * COS(ang)
  37.     dc.w.x = x0 + (-sx * w) * COS(ang) - (-sy * h) * SIN(ang)
  38.     dc.w.y = y0 + (-sx * w) * SIN(ang) + (-sy * h) * COS(ang)
  39.     CALL cmaptriangle(i&, 2 * w, 2 * h, sc, dc)
  40.     sc.u.x = -w
  41.     sc.u.y = -h
  42.     sc.v.x = w - 1
  43.     sc.v.y = -h
  44.     sc.w.x = w - 1
  45.     sc.w.y = h - 1
  46.     dc.u.x = x0 + (-sx * w) * COS(ang) - (-sy * h) * SIN(ang)
  47.     dc.u.y = y0 + (-sx * w) * SIN(ang) + (-sy * h) * COS(ang)
  48.     dc.v.x = x0 + (sx * w) * COS(ang) - (-sy * h) * SIN(ang)
  49.     dc.v.y = y0 + (sx * w) * SIN(ang) + (-sy * h) * COS(ang)
  50.     dc.w.x = x0 + (sx * w) * COS(ang) - (sy * h) * SIN(ang)
  51.     dc.w.y = y0 + (sx * w) * SIN(ang) + (sy * h) * COS(ang)
  52.     CALL cmaptriangle(i&, 2 * w, 2 * h, sc, dc)
  53.  
  54. SUB cmaptriangle (i&, w, h, s AS triplet, d AS triplet)
  55.     _MAPTRIANGLE (w / 2 + s.u.x, -s.u.y + h / 2)-(w / 2 + s.v.x, -s.v.y + h / 2)-(w / 2 + s.w.x, -s.w.y + h / 2), i& TO(_WIDTH / 2 + d.u.x, -d.u.y + _HEIGHT / 2)-(_WIDTH / 2 + d.v.x, -d.v.y + _HEIGHT / 2)-(_WIDTH / 2 + d.w.x, -d.w.y + _HEIGHT / 2)
  56.  
Title: Re: collision questions and hard work
Post by: bplus on March 02, 2020, 10:47:52 pm
Oh man what fun! Now 2nd time I use Paint 3D to make transparent background (except it left a gray halo around image thus gray background):
Title: Re: collision questions and hard work
Post by: codevsb12 on March 03, 2020, 06:36:13 pm
aw dang it, i think i don't need all this code to a simple game... glitchy effects... i made the 90 degrees rotation images manually in paint and now i just need to snap an array of spikes in the EDGES of the (framed) screen. that's the only thing i need now. that's it. you'll never see me again by a long time after that so help me.
Title: Re: collision questions and hard work
Post by: bplus on March 03, 2020, 06:47:53 pm
Hey codevsb12, thanks to you and STxAxTIC and Fellippe all pitching in to try and help, I made this:
https://www.qb64.org/forum/index.php?topic=1511.msg115148#msg115148

If you want a shortcut to a frame of spikes take a snap and load that image into your game as background, maybe?