Hi.
I am newbie in Irrlicht and I need a create Tile based map.
How do this?
Tile based map
Tile based map
Last edited by tBane on Wed Feb 21, 2024 8:00 pm, edited 2 times in total.
Re: Tile based map
You seem to be doing it already in your other thread? It didn't looks so bad. There you seem to have created one node per tile. Which is one way to do it. The other way would be to create a node which contains all tiles and has functions to access them. But unless the world is really huge it doesn't matter too much which way you do that. What are you stuck with?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Tile based map
I need a example because i am newbie in Irrlicht and no know how start.
I need a tile based map which services collisions
I need a tile based map which services collisions
Re: Tile based map
It depends, will you use 3D geometry or use 2D sprites? In any case, the most optimal way, although it requires more work, is to write the coordinates, and based on those coordinates to write the conditions, but this usually carries much more work
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free and in an anonymous way if necessary. You can send me a private message.
https://www.artstation.com/noiecty
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free and in an anonymous way if necessary. You can send me a private message.
https://www.artstation.com/noiecty
**
Re: Tile based map
I'm a bit confused as you already seem to have one in the other thread. Which looks pretty nice with just the collisions missing. And I already gave you 2 solutions how to write those. Maybe just try first if you can implement one of those. And when stuck with it ask more questions?
edit: With the picture you just added - that looks a bit more complicated. Doesn't seem to be simple tiles. Thought adapting your original code still probably good way to approach it. Not sure as the transitions look like they were done with some clever algorithm.
edit: With the picture you just added - that looks a bit more complicated. Doesn't seem to be simple tiles. Thought adapting your original code still probably good way to approach it. Not sure as the transitions look like they were done with some clever algorithm.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Tile based map
I'm trying to create this map. I have the coordinates. I don't know how to correct start creating a map using Irrlicht.
Re: Tile based map
Yeah, that one is a bit interesting due to the transitions between the tiles. Which tile will be selected when you click one of the transition polygons?
There is also different ways to approach this. Using one tile per node seems tricky for this. For the 6 sides you could say half the side for connecting polygons belong to each tile. But the triangle gap polygons... no idea to which node they would belong to.
So I'd likely create a single mesh for the whole map and re-create it each time one of those tiles changes height (just assuming they do). Unless it's too expensive (depends again on size). And then write my own collision routines (just check ray against each triangle and then figure out to which tile each one belongs).
At least that's what I might do if it only uses vertex colors as in your image above. With different texture per tile this map will get a lot more complicated.
There is also different ways to approach this. Using one tile per node seems tricky for this. For the 6 sides you could say half the side for connecting polygons belong to each tile. But the triangle gap polygons... no idea to which node they would belong to.
So I'd likely create a single mesh for the whole map and re-create it each time one of those tiles changes height (just assuming they do). Unless it's too expensive (depends again on size). And then write my own collision routines (just check ray against each triangle and then figure out to which tile each one belongs).
At least that's what I might do if it only uses vertex colors as in your image above. With different texture per tile this map will get a lot more complicated.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm