I want to create the bomberman map around a planetary sphere, just like Mario Galaxy. As you can see in the image below, the level map has blocks on equal intervals. I want to create the same, but around a sphere.
I need help with the brainstorming as well as in little bit of scripting too. I am kinda new to C# / C++ scripting.
The first thing to figure out is the mapping, I will advise you to use the inflated cube method, with correction like this:
Also since it’s a plain grids it’s easier to initialize and move stuff according to generic logic, with crossing the edges corner the most difficult part but relatively trivial … unless you start wanting to acquire stuff that were not initialized from the sphere in which case I’m currently trying to solve that part.
Makes sense. But, we still need to figure out the corner parts. Although, I am kinda OK with having blocks on the corners as of now, which I can fix down the line. But, still need to brainstorm on that as well.
I mean there is 6 faces, each face is a grid, when you cross the edge of a face, find the next face, the difficulty is that since it’s a sphere face have different direction, it’s possible to keep direction for about 4 faces and the polar to that ring (so they constantly shift direction relative to the ring face per edge of entry). If all objects are discrete like in bomberman (ie occupy mostly one grid cell) it’s just a look up to translate the direction and position on crossing.
That is true for sure. Also, I was planning to go ahead with an “Odd number grid” and block the corners of the faces (corners only not the entire edge) for now. Just to get things started.
Have you considered whether it actually needs to be a true spherical world? An alternative way that would eliminate all the problems with tiling the surface of a sphere and deliver similar results, would be to create a regular flat map that loops at the edges and use a shader to alter the players perspective to make the world look round.
You kinda solved all my problem with just one blow =D hehe Thank you so very much. Let me give it a try and lets see if the basic functionality of the game works on this idea or not.
P.S : My gut says this trick will do the job. (Lets see)
It will work, just don’t have a case where: you travel from planet to planet, with seamless transition to landing from space, based on visible landmark, and you are fine.
What if I do it with a script? Where I will spawn a portal that opens upon successful completion of the level. While, the secondary planets (i.e level 2 / level 3 … so on) are constantly visible in the background. Creating an illusion of space teleportation =D
well that’s not seamless as you have a transition, and also using portal mean you get to have a definitive point of entry in the next grid, so yeah the case I enumerate is very specific and the only case where you this type of representation fail.
But if you have a transition from space to surface (like a jump cut after a prompt to land on the planet, all concern disappear, the transition change the change of reference. If you want to mix seamless transition with that technique, then you can’t have visible landmark from space, because looping maps are actually torus, so you need to cheat to find where to land the player after he cross to the surface, you would generally have a thick layer of cloud to serve as visual transition to hide the fact you can’t really see topology from space and that it doesn’t make sense at all.
It’s always cheating, you can only cheat.
My game hit the very specific case where I can’t use that specific shader technique, I want you to see stuff from space and target them down to the surface I had to go under a table to make it happen, and worse, I need to connect tile between themselves to have road, so I need to figure out algorithm to go from face to face through corners and edges of the cubic sphere. Shouldn’t be hard but I haven’t done it yet
Is there a neat way to create something like this? I did followed some tutorials on creating these type of shaders from Youtube, but I could not finish the project properly. Most of them were kinda out dated. Could you please suggest me some good resources to create the above?