Taking one's own advice

10
Official Construct Team Post
Laura_D's avatar
Laura_D
  • 18 Sep, 2020
  • 719 words
  • ~3-5 mins
  • 1,245 visits
  • 2 favourites

Happy Friday! I hope you've all had a good week. I'm gonna chat a bit today about following my own advice and the final iteration of my crafting experiments.

Last week I talked about Designing for a Problem, which up until now I hadn't been doing. I've been trying to look at different crafting systems to figure out how they worked and build up my understanding. And that’s great, but it meant I never got around to thinking about the actual crafting system I wanted to make. So now, I've finally sat down and had a think about what it is I want my final system to roughly be.

The simplest way to describe this idea is as a recipe book. The book will contain a set number of recipes, with a certain amount displayed per page. The book will initially start with only a handful of recipes and the player can find more throughout the overworld. Each recipe will be clearly defined and as crafting is only an optional part of the game, each recipe will only require one of each ingredient. The number of ingredients for a recipe can vary from two to four. Also, bulk crafting is something I'm quite keen to add to make things easier.

The above image shows and incredibly basic structure of how it might look. (And apparently the lighting in my office is strangely pink. Sorry about that.) You'd have a recipe list on the left and details about the crafting result and ingredients on the right. To expand a little further using the numbers on the image:

1. The recipe list

Populated by information stored in an array. One column of the array dictates if the player has found the recipe yet. If they have its name will be displayed in the list, if not, just "???" or something similar will be shown.

2. Craft Result Showcase

This will show a large image of the item that is produced by a recipe. This data is also stored in the 'RecipeBook' array – the name/id in the array will correspond to an animation frame.

3. Craft Result Detail

I'm undecided if this will stay in or not, but it would show some text about the item being produced. Data would probably also be in the aforementioned array.

4. Ingredient List

This shows each of the ingredients required for the recipe. If the player has not got an ingredient in the inventory, it will be at half opacity or similar. The frames will be set by ids/names stored in the RecipeBook array.

Having a basic idea of the structure meant I could figure out how it should all link together. Originally I was planning to have the recipes stored in the main item JSON file, with their availability in a separate dictionary, but I'm coming round to the idea that the single array might be easier to manipulate (which may mean I go back and condense my inventory system to a single array too!)

Part of figuring this out was actually trying to imagine the events in my head before building them in Construct. For me, one of the best ways to start this process is by scribbling down the 'flow' of a process - what is actually involved in the crafting system. This is by no means a complete diagram, but it did give me a good starting point (if you can read my writing):

With my chart in hand, I've already started building the test project for this and so far I've managed to get the recipe names displaying correctly in the list as well as putting in the basic scrolling through the list. The next stage will be get all of the sprites displaying the correct frames. Again, in theory this should be fairly similar to getting the names to display, it's more a case of figuring out where in the function it should be, or if it should get its own function etc.

As always, there's plenty more to do, but I think by the time I'm done with this, I should have three different text projects I can turn into solid tutorial examples. Hopefully, they'll provide a little insight into crafting mechanics and give you some ideas for building your own if you need to!

Subscribe

Get emailed when there are new posts!

  • 3 Comments

  • Order by
Want to leave a comment? Login or Register an account!