Playable Ocarina and Day and Night Cycle

Started by sun_yok, December 13, 2022, 12:49:24 PM

Previous topic - Next topic
First of all, I want to thank all of y'all!! Just found out about Solarus this weekend and this is a blessing, I've been trying to do an idea of a game for years and only with two days using Solarus I already achieved a long time dream, now I'm switching my game to Solarus, I already made some progress on other Engine, but now I want to find out the way to do on Solarus, if y'all can help me I will be very grateful

I want to create a day and night cycle that works in: day and night/30days/4weeks/4months, anybody knows how to achieve it?

And I also wanna do a playable ocarina

I never programmed in lua, actually, the only program that I ever programmed with was RPG Maker, but I already achieved things in Solarus that makes me feel like when I was trying to learn RPG Maker when I was young.

Well, any help would be great, because I am trying to make my game works for at least 8 years, hope I finally have found a way to do it trough Solarus :)

December 13, 2022, 04:48:12 PM #1 Last Edit: December 13, 2022, 04:56:15 PM by Christopho
Hi! Nice to see that you enjoy creating your game with Solarus and that you are making progress :)

One way to create a day and night cycle is to use timers. You can create a timer that fires every X milliseconds, where X is the length of a day in your game. When the timer fires, you can increment the current time of day and update the lighting and music in your game accordingly.

To create a playable ocarina, you can use the input system to detect when the player presses certain buttons on the keyboard or gamepad. You can then use that information to play a sound effect and display a visual effect on the screen to simulate the ocarina being played.

If you have not programmed in Lua before, it may take some time to learn the language and understand how to use it with Solarus. I recommend the Programming in Lua online book for that. Once you know some basics about Lua, good places to help you get started are the Solarus tutorials and documentation, the forums here and Discord.

I hope this helps and good luck with your game!