121
Offtopic / Re: XCOM Inspired Fantasy Game
« on: July 10, 2020, 08:37:39 pm »
Things one learns: voxels actually do look like cubes, if you render them at resolution higher than a pixel. For some reason I believed the will look like pixels, but that is the case only when one projects them as pixels, when rendering like trinagles. And one needs to render them at higher res to precisely edit them. But triangle-style rendering for voxels has a lot of quirks:
1. One has to sort voxels by distance from camera.
2. The one draws them upscaled based of Z.
3. If several voxels project to the same screen pixel, one just blends them.
That was very inefficient but it worked for small scale models.
Alternatively one can convert voxels to triangles. And that actually works well for sparse scenes. But the conversion process is very expensive, and one cant modify the model after conversion - polygons are surprisingly hard to mutate. Although if one doesn't do large modifications, then space can be broke into parts, which are much faster to convert to render into triangles, after being modified. I personally just raytrace them like spheres, since raytracing allows sampling very large, potentially infinite constructs. One guy even made a complete video game base of infinite fractals: https://www.youtube.com/watch?v=9U0XVdvQwAI
There fractals are mutates them with time and it acts like complex a course to navigate. Think Marble Madness + Monkey Ball on speeds.
Anyway, I have already mentioned that XCOM Apocalypse had all objects internally made out of voxels, so projectiles move with great precision
https://www.terrygreer.com/xcomapocalyse.html
Obviously I plan to integrate that voxel engine with Spell of Mastery. Just because it opens so many possibility on both visual effects and gameplay sides. But it is unlikely I will use complex projectile raycasting, since I want player being easily able to guess where unit can shot. The game does use simple raycasting already and it was real pain to make remotely intuitive. Yet I need robust large scale voxel modifications to produce stuff like tiles breaking apart or just for site map transformation.
1. One has to sort voxels by distance from camera.
2. The one draws them upscaled based of Z.
3. If several voxels project to the same screen pixel, one just blends them.
That was very inefficient but it worked for small scale models.
Alternatively one can convert voxels to triangles. And that actually works well for sparse scenes. But the conversion process is very expensive, and one cant modify the model after conversion - polygons are surprisingly hard to mutate. Although if one doesn't do large modifications, then space can be broke into parts, which are much faster to convert to render into triangles, after being modified. I personally just raytrace them like spheres, since raytracing allows sampling very large, potentially infinite constructs. One guy even made a complete video game base of infinite fractals: https://www.youtube.com/watch?v=9U0XVdvQwAI
There fractals are mutates them with time and it acts like complex a course to navigate. Think Marble Madness + Monkey Ball on speeds.
Anyway, I have already mentioned that XCOM Apocalypse had all objects internally made out of voxels, so projectiles move with great precision
https://www.terrygreer.com/xcomapocalyse.html
Quote
Tiles were complex data structures. Each one also had a reference to line of sight definition – this was a simple 4x4x4 grid – a sort 3d texture – where each cell was either solid or empty. There were a relatively small number of these solid line of sight definitions, but enough to approximate the 3D shape of any shape of tile created. This meant that the world was effectively broken into a 3d voxel grid where weapon fire could be accurately ray-traced. It was a ball ache to set up initially, as every tile had to have a line of sight definition assigned, but really made life easy later on as collision in game then became automatically generated from the map editor.
It was a genius approach, especially in the years before decent 3d raytracing – and one of the key identifying features of an xcom game. Players always loved being able to snipe enemy forces from right across the map through a couple of windows or blown open walls. It’s also a technique which I think useful to reinvent for use in conjunction with true 3D worlds and can think of lots of good mechanics you could use them for.
Obviously I plan to integrate that voxel engine with Spell of Mastery. Just because it opens so many possibility on both visual effects and gameplay sides. But it is unlikely I will use complex projectile raycasting, since I want player being easily able to guess where unit can shot. The game does use simple raycasting already and it was real pain to make remotely intuitive. Yet I need robust large scale voxel modifications to produce stuff like tiles breaking apart or just for site map transformation.