Tuesday, March 24, 2020

Slumps

Everyone gets demotivated at times. Everyone falls into an apathetic slump. Especially with personal hobby projects. Sometimes it's because life gets busy and other things take priority. Sometimes it's because you hit a wall or a block and can't figure out what to do next.

I've hit a little bit of a slump with this ProcGen Tabletop project recently. Things were going well and progress was being made. The grammar system is working (will have to explain that later) and walls were generating. I had hacked together a small rectangular building generation too! It was all looking good, so why the slump?

Well, I thought it would be a good idea to make a graphical user interface so I could start turning this little toy project into a usable application. And that led straight to a giant roadblock. Implementing a gui is a large undertaking, and it's not something that excites me. It's more a necessary evil. And the scope of the task is very large and vague. Not knowing how to proceed and not being excited about tackling the problem, means I am in a slump.

So how do we get out of this slump? If the scope is too big, break the problem down into smaller bits that are not as intimidating. And the other thing that helps, is to only do the least amount of work to address one small, specific problem and then build on that afterwards. In my case, I want an interface where I can:
A) Clear the currently generated building and start fresh (ie New Document)
B) Export the current model to a STL file that can be sliced and printed
C) Exit the application.
This sounds simple, and it is. It's meant to be simple and non-threatening and easily tackled, so I can get started. Once I have this functioning, I can then look at what the next small step will be. And after many small steps, this project will slowly start to take shape. 
Wish me luck!




Friday, February 14, 2020

We're going to build a wall.

Why do we need a wall? The goal is to procedurally generate tabletop wargames terrain. To make a building, we will need at least a few walls and a roof. A wall is a big enough chunk that we can generate variety and it's not too big to be intimidating. 

The very simplest wall is just a box of specified width, length and height. But that would be dull. We're going to want to at least have some decorative pattern on the surface and for more practical uses, windows and doors. 

So let's take a page from the modular book and create a number of partial wall segments, some with windows, some with doors, and some solid sections with different details. Then we can use a procedural algorithm to mix them and modify them to make a wall of the desired length. 


What's the difference between printing out a number of modular segments and an algorithm that merges these segments into one wall? 
Firstly, the algorithm can create any length of wall, not just multiples of the modular pieces. 
Secondly, we can hide the seams and create a stronger, single wall.
Thirdly, we can add far more virtual variety that can be combined and printed as unique pieces, with a lot more detail than we can achieve by combining separate physical segments.
Finally, once we start combining multiple walls into full buildings, we can do things you would never be able to do with physical modular pieces.

But first, we have to build a wall.

Saturday, January 18, 2020

Why Procedural Generation?

In my exploring of thingiverse and ed printed terrain on Kickstarter, I have come across two major patterns of terrain models.

In one camp, there are fully completed models. Here, the artist has created a model of a set size and design. These look great, but if you want to fill a table, you will be printing multiples of the exact same building and your tabletop will look like it's come off an assembly line, all completely identical buildings. If you want variety, the artist needs to make several buildings with different variations to make it interesting. Another issue is that the size of each building is fixed. If you want different sized buildings, again the artist needs to make larger and smaller models. This is a very content heavy and tedious approach.

In the other camp, are modular designs. Here the artist makes a number of modular pieces that can then be combined, like Lego bricks, to construct any building you want. Dungeon tiles and other clip together systems all follow this pattern. The advantage here is that you can construct many different buildings and even change them up every game. However because all the modular parts need to be interchangeable, the results can be a bit blocky. They can also look like they're made from a construction set instead of a scale representation of a building or city. 

Procedural generation aims to give us the best of both systems. An intelligent algorithm can take various artists created models and textures and combine them to create some desired building specification. As we resize our desired specification, the algorithm can recreate the building automatically. And it can generate multiple variations of buildings too.

This is the Holy Grail I am after. Stay tuned to follow me on my quest!

Saturday, January 4, 2020

A New Beginning

It's interesting how things come together. I just recently bought a 3d printer. This technology has captivated me since reading The Diamond Age by Neal Stephenson many, many years ago. I feel a little late to the party now, but I am excited to dive in. 
It was another hobby of mine that helped me take the 3d printing plunge. I've been an avid wargamer since I was a young boy. Building model airplanes and playing historical WWII battles led to Warhammer and more. I recently played Infinity on 3d printed terrain. This just captured my imagination and I knew I had to get involved!
And finally, I am an AI programmer and procedural generation is a huge interest of mine. This involves writing algorithms that can then generate content automatically according to specifications. 3d printing now opens up the possibility of not just procedurally generating virtual environments, but physical, real world environments too! 
And that makes me really excited. So please follow this blog if you're interested in coming with me on this journey of exploration!

Slumps

Everyone gets demotivated at times. Everyone falls into an apathetic slump. Especially with personal hobby projects. Sometimes it's beca...