itch.io is community of indie game creators and players

Devlogs

Adding a seamless level system

working title
A browser game made in HTML5

For this release, I wanted the ability to easily define levels as data, so as to easily create, scrap, or otherwise rework levels.

I decided to go with a very simple level system. Each group of obstacles is defined as such:



       Section[] levelXSections =
        {
            new Section("cwp", 1, 10),
            new Section("pwc", 1, 10),
            // ...
            new Section("pwc", 1, 10),
            new Section("cwp", 1, 10),
        };

We then just store the sections array inside the levels list and iterate through as the player progresses.

This lets us dictate any obstacle section with a simple string.

c = cyan, w = white, p = pink, etc...

The two other values are time between obstacle spawns and speed of movement.

Files

  • Build.zip 14 MB
    Jul 24, 2019
Leave a comment