RayEngine Version 2.0 Beta 3.97

Show off your arty creativity here! Post fanfics, paintings, drawings, and anything Rayman that you have made!
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
XTUX345
Green Lum
Posts: 19
Joined: Sat Jan 29, 2011 7:25 pm
Tings: 95

Re: RayEngine Version 2.0 Beta 3.97

Post by XTUX345 »

Oh.

You see, the RayEngine interests me greatly, and I've been thinking of using it for a fangame that I might do eventually (not related to Rayman, sadily). I have a fair amount of experience with 2D graphics, and I was wondering if the RayEngine supports high resolutions and 32 bit color support. Even if it doesn't, I'll still use it, but if it does, then I'm definantly using it for my project.
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

The engine supports 32 bit sprites (png,gif, gmspr) and alpha channel :p

About high-resolution, it depends on your computer, most of the sprite i use are 64x64 / 128x128 px

What's this fangame ?
XTUX345
Green Lum
Posts: 19
Joined: Sat Jan 29, 2011 7:25 pm
Tings: 95

Re: RayEngine Version 2.0 Beta 3.97

Post by XTUX345 »

Terminapor wrote: What's this fangame ?
Oh, it's not related to Rayman at all. It's just for a website called the Club Penguin Fanon Wiki, at http://fanon.clubpenguinwiki.info/.

You see, I'm interested in using the RayEngine for a 2D platformer I've been planning on making for that site for a long time, and this engine looks the most promising.
da1
Incrediball
Posts: 76
Joined: Thu Jun 10, 2010 6:38 pm
Tings: 358

Re: RayEngine Version 2.0 Beta 3.97

Post by da1 »

Hay, what do you think, you finish before end of this year?
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

The full engine, i'm not sure... (the biggest part would be the AI for multiplayer)

I'm almost done with the event (rayengine script); yet you can make some ennemies (stonedogs, some antitoons, swinging prickles, every ennemies that doesn't have a 'view')

I have to add the screen-moving stuff, in-game weather controller (spawn weather whenever you want in the map), triggers (that can modify an event's behaviour), factory (which is a little bit like the gendoor) the type editor (which'll let you do making some new types, such as accelerators) region-controller (which will load every ressource for a region, instead of only loading the required datas for a map) and some other stuff..
da1
Incrediball
Posts: 76
Joined: Thu Jun 10, 2010 6:38 pm
Tings: 358

Re: RayEngine Version 2.0 Beta 3.97

Post by da1 »

Mabe first release some kind of beta?
Sorry if it looks like I underestimate your hard work, but it hard to prove, using internet translators :roll:
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

:D

Yeap, soon i just have to re-make the rayman's fist and fix some bug regarding the map editor ;)

Or i can already release a version without map editor nor animation editor
da1
Incrediball
Posts: 76
Joined: Thu Jun 10, 2010 6:38 pm
Tings: 358

Re: RayEngine Version 2.0 Beta 3.97

Post by da1 »

I take a first option (soon) :wink:
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Alright :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Next release ! (too lazy to make a real post, i'll copy it from betilla's garden x) )


RayEngine Version 3.0 Beta 3.5

-Big post-

Map Editor

To create a new map, click on file>new map, choose the size, then click on choose template, go to your Rayengine folder\content\maps\graphic\ and take the template you wants, and then press ok (name is unused)
Now, there is two window : One that contains the template, and one that contains your map.
Click on the map and drag your mouse to select the parts from the template, then go to your map and do the same thing to past, just like in the original mapper; the only difference is that right click is used to delete instead of copy :)
shift+mouse wheel is used to make zoom, and shift+middle mouse button to move the camera (sorry for those who don't have mouse wheels :wacko: )

When your map's ready, go to edit and take type editor to modify the types. The engine only supports jump-through, standard, slopes & water blocks. All the rest are like the jump-through one (yeah, that's a little bit stupid, but i was too much lazy :D )

Then, go to edit>event editor, a list should appears.
Basic spawnpoint are not used in the engine, i forget to remove them, counter was previously used to count events -obviously- and could activate gendoor/killdoor, but they've been removed because they were source of some bugs..

Anyways, to place a event, click on it inside the list, then right click somewhere in the map. To move it, keep the control key pressed and move your mouse.
Ctrl + M flips the object's direction

Right clicking on a AI (stoneman/stonedogs/black drummer/etc) will open a small window, where you can change the costume and the teamid (255 will make-em friendly with rayman and kill other AIs)

Once done, go to file>save map and give it a name (that's not the name shown in the engine, but just the name of the map's folder)

I think i've said everythings for the map editor :D

Animation Editor

Big part of the engine :ph43r:

The animation editor have two big parts :
Template, and animations.

Template contains precious data about your objects, for those who have already used 3d software, template is a little bit like rigging, you put your bones and then you can move'em to make the animations

So, to make a new template, go to file>new template
Then, pick a sprite (Content\Sprites), which will be the parts of your object.

Then, right click to add a bone, and mouse wheel to change the part,
control + mouse click to move the part
arrow to move it precisely
control + arrow to change it's direction
pageup/pagedown to change the layer of the bone
control + mouse wheel to change the chunk (sprite package)

The template have a chunk-support, it means that you can use up to 255 differents sprite for one animation, if you want to add some chunks, go to edit>change parts double-clicking on a existing sprite to change it, and add chunk/remove chunk to add new sprite or remove existing one
Then, a important part (or not), naming the bones.
It's important if you want to attach later hitboxes/hitzones.viewzones to them, go to edit>rename bone to rename it (never use spaces, "bone 01" will be considered as "bone01" inside the engine, but "bone 01" as it name :ph43r: )

Once done, go to file>save template, create a new folder and save it as template.tmp.
It will also generate a file called ref.anim, don't touch it :D

Now your template is done, go to file>new animation to start making a animation.

Image

Same controls as the template editor, but you can't move a part using the mouse, and you can't change the chunk id

Then, another function (not used yet in the engine), the origin
The origin is used to move the whole object, and will also move the event, instead of only moving the bones :D

To activate the origin, go to edit>use origin
To move the origin, press the alt key :)

To save the animation, simply go to file>save animation and place it in the same folder as the template.

Sprite Editor

Sprite editor is used to convert a gif file to a spr file, used in the engine :)
spr file have an important information, the origin, in the animation editor, it's used to place the sprite in relation to the bone.
When making a sprite for the rayengine, first use a green (255 to green 0 to red and 0 to blue) background.
Then, draw a black cross, and leave it visible only in the first frame. The second frame have to be empty, then you can put your sprites :)
Save it in gif format, go to file>open and take yout gif file.
Say yes when the engine asks for using the automatic offset finder (it will be where you've placed your cross)


Events


Now, the biggest part : The events

ok, first create a new *.info file inside the object folder or copy an existing one, open it and remove all the line if it was a copy.

Here is the structure :

AI :

Code: Select all

kind=AI;
filter=whateveryouwants; (filter is used inside the map editor, it creates a group)

@setData
character=aaa; (This is the folder of the animations, for instance, character=stoneman; will uses the stoneman's animations & template)

default_costume=0; (define the default costume.. )
initial_state='xx'; (which state is used when the event is created)
initial_substate='yy'; (which substate is used when the event is created)
gravity=??; define the gravity, default is 0.33
editor_animation=aa; (define which animation plays the AI inside the map editor)

deactivated_when_out_of_range=0/1; (tell the engine that we deactive the instance if it's out of view)
destroed_when_out_of_range=0/1; (tell the engine that we destroy the instance if it's out of view)
use_controller=0/1; (controller automatically destroys the instance when it's out of view, and recreate it before the player reaches it)
@end

@setCostume
costume0:
chunk_0=spr0;
chunk_1=spr2;
chunk_n=spr_gnagnagna;
name=Superman;
end

costume1:
chunk_0=spr0;
chunk_1=spr2;
chunk_n=spr_gnagnagna;
name=Batman;
end

@end

(The costumes defines the sprites used, so you can use different colors/shapes for only one AI)
OBJECTS:

Code: Select all

kind=object;
filter=gnagnagna;

@setData
animation_package=aa; (same as character for the AI)
chunk_0=; (defines the sprite used for the chunk 0)
chunk_n=; (defines the sprite used for the chunk n)
editor_animation=; (animation played in the map editor)
initial_state=''; (same as AI)
initial_substate=''; (same as AI)

@end

Remember to add the ";" at each end of line, and space are not allowed /!\

Now, to add some extra files :

@setAnimationList
anim0:
anim1;
@end

Import the animations inside the engine (else you won't be able to play them)

@setSoundList
sound0;
sound1;
@end

Import the sounds 'sound0' & 'sound1'

@setEffectList
effect0;
effect1;
@end
Import the effects inside the engine

There is also @setObjectList, but it doesn't works, it loads the required events but skips the current event.. :/

RayEngine Script

The script are used to make an event's behaviour, here is the synthax (inside the *.info of the event)
It works with state & substates, state are used to control substate, by example you check if the object get hits and set the substate to "hit" which play an animation and a sound

Code: Select all

@setScript (begin the script)

@setState('state_name') (define a new state called state_name)
example1 (real) 1234; (create a new variable called example1 which is a real with value 1234
example2 (irandom) [0,10]; (create a new variable called example2 that choose a value between 0 & 10 (0,1,2,3,etc)
example3 (random) [0,10]; (create a new variable called example3 that choose a value between 0&10 (not an integer it can be 0.566541522 or 9.524154)

{ (begin the code of the state)
example1=2; (example1 is now "2" instead of 1234)
} (end the code of the state)

@setSubState('substate_name') (define a new substate called substate_name)
example1 (real) 0;
example2 (irandom) [0,888];
{
example2=8; (example2 is 8 instead of a random value between 0 & 888)
}
@endSubState

@endState

@endScript
Every @setState,etc are case sentitive, the engine won't recognize @setstate or @Setstate

parentheses are not allowed inside the code, the following line example1=(1+8)*16; won't work.
Every lines should have a ';' at it's end.

assignments
variable = value; assign the variable to a value
variable +=k; increment the variable by 'k'
variable -=k; decrement the variable by 'k'
variable *=x; multiply the variable by x
variable /=x; divide the variable by x

Logic Check
variable==value (check that the variable is equal to value)
variable!=value (check that the variable is not equal to the value)

Operator
&& : And operator
|| : Or operator

Condition Synthax

Code: Select all

if a==8 && b!=7
//do something
else
//do something else
endif
or

Code: Select all

if a==1 || b==0
//do something
endif

Available functions

play_animation("animation",ratescale) play the animation "animation" ratescale defines the speed, default is one. the animation stops when reaching the last frame and freeze

loop_animation("animation",ratescale) same as play_animation but the animation is looped.

reset_animations() simply reset the frame index to 0

get_bone_x(bone_name) retrieves the x position of the bone by using it's name
get_bone_y(bone_name) retrieves the y position of the bone by using it's name

play_sound('sound',unused); play a sound

viewzone_create(positionX,positionY,width,height,name_of_the_viewzone,attached_to_the_event,bone_name,filter)

Creates a new viewzone at the position X & Y with desired width & height, the name of the viewzone is used to retrives it . attached means the viewzone is attached to the event, when putting '2', the viewzone is attached by don't use the event's dir.
Bone_name is used if you wants to attach it to a bone, else leave it empty.
filter defines what the viewzone have to check, there is three filters :
players
ennemy (every AI or player that don't have the same teamid as the event)
ennemy_AI (every AI that don't have the same teamid as the event)

viewzone_check('viewzone_name') : check if the viewzone have seeks a object, return -4 if none, or return the ID of the event

hitbox_create(x,y,w,h,name,attached,bone_name,destroyable);
create a new hitbox at the position x & y with width w and height h, attached defines if the hitbox is attached to the event or not.
bone_name is the bone where the hitbox is attached, leave it empty if you don'y want to attach it to a bone. destroyable means the hitbox is destroyed everytime it touchs an ennemy's hitzone)

hitbox_set_active(hitbox_name,active) : activate or deactivate the hitbox

hitzone_create(x,y,w,h,name,attached,bone_name,unused);
same arguments as hitbox_create

hitzone_set_active(hitzone_name,active) activate or deactivate hitzone

hitzone_check(hitzone_name) : check if there is a hitbox inside the hitzone -return -4 if none or return the hitbox's ID- if you put -1 as the name, it will check all the event's hitzone

spawn_event(x,y,event_to_spawn,initial_state,initial_substate) spawn a new event, it return it's ID.

destroy_event(eventID) destroy an event, -1 means self.

move_to_event(event_id,speed) : The event starts following another event

distance_to_event(event_id) : return the distance to the event

spawn_effect(x,y,effect_name,layer): spawns a new effect

get_map_type(offsetX,offsetY) return in a string the block at the current position, 0,0 will check the coords X & Y;
'sloper' is a 22.5° slope to the right
'slopel' is a 22.5° slope to the left
'sqsloper' is a 45° slope to the right
'sqslopel' is a 45* slope to the left
'block' is a standard grey block
'jtblock' is a jump-through block
'void' means there is no block
'' means unknow block

shake_camera(amountX,amountY,time) : shake the camera for a specific amount of time (i don't know if it still works :D)

Default variables

Every objects have some default variables, here is the list :
isonground : 0 if not on ground, 1 if on the ground.
isnearvoid (ai) : 1 if the object is near the void, else 0
isagainstwall : 1 if the object is against a wall, else 0
collide_with_map: 0 if the object skips the collision (such as the lavarock's chunks)
state : current state, state='somethin' will switch the event's state
substate : current substate, substate='something' will switch the event's substate
frame_index : current frame of the animation
framecount : how much frames have the animation
dir : direction of the event (1 means to the right, -1 means to the left)
movespeed : move the event, for instance :
movespeed=2 will makes the event moving 2pixels every frame, it depends on the dir.
xspeed same as movespeed, but doesn't depends on the direction
yspeed : vertical speed
gravscale : gravity (0.33 by default)
flag_animation_end : 1 if the event reaches the last frame_index
notification : return the notification of the current frame
map_collide : return 1 if the event is colliding with the map

Mmmhh.. i think i've said everythings, but not sure :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

-reserved for a tutorial about scripts-
Chilly Willy
Elder Teensy
Posts: 108
Joined: Tue May 26, 2009 1:37 am
Contact:
Tings: 4230

Re: RayEngine Version 2.0 Beta 3.97

Post by Chilly Willy »

Wow! Really awesome release. :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Thanks ! :D
da1
Incrediball
Posts: 76
Joined: Thu Jun 10, 2010 6:38 pm
Tings: 358

Re: RayEngine Version 2.0 Beta 3.97

Post by da1 »

OMG, I hope you add a sample map with a sampe AI, so I could just change random things and see what happends... This is a best way to learn :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Update :

I've started to make the C++ version, i've made most of the basic functions (load a map, play sounds, draw sprites, and most of the player's movement and some other things)

OpenGL / SDL for the graphics;
openAL for the sound

The engine also use lua (interpreted language), i'm still working on it :)

Of course, the Rayengine language will be still available :)

I will also try to compile it for Mac & Linux :)
Chilly Willy
Elder Teensy
Posts: 108
Joined: Tue May 26, 2009 1:37 am
Contact:
Tings: 4230

Re: RayEngine Version 2.0 Beta 3.97

Post by Chilly Willy »

Sounds good. That should be reasonably cross-platform.
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Yup, and there might be a way to compile it for WII/DS & PS3, that'll be fantastic :D
da1
Incrediball
Posts: 76
Joined: Thu Jun 10, 2010 6:38 pm
Tings: 358

Re: RayEngine Version 2.0 Beta 3.97

Post by da1 »

PS3? Only if someone hack it again... I think PSP will be ideal, this is the only platform where the homebrew games are better than official, so everone have the custom firmware :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

There is a way to compile for PS3 using Linux, but you can't access to the GPU (only CPU)

PSP would be great, anyways, i first have to finish it for windows before starting the project on other platforms :D
Terminapor
Antitoon
Posts: 39
Joined: Wed Jan 06, 2010 1:52 am
Location: France, derrière le frigo.
Tings: 0

Re: RayEngine Version 2.0 Beta 3.97

Post by Terminapor »

Hi !

Here is a small video of the C++ version of the engine introducing the thunder and snow weather : http://www.youtube.com/watch?v=_UgLfM3tPoI
Post Reply