Sphere (program)

Sphere (program)

Sphere is a cross-platform, open source computer program designed primarily to make role-playing games (RPGs) similar to those found on the SNES and Sega Genesis consoles. Sphere was originally coded by Chad Austin. When making a game with Sphere, most things are scripted using the JavaScript (often abbreviated as "JS") language (though very early versions used its own Spherescript language) with special functions and objects for maps, spritesets, images and other resources.

Though Sphere was designed to make RPGs, because of the flexibility of a scripting language it can be used to make almost any other type of game, even basic applications such as Drawing programs.

Sphere, unlike other game-makers who can create a single Executable file, keeps all of its files in folders, which involves many file-handling abilities. This is in tune with Sphere's Open Source ideology. It also has access to networking functions, allowing for gameplay over the internet or LANs.

Recent versions of Sphere also support basic 3D graphics functions using the OpenGL video driver. However, it is more complicated to use than the 2D graphics functions and is still in early stages.

Additionally, a modified version of Sphere was made where one could choose to use Python as the scripting language by changing a line of text in the "game.sgm" file. This feature was never completed and was not intended to be an official release, especially due to the conflict two incompatible scripting languages would make in the engine's community.

The Sphere engine

Sphere has a wide range of basic abilities that are embedded in the engine itself and are run via scripts written in Javascript.

Drawing functions

A great deal of drawing abilities are provided within the engine. These range far greater than the simple image, line, or shape drawing available in the majority of game engines. These functions allow game creators to create on-screen effects without tampering with image-editing software. As an added bonus, there is also a special image type called "windowstyles" which are images that can be stretched but keep their borders and corners intact - a tool used for displaying text boxes in games.

As for text, sphere allows users to import text from their operating system, and can also edit them within the IDE. A number of effects are available, such as applying gradients and expanding its size. The fonts themselves are not limited to the basic 256 characters, but can incorporate many more characters.

If any image files are used, they are saved in a folder within the game itself, which can be referred to from scripts.

Due to using JavaScript, highly complex and systematic functions, such as a Bézier curve are possible.

Programming with Sphere

Sphere uses the JavaScript language, used largely in the web. This means Sphere supports programming native objects, like strings, arrays, and objects, while retaining their native properties (like string.substr or array.length). This Object-oriented programming language allows Sphere to create highly adaptable objects and systems, producing powerful, structured and organized scripts.

The Sphere JS function "Abort()" is similar to "Alert()", common for debugging JavaScript on the web.

Here is Hello World as used in Sphere:function game(){ Abort("Hello World");}

External links

*http://sphere.sourceforge.net/ - Official Sphere Site
*http://www.spheredev.org/ - Dedicated Sphere community
*http://www.sphere-2d-engine.net/ - A French Sphere community
*http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference - Mozilla JavaScript Reference
*http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide - Mozilla JavaScript Guide
*http://www.spheredev.org/smforums/index.php?topic=592.0 - Forum page with Sphere Python documentation


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Sphere (disambiguation) — A sphere is an object shaped like the surface of a ball, but can be used to refer to a ball shaped object, as well as a sphere like or annular region or shell. Additionally, it has several metaphorical uses.In mathematics: * Sphere, the set of… …   Wikipedia

  • Sphere de Dyson — Sphère de Dyson Pour les articles homonymes, voir Sphère (homonymie) et Dyson (homonymie). Diagramme d’une coquille de Dyson d’une unit …   Wikipédia en Français

  • Sphère de dyson — Pour les articles homonymes, voir Sphère (homonymie) et Dyson (homonymie). Diagramme d’une coquille de Dyson d’une unit …   Wikipédia en Français

  • Sphère de Dyson — Pour les articles homonymes, voir Sphère (homonymie) et Dyson (homonymie). Schéma d’une coquille de Dyson d’une unité astronomique de rayon. Une sphère …   Wikipédia en Français

  • Sphere Project — The Sphere Project [ [http://www.sphereproject.org/| Sphere Project] ] was launched in 1997 to develop a set of minimum standards in core areas of humanitarian assistance. The aim of the project is to improve the quality of assistance provided to …   Wikipedia

  • sphere — 01. Everyone working in the [sphere] of education will be affected by the government s budget cuts. 02. After World War Two, Czechoslovakia fell within the Soviet [sphere] of influence. 03. Free moving liquid in outer space will form itself into… …   Grammatical examples in English

  • One-Million-Liter Test Sphere — U.S. National Register of Historic Places …   Wikipedia

  • Salyut program — Salyut 7, the final Salyut station to be launched, as seen from the departing Soyuz T 13 spacecraft …   Wikipedia

  • Dyson sphere — A Dyson sphere (or shell as it appeared in the original paper) is a hypothetical megastructure originally described by Freeman Dyson. Such a sphere would be a system of orbiting solar power satellites meant to completely encompass a star and… …   Wikipedia

  • Greater East Asia Co-Prosperity Sphere — Poster of Manchukuo promoting harmony between Japanese, Chinese, and Manchu. The caption, written from right to left, says: With the help of Japan, China, and Manchukuo, the world can be in peace. The flags shown are, left to right: the flag of… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”