Make a level to my game!
-
Hi!
I recently released a new version of my game The Key to my Heart. Download ID: SK8M3MND5C.
I had the idea of making it a challenge to the community to create some new levels for the next update! It could be fun!
All proper levels that get sent in will be added in the next version.
When I created my levels I did lots of trial-and-error to make them fun, but you can also map them up on paper and then try to recreate them in the game. Here is what you need to do to create a level:
-
Download the game using the Download ID.
-
Comment out line 35. This will keep the intro animation from showing which makes it quicker to try out your level.
- Find the bookmark called “Level template”. Go there and copy all the code inside the comment.
- Go to the bookmark called “setupLevels”. Paste the code after line 438. (Before where it says
// Level 0
.)
- Pick a colour for the line and add it where it says
.col = ?
.
- Set the start point. Here you can use the function
toScreenCoords()
if you want to use sprite coordinates instead. This will be the location where the key starts.
-
-
- Now add the steps that form the line. Change where it says
[n]
to a comma-separated list of steps in different directions. n means north, ne means northeast, e means east, and so on. In my example, the line goes west for five steps, northwest for three steps, and then north for three steps. The heart will appear where the line ends.
- Add the enemy saw-blades! Add data to the
lvlEnemies
struct like in the example. First comes.pos
which is the coordinates for the enemy, then comes.amount
, then.amp
which is the amplitude for the movement in {x, y} format. Set x to zero to have only vertical movement, y to zero to have horizontal. Set both to the same amount to have circular movement..frq
is the frequency, or movement speed in {x, y} format. 0 means no movement on an axis, higher numbers means greater speed. Use negative numbers for backwards movement..delay
is how close together the enemies will appear. To get an even spread, calculate the delay as 360 / (number of enemies).
So here is how to add two saw-blades moving in a vertical motion:
Let’s add three more that spins around in a circular motion:
- Now add the steps that form the line. Change where it says
-
- Finally add some trees by adding data to the
lvlTrees
struct. I’m using an asset that has got over a hundred different trees, so just try some different numbers for.no
until you find some that are suitable..pos
is the location, and here too you can use thetoScreenCoords()
function if you want to use sprite coordinates for the trees.
Let’s add two trees to our little level:
And there we have it. Our little test level is complete and ready to be played. Just repeat the steps to add in even more levels.
When the level is finished, please friend share it with me. My friend code is SW-2920-4811-2229.
- Finally add some trees by adding data to the