This work perfect but I have a small issue. When I resize the screen (with a Matrix or RenderTarget2D, tried both) the mouse is offset and i dont know how to fix it. (Im new with MonoGame)
Hey, just scale the Vector2 of the mouse position by the same amount as the screen. Example: Original screen size 800x600 Resized screen size 1600x1200 Ratio = 2 (new size / old size) Real mouse position on the screen is 500, 500 Game mouse position is Real / Ratio = 250, 250
This doesn't allow for diagonal movement on the tilemap though, does it? I assume not but maybe I'm wrong and the wall is affecting it, because wasn't a show case for pathfinding through a larger area (at least 3x3)
Hey, the diagonal movement was intentionally restricted (1:46) but can be very easily allowed by adding the diagonal indices into the row and col arrays. row = { -1, 0, 0, 1, -1, -1, 1, 1 } col = { 0, -1, 1, 0, -1, 1, 1, -1 }
Nice video, very interesting, it would be nice if you have a discord for the channel so we can talk to you and each other and build a community, also nice video 😁
Perfect. I never could grasp this type of algorithm. Thanks to you i finnaly got it.Big THX
These are just fantastic! Keep them coming!
Awesome! Love your videos, please keep bringing this type of content to us!
Thanks!
Good stuff!
Nice!
I guess a* pathfinding could be explained as simple as that. I am so grateful.
Thanks. I want to cover A* too.
@@GameDevQuickie wait this wasn't a* ? I Thought this is a* and I got happy because I was almost about to understand all the logic
@@isimbulamadmobenibulsun660 it is not. A* is a little more complex. But we will get there one day.
Good
This work perfect but I have a small issue. When I resize the screen (with a Matrix or RenderTarget2D, tried both) the mouse is offset and i dont know how to fix it. (Im new with MonoGame)
Hey, just scale the Vector2 of the mouse position by the same amount as the screen.
Example:
Original screen size 800x600
Resized screen size 1600x1200
Ratio = 2 (new size / old size)
Real mouse position on the screen is 500, 500
Game mouse position is Real / Ratio = 250, 250
@@GameDevQuickie I can't believe it was this simple, thank you so much
This doesn't allow for diagonal movement on the tilemap though, does it? I assume not but maybe I'm wrong and the wall is affecting it, because wasn't a show case for pathfinding through a larger area (at least 3x3)
Hey, the diagonal movement was intentionally restricted (1:46) but can be very easily allowed by adding the diagonal indices into the row and col arrays.
row = { -1, 0, 0, 1, -1, -1, 1, 1 }
col = { 0, -1, 1, 0, -1, 1, 1, -1 }
@@GameDevQuickie Awesome, thanks for the quick reply! Joined the discord:)
Nice video, very interesting, it would be nice if you have a discord for the channel so we can talk to you and each other and build a community, also nice video 😁
Thanks. I will setup one.
Agreed! I'd love to join as well
Here we go: discord.gg/UrsNc7Kaz5 (I'll play around with the channels, etc. as we go)