Sonic level editor version 2.1 (c) 1/1/1999 Joe 
use word wrap under the Edit menu
files in this zip file are:
these should be in the directory you installed it to;
sonicx.exe
sonicxws.bat
tileedit.exe
tilemapc.exe
palette.exe
sbmidi.exe
sbsim.com
sbsim.cfg
level.ini
script.ini
tile.ini
space2.lvl
space.tex
space2.txt
icecap2.mid
readme.txt
these should be in the sub directory \pics\
a.bmp
bg.bmp
color.bmp
level.bmp
sonic1b.bmp
sonic2b.bmp
sonicb3.bmp
sonicb4.bmp
test.bmp
toolbar.bmp
toolbard.bmp
icon.dll

v 2.1 revisions :
sonicX.exe now fetures drag and drop windows support. Simply drag a 
level file onto sonicx.exe , and it will run that level.
some bugs with the tileditor have been fixed , but you must save the first pic you draw , or it will stuff up.
fixed some bugs in sonicX.exe
includes a much better level
enhanced tilemapc.exe

This is the second version of the "user friendly" level editor for SonicX(treme). It will only work with the version 2 and above of sonicX(treme) because it uses a totally different engine than the first version. This package lets you design a level of sonic the hedgehog and play it !. There are 3 executable files necessary to build a level and they are  Tileedit.exe, Tilemap.exe and Sonicx.exe.

Whats New ?
*There are still only 16 colours, but the palette has been increased to 90.
*Sonic looks closer to the megadrive version
*There are now 4 scrolling levels
*The new graphics engine lets sonic sprite go to any height on the screen, It isn't stuck to the 
middle of the screen.
*Sonic can jump onto another platform.
*There is a wall mode and a spike mode in the level editor.
*I have compressed the wall.txt ,start.txt, loadtile.txt, editinfo.txt, gradient.txt, spike.txt,
platform.txt and boundary.txt into one level file with a .lvl extension. This level file doesn't
contain the texture file , but specifies it's name. So to load a level into sonic X(treme) you
need a level.lvl file and tile.tex file
*Sonicx.exe now has a script.ini file that allows you to change game settings and to specify 
which level to load. open the file for more information
*The tileedit.exe program now has an advanced GUI and an undo function. It now draws the tiles
like Microsoft Paint does, ie ,to draw a line press and hold the left button and move the mouse
to the desired position before letting the button go to complete the line. Also ,the line would
now be drawn while your drawing it.
*Tilemap.exe (the level editor) is totally mouse driven and has an advanced GUI.It supports 2 
new level control functions , spike mode and wall mode ,3 new scrolling levels, multiple level
undo and a map mode.The map mode lets you zoom out of the level, in case you get lost, and
lets you zoom in again.
*Midi files under 100 kb are now supported for sound blaster compatible cards.

Tileedit.exe allows you to draw tiles to use in the game.  You must not enter the same name twice . Doing so will cause an error and you will have to delete the .tex file and the tile.ini file
to get it to run properly again. 
the keys are; 
F1  ends the program and saves the tile 
F2  changes the colour to the next colour
F3  changes the colour to the previous colour
F7  deletes all the tiles and ends the program
Numpad keys; make sure num lock is off
8  scrolls up
2  scrolls down
4  scrolls left
6  scrolls right

All the drawing is done through the mouse. The first point is taken by left clicking (hold it
down) and the second point is taken from letting go of the left click. 

There are a couple of different modes that can be selected by left clicking an on screen icon.
--------------------------------------------------------
Icon       :   Mode                    :Hotkey
--------------------------------------------------------
Eraser     :   Undo                    :  U
Eyedropper :   Select colour mode      : none
Pencil     :   Free draw line mode     : none
Line       :   Line mode               : none
Paint tin  :   Paint mode              : none
Box        :   Filled box mode         : none
Polygon    :   Square box mode         : none
Circle     :   Circle mode             : none
Folder     :   Load or create new file : none
none       :   Load next tile in file  : shift and a
none       :   load a 16 colour bmp    : shift and l
none       :   hide bmp , show bmp     : F9
none       :   end program             : F1 
none       :   scrolling               : numpad keys
none       :   Enter palette editor    : Shift and P
------------------------------------------------------------------------------------------------
    Mode                :           Explanation
------------------------------------------------------------------------------------------------
Undo                    : Undoes the last action.
Select colour mode      : Left click a point on the screen and the current colour will change to
                        : the point's colour
Free draw line mode     : Hold down left click and drag the mouse to draw the lines.
Line draw mode          : Hold down left click and drag the mouse to the desired position. 
                        : release the button to complete the line.
Paint mode              : The paint mode will only work well if its enclosed in a boundary of 
                        : it;s own colour , such as in the centre of a circle. Be warned that if
                        : it's boundary of it's own colour isn't surrounding the paint point then
                        : the whole screen will be filled by the colour.To paint , left click the
                        : mouse.
Filled box mode         : Hold down left click and drag the mouse to the desired position.                               : Release the button to complete the filled box.
Square box mode         : Same as filled box mode except that it draws a filled square.
Circle mode             : Left click the mouse and drag the mouse before letting it go to set the
                        : radius.
Load or create new file : Loads another .tex file or allows you to create one.
Load next tile in file  : Skips to the next tile in the .tex file so that you can reedit tiles
                        : you previously made.
Load a 16 colour bmp    : Loads a 16 colour .bmp file into the background so that it can be
                        : traced. 
Hide bmp , show bmp     : This allows you to make the .bmp picture in the background appear and
                        : disappear at will so that you can check on your drawing.
end program             : Ends the program and saves the loaded tile.
Palette Editor          : Use the numpad keys to select colours to change. Press R, G, B, to 
                        : increase the saturation of Red , Green and Blue respectively. Press Q
                        : to see the colours which the sonic sprite doesn't use. Press Escape to
                        : return to the Tile editor.  
 

You can draw tiles bigger than the screen by scrolling using the numpad keys, but the bigger the tile , the slower the game may run.
The more individual lines , boxes and circles in a tile , the more memory the tile will take up and the slower the tile would be in the game.
Remember that when a tile is rendered in the game it is drawn the exact order you drew it, circle by circle and line by line.
At the moment , only a maximum of 14 tiles can be used in the game due to program memory constraints. 


Tilemap.exe allows you to create a level of sonic the hedgehog by using the tiles you made in the 
tile editor. It also allows you to implement events at certain pionts in the game like selecting where sonic starts using the start function or allowing sonic to run up a hill using the gradient function. In order for tilemap.exe to start , it requires that at least one .tex file has been made using tileedit.exe. An error could also occur if a level had been made , but the .tex file  had been deleted or replaced. 
There are a couple of different modes that can be selected by left clicking an on screen icon.
--------------------------------------------------------
Icon       :   Mode                    :Hotkey
--------------------------------------------------------
none       :   Undo                       :  U
Tp         :   Tile placement mode        : none
Bp         :   Background placement mode  : none
Mp         :   Midground placement mode   : none
Ep         :   Endground placement mode   : none
Flag       :   Start mode                 : none
Z and line :   Zero gradient mode         : none
Slope line :   Gradient mode              : none
W and line :   Wall mode                  : none
Folder     :   Load or create new file    : none
S and line :   Spike mode                 : none
none       :   Delete level               : F7
none       :   End program                : escape or F1 
none       :   Scrolling                  : numpad keys or arrow keys
none       :   Next tile                  : F8
none       :   Load a midi                : m
none       :   Map mode                   : z

------------------------------------------------------------------------------------------------
    Mode                  :           Explanation
------------------------------------------------------------------------------------------------
Undo                      : Undoes the last action. 
Tile placement mode       : In this mode , You place the tiles that are in the same zoom level as
                          : sonic. To select a tile, press F8 Once you have selected a tile you                            : can set it in the desired position by using a mouse and clicking on                            : the left mouse button. 
Background placement mode : In this mode , You place the tiles   in the zoom level behind sonic                            : and far away. To select a tile press F8 . Once you have selected a                             : tile you can set it in the desired position by using a mouse and                               : clicking on the left mouse button.
Midground placement mode  : In this mode , You place the tiles in the zoom level behind sonic but                           : closer then the background tile mode. To select a tile press F8 .                              : Once you have selected a tile you can set it in the desired position                           : by using a mouse and clicking on the left mouse button 
Endground placement mode  : In this mode , You place the tiles in the zoom level in front of                               : sonic and about as far away as the midground mode. To select a tile                            : press F8. Once you have selected a tile you can set it in the desired                           : position by using a mouse and clicking on the left mouse button 
Start mode                : In this mode ,You set the starting place of sonic in the level. Move                           : the mouse cursor to the desired position and left click the mouse 
                          : button.
Zero gradient mode        : In this mode ,You set the boundary for each platorm that sonic walks                           : on. Sonic can jump from one platform to another if the boundaries are                           : set.If the boundary isn't set at all , sonic will just fall through                            : the platform. To set the boundary, left click the 1st point on the                             : platform and hold the button down as you move the cursor to the 2nd                            : point on the platform. Release the button to set the boundary.This                             : mode should only be used if the platform is flat. For diagnal 
                          : platforms , use the gradient mode.
Gradient mode             : In this mode ,You set the boundary for each platorm that sonic walks                           : on. Sonic can jump from one platform to another if the boundaries are                           : set.If the boundary isn't set at all , sonic will just fall through                            : the platform. To set the boundary, left click the 1st point on the                             : platform and hold the button down as you move the cursor to the 2nd                            : point on the platform. Release the button to set the boundary.This                             : mode should only be used if the platform is diagnal. For flat 
                          : platforms , use the zero gradient mode.  
Wall mode                 : In this mode you can set a wall that sonic can't run through. For                              : instance, you might want to have a wall that connects to a platform                            : so that sonic can't walk under the platform. To use it , left click                            : the first point of the vertical line and hold the button until you                             : find a suitable second point.
Load or create new file   : Allows you to load a .lvl file or to create a new .lvl file.
Spike mode                : This mode allows you to set the boundarys of an object that kills
                          : sonic , like spikes.To set the boundary, left click the 1st point on                           : the object and hold the button down as you move the cursor to the                              : 2nd point on the object.
Delete level              : Deletes all of the level file information so you can re-start the                              : level.
End program               : Saves the .lvl file and ends the program.
Scrolling                 : You can scroll through out the level using the numpad or arrow keys
                          : or the mouse.
Next tile                 : Skips to the next tile.
Load a midi               : Allows you to specify the midi file (under 100 kb) that the level
                          : will play if the sound is on.make sure you include the .mid extension
Map mode                  : Map mode zooms out so that you can see the level from further away
                          : and pinpoint problems with levels.
 
This program isn't perfect and there is a lot of optimisation to be done ,but at the moment there can only be a certain number of things being rendered on the screen at once before it slows to a snails pace.Keep the graphics sparse and draw the tiles conservatively.
Please Note that due to program memory constraits, tilemapc.exe doesn't have the same palette
as tileedit.exe and sonicx.exe,  so the tiles look different. don't worry , it does not affect the game.
If nothing works at all then DON'T PANIC, delete the .lvl file and the level.ini file


SonicX.exe runs the level you have created :)

To make it run a particular level , there are 3 things you can do;
1, if you are in windows , drag the level file on to the sonicx.exe icon.
2, if your in msdos mode , type sonicx.exe followed by the level file eg sonicx.exe x-files.lvl
3, edit the script file and run sonicx.exe 
Here is an example of editing the script.ini file

-------------------------------------------------------------------------------------------------
2
1.15
10
space.lvl

Usage ;
2 = speedvar! 'controls the speed at which sonic decellerates
1.15 = accelerate!  'controls the speed at which sonic accellerates
10 = inispeed%   'Set's the maximum speed achieavable
space.lvl = level$    'level to be loaded
-------------------------------------------------------------------------------------------------
speedvar! is the variable that controls the speed at which sonic decellerates
accelerate! is the variable that controls the speed at which sonic accellerates
inispeed% is the variable that sets the maximum speed sonic can reach
level$ is the string variable of the level to be loaded
I allowed speedvar!,accelerate and inispeed% to be changeable so that some of you would
be able to experiment with it to find the right mix.
To change a variable , match the number with the variable under "usage;" that has the same number
and change the top one.Please note that every thing under "usage;" isn't read by the game.
To change the level , type the name of the level and include the .lvl extension where
space.lvl is.

To play with sound run sonicxws.bat . If there is an error , It is because a midi file hasn't
been specified for the level you are running yet. Just open the level with the tilemap.exe
program and press m to specify a midi file.

The keys are;
up arrow      :  makes sonic jump    
right arrow   :  makes sonic run right
left arrow    :  makes sonic run left 
down arrow    :  makes sonic do the super spin dash if running and makes sonic look down if not
F1            :  ends game




If you like this program or if you want to email me your opinions on it or if you want to send me a level you have made then email me at prodigy_2000@hotmail.com. I will put all levels made onto my page.







