Chemaria - Building and material-focused Terraria-like

Short ternary operations can usually be done like this:

a and b or c

This, however requires the use of the bit.* operations:

bit.band(a, bit.rshift(b, c))

If you use the functions often then cache them:

local band = bit.band
local rshift = bit.rshift
band(a, rshift(b, c))
3 Likes

Sorry I probably needed to express it a bit differently: { x>b ? x=a : x=c }
basically - if true do else do

x = (x > b) and a or c

This works as long as a is not nil or false

1 Like

5/16/2019

Long Time

Hello again! This past month has been a busy one for both the game and my life. For a while, I was busy with all that comes with graduating from college and getting my life packed up and out of my college townhouse.
Lot of things moving out this time around left me with little time to work on any of my game projects, especially Chemaria for the game is at a point where the things I am not as good at (UI design) are needing to be done.
Once I got back from school, lot of various celebrations with people occurred of course, and then I was finally able to start working again, and finally some more things are done!

Progress

The most important thing that has been completed is the crafting UI has been completed for the time being! It now has switchable tabs, items you cannot craft show up with a different texture in the list , and at a minimum it actually works!


Beyond the crafting UI, I havenā€™t made a lot of specific progress, but there was a lot of work that had to be done to make Gooey work exactly as I wanted it to. Now that I really understand how Gooey works though, I am glad I have it and it will make life a lot easier moving forward.

What is left?

At this point, I have a pretty limited list as to what I still need to do before I feel okay putting this out there with a price on it and beginning to support it as such.

  • Add a settings menu
  • Clean up some game state tracking
  • Speed up world saving/loading
  • Make holding a tool affect actions
  • Integrate the logic simulator
  • Get some much better sprites (Thankfully, my fiancee really wants to do this for me after we are married next month. She is a graphic designer unlike me.)
  • Add moving animation to character
  • Add breaking animation to blocks
  • Fix some movement floatiness
  • Bug sweep

Thank you all for the support you have been giving me. I am excited to see where this will be going in just the next few months even. :smile:

9 Likes

7/2/2019

Marriage

This has been quit the past month. Between driving 40 hours across the United States, getting married, and moving to Silicon Valley, life has been a bit of a whirlwind for me and my wife. To start with, here we are:


And we are both incredibly happy to be starting our new life together and helping one another with our various passions and projects.

Chemaria

Surprisingly, some work was actually accomplished on this game in the weeks leading up to our wedding. I have made some progress on a settings menu using DefSave for the configurable settings. DefSave has been a great blessing in simplifying how I am going to handle all non-world/player related save data.
In other news, world save and loads are much faster than before. What is done now is much quicker and more space efficient than before. My first solution had been to save every block of the world, just to see if it would work. But any sizable world produced completely unacceptable save times and save file sizes. Instead, I elected to generate the world with the provided seed and simply apply the saved transformations to the world. So the save file simply holds information on how the world differs from the seed generation. This does mean that the save file will bloat as players modify more and more of the world, but the point at which the save times would become unreasonable again would require a grand amount of time and determination on the playerā€™s part. For now, the solution works, but time will tell if it works well enough.

Moving forward

Now that my wife and I are mostly unpacked into our apartment, we both intend to start working on our own personal projects again and that means Chemaria and my other projects will start getting attention again. Itā€™s liberating to no longer be living on a strict schedule for school or anything else anymore and I am excited to see how my projects benefit from this newly open schedule.

18 Likes

Congratulations on your wedding! :wedding:

Iā€™m looking forward to following your progress! :smile:

4 Likes

8/24/2019

Tons of Progress

The tasks for Chemaria that were ahead of me the past almost two months were going to take me out of my comfort zone and I knew this. As I have been adjusting to my new work and schedule, I have fallen into a groove of finding time to work on projects such as Chemaria and pushing myself to learn new things.

Since last update, I have done a lot of tweaks to the general text rendering in the game.
Going from this
bad-title
to this
good-title
On top of that, the settings menu truly affects the game now, allowing options to modify the camera zoom, whether or not the game will be in fullscreen, and turning vsync on and off.


The load menu has gotten a makeover, allowing the user to even delete their save files.

The game has a proper pause menu also providing a save option.

Someone paying attention will also notice a few new things in the last screenshot, and that is that the game chunks are not a single block type anymore! I added in a SimpleX noise Lua implementation. Using 2D noise, I am able to generate these more natural shapes in the world.
I am going to modify it a bit as I move forward, adjusting the numbers which determine what block is generated, based upon the Y position, but that is for the future.
One more small thing as well, holding a pickaxe actually affects the mining speed, mining and crafting have limited distances which you can perform them from, and an item selected in the toolbar will show up in your playerā€™s hand.

That last picture also demonstrates thge various different elements in the game now, such as the various ores and ingots.

Next Steps

There is not much left that I want to do before release! I am having my wife work on better looking and higher resolution assets to replace the current ones. I also plan to add in more items to modify materials (like the furnace does, but for mixing various metals into new ones.) and more materials in general to work with.

I obviously want to finetune the world generation as mentioned before, because at this point it will be a very simple process to modify the generation methods.

There is also the big beast of adding the logic simulator into the game, but that is going to come after those things mentioned before, and maybe even after officially releasing the game and moving continued development to a closed source repository (the original repository will always exist as open source).

Thanks!!

It has been great keeping track of the community as more of a lurker and simply focusing on getting something finished on Chemaria. I love to see the Defold community growing and I hope to continue to be a helpful member as best I can while also pulling from the wealth of knowledge that comes from the various forum posts day to day.

11 Likes

12/15/2019

Hey all! I know itā€™s been around 4 months since I have posted anything regarding Chemaria, but I felt it was worth coming back and giving a little bit of an update on how I have been doing and the reason for the break.

Vacation and Mental Health

To be quite honest, I was getting a little burnt out on game design, but specifically Chemaria.
After moving across the nation, getting married, and starting my new job, I noticed myself falling into an unhealthy cycle of waking up, going to work, coming back, and coding till I needed to sleep.
I was not taking care of myself mentally, physically, emotionally, etc. out if an addiction to work and busyness.
My wife and I realized how I was behavinn was unsustainable and I took a step back from everything for a while. I spent time just focusing on my job, building friendships in the new area, and enjoying time with my wife.
I took a vacation from my passions but am now more balanced and ready to attack them.

New Location

One of the great changes in my life recently was that we just moved again. Now within walking distance of my work, an extra bedroom (acting as our office space), and an extra bathroom, my wife and I are feeling well at home in our new place. We donā€™t intend to move for a few years at his point and Iā€™m personally ready to nestle into one of my favorite communities again and produce something Iā€™m proud of.

Hindsight

Sometimes it takes some time off and the ability to look back to really understand the scale of what one has accomplished. Before this post, I took a bit to just look through my whole Devlog and I was shocked at the progress I have made and how many different problems I have wrestled into submission (world generation, saving/loading, chunk-based world rendering). I am prone to be quite hard on myself and my designs when I am working on them, and Chemaria was no exception. Looking back at what Iā€™ve done, Iā€™m proud of what Iā€™ve accomplished so far and hopeful for the future.

New sprites on the way!

Like me, my wife has been busy, so I have taken back the reins on making new sprites.
dirt sand stone iron gold silver platinum
My old sprites were 24px by 24px (donā€™t ask me why, I have absolutely no idea), and as far as I understand texture atlasing in Defold, this is not as efficient as 32px by 32px would be? (Someone please correct me on this if I am wrong) Regardless, 32px by 32px is not only easier to remember, but allows for some better detail and gives me an excuse to actually reconsider how I will be making my sprites.
I am personally quite happy the the iron, gold, silver, and platinum. The dirt, sand, and stone still need some work I believe, but no way to tell until I out them in Chemaria and mess around with them a bit.

Next Steps

I am going to be working more on making the sprites more palatable, as well as figuring out a good way of visually showing how much ā€œdamageā€ a block has taken, as this is already being tracked but is not visible by any means currently.
I also have two other major game projects going on (one in Godot and another in GameMaker Studio 2) that are sharing their time with Chemaria, but each of these 3 games are in a different development stage which is good for when I begin to experience burnout on one of them, for I can switch to another for a bit if need be. :slight_smile:

Any suggestions or comments, feel free to contribute! Thanks again for such a solid community.

8 Likes

It depends on the final size of the texture. The size of the individual sprites doesnā€™t matter but the width and height of the atlas/texture will be a power of two, ie 2, 4, 8, 16, 32, 64, 128, 256, 512, 2014, 2048. This means that if you put an image that is 513 pixels wide into an atlas you are guaranteed that the atlas will be at least 1024 wide, which could be vasting a huge amount of pixels and take up a lot of memory to no use.

3 Likes

Thatā€™s what I thought. Using 24px, there was a lot of wasted space in the atlas. At least with 32px, I can predictably meet those atlas sizes exactly.

1 Like

3/15/2020

This post will likely be more solemn than others I have done before, but I wish to share my experience to teach something to anyone willing to listen and learn.

The death of passion

Over the past 2 years some of the most amazing things have happened to me. I started work on my first real video game project (Chemaria), I graduated college, I got a job in Silicon Valley, and I got married to the love of my life. My wife loves my passion for programming and my obsession with gaming in general. Defold is an important part in our lives, as mentioned in the first post of the dev log, I proposed to my wife with a small runner made in Defold.

I was passionate about Chemaria, believing I could make a Terraria-like I would actually want to play. Over time, it has gotten harder and harder for me to work on it. I would get distracted by other projects, whether that be another game, a game engine, an extensible TCP game server, or contracted work making a website from scratch. For a while, I felt guilty that I wasnā€™t working on Chemaria. I would have short bursts of productivity, but I realized I was feeling more and more like I was going through the motions. I wasnā€™t ā€œtastingā€ Chemaria as I made it, the way a chef will taste their dish as they season it. I think I didnā€™t ā€œtasteā€ Chemaria because I didnā€™t want to, I was scared to. I was scared to realize I cared for it no longer.

Compromise

At the beginning of this year, I told myself I would get Chemaria to a releasable state so I could be done with it. As mentioned before, my passion was waning and that could be seen in this goal I made for myself.

I wanted to release it. I wanted it off my docket of things to do.
I didnā€™t want to make it good. I wanted to make it done enough.

This compromise would instead turn into the death of Chemaria, but I believe it now to be a necessary one.

Lessons Learned

In letting a previous passion die, I had to look at this experience and take some kind of value from it.

In reality, without Chemaria I would not be as passionate about game design and development as I am now.

I started Chemaria as an immature starry-eyed college student who basically believed anything could be fun if enoug effort is put into it. I started listening to game design podcasts (Game Design Round Table is a lovely one), speaking with other friends passionate aout games about the different aspects of design and what makes a game fun.

In learning more about the art of making games, I learned more about why I shouldnā€™t force myself to finish Chemaria.

Chemaria taught me much technically:

  1. How can perlin noise be used to generate seemingly random natural worlds?
  2. How can a world made up of tons of small parts be easily managed?
  3. How do you implement parallax?
  4. Why canā€™t 2D collision with tons of tiny contiguous blocks not just work? (The Platypus extension simplified a lot of this, but in the end, even the extension itself makes some assumptions which make various odd small ā€œquirksā€ to occur when performing actions like removing a block you are currently standing on)
  5. Many many many other things.

This experience and these lessons will stick with me forever and have already greatly informed much of my work beyond Chemaria and has continued to reveal a world to me that I never could have imagined. A world where people can take their ideas and dreams and make them into these works of digital art, into games.

What about Defold itself?

If you are enjoying Defold for whatever you are doing, absolutely stick with it. Whatever shortcomings the engine may have will likely be made up for by the insane quality of the community. If you find yourself like me though, losing passion for a project and just wanting to ā€œget it released and get it doneā€, take a step back and challenge yourself. Why are you creating? Why are you making what you are making? Part of being a great creator and artist is realizing when something is not worth the time and effort. Cut your losses, learn what you can, and move on to the next great thing.

Defoldā€™s community has been such an amazing and unique blessing. I would like to give special thanks to @britzl for his interest in the project and general interest in helping anyone and everyone on this forum realize their goals.

I am going to miss Chemaria only for the fact that it was the main link I had to this community.

I donā€™t believe this is totally a final goodbye though. I will likely be back at some point with smaller ideas for smaller mobile projects: something I believe Defold excels at. This is more of a goodbye to Chemaria.

P.S. Final asset updateā€¦for now

I have updated all of the gameā€™s non-UI assets since the last devlog update. Feel free to check out the latest master branch for these changes!

8 Likes

Thanks for the post and sharing your experience. Obviously quite bittersweet. This part made me happy though:

:slightly_smiling_face:

4 Likes

@gamzwithjamz Thank you for sharing your experience and thoughts! The first project, a dream project is always the toughest, you have a lot of enthusiasm and ideas, but actually learning a lot of things. Lifeā€™s going on and itā€™s pushing more and more on your back, so getting back to the project is very hard. When I started my journey with Defold I was a student and I needed to defend my Masterā€™s thesis - I thought this is hard to deal with. But life quickly verified it, I have now wife, two smart and joyful kids, a home, a great job and I care about it all, having only a little break at night, when I could add some small part to my dream realization. As the time passes you feel more and more upset, that it takes so much time and you still donā€™t see the end - this is not helping to keep enthusiasm. Bear in mind that your decisions are made by your priorities, so think about it, if it is bad that you do so or are you actually happy with all the other things you are doing - developing your career, home and relationships. Without being a professional gamedev or having a lot of time for this, treat it like a hobby, that is a pleasure, not a duty :slight_smile: And yes, I hope youā€™ll find some time to continue working on it! :wink:

5 Likes

This is a little sad. But it can be hard to let go of something that holds lesser passion for you than when you first started. Its a very common issue with game dev. Have been mucking around professionally and non-professionally in the game business for some 30+ yrsā€¦ I really feel for you. You would not believe how many commercial games go through this same problem due to so many reasons: publishers mood changes, market demand changes, tech changes, developers literally wear outā€¦ and many more. So dont feel too alone in this spaceā€¦ andā€¦ I would like to sayā€¦ it comes back. What does?.. the passion for the same idea. Give it time to swirl around in your head, write notes, write ideasā€¦ tinker with simple little ā€œtest ideasā€ that would fit well in the game. Over timeā€¦ you might find yourself writing enough ā€˜partsā€™ to make the whole quite achievableā€¦
Alsoā€¦ look to the communityā€¦ Defold is utterly brilliant for thisā€¦ reminds me alot of the early Unity3D days (circa 2006 ish) where the community and the people were really passionate and really invested themselves into helping others and sharing. Its a big thing to haveā€¦
Good luck with the futureā€¦ I hope you get back to your game sometimeā€¦ I might have a peek :wink:

5 Likes