top of page

Creating an Alchemy Sim in Unity

Writer: Olli Machina
Olli Machina
May 4, 2022
2 min read

Alchemy sims are quite a common game and they are a nice and simple concept that blossoms into a complex and detailed experience. The type of Alchemy sim I made an attempt to emulate is similar to games such as Little Alchemy , where the player begins with 4 base elements in their collection. The player combines the items to create new things to combine and create with. The number of items in the collection grows exponentially over time and the item types can become very detailed and extensive.

I thought it would be fun to put one together and specifically have the Unity project read the data from a txt file, just for a nice detail. I was excited to make multiple layers of items, and quickly realized how much organization is actually required for this game!


The Concept

For this project, I mainly wanted to focus on the organization and readability of the code. The mechanics themselves are quite repetitive and the most important element is the data list and storage of progress. It's a super simple outer look with no art and a really simple layout:

The cylinder in the middle is the "beaker" for the combinations and the elements to the left are air, earth, fire, and water (top to bottom). When the player clicks on an element, it is added to the beaker combination and will combine with whatever the player clicks next.

There is also a super basic menu at the top of the screen, allowing the player to spawn in the base items or new items that they have already created:

I really just wanted to focus on getting the data read from the txt file and allowing a theoretical designer to input data that is read in automatically. This is what the txt file looks like in the current state. It's not super clean, but with the limited time of the project, I just wanted something easy to parse:

The data is the name, the "layer" of the item

[0 = base item], the combo required to create it, and the color of the material






Reflection

The things that required the most attention were the pieces I didn't really think about at first. Where should the spawned item go? How can I efficiently keep track of items already created and ones undiscovered? How can I make a menu that works well enough for this project? Why did I make this in 3D space because that was evidently a bad idea for this project? There were a lot of steps that I had to spend more time on than expected. Or at least if I didn't want to brute force the code into behaving. I ended up only doing the first layer (items made from the base items) due to time and wanting to focus on at least getting foundations established.


Overall, I'm pretty happy with where it ended up. It's at a state where it can definitely be expanded upon further and that sits well with me.


4 Comments


giecphangqua.n.h.g.h.u.n.g
Aug 27

https://keonhacai.cam/ mình thấy mấy hôm nay nhiều người nhắc nên cũng tò mò bấm vào coi thử giao diện thế nào. Mình không có ngồi soi nội dung hay chọn từng mục gì đâu, chủ yếu lướt qua xem họ sắp xếp trang ra sao cho dễ nhìn. Ấn tượng đầu là bố cục khá gọn, các phần được chia thành từng khối rõ ràng nên kéo xuống không bị “ngợp”. Menu cũng đặt chỗ dễ thấy, bấm chuyển qua lại giữa các mục khá nhanh, không phải mò mẫm nhiều. Mấy bảng thông tin hiển thị theo dạng cột nhìn sạch sẽ, chữ không quá rối nên đọc lướt vẫn nắm được ý. Nói chung mình thích kiểu trình…

Like

terrancecart.e.r.36.0.7
Aug 26

Bài của bạn ngắn gọn mà dễ hiểu thật, đọc lướt một lượt là nắm được ý, cảm ơn bạn đã chia sẻ. Mình cũng có thói quen xem thống kê XSMB hằng ngày, nhưng hồi trước cứ phải mở nhiều nơi khác nhau nên hơi mất công. Về sau mình tự gom lại để theo dõi cho tiện, kiểu lưu một chỗ để khi cần thì tra nhanh, nên mình đặt nó trên soicau247.com để khỏi phải nhớ từng nguồn. Mỗi lần muốn xem theo ngày thì chỉ cần mở ra là có số liệu, nhìn tổng quan cũng đỡ rối hơn nhiều. Nếu bạn cũng hay để ý phần đầu đuôi giống mình thì mình có lưu ở…

Like

katrinacha.vez.52.0.2
Aug 21

Bài viết đọc cuốn, mình đọc một mạch hết luôn, cảm ơn bạn đã chia sẻ. Dạo này mình cũng hay để ý mấy nền tảng giải trí trực tuyến nên có vào xem thử họ sắp xếp giao diện và chia chuyên mục thế nào, chủ yếu nhìn bố cục và cách hiển thị thông tin cho dễ theo dõi. Mình gom lại vài chỗ để tiện tra nhanh, ai cần thì ghé https://uccle.monopinion.belgium.be/profiles/Soicauxsmbpro/activity

Like

savannapatt.er.s.on.7.0.4
Aug 11

Mình chơi xổ số kiểu cho vui là chính, coi kết quả như một thói quen giải trí chứ không đặt nặng chuyện thắng thua. Trước đây nghe người ta bàn về mấy “cầu” này nọ mình cũng thấy mơ hồ, nửa tin nửa ngờ, nhưng theo dõi lâu thì thỉnh thoảng lại bắt gặp vài chỗ trùng hợp nên cũng tò mò. Mỗi lần đọc nhận định ở đâu đó, mình hay note lại vài ý ngắn rồi để vài hôm sau mở ra so lại, coi thử có phải mình đang tự suy diễn không. Dạo này mình có ghé https://soicauxsmb.io/soi-cau-368.html để xem thêm cho có chuyện tám với bạn bè. Có bữa trúng chút thì vui, có…

Like
  • linkedin
  • Github
  • itch.io

©2020 by Olli Machina. Proudly created with Wix.com

bottom of page