Adding a seamless level system


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 Play in browser
Jul 24, 2019

Leave a comment

Log in with itch.io to leave a comment.