Early Gameplay Prototype!

Rainy Day Devlog #3: Rigidbody movement, basic stacking gameplay, object pooling, and the mindset of documenting rather than creating

Early Gameplay Prototype!
Table of Contents

Hello world and welcome back to another Rainy Day devlog!

The basic core gameplay I envision for Rainy Day will be to simply stack and balance falling objects within the screen. And for the past week or so I have been working on the core gameplay prototype and have managed to accomplish basic horizontal player movement as well as spawning a randomly generated amount of falling objects from an object pool. Here is a visual of what I have so far.

Early Gameplay Prototype

0:00
/0:06

Early Gameplay Prototype

Right now, the balancing of the stack as well as the stacking mechanic itself is far from perfect. But for writing little to no code at all, it's pretty good, and that is thanks to Unity's physics engine. All I had to really do to achieve what you just saw was tweak gravity to slow down the speed of the falling objects as well as tick checkboxes to constrain their positioning and rotation. This is a mechanic that I will polish more and more as I go.

But in terms of terms of how I moved the player character for this game, I couldn't just alter its `transform.position` per frame because this method will ignore some physics and will cause funny behaviour throughout the whole stack. The gameobjects are rigidbodies so I had to specify that and move them 'properly' with `Rigidbody.MovePosition` to get what I want out of how everything will interact in the game. This makes it so that the movement of the player actually fills a space in the game's world instead of it teleporting to its target position and leaving gaps. It prevents occurrences such as the player teleporting into a space taken by another object. Hopefully that makes sense, but it is the correct way to move a rigidbody in Unity if you are planning to use its physics engine.

Object Pooling

In the same but different way for how I moved the player, the stacked objects moved to follow what is below it based on the player's horizontal input. When they fail to get stacked, they continue to descend down due to gravity and ultimately get "shredded" by an invisible wall with a collision detector. This shredder disables the gameobject, puts it back into an object pool, and gets enabled again once it is needed based on time. For game developers, use object pooling because it is a powerful optimization design pattern, especially when you need multiple copies of a specific gameobject. A common example is bullets. It is better to pre-instantiate each individual bullet and activate/deactive them when needed than to create/destroy them every time at runtime. So, for Rainy Day, I pre-instantiate a pool of falling objects to simply activate when need be.

0:00
/0:06

Object Pooling of Falling Object for Rainy Day

Document, Don't Create

And before I end this devlog, I just want to express the importance of having the mindset of documenting rather than creating. I almost held back into documenting and putting this devlog out there because I didn't have a perfect stacking mechanic yet. The mindset of "document, don't create" goes hand in hand with marketing because it helps projects create some sort of traction before its full release. It's very rare for a project to become successful just by plainly publishing it without any marketing prior to its release. What I'm trying to say is that we don't have to wait to market our games or feel like we have nothing to show yet until it is released. It's another mistake I made before that I hope you won't! People love seeing the journey it takes to create something and it affects how people will value the end product. Of course, it won't be all pretty. It isn't the final product! Just start. You don't have to be a professional or create content to meet what people want to hear about. Like, I'm just a person on the internet, but I will leave it with this. Start with what you know, what you care about, and share that.

And that is it for this devlog! Thank you for reading. Consider subscribing to become a beta tester for Rainy Day once it's available. Its all free and join our Discord community where we can take on challenges together and engage more closely!

September Donators

Special thank you shoutout to my website supporters who donated in September

  • Laura Milligan