Welcome to sphere.sf.net
Search  
Main Menu  

Languages  
Preferred language:


  

A Guide to Sphere

(8639 total words in this text)
(12952 Reads)  Printer-friendly page

A GUIDE TO SPHERE

for Sphere.96b
by Zennith



Chapter 1: Overview

Gaming and Computer Terms
File Types
Sphere Folders and Documents
Executables

Chapter 2: Sphere Development Environment

Section 1:The Basics
SDE
Image Tools
Map Tools
Swatch
Tiles
Spriteset Images
Editing Images

Chapter 2: SDE

Section 2: Project and Resource Files
Project
Maps
Spritesets
Scripts
Fonts
Windowstyles
Images
Sounds
Animations

Chapter3: Odds and Ends

Graphics
Scripting
Shortcut Keys
Audiere and Corona
Community

Glossary




Chapter 1: Overview

Gaming and Computer Terms

RPG: role-playing game
GCE: game creation engine
IDE: integrated development environment

Index: a list of items that are numbered, starting with 0. One example is the tiles of a
tileset. The first tile is tile #0, the second is tile #1, etc.

Coordinate System: an imaginary grid. Each square is represented by an x and a y
value (x,y). X refers to the horizontal aspect of the grid, and y refers to the vertical;
(0,0) is the upper-left corner. X increases in value for a square that is further right,
and y increases for a square that is further down.



File Types

File types are denoted by the extension after the file name (filename.extension). An
extension is typically 3 letters and is not always shown after a file. Usually, different
file types have different icons. Here are some common extensions.

txt : a text file
jpeg, jpg, jpe, png, pcx, bmp : these are image formats.
mng, flic, flc, fli: these are animation formats.
mp3, wav, it, xm, s3m, mod: sound file formats.
exe : these are executables. Exe files are programs that may be executed, or run.

Sphere File Types:
rmp : Map file, including a tileset.
rts : Tileset
rss : Spriteset
rws: WindowStyle
js : Script
rfn : Font
sswatch: palette
spk: a packaged Sphere game.
sgm: each Project has a file called game.sgm. This file contains the game information
that you may determin in Game Settings (explained later).


Sphere

Get the latest version of Sphere from http://www.sphere.sf.net , in the downloads section.
It will be under "official releases". After you have unzipped it, take a look. You'll notice
6 folders and 3 executables. We'll talk about the folders first.

Bin: This contains dlls and texts of Engine and Editor configuration settings. Also contains
copies of the three executables.

CVS: I'm not really sure what this is, but I think it is for programmers who are using
the Sphere source code. You can access it by going to Sphere.sf.net, and clicking
on the CVS link in the upper right hand corner. Here you may browse the CVS
Repository to find stuff about Sphere. You may view these topics by selecting them
and downloading them.

Docs: contains all of the documents that come with Sphere.

          build.txt: information to help programmers who are using 
Sphere's source code. doc_functions.txt: contains a list of all of Sphere's
functions, with explanations. GPL.txt: Sphere is licensed under the General Public License (GPL). keys.txt: this is a list of the names of keys that you may
use in your scripts. lack_of_documentation.txt: addresses the lack of documentation
in the Sphere community. Both addresses listed are
unavailable. legal.txt: this states that Sphere must always be free, among
other things. network.txt: the copy of an on-line conversation about networking in
Sphere. Contains one swear word. readme.txt: contains technical information concerning Sphere. Sphere Tutorial: a tutorial to help you get started. sphere_cvs.txt: this tells you how to log on to CVS. sphere_rules.txt: the rules for using #sphere on EsperNet. unix.txt: information on the project to port Sphere to UNIX.

Below is an overview of three folders included in the Docs folder.


     Sphere Help: this contains Sphere's help file.

     System Scripts: contains completed scripts for you to use 
with Sphere. Technical: contains docs referring to the technical
aspects of Sphere.



Folders

StartUp: When you run Engine.exe, Sphere automatically reads the files in StartUp, You
may place the files for your game in the StartUp folder and its subdirectories
(subfolders) to have Engine.exe run it automatically.

System: Contains system images, sounds, and scripts.

Games: This is where your Project Folder belongs. Also, any games that you wish to
play should be placed in here, except for one that can be in the Startup folder.





Project Folder: Each game, or Project, has it's own Project Folder, labeled by the
game maker(s). Each one contains eight subdirectories, labeled
"Animations", "Fonts", "Images", "Maps", "Scripts", "Sounds",
"Spritesets", and "WindowStyles". These eight folders hold the
Resource Files for your game.



The Executables.


Config: This allows you to select a driver (dll) for running games on your computer.
If you are having trouble playing a game, try selecting a different driver or
not running it in full-screen mode. The video drivers are explained in the
Help File under About Sphere. The file is found in docssphere_help. For more options, click on the Configure Driver button. The options that
you will see will depend on the dll you have selected. Editor: Just what it says. Click on this to start making a game in SDE, the
Sphere Development Environment.

Engine: Use this to play or test a game.







Chapter 2: Sphere Development Environment (SDE)

Section 1: The Basics

To get to SDE, run Edit.exe.

SDE has bars, windows, dialogs and menus that will help you make a game.



Bars: SDE has a Menu Bar, a Tool Bar, and a Status Bar, each indicated in the image
above.

The Menu Bar has four menus when you first open SDE. They are File, View, Window
and Help. When you open or create a new Project, Map, Spriteset, Script, Font,
WindowStyle or Image, a menu that corresponds to your present task will appear on the
Menu Bar. These menus will be explained later.

The Task Bar has four icons for quicktasks. The New icon creates a new Project. The
Open icon opens an existing file. The Save icon saves the active window. The Run icon
runs the current Project from the saved file. This means that any changes you made after
the last save will not be reflected when you test the game.

The Status Bar displays information relevant your tasks.



Menus help you use Sphere. The main menus are found on the Menu Bar, and pop-up
menus are accessed by right-clicking in a certain field.


On the left is the File Menu, from the Menu Bar. The right menu is a Pop-up menu.

The Menu Bar menus:
File Menu
New
Creates a new Project or new
resources for a Project
Open
Opens existing Project or existing
Resource Files
Import
Converts files from third-party
formats to Sphere formats
Open Last Project
Opens the last Project that was
run in SDE
Close Project
Closes the active Project
Save
Saves the active Resource File
Save As
Saves the active Resource File under
a new name and closes the old file
Save As Copy
Saves the active Resource File as a
copy of the original. You will still be
editing the file you saved it from, not
the copy
Save All Windows
Saves all opened Resource Files
Options
Opens the Options dialog. Here you
may register file types, so that clicking
on a Map file, Spriteset file, Font file or
WindowStyle file will open the file in
SDE
Exit
Exits Sphere Development Environment
View Menu
Tool Bar
Show or hide the Tool Bar
Status Bar
Show or hide the Status Bar
Palettes
Show or hide any active secondary
windows

Window Menu
Tile Horizontally
Tiles all active windows horizontally. This will
arrange the windows one above the other.
The window that was first opened will be
topmost and the last one will be on the
bottom. Secondary windows are not affected
by this. If you have more than three windows
open, they will be in rows and columns
Tile Vertically
Tiles all active windows vertically. Arranges
windows one beside the other. The first
opened window will be on the left and the
last will be on the right. Secondary windows
are not affected by this. If you have more than
three windows open, they will be in rows
and columns
Cascade
Cascades all active windows. This arranges
the windows in overlapping order with one
below and to the right of the other. The first
opened window will be foremost. Secondary
windows are not affected by this
Close All Windows
Closes all active windows
Below the commands there is a numbered list of your current
Projects. Select one and that window, with its secondary
windows, will become visible.

Help Menu
Contents
Not yet implemented
Tutorial
Not yet implemented
About
Information on Sphere. Specifies the version
that you have

When a Resource File is opened, a new menu will appear on the Menu Bar. These menus
are explained later.



Windows are the boxes that display a file or tools. Some of them have tabs that allow
you to choose one setting or another. The nine main windows are the Project window,
Map window, Spriteset window, Script window, Font window, WindowStyle window,
and Image window, as well as the Animation and Sound windows. (The Animation and
Sound windows are very simple, because you can only look at animtions and listen to
sound files in SDE.) Sphere also has secondary windows that will assist you in editing a
file. I will explain these windows in more depth later.

Below are three examples of windows. The first is the Map window, the second is the
Script Window, and the third is the Swatch Window.





Dialogs are boxes that appear when you use certain commands. They allow you to choose
options that go with your task.

Below are two examples of Dialogs. Note that one is more elaborate than the other.
Some dialogs only have one option, while others will even open more dialog boxes.






Projects: A Sphere game is created and edited in a Project. Games may consist of
Animations, Images, Fonts, Maps, Scripts, Sounds, Spritesets and WindowStyles. Each
of these has its own folder to hold its files. In naming a file, the extensions are optional.
You may also delete a file even if it is open.

Sounds and Animations must be made outside of Sphere.


Before we begin making any of these files, you'll need to know about windows.





There are main windows, secondary windows, and tool windows.

Main Window: Project Window or a window where you edit a file for your project.
Example: Map Window, Script Window, Font Window, etc.

The titlebars of the main windows display on icon that identifies the file type, as well the
name that the file is saved under. An asterisk (*) next to the name of the file means that
said file has been edited since the last save.

Secondary Window: A window with something that relates to a main window.
Examples: Spriteset Images window, Tiles window, Swatch window.

Tool Windows: really just a floating tool bar. The only ones are Image Tools and Map
Tools.

Here is a list of the tool windows you may encounter.


          Image Tools: 
Draw: Draw free-hand Line: Draw a straight line. Box: Create a box that is filled with the current color. Ellipsoid: Create a hollow ellipsoid. Fill: Fill an area of the image with the selected color.

          Map Tools: 
1x1: Place tiles on the map one at a time. 3x3: Place nine tiles on the map with one click. 5x5: Place fifteen tiles on the map with one click. Select: Selects a tile on the map. Fill: Fills the entire layer with the selected tile. Copy: Copy a tile onto the clipboard. Paste: Paste a tile from the clipboard. Trigger Copy: Copy a Trigger to the clipboard. Trigger Paste: Paste a Trigger from the clipboard. Obstruction: Allows you to draw an obstruction line
on your map. Remove Obstruction: Removes the obstruction nearest
to where you click on the map.



Swatch:

You may open, create, and/or edit a palette in this window, with the Swatch
menu.
Swatch Menu: access by right-clicking the Swatch Window
File
Load or Save a palette. Sphere saves palettes
as .sswatch files
Default
Opens the Dos or Verge palettes
Insert Color Before
Inserts the selected color before the cursor
Insert Color After
Inserts the selected color after the cursor
Replace
Replaces the color below the cursor with the selected
color
Delete
Deletes the specified color from the palette

This is a picture of the Swatch window with an opened palette.





Tiles: The Tiles window shows the tiles in the active tileset.
File Type: Tiles are saved as rts files, if saved separately from a map.
Status Bar: Tells you what the tile is that is under the mouse cursor, with this format;
Tile(index# / number of tiles). Example; Tile(0/1).

Note: The selected tile is denoted by a pink box around it.

Tiles Menu: access by right-clicking on the Tiles window
Insert Tile
Insert a blank tile before the selected tile
Append Tile
Append a tile to the end of the tileset
Delete Tile
Delete the tile
Insert Tiles...
Inserts specified number of tiles
Append Tiles...
Appends specified number of tiles
Delete Tiles...
Deletes specified number of tiles, from the lower index to
the higher. Example; if you are on tile #2 and delete 3 tiles
then tiles #2, #3, and #4 will be deleted
Insert Tileset...
Insert an existing rts file
Append Tileset...
Append an existing rts file
Zoom
View the tiles at 1x, 2x, 4x or 8x
Properties
Opens the Tile Properties dialog box

Tile Properties Dialog
Animated
Check this box to animate the tile
Next Tile
The next tile in an animation sequence
Delay
The time, in milliseconds, that the tile is visible in an animated
sequence
Next<
Edit the properties of the next tile
>Prev
Edit the properties of the previous tile
Edit Obstructions
You may obstruct a tile completely or partially, or not have
it obstructed at all. You may use presets or draw them mannually.
"Obstructed" simply means that the base of any Person will
not be able to cross the tile. Note: When editing obstructions,
right click to remove the last-placed obstruction line




Spriteset Images:

This window shows the images that you may use as frames for the
Spriteset. You may change the order of these images without affecting frames that have
already been placed. When you first create a new Spriteset, the Spriteset Images window has
only one image. This is used as the default frame for the existing directions.

Spriteset Images Menu: access by right-cliking on the Spriteset
Images window
Move Back
Moves the frame back (left) by one space
Move Forward
Moves the frame forward (right) by one space
Insert Image
Inserts a blank frame before the selected frame
Remove Image
Removes a frame





Editing Images:

Images may be edited in SDE. Because so many of SDEs applications
use the same menus and tools for images, I will explain them here.

Color Bar: Choose a color by clicking somewhere on this bar.

Selected Color: The color that you apply to the image. Click on this for more color
options.

Translucensy Meter: Allows you to set the alpha level that you apply to the image.

Below are samples of three different tranlucensy levels, used with the color green. Left:
255, opaque. Middle: 127, semi-transparent. Right: 0, transparent.



Image Editing Menu: access by right-clicking on the image
Color Picker
Sets the selected color to the color and alpha from
the current pixel
Undo
Undoes the last thing you did. May be used repeatedly
Copy
Copies the entire image to the clip board
Paste
Pastes the image from the clip board
Blend Mode
Blend Mode specifies the way that the selected color
is applied to the image
Blend
The original color will show through.
Apply the selected color more than
once to increase the intensity of that
color, and gradually replace the
original color
Replace
The selected color, when applied to
the image, replaces the original
RGB Only
Only the color is applied. The selected
alpha is ignored
Alpha Only
Only the alpha is applied. Selected color
is ignored
Rotate
Clockwise
Rotates the image clockwise
by 45 degrees
Counterclockwise
Rotates the image counterclockwise
by 45 degrees
Slide
Up
Slides the image up by 1 pixel. The top layer
will appear on the bottom
Right
Slides the image right by 1 pixel. The rightmost
layer will appear on the left
Down
Slides the image down by 1 pixel. The
bottom layer will appear on the top
Left
Slides the image left by 1 pixel. The leftmost
layer will appear on the right
Flip
Horizontally
Reverses the image so that the right side
appears on the left and the left appears
on the right
Vertically
Reverses the image so that the top appears
on the bottom and the bottom appears on
the top
Fill
RGB
Fills the entire image with the selected color
Alpha
Fills the entire image with the specified alpha
Both
Fills the entire image with both the color and
the alpha
Filter
Blur
Blurs the color and the alpha of each pixel
Noise
Sets pixels to colors that are similar to the colors
already on the image
Set Color Alpha
Sets the alpha of the current color to the alpha
specified by the tranlucensy meter
Scale Alpha
Gradually decreases the alpha of the image, depending
on where your tranlucensy meter is set. The higher
the alpha of the pixel, and the higher the alpha on the
translucensy meter, the more drastic the increase. You
may use Scale Alpha repeatedly to lighten the image
further



          Image Tools: 
	     Draw:  Draw free-hand
	     Line: Draw a straight line.
	     Box: Create a box that is filled with the current color.
	     Ellipsoid: Create a hollow ellipsoid.
	     Fill: Fill an area of the image with the selected color.








Chapter 2: Sphere Development Environment (SDE)

Section 2: Projects and Resource Files

Project

File Types: spk: a packaged game. 
sgm: game.sgm contains the game data.

A Project consists of all of the resources for your game. Each Project has its own Project
Folder, to hold Spritesets, Animations, etc.

To start a new Project, go to File8 New8 Project. A dialog will appear, with Project
Name and Game Title options. The Project Name will be the name of your Project Folder.
Game Title, of course, is the title of your game. Only one Project may be open at a time in
SDE.

Project Menu: appears on the Menu Bar when a Project
is active
Insert
Copies an existing Resource File and places it in the
proper directory
Refresh
If you have altered any files from outside
of SDE, Refresh will cause SDE to reflect
the changes
Run Game
Use this command to test/play your game
Configure Sphere...
Same as Config.exe. Allows you to choose
a video driver
Package Game!
Compresses the game for distribution. Also
prevents the average person from taking
your resources

Project Window

Click on "Game Settings" to open the Game Settings dialog. Here you may choose the
Main Script for your game. The script must already be in the scripts directory. Screen
Width and Screen Height are simply the width and height of the screen that displays your
game when it is executed.

Below "Game Settings" are eight folders. They hold the Resource Files of your game. To
show or hide the contents of a folder click on the plus or minus side to the left of it. If
there isn't one, then the folder is empty. You may double-click on any files to open them.
You could also right-click on a file to open it or delete it. Right-click on the folder icon
or name to copy a file from a different Project into that folder with the "Insert" command.

Next is an explanation of the files that go into a Project Folder, as well as information to
help you make them.



Maps

File Types:  Maps: .rms
Tilesets: .rts

Map Setting: Click on the Map tab to edit your map.
Tileset Setting: Click on the Tileset tab to edit a tile. Select a tile from the Tiles window or directly from
the map to edit it. You may use the scrollbar to select a different tile, or use the tiles window.
Refer to the Editing Images section of this document for tips.

Maps are the places of your game. This is where your characters (sprites) will walk
around and do things. A map may have multiple layers. It may also have "Triggers" that
run scripts, and "Persons" that can be controlled by separate scripts run their own scripts.
Entities (Persons and Triggers) as well as the Starting Point are layer-specific.

The graphics of a map are made up of tiles. A tile is a single picture that you may place
anywhere on your map as often as you like. It can be blocked and/or animated. A tile is
selected from the Tilesets Window and edited with the Tileset setting. In order to block
a tile so that Persons can't walk on it, see the Tile Properties Dialog in Chapter 2, Section 1.
To animate a tile, go to Tile Properties Dialog.

Every tile and every pixel has an x and a y value that corresponds to its position on the
map. The tile in the very upper-left corner is tile (0,0). The pixel in the very upper-left
corner is called pixel (0,0).

The Tiles window is explained previously in this document.

Tilesets: Each map has its own tileset. These tiles make up the graphics of your map.
Each one is indexed, beginning at 0. Any change to a tile will alter all instances of said
tile that appear on the map. A tileset may be exported as an rts file, and used in a different
map.

When the mouse is over the Tiles window, the Status Bar will identify the current tile and
the total number of tiles, like so; current tile/total tiles. Example: say you have a total of
8 tiles and the mouse cursor is over the second tile. The status bar will show this; Tile(1,8).
The first number goes by indexing (in an index, the numbering starts at 0, not 1) while
the total number of tiles is the actual numerical value; in this case, 8.


Now that you have the general concepts of maps, lets move on to the grunt work.

To create a new Map go to File8 New8 Map, and a dialog will appear. Width and
Height refer to the number of tiles on the map. There is no limit. Tileset refers to the rts
file that the Map will use. You may use a blank one or browse your computer for an
existing file.

Importing Tiles: By using Export, you may save a tileset as a tileset file (rts file), separately
from the map file. Then you can add it to other maps by importing it. Use the import
command from the Map Menu, or use the pop-up menu from the Tiles window, which
has Append Tileset and Insert Tileset. The Import Tileset command erases the existing
tileset, but the Append and Insert Tileset commands do not.

Map Menu: appears on the Menu Bar when a map is active
Map Properties
Opens the map properties dialog
Change Tile Size
Set the number of pixels in the tiles. Does not
change the size of the image on the tile
Rescale Tileset
Set the number of pixels in the tiles. The image
will fit the new tile size
Resize All Layers
Change the number of tiles in the width and
height of all layers
Export Tileset
Save a tileset as an rts file to use with other
maps
Import Tileset
Open an outside rts file. This will replace
the existing tileset
Prune Tileset
Deletes any tiles that are not used on your map

Map Properties Dialog
Background Music A sound file that plays continuously
while your map is running
Special ScriptsScripts that are run when the map is
opened [Entry], closed [Exit], or when
the input character crosses the North, East,
South or West border of the map. The
Entry script will run just before the map is
opened, and the Exit script will run just
after it is closed.


Layers: Maps may have one or more layer(s) - there is no limit. In order for one layer to
be at least partially visible below another, the above layers must have some pixels with an
alpha below 255. Those pixels will be somewhat transparent (or completely transparent
if the alpha is 0) so the lower layer will show through.

Remember which layer you are editing. When you place a tile or select one from the
map, it is done to/from the current layer. Same goes for any entities and the Entry Point.

The bottom layer cannot have any parallax or automatic scrolling.

You may rearrange the layers by clicking and dragging their bars on the left-hand side of
the map window. Click to the left of the name to show or hide the layer (if the eye is
visible, then the layer is visible.)

Status Bar: Shows the name of the layer bar that is under the mouse. Layer '0' is the bottom
layer. Higher layers are labeled with higher numbers.

To edit a layer on the map screen, click on the layer bar. The layer bar that is depressed is the
one you are editing.

Layer Menu: access by right-clicking on a layer name
Insert Layer
Inserts a new layer above the one
you clicked on
Insert Layer From Image
Creates a layer from an image
and inserts it
Delete
Deletes the layer. A prompt will
appear, asking if you want to delete
associated tiles. If you say yes, then the
map will be "pruned" after the layer
is deleted.
Duplicate
Copies a layer, including obstructions,
entities, and parallax data
Export
Creates an image file from the layer
Properties
Opens the Layer Properties Dialog

Layer Properties Dialog
NameThe name of the layer, which appears
on the bar
WidthWidth of the layer, in tiles
HeightHeight, in tiles
ReflectiveIf this box is checked then there will
be a reverse image of any entity reflected
on any areas with an alpha below 255.
The lower the alpha, the clearer the image.
ParralaxRefers to speed at which the layer
scrolls. Different layers can have
different speeds to create the illusion
that the map is 3-dimensional
Automatic Scrolling Use this to make layer scroll on its
own, even if the camera is not
moving


Map Screen: The screen that displays your map.
Status Bar: identifies the tile and pixel below the mouse cursor, in this format;
Map tile:(x,y) pixel:(x,y)
Map Screen Menu: access by right-clicking on the map screen
Select Tile
Selects the current tile from the layer that
you are editing
Set Entry Point
The default point for any Persons that appear on the map.
Marked in SDE by "ST"
Fill
Fills the entire layer with the current tile
Insert Entity
Insert Person or Trigger
Edit Entity
Edit Person or Trigger
Delete Entity
Delete Person or Trigger
Zoom
View the map screen at 1x, 2x, 4x, or
8x normal



Trigger: an invisible point on your map that causes something to happen when the input
character steps on it.

Person: usually a character, hence the name. An entity represented by a spriteset that
may have scripts assigned to it and may be destroyed when the map is exited. It may
also be influenced by separate scripts.

Each Person has 5 scripts: On Create, On Destroy, On Activate (Touch),
On Activate (Talk) and On Generate Commands. To edit any particular script, simply
select the one you want.

           On Create:  This script is run when the Person is created.
On Destroy: This script is run when the Person is destroyed.
On Activate (Touch): This script is run when the base of the input
character touches the base of the Person.
On Activate (Talk): This script is run when the input character is
near the Person and the designated "talk" button is pressed.
On Generate Commands: I think that this script is run when the
command queue of the Person ends.

Entities are set to tiles. This means that if you place a Trigger on a tile, stepping anywhere
on the tile will activate it. When you resize the map in editing, however, Entities
are relocated by the pixel. Example: suppose there is a Trigger on Tile(9, 6),
Pixel(152, 104). You change the tile-size from 16 to 32. The Trigger is now on Tile(4,3)
Pixel(144, 112). If you had changed the tile-size to 8, that same Trigger would have been
set to Tile(19, 13) and Pixel(146, 106). Notice that it is not set to exactly the same pixel
as before. This is because the Entity is centered on the tile that the pixel is in.



Spritesets

File Type: rss


Note: the selected frame has a pink box around it.

Frames Setting: click on the Frames tab to modify the directions and the frames.
Edit Setting: click on the Edit tab to edit the images of the Spriteset Images window.
Base Setting: click on the Base tab to set the base for the spriteset.

Sprites are images of the entities (Persons in this case) that move around on your maps. It
does not necessarily have to be a human - it could be a boat or an animal.

A spriteset is a collection of the frames that make up a sprite. The frames appear one after
another, to animate the sprite. "Delay" is the time that a frame is visible before it is replaced
by the next. To set a frame, first select the frame then click on an image from the Spriteset
Images window.

Spriteset Menu: appears on the Menu Bar when a spriteset is active
Zoom
View the sprite at 1x, 2x, 4x or 8x normal. Set
to 2x by default
Resize
Spriteset: adjust the size of the sprite in pixels.
Pixels will be the same size as the pixels of
map tiles
Fill Delay
Set the delay of every existing frame
Frame Properties
Set the delay of the selected frame

Directions: The default directions are "north," "northeast," "east," "southeast," "south,"
"southwest," "west," "northwest." Other directions may be added. The extra directions
could be used to store extra frames (like a "crying frame" for a crying scene). You could
also use one direction to store multiple frames for different scenarios, because you can
call each frame individually in your scripts.



Direction Menu: access by right-clicking on a direction name
Insert
Insert a new direction
Delete
Delete the direction
Append
Append a direction to the end
Properties
Name a direction with the Direction Name dialog

Edit: refer to the Editing Images section of this document.

Base: Simply click anywhere on the image display and drag the mouse. The pink
rectangle is the base. This box is the area where the Person is obstructed and the area
that activates "Triggers" and "Persons." If another person has a script under "On Activate
(Touch)" the script will be activated when the base of the player character touches the base
of the person. A Trigger will be activated when the base of the Person touches the tile that
the Trigger is on. When you use the x or y coordinates of a Person, the center of the Base is
returned.





Scripts

File Type: js


Scripts cause things to happen in your game. With scripting, you could create a textbox,
make a Person move on a map, and much more. Sphere supports SpiderMonkey's version
of JavaScript as well as the Sphere functions and objects found in doc_functions.txt.

Notice the different text colors in a script. Statements and declarations are blue. Most
operators are pink. Numbers and underscore ( _ ) are terracotta. Strings and comments are
green. Boolean, export, import and goto are red.

Script Menu: found on the Menu Bar when a Script
window is active
Check Syntax
Searches the code for syntax
errors
Find
Find a specific set of characters in
your code
Replace
Find and replace a specific set of
characters in your code

Script pop-up menu: access by right-clicking on the screen of
the Script window
Undo
Undoes your most recent typing
Redo
Replaces the typing after an "Undo"
command
Cut
Removes the selected text and places it
on the clipboard
Copy
Copies selected text to the clipboard
Paste
Pastes text from clipboard to the screen
Delete
Deletes the selected text
Select All
Selects all of the text in the script




Fonts

File Types: rfn


A font file is a collection of characters. Each character corresponds to a key on the
keyboard (lower case/ordinary and upper/special). Each font may have up to 94 characters.
The title bar of the font window will show you the key that corresponds to the current
character. Example; if you see - 2 - on the title bar, then the picture on the image display
will appear on the game screen when you press the 2 key (if you have a function for
displaying text).

Use the scroll bar on the bottom of the Font window to select either the next
or the previous font character.

Note: According to the titlebar, the first font character is indexed at 32, and the last at
126. The "total" is labeled as 256. This may be a bug, and it should not affect your use of
the font.

Font Menu: found on the Menu Bar when a font file is open
Export To Image
This feature is currently
unavailable
Resize Character
Alter the number of pixels of the
current character
Resize All Characters
Alter the number of pixels of every
character
Simplify
Convert the alpha of each pixel to 255 or 0. If a
pixel's alpha is higher than 128, it will be converted to
an alpha of 255 (opaque). If it is 127 or lower it will be
converted to an alpha of 0 (transparent)
Generate Gradient
Set the color and alpha for the top part of the
characters and for the bottom. The characters will
fade from the top color and alpha to that of the bottom,
for a gradient effect. To select a new color, click on
the box. To set the alpha, use the translucensy meter
to the right of the box




WindowStyles:

File Type: rws


A WindowStyle may be used as the background for a menu. To edit a WindowStyle,
select a section by clicking on it or by using the WindowStyle menu.

WindowStyle Menu: found on Menu Bar when
a WindowStyle is open
Edit
Select a side or corner of the windowstyle, or
the background. Background may only be selected
with the WindowStyle Menu
Zoom
The lower the number, the bigger the editing
section and the smaller the view of the
windowstyle. Vice versa for a larger zoom
number
Resize Section
Section: set the number of pixels for the width
and the height of the current section
Properties
Click here to open the dialog for WindowStyle
properties

WindowStyle Properties Dialog
Tile Background Image If this box is checked, the background will
be a repeating pattern of the image
you edited for Background
Gradient Background If checked, the background will fade in
a gradient style, based on the four
colors and translucensy meters below.
The section called Background that you
edited apparently will have no bearing

The default for each section is 16x16 pixels. Each corner is an exact copy of the picture
that you edited for said corners. The sides, top and bottom may have a repeating pattern
of the image that was made for said sections- it depends on the number of pixels of each
section and the size you set with the drawWindow function. The background will repeat
a certain number of times, depending on the number of pixels of the background and the
size that you set with drawWindow function.



Images

SDE may open jpeg, jpg, jpe, png, pcx and bmp files. However, it may only
save images as png files. For information on editing an image, refer to the Editing Images
section of this document.



Sounds

You may open midi, mid, mp3, mp2, ogg, mod, s3m, xm, it, and wav sound files.
You may play them, stop them, and adjust the volume. You may not edit or save. When
a sound file is played in the game, you may set the volume using scripting. The volume
ranges from 0-255.



Animations

You may open mng, flic, flc, and fli animations. You may view them, but cannot
edit or save them.





Chapter 3: Odds and Ends



Graphics

Configure Driver: use this to choose the video driver that Sphere will use to run games
on your computer. With each one, you may play your game in fullscreen mode or non-
fullscreen mode.

Pixels: When you increase or decrease the number of pixels in an image, you do not
affect the resolution. You merely change the size of the image. For information on
resolutions, read the paragraphs below.

Screen Width and Screen Height: go to the Game Settings dialog to adjust these. If a
game is run in full screen, then increasing Screen Width and Height will increase the
resolution of your game. If it is not in full screen, then this will simply increase the size
of the screen. If the map is smaller than the screen is, then the map will repeat.

I think that non-full screen mode is always set to a resolution of 320/240. If you use non-
full screen mode, your Screen Width and Height could exceed the monitors width and
height.


Scripting

You need scripts if you want anything to happen in your game. With scripting, you could
create a menu, a battlesystem, or make it look like a gate is closing. The possibilities are
practically endless.

Sphere supports Mozilla's JavaScript (SpiderMonkey), as well as it's own functions and
objects. Documentation for sphere's functions and objects should have come with your
download of this game engine. For JavaScript tutorials, try http://www.java.sun.com or
http://W3Schools.com . If these web sights do not have what you are looking for, you
could ask about tutorials on one of Sphere's message boards, or check the tutorials on
Sphere.sf.net. Sphere also has an FAQ.

Main Script: the script that is automatically executed when your game is run. Your game
function should go here.

Game Function: a function called game that is automatically executed as soon as the
game is run.

        function game()
	 {
	   //place scripting here
	 }


Shortcut Keys

Project Window

Up and Down Arrows: scroll through the items on the Project Window, including Game
Settings, folders, and visible files.

Right Arrow: Show the contents of a folder. If contents are already visible, go from folder
icon to first file of folder.

Left Arrow: If a folder is selected and it's contents shown, this will hide the contents of a
folder. If any file is selected, its parent folder will be selected.

Letter Keys: Go to an item beginning with said letter. Press it again to go to a different
item beginning with same letter.

Enter: If Game Settings is selected, opens Game Settings dialog. If a file is selected,
opens said file.


Menus:

To select an item from a menu, press the first letter of said item or the underlined letter.

Up or Down Arrow: scroll through the items.

Right Arrow: if selected item leads to more items, will display those items.

Left Arrow: if selected item comes from item to the left of it, will close the extra
selection and return to the item on the left

Escape: exits the menu


Dialogs:

Tab Key: go from one field to another.

Spacebar: If there is one checkable box on the dialog, spacebar will check or uncheck it.
If there is more than one box, the field has to be selected.

+ (plus): This key will only check a box.

- (minus): This will only uncheck a box.

Enter: opens/activates the selected field. The same as clicking on it.

If a letter in a word is underlined, pressing that letter will select the corresponding field.




Audiere:

a sound program developed by Chad Austin and used in Sphere. For more information go to aegisknight.org/audiere

Corona: an image program developed by Chad Austin that will be used in Sphere. For more information go to corona.sf.net.




Community

sphere.sf.net: Sphere's SourceForge page. This is the homepage for Sphere.

Aegisknight.org: The homepage of Chad Austin, the creator of Sphere.

GamingW.net: This webpage has a Sphere forum and Sphere tutorials.

Flik's Site: This site contains plenty of good scripting tutorials.

For more websites, go to the links section of Sphere.sf.net.








Glossary

#sphere: Sphere's channel on EsperNet.

Active Window: the window that you are currently using. Denoted by a blue titlebar as
opposed to a gray titlebar.

Alpha: Translucensy level.

Animation: Displaying one image after another to create the illusion of motion.
Spritesets are animated when they move, and tiles may be animated.

Automatic Scrolling: Unless this is set to zero, the map layer will scroll independently of
the camera movement.

Base: The area of a sprite that is blocked by obstructions and that activates Triggers.

bmp: an image file format.

Config: Use this to determine how Sphere on your computer.

Current whatnot: The "where" that something is applied. Example: when editing an
image, the current pixel is the one below the mouse cursor.

Dialog: a box on the computer screen with options for the user to choose or settings to
set.

Directions: Each Spriteset has 8 default directions, each with it's own array of frames.
(north, northeast, east, southeast, etc.)

Display Area: the part of a window that displays the file.

Editor: Use this to make a game.

Engine: Use this to play a game.

Entity: In Sphere, a Person or a Trigger.

Entry Point: The point where the person who the player controls will appear when the
map is opened. Each map must have an Entry Point. Denoted in SDE with "ST"

exe : An executable. Exe files are programs that may be executed, or run.

Executable: A program that may be run, or executed.

Extension: the abbreviation for a file type that is placed after the name of a file and
preceded by a period.

Field: an item on a dialog.

File Format: see file type

File Type: The type of data stored in a file. Example: a sound file stores sounds, an exe
file stores a file that may be executed, etc.

flc: an animation file format.

fli: an animation file format.

flic: an animation file format.

Font: a set of characters (letters, numbers and/or symbols).

FPS: see Frames Per Second.

Frame: An individual picture that is part of an animated sequence.

Frames Per Second: A measure of animation display rate.

Function: a set of scripting that can be called upon elsewhere. You may call a function
in the same script file or a different one, or with any Person or Trigger on a map.

Game Creation Engine: a program that is used to make games

Game Function: the main function of your game. This is the very first function to be
called whenever the game is run. It is found in the Main Script.

GCE: see Game Creation Engine

IDE: see Integrated Development Environment.

Index: a list of items that are numbered, starting with 0. One example is the tiles of a
tileset. The first tile is tile #0, the second is tile #1, etc.

Input Person: The person that the player directly controls.

Integrated Development Environment: Co

  
Online  
There are 1 unlogged user and 0 registered users online.

You can log-in or register for a user account here.

Login  




 


 Log in Problems?
 New User? Sign Up!


SourceForge LogoAll trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster.
Page created in 5.1928930282593 seconds.