Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision with tiles position and sprite not aligning correctly
#1
Hello again, I've been struggling with getting collision detection to work correctly. I'm *almost* certain I got the math/code right, however it seems there is an issue with the offset of the map and tiles not being rendered where they should be? I've linked the project, if you could check it out and see what I'm doing wrong here it would be a great help as I've been stuck on this problem for days now and I just don't know what I'm doing wrong here:

*removed link*

Thank you very much.
Reply
#2
Hi,

I've tried to build the project to see how it runs, but I think mi install of mingw32 is quite old as it isn't compatible with the supplied dlls. I'll try to update it and chek it. I'm not familiar with the flecs library so it may take a while
Reply
#3
Oh yeah, you'll need a newer mingw, I believe I'm using msys64. flecs is an ECS library, it's pretty straight forward if you're at all familiar with ECS. Thanks for checking it out for me. I'm so confused as to what I could be doing wrong. Hopefully you can see something I'm missing.
Reply
#4
Hi,

I've updated my install of mingw to mingw64 to last one available (13.2.0) but I when building I get many instances of this error:

Code:
src/Include/tweeny.h: In member function 'tweeny::tween<T>& tweeny::tween<T>::via(const int&, Fs ...)':
src/Include/tweeny.h:2315:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
2315 |        if (easing == "stepped") return via(easing::stepped, vs...);
     |            ~~~~~~~^~~~~~~~~~~~

It makes sense, the code is trying to compare an enumerated type with a string using the equal operator. So I cannot build it. What version of mingw are you using?
Reply
#5
(09-04-2023, 03:44 PM)megamarc Wrote: Hi,

I've updated my install of mingw to mingw64 to last one available (13.2.0) but I when building I get many instances of this error:

Code:
src/Include/tweeny.h: In member function 'tweeny::tween<T>& tweeny::tween<T>::via(const int&, Fs ...)':
src/Include/tweeny.h:2315:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
2315 |        if (easing == "stepped") return via(easing::stepped, vs...);
     |            ~~~~~~~^~~~~~~~~~~~

It makes sense, the code is trying to compare an enumerated type with a string using the equal operator. So I cannot build it. What version of mingw are you using?

Take out the include for tweeny. It's not being used anyways. Hopefully that fixes it for you. I'm using mingw64 1.4.0.0
Reply
#6
Hey Marc, Did you get a chance to download the link from the previous post?
Reply
#7
Hi,

I've finally managed to build and debug the sample using VS2022 Community. Now I can check what it does and where's the problem.

Regards,
Reply
#8
(09-22-2023, 12:24 AM)megamarc Wrote: Hi,

I've finally managed to build and debug the sample using VS2022 Community. Now I can check what it does and where's the problem.

Regards,

Awesome, thank you so much. Hopefully it's nothing too hard to figure out
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)