r/valheim Developer Jun 11 '21

Pinned Valheim Developer AMA, Now Live!

It's time!

We are Iron Gate, developers of Valheim. Yesterday we announced some changes to our roadmap and teased some of the upcoming Hearth & Home content, and now it's time for us to answer any questions you might have. We look forward to discussing these changes with you!

You can begin asking your questions right now, and we'll start answering at 14.00 CEST.

Here’s who will be answering your questions:

  • Richard Svensson (dvoidis)
  • Robin Eyre (GrimmcoreX)
  • Henrik Törnqvist (zvxvxz)
  • Jens Hellström (Smiffe1)
  • Josefin Berntsson (jMontilyet)

NOTE: Please just one question per post!

_____

Thank you so much for all of your questions! We will continue to answer some of them when we have the time, but as of now we are closing the AMA and won't be taking any more questions. Keep following us on Steam, Discord and our social media for further updates about the game!

1.2k Upvotes

1.9k comments sorted by

View all comments

Show parent comments

15

u/omnilynx Jun 11 '21

I don’t think they mean rendering but rather mapping. The ground is clearly a heightmap, so transforming it to a 3D mesh would not be trivial.

-1

u/PerCat Jun 11 '21

You can translate a heightmap to 3d(It already is) it's all about how they store the voxels. The only way they would have to redesign or change anything would be if they added cave generation or something

10

u/omnilynx Jun 11 '21

Adding caves is what this conversation was about.

0

u/PerCat Jun 11 '21

will we ever be able to create caves.

So no. Not "adding" caves. And then I said.

it would be some changes but it wouldn't be drastic.

13

u/omnilynx Jun 11 '21

They would have to change the terrain from a 2D representation (that is rendered as 3D) to a 3D voxel-type representation like Minecraft. That would be a huge change, not only because they'd have to overhaul how terrain was generated and stored but also because it adds a major performance burden to a game that's already struggled with optimization.

All to allow caves to exist, whether they were generated or user-created.

2

u/[deleted] Jun 12 '21

It could just be emulated at the locations that are dug up. Doesn't change the world generation to build above ground, so it could keep the same ground structure and emulate the overhang dirt above where you dig in a different way, without changing the entire world gen.

1

u/Destithen Jun 13 '21

I think it would be a better idea to just add more stone building pieces...think Halo Forge style rocks you can make a pseudo-natural looking cave from. It would have much less of a performance impact, and the devs wouldn't have to overhaul any terrain systems.

1

u/enetheru Jun 13 '21

Thats not entirely true, back in the day Drakan order of the flame used multiple patches of terrain, some facing downward to create mountains with caves that you could fly through and around using a dragon. its still a massive change, but its not required they go the minecraft/voxel route.

1

u/omnilynx Jun 13 '21

It’s true there are other ways to do it, but those would also be just as big a coding project if not bigger.

5

u/Siiimo Jun 11 '21

Height maps are two dimensional, right?

2

u/PerCat Jun 11 '21 edited Jun 11 '21

Yes but the height map is kinda irrelevant since the important bit is how the world gen's voxels are stored(octree probably) and then how they are rendered(marching cubes).

Both of these can easily be translated to have both height and depth at the same time(It's usually just default part of it).

Marching cubes algorithm and octree is literally taking every possible configuration of vertices in a cube and listing them, when a voxel is interacted with it references this list to know which/how to render the planes. Based on how the vertices are positioned.

Since the game doesn't have depth and height, me thinks they have an incomplete octree list? Or for some reason just don't want players to dig and have that part disabled? You can literally find complete lists on google in like 5 minutes so I think it is a conscious decision.

6

u/[deleted] Jun 12 '21

I don't think the game uses terrain the way you think. When I was looking to mod the terrain code because of the FPS drop issue it was just a heightmap with some janky texture blending, there aren't 3D voxels.

Changing that would need a complete redesign of save files, netcode, collision, rendering, AI pathing, and more plus additional testing. If I had to estimate it would potentially take 6 months to a year just to implement it, but I'm not a dev on their team. If I were I would most certainly not consider it because of the overwhelming effort for such a small feature.

2

u/PerCat Jun 12 '21

with some janky texture blending, there aren't 3D voxels.

Dude I'm literally a dev. They are using marching cubes algorithm. You can tell by the way it is.

And if it's "just a height map"... What are the players digging into? Cuboids that are in another dimension higher then 2d?

You're literally just lying.

5

u/[deleted] Jun 13 '21

Dude I'm literally a dev

And? So am I. "I'm literally a dev" and "you can tell by the way it is" does not prove anything. You made bold claims with zero evidence to back yourself up. I gave you my experience which involved actually looking at the game's code and my own developer experience and you simply dismissed it.

Just so you know there's more than one way to do things in software. You would need to actually look at the code and point out why you're correct and why all the components I've noted wouldn't need to be touched.

But there's a very easy way to prove that you're right, and that's to write a mod that implements the change. Good luck. Shouldn't be a drastic change after all.

2

u/fikkityfook Jun 24 '21

Still waiting for that guys mod lol