I've been getting into 3D for a while now, and I'm using Bullet Physics for physics, and OpenGL 3+ for graphics.
Up until now, I've used Blender to create a map, and then load it to a btBvhTriangleMeshShape for use in Bullet.
However, I want to create a map editor, and I first thought the easiest way would be to use a heightmap. This requires the entire terrain to be in a grid however, and that makes it hard to make good terrain without making a small grid full of unnecessary vertices. Therefore it seems like I can't use that.
I've tried Googling for resources on how I should go about this, but it's always topics which do not help me.
What I've been thinking about is to make the map in the editor a btBvhTriangleMeshShape, but I don't see any way to quickly modify vertices.
I hope anyone can give me some advice on what I should do.
I'm currently writing a wrapper, and I am using pimpl to be able to use the same interface for multiple libraries. I'm not quite sure if I'm approaching this in a good way however. Is it worth using pimpl for things that aren't platform specific? What I'm writing now is a Bullet Physics library wrapper. I have made a RigidBody class and a World class. These classes then have their respective "btRigidBody" and "btDiscreteDynamicsWorld" pointers. My goal is to make my API consistent and not need to use any Bullet code in my client code.
Now, to my problem:
The World class needs to access RigidBody's btRigidBody pointer. And the RigidBody needs World's btDiscreteDynamicsWorld pointer.
How do I do this without having any Bullet-specific includes in the header files?
I have come up with an idea, but I feel that it is relatively ugly. My idea is that I have a "void* getRigidBody()" and "void* getWorld()", and then cast them to either btRigidBody* or btDiscreteDynamicsWorld*.
I could just go ahead and implement that idea, but it feels like I'm thinking about this in a wrong way.
(and I've read the source code on there - that's how I wrote my own version of it, as the article was very abstractly written)
The problem is, however, that I cannot get it to use more than one tilesheet. (two tiles - dirt and grass)
I have been trying and trying for a long time to do it, and I've come across a lot of ways.
Like, making the tilesheet only have one tile, and the secondary tile being transparent - so there are limitless combinations, I also tried making a 9x9 tile that would overlap or underlap neighbour tiles depending on depth, but our pixel artist really dislikes this idea, and what I've primarily tried is making all the tiles have a main tile, like "dirt" "grass" or "water". I then named the tilesheets for "dirt grass", "dirt water", "grass water".
I then made two algorithms, which both failed, to find out what tileset to use for each neighbour around the new tile.
I am surprised that there is relatively very little information I find on Google about autotiling. Every result goes back to a few articles, which only covers the basics.