Daily Events and content changes

Hello,
I want to add some daily event in my game.
It’s a puzzle game with a normal level progression system. After level 1 is completed, level 2 in unlocked and so on.
But I wanted to add some bonus levels that would change daily, so players have only 24hours to complete them to get an achievement.
After 24 hours the bonus level changes. It would be like a daily time event.

The problem is that in my game every level is in a different scene. So I would have to create one different level a day and publish a new update with the new level.

I obviously don’t wanna do this, since it would require to submit a different app version to Google Play every day.

How can I do this?

The first idea that came into my mind is that I include like 7 additional levels in the build and then every 24 hours I change the bonus level to be one of those pre loaded levels.
I would have to update a new version every week, if I put 30 levels in the build, once a month but

Is there another way to achieve this?

Thanks in advance

I haven’t done this, but it should be possible to download scenes from a server and then load them dynamically. I believe the current recommended approach is to use Addressables.

You can probably also do this using asset bundles.

Of course, it would probably be more efficient if you created your own way to serialize and deserialize custom puzzles without using a separate scene for each one. But that might be more work.

2 Likes

Yep, depending on how your game is structured and what is needed for a level, you either need to look into asset bundles that you can download, or some sort of data structure that determines what the layout of your level is and is a simple json file or such that you can download.

Example, we have a word search game out and I just upload a list of words that covers a month and is a simple json file. The scene itself grabs that list and populates the puzzle. I never have to do a new game build and the json file is small.

From experience if a player has to download an update once a week or a month, you’ll lose players. Also, you have no guarantee how quickly Google or Apple will approve an update, so you need to look into addressables, which does use asset bundles, just in a much better way.

1 Like

Thank you both for the replies.

I will look into Addresables and how to use them, but then there is another problem, I have zero knowledge on how to run a server and make my app download new data everyday…

Could you guys suggest me some tutorials on those topics as well?

My levels are complicated from my little experience with Unity. I don’t think I can desterilize / serialize them with simple json or other files.
There are a lot of objects in the scene and many different prefabs that have more child objects.

The reason why I have different scenes for every level is that I use the Unity Tilemap with around 100 different Tile sprites.
So even if some prefab are the same across the game, the Tiles layout is different every level.
I don’t know if I explained myself, if you are curious the game it’s called DOTsZLE on Google Play.

Thanks again.

Hey @Brathnann you said you were already using addressables so I would like to ask you some more tips.

I looked up Unity tutorials about addressables and already started to re-structure my project to use of them(I have a back up from the previous build obviously).

Now I need to choose an hosting service. What hosting service are you using? Can you suggest me one? (google cloud, amazon, microsoft)

As a solo developer I would like something free, but obviously all the free subscriptions to these services have limits on how many data and download are used per month.
My concerns is that if i choose one of these services and my playerbase increases(It’s not likely to happen but who knows) I will have to pay for those services and since I can’t afford that at the moment, users will not be able to play my game.

Do you have any other tips about these concerns?

Thank you.

The free options might help at the start if you’re short on funds. That might help you get through until the game generates some income.

We use keyCDN for a huge chunk of our stuff. However, you do have to pay $49 when you need to add credits. I’m not sure if they still do this, but credits use to expire after a year. But that might be enough for you for now.

I’m not aware of any unlimited free option.

1 Like

Thank you.

While looking into the matter myself I found this thread.

https://discussions.unity.com/t/794402

It seems that it’s possible to use addressable with Google Play asset delivery.

1 Like

Whatever you do I highly recommend staying away from writing code to pluck individual pieces and chunks out of an asset bundle and putting it into your game at runtime.

The reason: there are a staggering number of ways this can go wrong, and it becomes a REAL pain to maintain, just a complete disaster going into the future. Utter trainwreck. Stay away. Fear. Loathing. Discontent.

Instead, simply load an entire scene out of Asset Bundle or Addressible. That way when you update the scene and decide to update the downloadable, 100% of everything the scene references just gets automagically sucked into the bundle merely by being used in the scene.

Once you go scene, you never go back.

Also, additive scene loading is another possible benefit:

A multi-scene loader thingy:

My typical Scene Loader:

Other notes on additive scene loading:

Timing of scene loading:

Also, if something exists only in one scene, DO NOT MAKE A PREFAB out of it. It’s a waste of time and needlessly splits your work between two files, the prefab and the scene, leading to many possible errors and edge cases.

1 Like

Thank you for this detailed response.

Yes I was going to use addressables only for level scenes.

Since you seem to know the subject pretty well I’ll ask you some more questions if you don’t mind.

For my first build I used normal scene loading and LoadMode.Single.

Every thing I needed to was included in every level scene. Besides the level tilemap grid and I have all prefabs for Camera, UI, gameobjects and so on. In this any level can be tested on it’s own.

I have started to make a different build with multiple scenes. There are some scenes that will not be addressables.

  • Main Menu
  • Level selection
  • EndGame scene
    All the other levels will be addressables.

In the build with multiple scenes it’s more difficult to test levels as I have always to start with another scene, and there are also double camera, audiosource problems, as well as other complications like these.

Do you think t’s better that I keep working on the multiple scene build or the single scene build it’s gonna work as well?

Thank you.

I think multiple scenes are definitely worth chasing. You need to make everything in your game tolerant of perhaps not having stuff ready at the same time, and you have to track things that you need only ONE of:

  • Camera (Main)
  • Audio Listener
  • EventSystem

I like to put all of those in the BASE scene if possible, then load other scenes like UI and pause and the level itself, etc.

You have to sort of figure out which works for you. You can actually make Start() be a coroutine too, such as looking to find the player spawn position which might not be ready yet:

private bool ready;

IEnumerator Start()
{
  ready = false;
  while( !ready)
  {
    // (however you do the following)
    PlayerSpawn = SearchForPlayerSpawnPoint();

    /// if we find it, then we are ready
    if (PlayerSpawn)
    {
     ready = true;
     break;
    }

    yield return null;
  }
}

void Update()
{
 if (!ready)
 {
   return;
 }
 // do your normal update stuff here...
}
1 Like