Use word wrap
Sonic X(treme) Version 5 :2000
Web page : www.geocities.com/siliconvalley/haven/1631/qbasic.html
Please send all correspondence regarding this release to my email
address at prodigy_2000@start.com.au.
Also, send in any levels you make. Having people send in levels
makes updating this program seem worthwile. Send levels instead of
money
All the *.bmp files should be in the sub directory pics.

Sonicx.bas:
Sonic X(treme) source code for use with QuickBasic 4.5. This is the way
it is meant to be played.

Sonicxqb.bas:
Sonic X(treme) source code for use with QuickBasic 1.1
Please note that this doesn't feature collision detection of objects 
and is missing quite a few frames of animation. Also, many levels
will be unplayable because they require more memory then qbasic can  
handle. I really suggest that you download quickbasic 4.5, I have a link 
on my website at www.geocities.com/siliconvalley/haven/1631/qbasic.html.


Winsonic.exe
Sonic X(treme) Version 5 :2000
Usage:
Winsonic.exe [(level file).lvl] [-sound]

This program basically edits the script.ini file before running 
sonicx.exe. In windows, you can drag a level file onto the
winsonic.exe icon and let go. This will run the level you dragged
and dropped. In dos, just type Winsonic.exe (level file).lvl




SonicX.exe
This runs *.lvl files of version 5 standard and is a decent clone of
sonic the hedgehog on Megadrive(genisis).

Usage:
sonicx.exe reads script.ini and runs the level indicated. It has no
command line options anymore. I removed them. To run a new level
without editing script.ini, drag the level file onto the winsonic.exe
icon.



The keys for sonicx.exe 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
Esc           :  ends game
F3            :  toggles joystick mode on and off

v5 revisions :
now runs V2.3 levels as well
better keyboard routines. You can now hold 2 keys at a time.
new animations
Unlimited textures
Faster rendering
animations
rings
sigpost
power ups
springs for super jumping
object collision detection
score counter
time counter
ring counter
live counter
all the counters use the same font as the original sonic version.
speed optimisations
miscellaneous updates of utilities

v 2.3 revisions :
graphical anomolies in tilemapd have been fixed
graphical anomolies in sonicx have been fixed
text in sonicx.exe now blends in with background.
sonicx now has a maximum fps of 20 fps, which allows the game to become playable on high end computers.

v 2.2 revisions :
speed increase
mega CD mode
better collision detection
joystick support

v 2.1 revisions :
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









Level files:
The included level files is pitfall.lvl. Please note thatit doesn't work
with the qbasic 1.1 source code. This is because qbasic 1.1 has very little
program memory. The level will work in SonicX.exe or the
Qbasic 4.5 source code. To run a level, edit script.ini and type the
filename of the level you want to load in the appropriate place.Close
the file and run the source code in your favourite environment. Search 
for chdir and change the corresponding string to the directory you have
installed it to. Then you are ready to run the program.

Tilemapg.exe
Level editor Version 5 :1999
Usage:
Tilemapg.exe [(level file).lvl]
This program creats level files of version 5 standard that can be run
using sonicX.exe. It requires a texture file to work. Included texture
file is default.tex.

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
Op         :   Object 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 
Object placement mode     : Probably the most important mode in the game, at least in terms of                           : playability. It allows you to place objects such as rings, extra                           : lives, or even springs into the level.
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.
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 winsonic.exe icon.
2, if your in msdos mode , type winsonic.exe followed by the level file 
   eg winsonic.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
Esc           :  ends game
F2            :  toggles on screen messages on and off
F3            :  toggles joystick mode on and off
F4            :  toggles between mega CD and megadrive mode.


Levelch2.exe
Level updater Version 1 :1999
Usage:
Tilemapg.exe [(level file).lvl]
This program updates level files made from previous releases of the 
level editor to the new version 5 standard. This should please a
great many of you. 

Tileedit.exe
Texture editor Version 5 :1999
Usage:
Tileedit.exe [(texture file).tex]
This program creats texture files of that can be run in Tilemapg.exe
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
arrow keys:
up scrolls up
down scrolls down
left scrolls left
right 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
picture with arrow pointing left :   load previous tile in file:
picture with arrow pointing right:   load next tile in file    :
blank a4 page                    :   create new tile in file   :
disk                             :   save current texture file :
none                             :   load a 16 colour bmp      : shift and l
none                             :   hide bmp , show bmp       : F9
none                             :   end program               : F1 
none                             :   scrolling                 : numpad keys
------------------------------------------------------------------------------------------------
    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 previous tile      : Skips to the previous 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.


The long explanation of Version 5:
This version of sonicX(treme) features a fundamentally different 
rendering system which works much better then the previous versions. In 
this release, all the texture information is stored in a single array
from which each texture can be identified and sent to the rendering sub 
system. In the previous versions, each texture was stored in a single 
array, so that in effect there were 14 arrays that just held texture 
information. This proved to be extremely ineffecient not just because
it only allowed for 14 textures but also because it took up valueable 
program memory in the qbasic environment. Now that there is only one 
texture array, i have been able to introduce an object array which 
stores animations of the objects from "sonic the hedgehog" on genisis.
Something about this release which is worth mentioning is that for each
texture, it is drawn in all parts of the level simultaneuosly.