Author Topic: Rate blocklanders, SyjSand (games) and other stuff. Syerjchep.org --- my site  (Read 4047 times)

I still have the record of 141 votes.
:cookieMonster:

I still have the record of 141 votes.
:cookieMonster:
Most of them are Down Votes for me >=(

Code: [Select]
v --- Modify variable.
v <var name> <function> <numeral>
Examples:
v cat = 1 --- sets a variable named "cat" to one
v cat += 1 --- increments "cat" by one
v cat -= 1 --- decreases "cat" by one
v cat *= 2 --- multiplies cat by two
v cat /= 2 --- devides cat in two

b --- Beeps.
b <frequency> <length>
Examples:
b 500 10 --- A beep for a tenth of a second at a freq. of 500
b 250 100 --- A one second beep at a frequency of 250

w --- Waits.
w <length>
Examples:
w 500 --- Waits for five seconds.
w 1 --- Waits for ten miliseconds.

r --- Draw a solid color rectangle.
r <x> <y> <w> <h> <color>
Examples:
r 123 115 10 10 50 --- Draws a 10x10 rectangle in the center of the screen with color 50.
r 0 0 256 240 150 --- Fills the entire screen with color 150.

d --- Flips the screen.
d
Examples:
d

l --- Loads a sprite file.
l <type> <filename>

Examples:
l 16 ghostsprite --- Loads a 16x16 sprite from "./ghostsprite.sjbs"
l 32 bigsprite --- Loads a 16x32 sprite from "./bigsprite.sjbs"

i --- shows a sprite on the screen
i <type> <id> <x> <y>
Examples:
i 16 0 32 32 --- Shows the first size 16x16 loaded sprite at 32,32
i 32 5 18 59 --- Shows the sixth size 16x32 loaded sprite at 18,59

c --- Conditional, executes next line if statement is true.
c <var1> <function> <var2>
Examples:
c 5 == 5 --- Next line will run, as 5 is in fact, equal to itself.
c 8 < 10 --- Next line will run, as 8 is less than 10.
c cat > 10 --- Next line will only execute if cat is greater than 10.

f --- For/while statement.
f <var1> <function> <var2>
Examples:
f 1 == 1 --- Code from there to end statement will run until the program is termaniated.
f cat < 10 --- Code will run until the "cat" variable is less than 10.

e --- End a for/while statement.
e
Examples:
e







Other notes:

Default variable replaces:
lk --- If left arrow key is pressed, this equals one.
rk --- If right arrow key is pressed, this equals one.
dk --- If down arrow key is pressed, this equals one.
uk --- If up arrow key is pressed, this equals one.
ak --- If the 'a' key is pressed, this equals one.
bk --- If the 'b' key is pressed, this equals one.

There are two types of sprites, 16x16 and 16x32 sprites.
They are raw data types. Just 256 (16x16) or 512 (16x32) bytes of the same type of color values
as the program uses. No other data in them. Extension is always '.sjbs'.

The script files should always have their extensions made to '.sjtc'.

The program works with 8bit color.
This means that there are 256 colors avaiable. (0 to 255)
You can either figure out colors by knowing the 3r3g2b formula, or preset values for it.
Or you can just mess around.
Hint: 0 is black, 255 is white.








Example program:

v x = 100
v y = 100
l 16 tee
v color = 0

f 1 == 1
v dframe = 0
if dk == 1
v y += 1
if uk == 1
v y -= 1
if lk == 1
v x -= 1
if rk == 1
v x += 1
if ak == 1
b 200 10
if bk == 1
b 300 10

if y > x
v color = 200
if x > y
v color = 0

r 0 0 256 240 color
i 16 0 x y
d
w 1
e




Explaination of example program:
Loads a 16x16 sprite called "tee.sjbs"
Sets some starter values.
Allows the user to move this sprite around the screen with the arrow keys.
Makes a lower pitched beep when a is pressed. Makes a higher beep when b is pressed.
If the sprite is on the lower left side of the screen, the background turns red.
Otherwise the background is black.

Made a complete tempoary page for that project:
http://syerjchep.org/othergame.html




I supposed I kinda abandoned this thread in favor of my game dev thread.
I don't know, I'll probably make that thread some kind of combonation thread since it's bigger.