Project X Forums



It is currently Thu May 09, 2024 9:05 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Add Spriter lib by Zed
PostPosted: Mon Sep 05, 2011 7:32 am 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
That lib allows you to add sprites directly into the map even if youre not the programmer.
====================================================
Current State : Raw version.
Need to add: Transparency, Rotation, Color params and optimization. Right now im lazy. :D
====================================================
How to use:
00) Sprites should be:

in png.
with alpha channel.
rgb image mode.
height of the sprite should be divisable by it's width.

0) Count the number of frames of your sprites and write it somewhere (frames=height/width).
1) Add your sprites to the lib.
2) Include the lib to the your map through Map Editor.
3) Then add the object called Spriter on the place where you want to see your sprite.
4) Define the params:

The 1st and 2nd param is most important ones.

SpriteName should be the name of your sprite, for example:
base.png

FrameNum should be the number of the frames of ur sprite, very important param, without right number the function willnot work :o

AnimSpeed should be the number from 1 to 1000. Its integer so dont use numbers like 1.5 or 50.5.
It will define Sprite animation speed, 100 or 200 should be fine for sprites with big number of frames.
Good way to determine your AnimSpeed is to use that formula:
AnimSpeed = (1/(FrameNum*22))*1000

ZPlane is layer where your sprites will be drawn. For example sprites with ZPlane 5 will be drawn above sprites with ZPlane 6.
Sprites with same ZPlanes will do thing, called by undef "Z fighting" :D

5) Then run ur map with any pxscheme (default.pxs is ok) to test if everything is ok.
6) You can also rename the lib to evade possible rewriting by the lib with the same name.
====================================================

Post questions and bugs.


Attachments:
addspr.rar [1.07 KiB]
Downloaded 590 times

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Last edited by Zed on Tue Sep 06, 2011 1:56 pm, edited 2 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Mon Sep 05, 2011 10:33 am 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
Entuser said that you can use framenum = 0 for all sprites and it will work too :D

edit - strange, framenum = 0 isnt working. Entuser?

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Last edited by Zed on Mon Sep 05, 2011 1:03 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Mon Sep 05, 2011 12:06 pm 
Offline
User avatar

Joined: Fri Aug 26, 2011 7:44 pm
Posts: 5
Great lib!
I was planning to ask, why there is no such thing yet, and here it is :)

Mayby i should start thread with bunch of my ideas :D
I'm sad, i cannot into programming, not even little :(


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Mon Sep 05, 2011 5:02 pm 
Offline
User avatar

Joined: Fri Mar 05, 2010 11:59 am
Posts: 33
Location: Kazakhstan
Hey mate ! it is that that need for my map ! thx a lot for this lib ! i will go to test it :D

_________________
My wmdb.org profile


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Tue Sep 06, 2011 7:35 am 
Offline
User avatar

Joined: Fri Mar 05, 2010 11:59 am
Posts: 33
Location: Kazakhstan
it doesn't work, completely, just you can set parameters in Med and add sprite in lib and when you start game its nothing showing :(

_________________
My wmdb.org profile


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Tue Sep 06, 2011 11:04 am 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
Alexkiborg wrote:
it doesn't work, completely, just you can set parameters in Med and add sprite in lib and when you start game its nothing showing :(

Zed wrote:
Need to add: Transparency


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Tue Sep 06, 2011 11:22 am 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
what do u mean guyz. More info. I tested lib with 1 frame sprite and it worked. Give me ur sprite at least ill test it.

Quote:
just you can set parameters in Med and add sprite in lib and when you start game its nothing showing

google translate died in pain

And you can use transparent sprites.

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Tue Sep 06, 2011 12:00 pm 
Offline
User avatar

Joined: Fri Mar 05, 2010 11:59 am
Posts: 33
Location: Kazakhstan
Quote:
google translate died in pain
And you can use transparent sprites.

Lol ,,, xD Zed I'm use translater very rarely , this comes from my brains xD
I'm can use this lib but only for one frame :( no matter what amount you set in FrameNum
check this sprite.

_________________
My wmdb.org profile


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Tue Sep 06, 2011 1:55 pm 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
lib fixed, thx for posting. Also you can use AnimSpeed from 1 to 1000, with default number 100.

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Top
 Profile  
Reply with quote  
 Post subject: Re: Add Spriter lib by Zed
PostPosted: Wed Sep 07, 2011 6:39 pm 
Offline
User avatar

Joined: Fri Mar 05, 2010 11:59 am
Posts: 33
Location: Kazakhstan
Damn ... guys help me ... I'm noob at mathematics :/ about two days I'm tormented with that f..ng sizes... here pls tell me what size is need :c

_________________
My wmdb.org profile


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane