PART ONE

THE BASICS, OF MAKING A GAME WITH SPHERE AND SDE

HELLO.

SO YOU WANT TO MAKE A GAME WITH SPHERE, HEY?

WELL.

OPEN UP SDE.
GOTO FILE > NEW > PROJECT

SELECT THE PROJECT NAME AND GAME TITLE.

NOW THE FIRST THING YOU WANT TO DO IS MAKE A NEW SCRIPT

SO IF WE RIGHT CLICK ON THE ITEM 'SCRIPTS' IN THE PROJECT WINDOW, AND SELECT INSERT.

IT'LL SAY SUB DIRECTORY 'SCRIPTS' DOES NOT EXIST CREATE?

CLICK YES

NOW WE'VE GOT THE FOLDER FOR IT

BUT INSTEAD OF BROWSING FOR A SCRIPT FILE, CLICK CANCEL BECAUSE WERE GOING TO START FROM SCRATCH HERE.
DON'T WORRY IT WONT DELETE OUR NEW FOLDER CALLED 'SCRIPTS'

GOTO FILE > NEW > SCRIPT

OH NO, WHAT'S THIS?

WELL IT'S SPHERESCRIPT, WHICH WE'LL DO MORE IN DEPTH LATER.

JUST TYPE THIS INTO IT.

    void game()
    {
    	AddPartyCharacter("aegis.rss");
    	ChangeMap("castle.rmp");
    	ChangeSong("theme.s3m");

    	MapEngine();
    }

AND SAVE IT.

FILE > SAVE AS
SAVE IT IN YOUR 'SCRIPTS' DIRECTORY AS GAME.SS

OKAY, NOW YOU HAVE TO COMPILE THE SCRIPT SO THE COMPUTER CAN UNDERSTAND IT.

GOTO SCRIPT > COMPILE

NOW GO BACK TO YOUR MAIN PROJECT WINDOW

WINDOW > PROJECT [WHATEVER YOU CALLED IT]

GOTO THE ITEM 'SCRIPTS' AND SELECT INSERT AND SELECT GAME.SS

IT CREATES A '+' SIGN NEXT TO THE ITEM 'SCRIPTS' AND IF YOU CLICK THAT YOU CAN SEE 'GAME.SS' THAT YOU JUST MADE

AND GOTO THE ITEM 'GAME SETTINGS' AND LOOK IT AUTOMATICALLY SELECTED GAME.SS AS YOUR SCRIPT CONTAINING THE GAME FUNCTION

SELECT THE ITEM 'TILESETS' FROM THE PROJECT WINDOW

CREATE THE TILESETS SUB DIRECTORY AND EITHER BROWSE FOR A TILESET ALREADY CREATED OR MAKE YOUR OWN.

FOR NOW WE'LL ASSUME YOU BROWSED AND FOUND CASTLE.RTS

IT'LL ASK IF IT SHOULD BE COPIED TO YOUR 'TILESET' DIRECTORY, ANSWER YES.

NOW LOOK. IT MADE A LITTLE '+' IN A BOX.

CLICK ON THAT AND VIEW THE TILESET IF YOU WANT BY JUST CLICKING ON THE ITEM SAYING 'CASTLE.RTS'

ASSUMING YOU DID USE CASTLE.RTS YOU WONT HAVE TO BOTHER WITH THIS.

WE NOW WANT TO MAKE OUR MAP, SO WE CLICK ON THE ITEM 'MAPS' AND CREATE THE SUB DIRECTORY MAPS.

AND WE'LL MAKE OUR OWN SO CLICK CANCEL ON THE BROWSE BOX.

OKAY. NOW WE GOTO FILE > NEW > MAP

AND WE MAKE A MAP WITH CASTLE.RTS SELECTED AS THE TILESET FOR THE MAP.

OKAY THE WORLD OF THE MAP EDITOR.

ON THE LEFT, THERE'S A SMALL COLUMN WITH A BOX.
RIGHT CLICK ON THE BOX AND A DROP DOWN LIST APPEARS.
MORE ON THIS LATER.

THE BIG MIDDLE COLUMN, IS THE MAP AND THE RIGHT COLUMN IS THE TILESET.

SELECT A GRASS TILE FROM THE TILESET AND DRAW IT ON THE MAP.
JUST LIKE SIM CITY?

HAVE FUN, BUILD A HOUSE, AND GET USED TO MAKING MAPS.

SAVE IT AS CASTLE.RMP
GOTO FILE > SAVE AS

OKAY JUST SIDE-TRACKING FOR A MOMENT.

YOU NOW HAVE TO GO BACK TO THE MAIN PROJECT WINDOW
GOTO WINDOW > PROJECT [WHATEVER YOU CALLED IT]

AND SELECT THE ITEM 'MUSIC' MAKE A NEW SUB DIRECTORY AND BROWSE FOR A FILE CALLED THEME.S3M

RENAME A DIFFERENT S3M FILE IF YOU HAVE TO.

AND NOW SELECT THE ITEM 'SPRITESETS' CREATE THE SUB DIRECTORY AND BROWSE FOR A FILE CALLED AEGIS.RSS

REMEMBER THIS:-

    void game()
    {
    	AddPartyCharacter("aegis.rss");
    	ChangeMap("castle.rmp");
    	ChangeSong("theme.s3m");

    	MapEngine();
    }

OKAY LETS BREAK IT UP INTO SECTIONS

FUNCTION SECTION | WHAT IT DOES
void game() | IS THE FUNCTION THAT IS RAN STRAIGHT AWAY WHEN THE GAME IS LOADED
{ | IS A CURLY BRACKET THAT HELPS THE COMPUTER KNOW WHERE THE FUNCTION STARTS
AddPartyCharacter("aegis.rss"); | IS TELLING IT TO ADD A CHARACTER CALLED AEGIS TO THE PARTY
ChangeMap("castle.rmp"); | TELLS IT TO CHANGE THE MAP TO THE CASTLE MAP WE MADE
ChangeSong("theme.s3m"); | CHANGES THE SONG PLAYING IN THE BACKGROUND TO THEME.S3M
MapEngine(); | IS RUNNING A FUNCTION WHICH IN THIS CASE, JUST ACTIVATES OUR CHARACTER ONTO THE MAP AND PLAYS THE BACKGROUND MUSIC
} | TELLS THE COMPUTER THAT THE FUNCTION HAS ENDED

MAKES A LITTLE BIT MORE SENSE NOW DOESN'T IT?

OKAY BACK TO OUR CASTLE MAP.

ON THE LEFT SIDE OF THE MAP EDITOR THERE IS A BOX AS MENTIONED EARLIER.

IT HAS THE NAME BASE, THIS IS THE MAP LAYERS.
WHICH MEANS YOU CAN HAVE TILES ON THE MAP THAT ARE BELOW AND ABOVE YOU.

SIDE-TRACK - HOW IT WORKS

IN THE TILESET EDITOR THERE IS SOMETHING CALLED ALPHA. 100% ALPHA MEANS NOT SEE THROUGH, 0% ALPHA MEANS SEE THROUGH AND 50% ALPHA WOULD MEAN SLIGHTLY TRANSPARENT.
E.G. SO IF YOU WALK UNDER A CLOUD, THE CLOUD COULD BE 20% ALPHA AND YOU'D STILL SEE YOURSELF ON THE LAYER BELOW.
E.G. IF YOU WALK BEHIND A BUILDING, THAT BUILDING PROBABLY HAS PART OF IT ON THE LAYER ABOVE YOU THAT HAS 100% ALPHA IN IT.

BACK TO WERE WE WERE

SO CLICK ON THE GRAY BOX, AND SELECT 'NEW LAYER'
OH NO, IT DID NOTHING.
WELL THINK ABOUT IT. THE BASE LEVEL IS AT THE TOP, SO JUST SELECT YOUR NEW LAYER AND CLICK 'MOVE UP'
BUT OH NO, IT ALL WENT BLACK.
DON'T WORRY, THE LAYER IS AUTOMATICALLY FILLED WITH THE FIRST TILE OF YOUR TILESET SO JUST SAVE AND CLOSE OUR MAP 'CASTLE.RMP'
JUST GO INTO THE TILESET EDITOR BY SELECTING YOUR TILESET FROM THE PROJECT WINDOW, AND SELECT 0% ALPHA FROM THE SLIDE BAR TO THE RIGHT OF THE TILESET EDITOR. NOW CLICK ON THE BUTTON SAYING 'FILL ALPHA'

FILE > SAVE

AND GO BACK TO THE MAP

NOW OUR BASE LAYER IS BELOW OUR HIGHER LEVEL AND THE BLACK TILES IN OUR HIGHER LAYER HAVE ALL 100% ALPHA IN THEM.
IF YOU WANT TRY IT WITH 25% ALPHA AND YOU'LL GET A SHADOW LIKE EFFECT.

THE CASTLE TILESET HAS A CERTAIN ORDER OF TILES, IT GOES LIKE THIS:

    TEXTURES - E.G. WHERE YOU'LL FIND GRASS
    SHADOWS - E.G. MAKE SHADOW EFFECTS WITH THESE
    CONNECTERS - E.G. SAND THAT LINKS UP WITH GRASS
    CLIFFS - CAVERN LIKE EFFECTS
    HOUSES - HOUSE TILES E.G. CASTLE
    SIGNS - E.G. INN THIS WAY
    FURNITURE - E.G. BEDS AND CHAIRS
    WINDOWS - E.G. NICE WEATHER OUT
    OUT - TILES THAT CAN MAKE SPACE AND LANDSCAPE SCENES
    GARDEN - E.G. FLOWERS, TREES
    PEOPLE - E.G. TWO ANIMATIONS FOR EACH PERSON

PART TWO

ENTITIES

SO YOUR IN THE MAP EDITOR AND YOU'VE DRAWN A CASTLE.

WE CAN NOW RIGHT CLICK SOMEWHERE BY THE CASTLE ON THE MAP AND A DROP DOWN LIST APPEARS.
SELECT 'ADD ENTITY' WHICH MEANS ADD AN EVENT IN YOUR GAME, IN THIS CASE A CHARACTER CALLED BOB.

NOW WE'LL LEARN ABOUT VARIABLES AND A LITTLE BIT MORE OF SPHERESCRIPT TO USE IN OUR ENTITY.

SIDETRACK

A VARIABLE IS JUST A PLACE TO STORE INFORMATION.
TO USE A VARIABLE ALL YOU NEED TO DO, IS TO DECLARE IT.
IN THIS CASE WE'LL MAKE A VARIABLE CALLED 'NUMBER' AND THEN ALLOCATE 5 TO THE NUMBER.

    int NUMBER;
    NUMBER = 5;

SECTION | WHAT IT DOES
int NUMBER; | THIS DECLARES OUR VARIABLE AS AN INTEGER VALUE, WHICH IS ANY WHOLE NUMBER
NUMBER = 5; | NOW WE SET OUR INTEGER, TO FIVE SO 'NUMBER' IS EQUAL TO FIVE

ANOTHER SIDETRACK

JUST WHY DOES SPHERESCRIPT NEED THE LITTLE SEMI-COLON AT THE END OF EACH LINE?
WELL THE ';' ENDS THE LINE, SIMPLE AS THAT.
BACK TO VARIABLES

OKAY WE'VE MADE A INTEGER TYPE VARIABLE USING 'int' BUT WHAT IF WE WANT TO HAVE A DIFFERENT TYPE OF VARIABLE?

SECTION | WHAT IT DOES
int | INTEGER
color | COLOR
image | IMAGE
string | A STRING OF TEXT

BACK TO OUR MAP.

OKAY SO WHAT WE WANT IS A CHARACTER CALLED BOB, THAT RUNS A FUNCTION WHEN YOU TALK TO HIM.

THAT'S ALL FOR THE TUTORIAL FOR NOW FOLKS.

TIL NEXT TIME THEN.
FLIK.