Super Dot 3 Programmer's Information:

INTRODUCTION:
	This file is for people making their own towers, writing Super Dot 3 hacks (Save game editors etc.) to get some background information about Super Dot 3. It has tips, explains some hidden features of the game along with explaining how the game works inside. (Gee, don't you wish every game had one of these files?). Some of the information in this text file may be changed after the final release of Super Dot 3.

TOWER EDITING:
	This is pretty simple really, just choose what object you want by clicking in the toolbox, then click where you want it to go. Click File-Save As and save your tower. To open your level in Super Dot 3 choose Towers-Open Custom Tower and find your tower. You can edit the levels that come with Super Dot 3, but we recommend that you make copies of the originals first. Even though that is all you need to do to make a tower, you can add more features by using the Variables listed below.
	Their are a few things to keep in mind when you are editing towers. Here  is a list of things to remember:
	-Make sure the first room in the tower (i.e. The one dot stsrts in) has the four middle squares blocks that Super Dot can walk on or has a Dot Start block somewhere in the room. When Super Dot dies or the tower is loaded this pot is where he starts. 
	-You do not have to use 100 levels in your tower. You can have dot reach floor 100 from walking off the screen in any other room (See EXIT ROOM below).
	-It is very important when you make your own graphics to us the Super Dot 3 palette. Otherwise the game will not display correctly on a 256 color screen. To use the Super Dot 3 palette simply load the \pics\SuperDot.pal while using MSPaint. Or if this does not seem to work or you aren't using Paint try editing one of the other images in the \pics\ directory and saving it with a different name. If you save over the pictures already in the \pics\ directory some of the Super Dot 3 towers will not look correct. For more information on custom graphics read REPLACING GRAPHICS below.

	

	ROOM VARIABLES:

		MIDI MUSIC:
			When dot enters a room the music changes to whatever the Midi Music variable has been set too. If the Midi Music variable is blank ("") then the music doesn't change. Their are many  songs available in Super Dot 3. These files are all stored in the /midis directory.	
			You can also add your own music to the Super Dot 3. just put your midi file into the Super Dot 3 \Midi directory (Ex. "C:\Program Files\SDot3\Midi\My.Mid"). Or you can replace the existing midis (We don't recommend this since you can get the same effect without doing it and you will have to reinstall Super Dot 3 to get back the original music.)

		EXIT ROOM:
			To have Dot able to walk off the side of the screen into another room set the values of the Exit On Right, Left, Top, Bottom to one of the following:
	
			0 = Same room
			1 to 100 = Room #
			101 = SDot3E1.tow
			102 = SDot3E2.tow
			103 = SDot3E3.tow
			104 = SDot3T.tow
			105 = Start.tow
			106 = {Exit On Top Value}
			107 = {Exit On Bottom Value}

		ROOM TAGS:
			The Room Tag variable can be used to do things that don't normally happen in a room.
			You can mix effects by adding the two numbers together to get a new number.
			Because of the new custom dialog, you do not need to memorize any of these tags,
			however we have left this section in for more information.

			0 = Normal
			1 = Little light
			2 = No light
			4 = If dot falls, he dies
			8 = Floors fall in a spiral format
			16 = Mecha Dot
			32 = Options Room (Switches in certain positions perform differently)
				(3,3) File-Open
				(3,8) Options-Sound
				(8,3) Options-Music
				(8,8) Options-3dEffects
			64 = Super Dot can not use his ESP (Enter) ability in this room.
			128 = If Mecha Dot falls he dies and you win (no door appears)..

	REPLACING GRAPHICS:
		When you are in the tower editor choose the block you want to change they graphics for by clicking on it in the toolbox. Then type in the name of the .bmp file in the textbox marked New Graphics. If you typed in the file name correctly it will show a picture of it to the side of the textbox. All picture files must be located in the Super Dot 3 \pics directory (ex. C:\Program Files\Sdot3\pics\sample.bmp, you would refer to this file as sample.bmp)
		To get the best looking results you should use the Super Dot 3 custom palette. A copy of it has been placed in the /pics/ directory called SDot3.pal (This is a MS Paint style palette).


SIMPLE HACKS:

	SOUND FILES:

		All sound effects in Super Dot 3 BETA will probably be changed for the final release.

		Their Are Many Sound Effects In Super Dot 3. To Change One Simply Replace One Of These Files:
	
		Bomb.Wav = When Any Item Is Picked Up
		BowlFall.Wav = When A Bowling Ball Falls Through The Floor
		Dead.Wav = When Super Dot Or A Slug Dies
		Excellent.Wav = When You Go Through A Door
		Explode.Wav = When A Bomb Explodes
		Fall.Wav = When Super Dot Falls
		Key.Wav = (Not Used In Super Dot 2, Used In Super Dot)
		Ouch.Wav = Super Dot Or Ghost Is Hurt
		Pop.Wav = Used By The Tower Editor For When A Block Is Placed
		Slug.Wav = When a Slug Moves
		Switch.Wav = When A Switch Is Pressed
		Tbomb.Wav = As A Bomb Counts Down
	
		With Any Windows Wave File.

HOW SUPER DOT 3 WORKS:
	
	Super Dot Three is based on the concept of two main objects. Background objects - these generally do not move. They are blocks which have different effects on the Foreground Objects when the two interact. Foreground objects are all the enemies, bombs (ticking), and Super Dot. They can move, but the thing that seperates them from the Background Objects is that they do something during a timer event or (in Super Dot's case) through user interaction. You cannot create or edit any foreground objects using the tower editor this is because foreground objects are not saved in a tower file (.sdt). Even though you create a bowling ball or slug by putting a Slug/Bowl block (Background object) in a room. This does not create a foreground object until Super Dot 3 reads the tower file. It then creats a foreground object and changes the background object (what was a Slug/Bowl Generator block) to a bFloor (Floor panel) block. The same is true with the bStart block and the Mecha Dot light level tag. They just generate a Foreground object.

	BLOCKS (BACKGROUND OBJECTS):

		' Super Dot 2 Background Objects (Still Available)
		Public Const bWall = 0		' Wall
		Public Const bStart = 1		' Super Dot Generator
		Public Const bCWall = 2		' Cracked Wall
		Public Const bFWall = 3		' Fake Wall
		Public Const bFall = 4		' Invisible Pit
		Public Const bCherry = 5	' Cherry Bomb (Not ticking)
		Public Const bKey = 6		' Key
		Public Const bCoin = 7		' This was a dime in Super Dot 1, now it is Soda
		Public Const bUpDoor = 8	' Up Locked Elevator
		Public Const bDownDoor = 9	' Down Locked Elevator
		Public Const bUp = 10		' Up Elevator
		Public Const bDown = 11		' Down Elevator
		Public Const bSwitch = 12	' Switch
		Public Const bBUp = 13		' Switching Wall/Floor
		Public Const bBDown = 14	' Switching Floor/Wall
		Public Const bFloor = 15	' Floor
		Public Const bTBomb = 16	' A Ticking Bomb
		Public Const bBowl = 17		' Enemy Bowl Generator
		Public Const bSlug = 18		' Enemy Slug Generator
		Public Const bSlugGuts = 19	' Slug Guts
		Public Const bGhostDot = 20 	' Super Dot 3 this block became an appearing door
		Public Const bHole = 21 	' Visible Pit
		Public Const bEnergy = 22 	' Battery

		' New Background Objects In SD3
		Public Const bSPit = 23		' Switching Pit/Floor
		Public Const bSFloor = 24	' Switching Floor/Pit
		Public Const bLifeCell = 25	' Six-Pack
		Public Const bEnergyCell = 26	' Battery Pack
		Public Const bWallA = 27	' Extra Wall 1
		Public Const bWallB = 28	' Extra Wall 2
		Public Const bWallC = 29	' Extra Wall 3
		Public Const bWallD = 30	' Extra Wall 4
		Public Const bFloorA = 31	' Extra Floor 1
		Public Const bFloorB = 32	' Extra Floor 2
		Public Const bFloorC = 33	' Extra Floor 3
		Public Const bFloorD = 34	' Extra Floor 4
		Public Const bWarp = 35		' Warp Tile

	FOREGROUND OBJECTS:
	
		Public Dot			' Super Dot
		Public Enemy(1 to 1000) 	' All the slugs and bowling balls
		Public Bomb(1 to 100) 		' All the bombs
		Public MechaDot			' Mecha Dot

	For those of you interested in writing utilities for Super Dot 3 I am including this awesome information on how to make your own Saved Game Editors and Tower Editors etc... You may notice that the Block (Backgrounfd OBject) data is not stored in any of the structures. That is because it is stored in a seperate three dimensional array of size (1 to 10, 1 to 10, 1 to 100). This translates out to (x,y,room). you can see this array saved in the TOWER SAVE FORMAT below:

	STRUCTURES:

	            ' -- Structures --
        	    ' Structures From SD2 & SD3
	            Public Type Enemy
	                X As Integer
	                Y As Integer
	                Width As Integer
	                Height As Integer
	                Room As Byte
	                Live As Boolean
	                Life As Integer
	                UnderMe As Byte
	                GH As Integer
	                Step As Integer ' SD3 - Used For Slug
	                direction As Integer ' SD3 - Used For Bowl And Slug
	                LastDirection As Integer ' SD3 - Used For Bowl
	                DropTime As Byte ' SD3 - For MechaDot
	                EnemyType As Byte
	            End Type
	            
	            Public Type TPoint
	                X As Integer
	                Y As Integer
	            End Type
	            
	            Public Type typeDot
	                Bombs As Integer
	                Keys As Integer
	                Top As Integer
	                Left As Integer
	                Width As Integer
	                Height As Integer
	                Visible As Boolean
	                Life As Integer
	                Maxlife As Integer
	                Energy As Integer
	                MaxE As Integer
	                direction As Integer
	                LastDirection As Integer
	                LastX As Integer
	                LastY As Integer
	                Step As Byte
	                Speed As Byte
	                KilledEnemies As Integer
	                Steps As Integer
	            End Type
	            
	            Public Type BombType
	                X As Byte
	                Y As Byte
	                Bombtime As Byte
	                Bombyet As Byte
	                LastBlock As Byte
	                BombDown As Boolean
	                Room As Byte
	            End Type
	            
	            Public Type tRoom
	                MidiFile As String
	                TypeOnEnter As String
	                TypeOnExit As String
	                RoomTag As Integer
	                ExitOnTop As Byte
	                ExitOnLeft As Byte
	                ExitOnRight As Byte
	                ExitOnBottom As Byte
	            End Type
	            
	            Public Type tTower
	                LinkOnTopExit As String
	                LinkOnBottomExit As String
	                Name As String
	                Start As Integer
	                NewG(0 To NUMOFBLOCKS) As String
	                Room(1 To 100) As tRoom
	                TowerVersion As Long
	                EndMessage As String
	            End Type
	
	VARIABLE DECLARATION:

                ' Variables from SD2
                Public Dot As typeDot 'Super Dot
                Public LoadedTower As String 'Filename
                Public NumOfEnemies As Integer
                Public LastSaved As String 'Filename
                Public Block(1 To 10, 1 To 10, 1 To 100) As Byte
                Public SBlock(1 To 10, 1 To 10, 1 To 100) As Byte 'This is used to remember original switch status
                Public Enemy(0 To 1000) As Enemy
                Public DotGhost As Boolean, SlugGhost As Boolean
                
                ' Variables from Super Dot 3
                Public pPalette As Picture 'Palette
                Public gBlock(0 To NUMOFBLOCKS) As New CPictureDC 'Graphics for blocks
                Public PreRelease As String 'Just for ALPHA
                Public DownBomb(0 To 100) As BombType
                Public Check As Byte
                Public BowlSpeed As Byte
                Public SlugSpeed As Byte
                Public ShowDoor As Boolean
                Public TowerData As tTower
                Public MechaDot As Enemy
                Public Playnow As Byte
                Public ColorMode As Byte

	TOWER SAVE FORMAT:

    		Put #1, , Block(1 to 10, 1 to 10, 1 to 100) 'Background Objects
    		Put #1, , TowerData 'Tower Information


	SAVED GAME SAVE FORMAT:	

                Put #1, , Shareware ' Don't modify this! It makes sure shareware users don't play registered levels..
                Put #1, , Dot ' All Dot's life, energy...
                Put #1, , DotCheat 'Whether they used passwords
                Put #1, , Room ' What room are you in?
                Put #1, , Sstatus 'Switch Status
                Put #1, , TowerData 'Tower Information
                Put #1, , Block(1 to 10, 1 to 10, 1 to 100) 'Blocks
                Put #1, , SBlock(1 to 10, 1 to 10, 1 to 100) 'More Blocks
                Put #1, , DownBomb(0 to 100) 'Bombs...
                Put #1, , NumOfEnemies
                Put #1, , Enemy(0 to 1000) 'Enemies
                Put #1, , MechaDot 'The one and only..
                Put #1, , LoadedTower 'String Tower Filename for if you die and reload
                Put #1, , MusicName ' What midi was playing when they saved?

	MISC CONSTANTS:

                ' Variable Replacements
                Public Const NUMOFBOMBS = 100 ' Number Of bombs allowed down at one time
                Public Const NUMOFBLOCKS = 35 ' Number of Block Types
                Public Const CURTOWERVERSION = 3 ' Save Version
                
                ' Dir Constants
                Public Const sdMidiDir = "\midi\"
                Public Const sdPicDir = "\pics\"
                Public Const sdDirSave = "\savegame"
                Public Const sdDirTowers = "\towers\"
                Public Const sdDirSound = "\sound\"
                
                ' Color Modes
                Public Const cmOther = 0
                Public Const cm256 = 1
                Public Const cmHigh = 2
                Public Const cmTrue = 3
                
                ' Room Tag Constants
                Public Const rtDark = 1
                Public Const rtDarker = 2
                Public Const rtFallDie = 4
                Public Const rtSpiral = 8
                Public Const rtMechaDot = 16
                Public Const rtSpecialSwitch = 32
                Public Const rtNoESP = 64
                Public Const rtLastMechaDot = 128
                
                ' Position Constants
                Public Const posDown = 0
                Public Const posUp = 2
                Public Const posLeft = 1
                Public Const posRight = 4
                Public Const posHurt = 5
                Public Const posDead = 6
                Public Const posDuck = 7
                Public Const posFly = 8
                
                Public Const posMDCrouch = 0
                Public Const posMDForward = 1
                Public Const posMDBackward = 2
                Public Const posMDThrowF = 3
                Public Const posMDUpHand = 4
                Public Const posMDHurt = 5
                Public Const posMDThrowB = 6
                Public Const posMDJump = 7
                Public Const posMDUpHandB = 8
                
                ' Enemy Constants
                Public Const eBowl = 1
                Public Const eSlug = 2
                Public Const eTri = 3 'Expected For Super Dot 4
                
                ' Sound Constants
                Public Const sndExplode = 0
                Public Const sndDoor = 1
                Public Const sndBomb = 2
                Public Const sndGetKey = 3
                Public Const sndDotFall = 4
                Public Const sndSwitch = 5
                Public Const sndBowlFall = 6
                Public Const sndDotHurt = 7
                Public Const sndDotDead = 8
                Public Const sndBombTick = 9
                Public Const sndSlug = 10
                Public Const sndLaser = 11
                Public Const sndGetSoda = 12
                Public Const sndGetBattery = 13
                Public Const sndMechaDie = 14
                Public Const sndEnd = 15
                Public Const sndTeleport = 16

	Hey, I hope that is enough information to get you started. If you need more e-mail me at superjeff@chibinet.com . I hope to see what kind of hacks you come up with.  And please give me a copy of your hacks or tell me where I can find them, I can't wait to see what you come up with! Thanks.
