How should I go about level progressing?

Started by
1 comment, last by LAURENT* 7 years, 1 month ago

I've finally managed to start developing smoothly and now I'm at a point where I'm indecisive. I need to choose how will I go about allowing the player to progress through the game. Here are my 3 ideas in detail.

  1. I create 9 files that have the value 0 or 1. they represent rather the levels has been unlocked. When the game load up it blocks the player from entering levels using these until they unlock it beating previous levels.
  2. ?I create one file to determine rather the levels are unlocked, and block the player using this one file. This file is edited when they beat levels unlocking new levels
  3. I code a special method and have this portion of my program directly manipulated every time the player beats a level unlocking the next one.

Which solution sounds the most professional. I don't care about the easiest solution only the one that allow me to mimic professionals.

Advertisement

I don't care about the easiest solution only the one that allow me to mimic professionals.

Generally the professionals choose the easiest solution, or the path of least resistance. Sometimes the easiest solution is to use the one the boss says to use because it is easier than fighting other policies.

The "9 files with values 0 or 1" isn't something I've ever seen.

The "create one file ... file is edited" sounds like a regular save file and I'll touch on it below.

The "special method is directly manipulated" is actually a special case of the second one.

Games usually do create a save file. The contents of the save file depend on the game, but it is enough to load the game to the expected state.

In old console games it was presented to the user as a long sequence of values, perhaps 16 or 32 alphanumeric values. They were usually scrambled a little bit, and contained the current score, the current level, maybe health points or bullets left or whatever small bits of information the game needed to load the next level. Players would write down their code when they finished each level, then they could type it in from the main menu using an option like "continue game". There was an underground pre-Web market of people trying to figure out the codes to see what every bit did.

In more complex and modern games there is more information, but the values are fundamentally the same purpose. In an open world RPG there will be flags, although the details of how they are implemented vary from game to game. Each zone may have a bit array indicating if a treasure is collected; if a key value of the zone is collected then that zone is marked as complete. Another option may be that there is a bit array for the story line which the player doesn't see; when the flag is set then the story line segment is complete. Others may have a number they store, or a few numbers, indicating the current chapter in the story line and the sub-chapter within the story line; game developers can use that to jump to specific chapters easily.

That special case of the program doing something when the player beats a level, that is a method that sets the flag and then saves the game. It might look something like SetStoryFlag(x); SaveGame();

Sometimes there are more complex systems, especially when working with established engines or large companies that have many libraries. They give more options but still fundamentally boil down to setting a flag or storing a number somewhere.

The path of least resistant seems like a double edge sword especially with the work environment example you posted. I did get a new idea from your explanation.

I have one file with a single number. The value of the number represent the how many levels have been unlocked with the max value being 9. Since the game is completed in linear order that should be all I need. Now I feel like a professional and a little lazy.....

This topic is closed to new replies.

Advertisement