Posted 01 May 2015 - 09:26 AM
I was playing around with some old code I posted some months ago and was thinking about what I could do with it. A few ideas came together and I'm going to have a go this weekend at making a navigable 3D heightmap in computercraft. It's going to require a lot of changes to my old 3D code but I'm optimistic it's doable.
I made a mockup of what a heightmap in CC might look like:
So the idea is that each corner of these triangles is a 3D point you put in a big list, which then adds faces to the front of them and colours them according to their properties; if the face is very steep it probably a cliff so it has a grey face, if it's low altitude it's grass green, if it's high it's rocky or snowy so grey or white and so on. In this mockup I set 0 to be sea level, so points below that are translated and are blue if all vertices are sea level, or yellow if at least one is. But I also tossed around the idea of having a separate model or vertex storage system available so from above the water is at 0 but if you go underwater you can see what's beneath.
I was sort of inspired by other games that did height maps with a very limited colour palette and processing power, which although mostly cosmetic, shows it can sort of be done:
I think in my head I had the ultimate idea of turning this into a flight simulator. I'd program turtles to move around my world, as they can collect and produce height maps from real minecraft worlds far easier than writing them manually, and then convert the height points of my blocks into the vertices used to make the map. Then I'd program some basics physics, and have the camera move like a plane so you can fly around your now smoother-yet-blockier world on a monitor.
Does anyone have any comments, ideas on how this might work or how foolish the endeavor is, things they might do with it?
I made a mockup of what a heightmap in CC might look like:
So the idea is that each corner of these triangles is a 3D point you put in a big list, which then adds faces to the front of them and colours them according to their properties; if the face is very steep it probably a cliff so it has a grey face, if it's low altitude it's grass green, if it's high it's rocky or snowy so grey or white and so on. In this mockup I set 0 to be sea level, so points below that are translated and are blue if all vertices are sea level, or yellow if at least one is. But I also tossed around the idea of having a separate model or vertex storage system available so from above the water is at 0 but if you go underwater you can see what's beneath.
I was sort of inspired by other games that did height maps with a very limited colour palette and processing power, which although mostly cosmetic, shows it can sort of be done:
I think in my head I had the ultimate idea of turning this into a flight simulator. I'd program turtles to move around my world, as they can collect and produce height maps from real minecraft worlds far easier than writing them manually, and then convert the height points of my blocks into the vertices used to make the map. Then I'd program some basics physics, and have the camera move like a plane so you can fly around your now smoother-yet-blockier world on a monitor.
Does anyone have any comments, ideas on how this might work or how foolish the endeavor is, things they might do with it?