Book Image

The Ultimate Roblox Game Building Cookbook

By : Taylor Field-Draper
Book Image

The Ultimate Roblox Game Building Cookbook

By: Taylor Field-Draper

Overview of this book

Roblox is a massively popular online gaming platform, but it can be challenging to maneuver for beginners who don’t know where to start, as well as seasoned developers who tend to struggle with limited scripting tools that make transitioning from other platforms such as Unity more difficult. The Ultimate Roblox Game Building Cookbook is an invaluable asset for any Roblox developer looking to take their skills to the next level. With a wide range of recipes, this Roblox book covers everything from the basics of game development on the platform to advanced techniques for creating immersive experiences. As you progress through the chapters, you'll gain a deep understanding of the proper workflow and building methods that will enable you to create extraordinary virtual worlds. You'll gain insights into creating complex game mechanics, such as multiplayer games, working with textures, and special effects in games. This cookbook will also provide you with tips from top Roblox developers, as well as valuable guidance on how to monetize your games and stay up to date with the latest trends in the Roblox development community. By the end of this book, you’ll have gained a comprehensive understanding of Roblox game development and design.
Table of Contents (13 chapters)

Creating wooden crates

One of the most widely used props across all genres of games is the humble crate. They come in many different shapes and sizes and make for a great asset that can be duplicated and stacked on top of one another. Crate models are also a prop that can be very easily scaled, stacked, and modified. In this recipe, we will be going over how to create a basic wooden crate model.

How to do it…

We will begin the recipe by creating a large cube and then creating an extruded outline along the top and bottom. Next, we will create corner and diagonal braces. To finish the recipe, we will apply color and material to the crate after we group and name the model.

Let us start:

  1. Insert a square block part onto the baseplate.
  2. Rescale the part to be a large cube. In this recipe, the cube size being used is scaled 5, 5, 5 studs.
  3. Next, place a 0.5 x 0.5 stud block across one of the top sides of the cube. Have the part sticking out of the cube by 0.25 studs to create a lip.
  4. Duplicate the top part and add it to the other three top sides. It should look like what is shown in Figure 1.8:
Figure 1.8: Square block outline at the top with square parts

Figure 1.8: Square block outline at the top with square parts

  1. Duplicate the four parts at the top and move them to 0.25 studs below the bottom of the cube.
  2. Duplicate one of the side parts and then place it vertically on all four corners of the box. This completes the initial outline for the box:
Figure 1.9: Parts placed on each corner

Figure 1.9: Parts placed on each corner

  1. To create a diagonal part across the faces of the box, duplicate one of the vertical border parts and move it to the middle of the face.
  2. Rotate the part by increments of 45 degrees until it lines up with the corners:
Figure 1.10: Diagonal brace after rotating

Figure 1.10: Diagonal brace after rotating

  1. Rescale the diagonal part along its x axis to extend out of the other side of the box. This allows us to create the same diagonal shape on the other side of the box without using an extra part, which helps keep our total part count low, as seen in the cut-away view in Figure 1.11:
Figure 1.11: Diagonal brace extended onto both sides

Figure 1.11: Diagonal brace extended onto both sides

  1. Rescale the diagonal part inward 0.15 studs to give another layer of depth to the model.
  2. Duplicate the diagonal part and then rotate the duplicate part 90 degrees.
  3. Next, group the parts into a model.
  4. Rename your model Crate.
  5. Now, color the parts in your Crate model. Use a darker shade on the inside (or outside) parts of the crate so that the depth of the braces stands out better, as seen in Figure 1.10. In this example, I used (108, 88, 75) for the inside parts and (138, 112, 96) for the outer crate parts.
  6. Finally, add material to your crate. Wood was the material used in this recipe’s example.

    If you are using the Wood material, use the MaterialFlip plugin to fix any incorrect woodgrain flow.

That completes the recipe for building crates. Make sure to anchor your model if you have not done so already!

Figure 1.12: Finished crate

Figure 1.12: Finished crate

Now, you can use this model as a template to create a wide variety of crates to use across your maps.

There’s more…

Z-clipping, also known as Z-fighting, occurs when two faces intersect with each other. This results in both materials fighting to be rendered and is often seen as flickering on the surface. To fix this, move the flickering parts up by at least 0.001studs.