Struggles with Maneuver Template Modeling

Published August 09, 2022
Advertisement

Last weekend, I got the start of a maneuver template system working and I felt like writing a game dev journal about it. Specifically, I thought it might be interesting to talk about some of my failures while I was working on it. Usually we see solution articles after the problem is already solved. This can give the impression to newer game devs that there was no frustration along the way. And that's just not true. :)

Disclaimer: I'm CERTAIN there are easier ways to do this. This is NOT a how-to-model article. But here's what I did to get the models for my maneuver templates.

What's a Maneuver Template?

In some table-top games like Gaslands, or X-Wing Miniatures, you use maneuver templates to move your miniatures around the table. It's a great way to break up a movement decision space into a limited number of options when you aren't on a grid. Typically a player will select a template, place it in front of their vehicle, and then move the vehicle to the end of the template.

Picture of some Gaslands movement templates

What's Gaslands?

A turn-based combat taple-top game where you use Hot-Wheels scale cars to simulate post-apocalyptic vehicular combat. Typically the cars are painted and modified to give a Mad Max feel. If you like mini's games, Gaslands is definitely worth checking out. https://gaslands.com/ Here's a few cool examples of some modified Hot-Wheels.

A before and after picture of Hot-Wheels being modified for gaslands

Modeling Failure 1 - Blender Modeling

3d Modeling isn't a skill I'm very good at yet. I'm only about 10% of the way through a Blender course, so I'm still very much a newbie. I'm at the point where I'm conceptually aware of the types of things that can be accomplished, but actually doing it is something else. My first idea was to take an image of the movement template, and turn it into a height-map to deform a mesh. So I found a tutorial and struggled through that. Along the way I ran into a few issues.

  1. The original image has some textured text that didn't work out well for the height-map. I spent some time cleaning that up in Paint.NET but it was a pain and took me a while.
  2. To apply an image as a height-map, I had to subdivide the mesh several times to get enough detail to show in the model. This made the model way more complex than it needed to be. I know I could somehow optimize the model to reduce the triangles but I was already getting fed up with the process.

I gave up part way through coloring the border and text because it was just taking too long. I could see how the final product might look okay, but I was worried about how much performance impact it might have.

Partially finished model of a Long Straight move template

Modeling Failure 2 - Unity Quad

I thought this idea was going to be pretty easy. Use a quad to hold an image of the template. Take a snip of the image from the pdf and rotate it to the orientation that I wanted. I knew straight templates were going to be easy so I decided to use one of the curves.

  1. The image was blurry and didn't quite line up correctly. There was alot of manual massaging the data to get the correct size for the template.
  2. While messing around with splines to map the center-line curve of the template, my math wasn't working out correctly... Turns out the math was fine, but the turn-templates weren't symmetrical! >.< Now I didn't have a math way to make things perfect.
  3. Looking to the future, I wasn't sure how I was going to solve collision. I was going to need to create a collider to be the size of the movement template.
Using a Unity Quad to draw the image of a Gaslands Gentle Right template

I knew the blurry bits were solvable, but the lack of symmetry bothered me. I don't think it was an intentional design-decision. I think they just squashed and stretched some of the templates so that they would fit on a single piece of paper. My spline solution was also giving me fits. Plus, I still needed a collider of the same shape so even if the quad solution was perfect, so I still needed to solve the issue of creating a 3d model of the collider. I also decided to abandon the spline movement that I was trying to make work in favor of doing the math myself with simple trig functions.

Modeling Success - Tinkercad

I'm not a good 3d modeler. But I am a good programmer. I remembered using Tinkercad a few times for creating some models for 3d printing projects. It's a free online 3d modeling program. One of the environments is called Codeblocks which uses drag and drop widgets that execute 3d modeling commands similar to Scratch. Check it out here: https://www.tinkercad.com/

With Tinkercad, I was able to use familiar concepts to model the arc of a move template. I created a couple of cylinders one solid, one negative to create a ring. Then a couple of negative cubes to cut the circle into the arc-sweep that I wanted. Then I was able to export it to an .stl file. Import that into blender. And then export it to an .fbx file for Unity to use.

I reworked the code in the Tinkercad process so I can generate whatever size templates I wanted for the curved pieces. That's when I discovered some limitations of this system. I won't be able to use the current generator for all the curves. There's a limitation on how big you can model something with code blocks and I need a bigger radius to model the curve. But I have plans for how I'll solve that.

The codeblocks interface in Tinkercad I used to make the move template and how it turned out in Unity

I spent a lot of time trying things that didn't work last weekend. Once I abandoned the splines and just used trig functions to move along a curve, the movement code became really simple. I'm pretty happy with the end result.

Animated gif of my move template in action

Next Steps

I think the very next step is to create a few different curves, some straight pieces, and different sizes of vehicle bases (a motorcycle is smaller than a monster truck). After that, there's lots of directions to go.

  1. Import some real game assets instead of my mocked up red cubes
  2. Work on obstacles/collision logic that interrupts movement along the template
  3. Implement Skid Dice with the Slide/Spin results.
  4. Wire up some temp UI to let users select the movement template

If you want to see a particular direction, just let me know.

Tips from your Uncle Eck

  1. Don't make assumptions. You'll make an ass out of U and Mption. - The Gaslands turn templates are NOT SYMETRICAL!!! >.<
  2. Failure is part of Game Development. (or when learning any new skill really) - Be persistent and keep at the problem until you solve it.
  3. Close is good enough. Things don't HAVE to be perfect. - You can lose a TON of time trying to get the 100% correct answer when it doesn't really matter. My templates aren't going to match the Gaslands system exactly and that's okay.
1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement