Project Spark Wiki

Side scroller basic set-up

233pages on
this wiki
Add New Page
Comments0 Share

So, after receiving a great deal of help here at this forum in developing my game, I decided I’d give back, and go over what I’ve learned to create a guide to making a Side Scroller action game, such as Megaman, and Mario. More so Megaman. If you’re lazy, and just want to remix something, you can look up the finished level under Side Scroller Template, under my Gamertag, Klaus Aidon.

Creating the level If you already have the level you want set up, feel free to jump to the Kode part of the tutorial below. To start, I heavily recommend starting with an empty world. It will make things a lot easier as you build the game up. Drop your hero somewhere on the left side of the world. Although it’s not necessary from the start, if you plan on making something big, it would be good to delete most of the world using the subtract tool. You only really need a narrow, long sliver for a side scrolling platformer, and “cutting out the fat”, will give you most space to create larger levels. You definitely don’t need any map where the camera won’t see.

Here’s a screenshot, with a visual reference.

Kode Ok, now let’s get into some Kode. Use the 3D action adventure brain as a base. Now the first thing you should drop in you character is the Camera. So replace the “Follow Camera” tile with:  When [] Do [Boom Camera] [Pitch] [0] [Yaw] [270] [distance] [20] [ignore camera collision]

Test it out, and you should see something like this:

Well there you go, you got yourself a side scroller. Huh, you wanna to do more? Well I suppose we should make the character act more like a platformer character.

So let’s get him moving in a 2D. So, in your player’s brain, find the Kode:  When [Left Stick] Do [Move] And adjust it to look like this: When [Left Stick] [Pushed Right] Do [Move] [in Direction] [East] Than go ahead and copy that previous line, paste into a new line, and adjust it like so: When [Left Stick] [Pushed Left] Do [Move] [in Direction] [West]

Test it out, and the player should only move left and right now. Now using the left stick code, will also automatically make A and D work on keyboard. However, optionally, if you’re like me, you’ll want to make the keyboard controls use the arrow keys. That’s as simple as adding in two more lines similar to the last but replacing the left stick, with arrow keys tiles.

Now, you could just plop any enemy in, but you’ll quickly notice another problem. When ever you walk into other objects, or characters, your character will walk around them, which isn’t good. So lets lock the player into the right spot. I recommend turning on the grid by going into the level settings, then turn on snap to grid for this next part. Make a Logic Cube prop. Now to make things in the future a lot easier, you should place this down on one of the darker lines on the grid. You should also move your player in front of this Logic cube. This will make it easier to remember where the player will be walking, when creating your level. Rename the cube to “Z Lock”, and open the player’s brain. Insert a new line of Kode right at the top: When [] Do [Position] [Z] [=] [In world Picker: Z Lock] [Position] [Z]

Place something in the player’s path, and test, and the player should now ONLY be able to move in 2D. Keep that above line of Kode handy, as you’ll need to reuse it a lot. You’ll also want to plop it into the brain of any enemy, or object that might move around. I also put it in coins, and collectible items to make sure they’re in the right spot, and I don’t have to keep moving stuff around.

So let’s take a Biome, paint over the level, make sure to move some of the trees around so there is a straight path for the player, remember to follow the dark line on the grid. Drop in some enemies, make sure to put that Z locking line in their brains. I recommend dropping the water level, unless you plan on using water in your level. Extend the background, or make a wall to make the background. You might just end up with something like this:

So there you have it. Four simple lines, and you have yourself a side scroller. Just drop a few enemies in, create a boss, extend the level out, maybe give the player a few new moves, and you got yourself a pretty cool game. You make something neat out of this guide, please make sure to post the name of it here, so I can try it out.


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.