SpaceChimp

Big Book Of Enlightenment

 

 

1. Installation

1.1 (From SVN)

Download “SpaceChimpSVN” from the release page. This tool will let you very easily create -

a local working copy of the SpaceChimpSVN branch. The tool includes a read-me that instructs you how to use it.

But put simply, you simply select an empty folder, then click ‘Checkout SpaceChimp’ and it will do the rest.

You will need some form of svn installed most likely, unless SharpSVN can live without one. Doubtful though.

1.2 (From Latest Release)

Download the self-extracting exe, select an output folder, and click proceed/next and it will unpack the entire release onto that folder.

1.3 (Important File Locations)

The bins are already present in both svn and releases, but they are hidden away in bin/debug bin/release folders. If you ever used Visual Studio you already know where to look I assume, but if not, do a windows search for exes or dlls within the project folder, and you will find all the binaries to run the ide and so fourth without having to recompile anything.

1.4 (Project solution Location)

It is within SpaceChimp/StarKnitesI/StarKnites1.slh

It will be moved soon and this document will be updated.

2.Joint Basic Brief

Joint basic is a new paradigm in computer programming. It’s basic premise is to generate multiple outputs from a single source base/language.

Joint scripts consist of the following several components at present (Still Alpha software remember, so this list will grow rapidly over time)

2.1 States

The State keyword is used, much like ‘Class’ is used or ‘Type’ is used, in other languages. But it is very different from a class.

A state is a class, do not get me wrong, but it is more than just a container with members and variables. It can be pushed

onto a active stack of states. The very top-most(Last pushed on) stack is considered the current active state. The active state

is updated, and draws anything it needs to. And once the state has finished it’s job/portion of responsibility , you can safely

call ChimpApp.PopState(“StateName”) in C#, or in Joint it’s self “PopState <StateName>” – to pop the state, and return to the previous state, which once again becomes the active state. then that can be popped, and the previous one becomes active.

To specify the start state, add the Auto keyword.

An example bare-bones state might be (And remember the ide can create an empty one for you if you push the ‘Create New State’ button in the IDE toolbar)

State MyState Auto

Event OnStart

End

Event OnUpdate

End

Event OnDraw

End

End

Note, identation is not important. But case is! state will return an error. it must be State. all keywords begin with a capital to avoid any confusion and to keep code professional looking. At any time you can push the big ‘Sync’ button to re-highlight the code if it isn’t highlighted correctly/at all.

The 3 functions are called automatically by the engine if the state is active. Auto does not mean the state is always active, it just means the engine pushes onto the active list for you when the game/app starts. Much like the Auto keyword in UnrealScript.

There are other events too, but more on them later.

States can also contain both per instance, or global(static) variables.

Here is an example of some variable decelerations.

State TestState Auto

Var (Float test1,String test2,Int test3,Bool test4)

Var (OtherState state1)

Var (String staticString1) Static

End

So the format is, (Var (<VarList>))

so to declare an int called x it would be,

Var (Float X)

or to declare a static variable called X, it would be,

Var (Float X) Static

There is no limit to how many  vars a class can have other than memory/cpu impact.

Note all JointScripts in most cases will be compiled to machine code JIT-Style, because, joint code, is in turn converted to many different types of files, but the core type is C#. This is in turn compiled into a C# dll, and most .Net implentations will in return compile this to native machine code before running. 

So your scripts can be VERY complex. Do not worry about speed. No more than you would if you were coding a raw C# app anyway.

----

End Draft 1 -

Docs to be updated more soon.

Last edited May 28, 2011 at 5:20 PM by AntonyWells, version 4

Comments

No comments yet.