Hi all, I'm new to the unity community and I would like to understand how to create a feature. Actually, I m developing a 2D shoot em up game and I would like to create a system that has "infinite" levels. What I mean is, the map will be always the same, but the eniemes number will change every level. So, for level 1, the player should kill 10 enemies, after that the game should load level 2 (same map with different number of enemies). Is there a specific way to do that? For now, in my mind, I thought that I could just save the level number somewhere and everytime I load the map create X enemies depending on the level variable. Any better idea? Thanks, Davide.
Hi Davide, Welcome to the Unity community! This will probably require at least a tiny bit of scripting. I recommend posting your question in the Scripting section. Design-wise, if the map is always the same, you can use the same scene. When the scene initializes upon loading, spawn a number of enemies based on the level count. When the player defeats all the enemies, increment the level count and reload the scene. You can get pointers on how to implement this in Scripting.
Thanks for the reply. I think that I will be able to handle the scripting part, in case of any problem I will surely ask there. I was just searching for an idea thanks again
I discovered this through a quick google search: https://gamedevelopment.tutsplus.co...-generated-dungeon-cave-system--gamedev-10099 The method is generally called "procedural content generation", and it involves math, algorithms, and to some extent data structures. Rewarding though it an be tough for someone not well versed in these things.