Help with tile collision please!
-
Edit: sorry, I really don't want to waste your time. (delete doesn't seem to work)
Many thanks to those that replied! -
Hi @SteveZX81
Collision made/makes my brain ache. Especially when it's going from pixel coordinates to array coordinates.
Would you mind sharing your program? I'll add you as a friend and take a look! It's difficult to know the best way to advise on this without seeing the program.
-
This post is deleted! -
Thanks! No need to worry - I feel absolutely the same about my own programs :)
-
@SteveZX81 Here are some tips:
First, start with one single tile on screen, and one moving sprite. In the update() cycle, use print() to output the coordinates for both objects. That should give you an idea of what you should be looking for in terms of coordinates.
If the coordinates and coordinate systems between the tile sprite and the moving sprites seem to match, try detectSpriteCollision()
https://fuzearena.com/help/view/detectSpriteCollision -
This post is deleted! -
Hi @SteveZX81
I took a look at this just now, I've got something working and shared it. You'll find explanations in comments in your code :) It's called "Bubble - Dave Edit"
By the way, I love the controls! It really feels like you're moving a bubble around - it's brilliant!
-
oh Dave! you are such a gem, thank you so very much and I'm sorry if it took a ton of your time.
I'm going to read your code over and over and TRY to bash some understanding into my feeble brain, quite frankly your timing with this was pretty perfect as I've been tinkering with it since around 5:40am and I worked myself up into such a state that I was about to just toss my hands up in the air in defeat and quit using fuze to save myself the utter frustration and feeling of being so dumb. but I have your code now and I'll do my utmost to actually understand it. Thanks again, much appreciated and I'm sorry if it took a lot of your time.
also thank you for your comment on my bubble, made my day
-
You are so very welcome sir. Don't worry - you didn't eat into my time in the slightest. You'd written the code perfectly well and I also learned something new about the sprite engine, so thank you very much for sharing!
Please don't be so hard on yourself! I understand the frustration so very much. If you'd like to message me about any part of the code I've written please feel free. I'm very happy to explain it a million times. It's very much a pleasure for me and really, this is exactly what the product is about. Being able to help with this has already made my day.
If you'd like more details, I could always write some more comments in that program and share again with the name "Bubble - Dave Comments".
This is exactly what I wanted the product to be - don't you be apologising for letting me do my job! :)