Training Tutorial Zone Map > Act 1 > Act 2 > Act 3 > Act 4
Now back to the "Level editing screen"...
- 1: Setting up the Tiles
"but where do i get them"?
In the the mystical forest zone
- very good for sonic related stuff -
- pretty good for almost... everything -
For this, you can use softwares like GIMP, Paint.net or Photoshop or doing the hard way by not using any of those at all.
But it's really recommended that you use one of the softwares mentioned up there.
Anyway, i'm not teaching you on how to get the tiles from the sheets, that is a basic you can learn anywhere just by learning how to use the selection tool and Ctrl+C and Ctrl+V...
ok, now you have the tiles and want to put them into your level.
there is 2 ways to do that.
1: as you can see, the engine has some folders on a window at the side of the screen, try to find the Level_HardTiles folder, then double click on one of those tiles. you should see a window pop up.
Just click here:
it will pop up another window and with it, select the tile you want.
good, now you have replaced that tile with another one and now you already have an idea on how to build a level.
2: and there is another way> by adding a new Backdrop or an Active and...
- 2: Backdrops and Actives
ok, now all you have to do is Double Click the gray background in the "Level editing screen" and... see? those are the objects!
but dont get too much excited to know that you can add .avi files, this isnt a good thing actually.
there is 2 objects that we are going to look in this tutorial:
The backdrop
and...
The Active
"whats the difference"? well, quite a lot
A Backdrop is a object that can't be animated or programed, it is there to be there, for an example most of the titles (the green blocks) on the level are backdrops with Obstacle set in its proprieties
An active, well is... quite a lot, From the player, to tiles, badniks, gimmicks and pretty much everything that has to be programmed, have values and animation.
"But why use backdrops if actives are a lot better"?
because they use a lot of your memory, the more backdrops you use and the more you avoid using actives, the better
oh, you can still put a lot of actives but remember, Rings are also actives and you will put a lot of them.
2.1 - Collision
"So, i've added a backdrop and it's not colliding with the player, what do i do?"
take a look on its proprieties (it's a window usually on the side of the screen and if it's not there, just go to View > Toolbars)
you dont have to know the name of all of those, just click on them and explore what they do.
And to add collision, just go to the 4th icon and set the Obstacle type to Obstacle... and... done!
"well, now, how do I do the same but with actives?"
The properties of an active are different from a Backdrop
2.2 - Qualifiers
As you can see there is a lot more in an active than in the backdrop
but that also means it will be even more complicated...
anyway, lets look at this window first, and as you can see, there is a 0 on the Qualifier(s) line, wich means that this Active has a solid collision with the player and if there isn't anything, the Active has no interaction with the player unless you program something in the events editor.
ok, now click the 0 and the add in the window that pops up, you will see a lot of qualifiers. Let me explain what some of those things do:
0: Solid Collision
1: A platform, you can only collide with it from the top
Also, all the objects in the Level_Platforms Folder have this qualifier
2: "No rotation", if this is applied, sonic will not change its angle when walking on it
3 and 4: Those actives are used to make Loops and some few more things...
- 2.3.1: Loops
- And "Layer Switching"
Yeah it's time to work with the most recognisable thing in sonic games, Loops!
dont even try doing such a big loop
It's actually very simple to work with it
See those red things with an 0? if Sonic touches them, he will not collide with the blue tile and will collide with the red one and when he touches the
one at the top, he will switch from RED TO BLUE and for the blue things with a 1 the same as the red ones but you collide with the blue tile instead of the red one.
but where the 3 and 4 get in?
the red tile, which is an active has the 3 qualifier and the blue has the 4 qualifier... and that is pretty much it.
- 2.3.2: Moving Platforms
you can find them in the Level_MovingPlatofms folder
ok, this is one of the most usefull thing in this whole engine, you can make a lot of things using those, to plataforms, to badniks and bosses.
but anyway, how does it works? ... i dont really know for sure but let's take a look
for an example, this is a platform that moves in circles
Thankfully the guy who made the code for this object, Damizean, did in a way that you can program what you want the moving plataform to do by just changing those values.
if you are very very good with math, you will understand this very quickly, unlike me, who just puts some values at random to see what happens.
Anyway, DW in the SFGHQ forums explained those. hope you understand it
InitialAngle: What angle is used for the sin/cos value to start with. Just refer to your unit circle. The important thing to be aware of is that if you shift this by 180 degrees, you'll have a platform moving at the opposite clip of what it would be if you used 0. That way you can make it so that platforms move in a way that they will sync up with one another.
AngleStepX/Y: Value added to the trig angle each frame for X/Y. Increasing this makes the platform complete it's path faster in a given direction. Decreasing it makes the path complete slower.
DistanceX/Y: Kinda obvious, but the amount of distance covered by the platform.
Cos/Sin: Whether the motion uses sin or cos to determine current position. This is only important because the 0 angle for sin starts in the center while for cos it starts high.
- 2.3.2: Common Objects
knowing what those things do is pretty usefull when trying to create new gimmicks. alright, lets cover all of those guys:
1: Rings, monitors, springs, spikes, lava and air bubbles: they are pretty easy to handle and you probably know what they do already
2: Enemies: i'll cover this when we get to program a badnik from nothing
3: Speed Pads: they make you go really fast... just dont abuse it or else people will call your game DIMPS-ish even if the level design is actually really good.
4: Breakable Stuff: ya know, those walls that break and all of things like that, the code in this is very usefull if you want to make any object fly off.
just explore it a bit, it's worth it.
4: Switches: you press them, something happens. like the one above, exploring it it's very nice thing to do
- 3: Making a Badnik from an Active
A bit too big for this page: [Click here to see this tutorial]
- 4: Music
yeah, it's time for music! but, how do you do it?
go to the Music group and find this line of code
see those things in red? those are the ones you need to replace.
you can do it in 2 different ways:
1: Here:
but if you do so, you will just replace the "Foliage Furnace - Act 1" track and not actually add anything
2: This is how we are going to do it, first Double Click the Foliage Furnace - Act 1
them, this window should appear
Click in the thing highlighted in red, select the music track and yup, there you go
BUT MMF2 doesnt support MP3! "now, what do i do batman"?
you have to find a way to convert you music files to a .ogg or .wav
though .ogg is very close to an .mp3 in file size and quality
- 5: Parallax
Parallax is a fictional comic book supervillain in the... NOPE!
Parallax is distance measurement in astronomy... NOP... well, yeah, kind of
In sonic worlds it's a Background that moves in a different or equal speed than the foreground (where sonic is standing)
it uses the Background System Box object in a very wierd way
let's go step by step:
1: first, to get you started, make every layer invisible, by clicking the eye icon on the layer toolbar, except for layer 1
2: you will see just one object on the side of the frame, it's red-ish and it's a bit wierd, let's clone it! how?
Right click it > Clone > ok
"but, why"? simple, there is some code related to that object, the code makes it shine in red around the borders and i dont want that in my way.
And also, the object has a qualifier that we need in order to the parallax to work.
3: Double click it, you will see a window and right on the top there is something called Fill Color. set it to None and on the image section, click on edit
you will see the same window you saw when adding a tile, now you know what to do, just get the image you want for the background and... WAIT!
see those things in red? memorise them...
and now click OK to everything you see until you arrive back at the frame window
4: your image seems a bit wierd now isnt it? "Batman, help me!"
hey, did you memorised those numbers? now go to the object's proprieties
and set its wide and height to those values.
5: now, let's make it a actual PARALLAX
first, go to the events editor, scroll down the page and click the new condition.
Double Click the first object in this list and click on always.
then, below the always, you will see the "insert new action here"
click it and try to find the parallax object in the middle of all this mess... yes, try to find it, i'm not kidding.
After you have find it, Double click it and go to Alterable values and click on Set.
Yes, we are going to change some of its values
the values we are going to change are the D and E
D being the X scroll and E being the Y scroll. but for now, lets just change the D value
now, let me explain something, the higher the value, the further away it is from sonic, but the highest value you can use is 1.
-1 ..... (Sonic) 0............................................1 (far away in the BG)
yes, the values you are going to set are between 1 and 0, like 0.5, 0.3.
but for now, set the D to 0.9
now, Ctrl+C and Ctrl+V the "set D value to 0.9" but this time set the E value to 0.9 but be aware, if you test the frame and lose sight of the object dont get afraid, it's just in a place you cant see it.
in the end, it should look like this
ok, this is it for now!
see ya later