Day 123: Today, I spent the entire day on this freaking collider automation. I now officially hate meshes generation and vertice orders. Like seriously There’s no logic in those meshes. It’s late and I’m grumpy so I’d like to keep it short.
Daily interesting stuff:
Reddit post, who earns money with game dev? I don’t remember why, but it was interesting.
Article of advices from a guy. It’s game dev related. It’s not amazing, but it does the job well.
Reddit post, “what sense of place”?. I didn’t hear about this before. It’s what makes you think a game is believable. Or something like that.
Tasks done:
Rewrote the collider importer. It’s the piece of code that automatically place colliders on the walls of the rooms. Like I said before, it worked great with the previous tileset. But now it’s fucked up. Apparently having different tiles change the order of the triangles of the mesh. And it defies logic. At first glance you might think it goes from left to right line by line. But it doesn’t! Sometimes it switches on the line below, sometimes it goes back, sometimes it skips tiles. That was enraging! So I tried a LOT of things to get it working back. In the end I had to change my method altogether. Instead of checking the vertices for “holes”, I check each triangle and see if it fits in a collider. If it does I expand the collider, if it doesn’t, I create a new one. I had to separate colliders into one tile height lines. Because if I make colliders with boxes. Colliders are then packed into a list ordered in a dictionary. And their height is the key of the dictionary. So for each triangle, I have to search among a very limited set of existing colliders. But I’m sure you’re thinking “hang on! Wouldn’t that make a lot more colliders than necessary?”. And you’re right. But I work with abstract collider info (just x, y, w, h) so before making box colliders, I merge the colliders when I can. In the end it works as well as the previous importer, but with weird meshes. It might be tad slower, but that’s not done in run time anyway, so it doesn’t matter. Oh and of course my exit automation code is broken. I’ll do that tomorrow as well…
Tried the new 256*256 tileset. I didn’t had enough time to do many things. But I noticed a few problems. There’s a depth illusion problem. And I think the walls are too big. With them taking 4 tiles on the border and a minimum of 8*8 for interior obstacles, it’s too much. But It might be interesting to try it with enemies to see of this reduced space doesn’t actually better the gameplay.
0 comments