Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (-1) | Shanky.com
Graphic Files

 
Post new topic   Reply to topic Printable version
 View previous topic  TimeSinceRequest:2420 ms (Rock_Chick)(... Post :: Post Bullets  View next topic  
Author Message
Sercit
99.5% Optimistic


Age:42
Gender:Gender:Cat Lover
Joined: Sep 12 2003
Posts: 352
Offline

PostPosted: Tue Apr 13, 2004 5:11 pm    Post subject: Graphic Files Reply to topic Reply with quote

Alright, I'll keep this simple. How exactly does the client read the Graphic files? More specifically, Bullet, Warp, wall, etc.
_________________
Signature.
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3616
Location: Las Vegas
Offline

PostPosted: Tue Apr 13, 2004 5:15 pm    Post subject: Reply to topic Reply with quote

It loads it up, and checks the size of the image (width/height). It then divides those pixel counts by known factors (such as all ships are 10x4) to figure out how wide and tall each frame is. Then, it can read a rectangle at a certain point in the image, and thats what it shows.
Back to top
View users profile Send private message Add User to Ignore List Send email
Sercit
99.5% Optimistic


Age:42
Gender:Gender:Cat Lover
Joined: Sep 12 2003
Posts: 352
Offline

PostPosted: Tue Apr 13, 2004 5:17 pm    Post subject: Reply to topic Reply with quote

hm. *confused*
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3616
Location: Las Vegas
Offline

PostPosted: Tue Apr 13, 2004 5:24 pm    Post subject: Reply to topic Reply with quote

Look at it this way. Ship1.bm2 is known to be 10 frames wide, and 4 frames tall. Thus, there are 40 ship images on that bitmap.

Continuum looks at the total height/width of the image. Say your ship1.bm2 file is 1000 pixels wide, 80 pixels tall. Continuum then divides by the known factors to get each frame's dimensions. So each frame's width is 1000 / 10 = 100 pixels, and the height is 80 / 4 = 20 pixels.

To get a certain frame, it just looks at multiples of those values. Say it wants frame #13, which is on row 2, column 3. So, the location of that object is at 100*(3-1), 20*(2-1), or 200,20. Thats the upper left corner of the frame. It then draws a little rectangle from that point of the frame size (100,20). So, right know it has the locations [(200,20), (300,40)]. When it wants to draw this to the screen, it just reads that little rectangle in, and thats the image you see on the screen.
Back to top
View users profile Send private message Add User to Ignore List Send email
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Apr 13, 2004 5:41 pm    Post subject: Reply to topic Reply with quote

I would guess that, for example with ships.bm2, it precalcs a RECT rect[40] array with all the bounding boxes. So to draw image #13, you just lookup rect[13] for the source rectangle.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Sercit
99.5% Optimistic


Age:42
Gender:Gender:Cat Lover
Joined: Sep 12 2003
Posts: 352
Offline

PostPosted: Tue Apr 13, 2004 6:00 pm    Post subject: Reply to topic Reply with quote

Ah, so if I lengthen out the bullet.bm2 file to add a more complex/different bullet animation Continuum will automatically figure out the frames on its own? Or will I have to set it to a certain width?
Back to top
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Apr 13, 2004 6:36 pm    Post subject: Reply to topic Reply with quote

The bullets graphics file has 4x10 frames. As long as your file has 4x10 equal-sized frames, Cont will figure it out. Each frame can be any dimensions, and any proportions.

For example, the default bullets file has 4x10 frames, each 5x5 pixels. You could create a file with 3x7 pixel frames. The resulting image size would be 12x70.
Back to top
View users profile Send private message Add User to Ignore List
Sercit
99.5% Optimistic


Age:42
Gender:Gender:Cat Lover
Joined: Sep 12 2003
Posts: 352
Offline

PostPosted: Tue Apr 13, 2004 8:25 pm    Post subject: Reply to topic Reply with quote

Ah, alright. Well now that makes perfect sense. >.o Now If i can just not screw up with this newfound knowledge. icon_lol.gif
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3616
Location: Las Vegas
Offline

PostPosted: Tue Apr 13, 2004 10:16 pm    Post subject: Reply to topic Reply with quote

You cannot change how many frames are in an animation. Only the size of the outputed animation. So if you want your bullets to be 100x100 images, thats fine, but you cannot change that it only has 4 animation frames.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 207 page(s) served in previous 5 minutes.

phpBB Created this page in 0.101609 seconds : 30 queries executed (70.5%): GZIP compression disabled