-
Notifications
You must be signed in to change notification settings - Fork 390
Create and replace art assets for a mini-game #627
-
Why this task matters
These kinds of objects don’t necessarily have scripts or gameplay mechanics. They're just scenes that help decorate your level or add variety to the world and can help make the space feel more immersive.
Copyright: a very important thing to keep in mind while creating art for Threadbare
As you will read in the link provided at the end of this paragraph, Endless Access strongly prefers that assets in Threadbare are created by hand, without using generative AI (the goal is to teach fundamental creative skills: these are necessary to design high-quality art). Nonetheless, if you do want (or need) to use AI, you can do so by following the guidelines shown here: CONTRIBUTING: Document how to cite AI-generated images. Please, read carefully.
You can always use the Threadbare Tailor apps to create your own artwork:
Pixel Stitch
PatchWork Shop
Git Setup
- Update your local repository. Open Git Bash and navigate to your project folder. Before creating a new branch, switch back to the main branch and pull the latest changes from your team's GitHub repository. This makes sure that the new branch you are about to create will have the latest updates from your team's StoryQuest.
git switch main git pull
- Create a new Git branch
Now, create a new branch for your work:In general, choose a branch name that reflects what you're doing, likegit switch -c new-branch-name
intro-outro-tilemaporadd-custom-path. This keeps your work organized. Click here for a more detailed guide and more information on updating your local repository and creating a branch.
Exploring An Existing Scene
While in the template intro scene, follow these steps to explore how the rock object is built and use it as a guide:
- Open the 0_template_intro Scene
- Find the Rock in the Scene Tree. In the Scene Tree on the left, look for a node called Rock.
- Open the the Rock Scene. Click the small scene icon (movie clapboard) next to the Rock node name. This opens the Rock’s own scene in a new tab in the editor.
Understand Its Structure
Inside the Rock scene you’ll see:
- A StaticBody2D as the root or parent node (this makes it a solid, unmoving object).
- A Sprite2D child node that holds the image.
- A CollisionShape2D child node that defines the object’s solid area.
Part 2: Create Your Own Game Object
Want to make a decorative item like a tree, bush, or a house? Here's how to build it from scratch:
- Open a new blank scene in the editor. Click the "+" icon at the top of the Viewport to make a new scene.
- Add your root node first. In the empty Scene Tree, select Other Node, then choose or search for StaticBody2D and click Create.
-
Add two child nodes under the StaticBody2D. Add these node by selecting your StaticBody2D node in the Scene Tree, then clicking the "+" button in the top of the Scene Tree to search for and add a new node. Do this two times: once to add a Sprite 2D (this will hold the objects texture) and once a CollisionShape2D (This will make the objection have a solid body). Your Scene Tree should match the rock.tscn from the intro scene.
-
Add your own texture to the scene. In the Inspector, drag your .png image from the FileSystem into the Texture property of the Sprite2D node.
- Set up a collision shape. Select the CollisionShape2D node. In the Inspector, click the shape drop-down and choose a shape like RectangleShape2D or CapsuleShape2D. Resize and position it to fit the image in a way that suits your design.
- Save Your Object. Save your scene and name it something like tree.tscn, rock_variant.tscn, or new_house.tscn.
- You've now made a re-usable object! To re-use this new object, simply find your newly saved .tscn in the FileSystem and drag it into a mini game or scene and place it wherever you want. You can do this as many times as you want to add multiple instances of the object.
Save To Git and GitHub
- Stage and commit your changes. In Git Bash, here is an example of how this flow will generally look:
git status git add scenes/quests/story_quests/yourStoryQuest/ git commit -m "Add your message here - explain to your team what you changed" git push --set-upstream origin your-branch-name
- Make sure the file path shows your actual story quest name, write your own descriptive commit message, and use your actual branch name.
- You can use
git addto add more than one file simply by putting a space between file paths you paste in. - You only need to use
--set-upstreamthe first time you push a new branch to GitHub.
Click here for a more detailed guide and more information on saving and pushing your changes to GitHub.
- Submit a pull request. Go to GitHub, navigate to your fork, and click Compare & pull request. Write a clear title and description indicating what you changed and why, then click Create pull request.
Click here for a more detailed guide and more information on creating a pull request to your team's forked repo.
Note: Pull requests are better with a peer review! Click here to learn more. If you are working alone, you can merge your own pull request after submitting it.
Additional Tips
- Use consistent scale so your object fits well with others in the game world.
- To use the object in a level, drag it from the FileSystem into your game scene.
- Want it to be decorative and not block movement? Use Node2D instead of StaticBody2D, and skip the CollisionShape2D.
Beta Was this translation helpful? Give feedback.