Stone Devlog: Knapping - First Pass

Knapping is the process of shaping a stone by striking it. Obviously, being able to shape stone is absolutely pivotal for this Stone Age crafty game I intend to make, so this is the first part of the game I'm working on. But before I could jump in, I needed a stone.

To start off with, I created a cube, subdivided twice along the height and width, and once along the depth to give it 5 vertices on the X- and Y-axes and 3 vertices along the Z-axis. The vertices along the X and Y-axes were all connected to a center point to create the triangles that form the front and back faces. This allowed me to shape the would-be stone using a basic algorithm à la Asteroids, applying some extra oomph to the middle vertices along the Z-axis. I also mapped the UV's for the front and back faces separate from the side faces, so that I could use a simple 2 pixel texture give the edges a different color.

The result looked like this:

Very Asteroid-esque

Yeah, I suppose that looks like a stone. Alright, now to start shaping it. I set up a basic system with GUI handles that allowed me to click and drag the vertices of the stone to position them. Sort of like 3D modelling, but with extra steps. After some fiddling around, I created some examples of tools that players might make:


A knife, spearhead, and axe head

Not too shabby. As far as how this would be accomplished in-game, the actual knapping mechanic would use a 'force' radiating outward from the position of the player's click to move the vertices of the stone. When a shaped stone is put to use, the sharpness of an edge would be determined by the interior angle from front to back, while the sharpness of a point would be determined by the interior angle of 3 consecutive vertices along that middle ring.

This system seemed to wrap everything up in a neat little bundle. As stated before, it would be easy to determine the properties of the final product. Plus, the system would be fairly easy to implement and also straightforward for game-play. Despite being a 3D object, the system is 2D in nature, with vertices only being moved on the X- and Y-axes. This would hopefully make it simpler to visualize the effect of each strike on the stone for the player. And to top it all off, the items created would always have the same number of vertices, which alleviated one of my worries about saving data and scalability.

Unfortunately, the implementation also had some flaws that left a lot to be desired. First and foremost, the end result is pretty bland. While the 2D nature of the system would be simpler, the large, flat front and back faces are kind of boring. The final shapes lack the ridged and gritty appearance of actual knapped stone. This issue is further exacerbated by the limitations brought by the original cube used to form the stone. Sure, more vertices could be added to the cube to allow for more detail, but that would mean more vertices for every stone, of all shapes and sizes. A tiny arrowhead would have as many vertices as a large axe head, which is less than ideal. Additionally, the way all the vertices on the front and back faces connect to a center point means that if any vertex crosses the line formed from another vertex and the center, the triangles overlap. This further limits the complexity of what can be produced with the system.

So what's the solution? Well, I could add more vertices to the cube to allow for more detail. Perhaps I could remove/merge vertices as the stone becomes smaller to simplify the mesh. I could also add some extra vertices to the front and back faces to roughen it a bit and move those vertices as the stone is worked to sort out the overlap issue. Maybe even do some proper UV mapping and add a bump map to improve the visual appearance.

Or I could come up with a new, much more complicated system. More on that to come.