Hey Dan thanks for great tutorial 💪 one thing: you can easily check that the number of rocks and bushes on the map matches the defined ones. In place of: if (this.#objectsMap.has(coordString)) continue; just add if (this.#objectsMap.has(coordString)) {i--; continue;} But there are only 2 problems: 1. it is a bit inefficient, creating a vector that may already exist (it is better to randomize and check the coords first) 2. if the number of elements defined to be added exceeds the number of available places, we will fall into an infinite loop 😅
This is great, and I'm looking forward to more. I feel it's better to simply rotate the camera instead of the plane. This allows all the objects in the scene to use the same coordinate system. This also lets you use x and y for position coordinates, leaving z for height, and that just feels more natural to me.
Y-axis being up is a pretty common convention, but it depends what software you are coming from. I’ve seen both. Each object has its own local coordinate system and a transformation which defines its position, rotation and scale relative to its parent’s transformation. Objects won’t always share the same coordinates, but that doesn’t matter because we can use these transformations to align everything in world space.
Eventually the terrain will be more interesting than a flat plane. I've kept it simple on purpose for the time being. Adding a "height" dimension to the terrain will bring additional complexity to combat since traditionally Dungeons and Dragons has a concept of "higher ground", where the character that is on higher ground relative to another has advantage on attack rolls.
Dan, it is me again! I am trying to follow along with your tutorials so that I have a dosis of threejs every week. That being said, I have always some issues with making threejs projects responsive? Are u also considering that the game could work in landscape mobile format? That would be amazing and interesting for a lot of people! Would love to see your approach on that!
@@manuelsanchezweb hello, feel free to check out r3f or angular-three libraries where you can create games/apps in react native or ionic folowing code from Dan. At the end of the day it is all javascript. More on your question, with these libs, responsive stuff is out of the box (for most of the stuff) but with vanila you will have to add listener when viewport is changed and act accordingly. Overall, Dan's approach is how to get in the mindset of creating games and to provide basic/advanced knowledge on how to tackle some of the stuff.
@@elkestudio Hi! Thanks for the reply, but I am asking because I have already tried to do it myself with native js/ts listeners and some libraries, and it looks buggy, does not recognize axis properly or has problems with safari and iPhones clicks. That’s why I asked, I do not want to use angular, native app or react three fiber for that
Fun series! Glad I caught it at the beginning. Thanks!
Awesome project, thanks for the quality content! :)
Yes! Episode 3, thanks!
Amazing series! ❤
Hey Dan thanks for great tutorial 💪
one thing: you can easily check that the number of rocks and bushes on the map matches the defined ones.
In place of:
if (this.#objectsMap.has(coordString)) continue;
just add
if (this.#objectsMap.has(coordString)) {i--; continue;}
But there are only 2 problems:
1. it is a bit inefficient, creating a vector that may already exist (it is better to randomize and check the coords first)
2. if the number of elements defined to be added exceeds the number of available places, we will fall into an infinite loop 😅
I love this! When can we expect episode 4?
New episodes released weekly on Mondays.
This is great, and I'm looking forward to more. I feel it's better to simply rotate the camera instead of the plane. This allows all the objects in the scene to use the same coordinate system. This also lets you use x and y for position coordinates, leaving z for height, and that just feels more natural to me.
Y-axis being up is a pretty common convention, but it depends what software you are coming from. I’ve seen both.
Each object has its own local coordinate system and a transformation which defines its position, rotation and scale relative to its parent’s transformation. Objects won’t always share the same coordinates, but that doesn’t matter because we can use these transformations to align everything in world space.
that was great !
please change the color of the tooltip with explanations, white is to shiny haha
love it man, you are really good explaining
Thank you! And noted! 😆 When I edit the viewing area is only 1/4 of my screen. I went back and watched full screen and I agree with you.
love you bro!!!
45:16 shouldn't the mesh be created after the IF/continue? 🤔
Yes, good catch. Garbage collection should clean up the loose mesh references, but they still should only be created when needed.
Awesome. Thanks for the video.
Is it possible to turn the plane into some sort of heightmap?
Eventually the terrain will be more interesting than a flat plane. I've kept it simple on purpose for the time being. Adding a "height" dimension to the terrain will bring additional complexity to combat since traditionally Dungeons and Dragons has a concept of "higher ground", where the character that is on higher ground relative to another has advantage on attack rolls.
Dan, it is me again! I am trying to follow along with your tutorials so that I have a dosis of threejs every week. That being said, I have always some issues with making threejs projects responsive? Are u also considering that the game could work in landscape mobile format? That would be amazing and interesting for a lot of people! Would love to see your approach on that!
@@manuelsanchezweb hello, feel free to check out r3f or angular-three libraries where you can create games/apps in react native or ionic folowing code from Dan. At the end of the day it is all javascript.
More on your question, with these libs, responsive stuff is out of the box (for most of the stuff) but with vanila you will have to add listener when viewport is changed and act accordingly.
Overall, Dan's approach is how to get in the mindset of creating games and to provide basic/advanced knowledge on how to tackle some of the stuff.
@@elkestudio Hi! Thanks for the reply, but I am asking because I have already tried to do it myself with native js/ts listeners and some libraries, and it looks buggy, does not recognize axis properly or has problems with safari and iPhones clicks. That’s why I asked, I do not want to use angular, native app or react three fiber for that
@@manuelsanchezweb no harm done :) but be aware that dom on mobile is flickery if changed from portrait to landscape thus my comment on frameworks.
I hadn’t planned on implementing this for mobile, but I could potentially add it later on in the project.
thank you a lot
❤ tbh, glad to see that standard mind bugs are always present (super(); , negative rotation etc...)
Readmeee 😂
you are doing the student confused by changing like this it get more frustrated
Apology for being rude