Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Jul 14, 2020 6:19 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue Oct 09, 2007 9:07 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Quote:
it seems that this code is framerate dependent, no ?

Yes, currently is framedependent, i have to fix it.

Quote:
How do you plan your API to move sprites ? Change animation ?

I'm working on animation blocks/groups.

The idea is something like:
Each sprite file will have a name variable for each frame. More than one frame can have the same name, but the frames with the same name has to be together.
So if i call raydium_sprite_show_animation(spriteID,"walking_right") All the frames called "walking_right" will be looping until a new group of animation be selected.
Also i think a variable "loop" per frame (default to 1) will allow the animation in loop mode, but if it's set to 0, then the animation will stop in that frame until a new group is selected. If a variable "jump" is different to NULL then the animation will automatically jump to the indicated animation group. For example the animation "getting_up" always will be followed by the animation "stand".
Also i'll have to add a flags system to allow the programmer to know how is going the animation.

The sprite file will look like:
Code:
coords={0.0,0.1,0.2,0.3}
texture="filename.tga"
group="getting_up"
loop=1
jump=0
coords={0.4,0.4,0.5,0.5}
texture="filename.tga"
group="getting_up"
loop=1
jump="stand"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 09, 2007 8:16 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Nice. There's a few idea I've used for the MD2 animation support too :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 1:12 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
New version.
This time it supports for animation groups into the sprite file.
Also i have added a new animation file with groups to shown the efect.
You can press 1,2,3,4 keys to play that animation group.
A few OSD messages has been added.
DEBUG mode is on, so you'll get a lot of output in the terminal.

The new sprite.c:
http://pastebin.com/m35c08f22

The new animation file is this (and has to be named sprite2.sprite. sprite.sprite is not longer used):

http://pastebin.com/m1108df46

Still pending the atomization, the framerate dependence and clearer raydium integration.

Also i want to use one triangle instead of a Quad, to improve the rendering speed.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 25, 2007 8:01 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Nice. Way too quick on my computer, but nice :)
About quad to triangles, it's a good point and must be applied to some other parts of Raydium (including particle engine).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group