Be a Supporter!

Vector or png?

  • 444 Views
  • 17 Replies
New Topic Respond to this Topic
RockLou
RockLou
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Vector or png? 2009-02-22 13:38:09 Reply

What is more optimized in flash, vector graphics or exported image of vector as png/jpg?


Play my epic rpg NAO - The Awakening

... but I'm legally obligated not to say that.

Skeddels
Skeddels
  • Member since: Dec. 13, 2008
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Vector or png? 2009-02-22 13:40:21 Reply

Vectors, I think.....


Slinky + Escalator = Everlasting Fun!

TVK
TVK
  • Member since: Jan. 20, 2005
  • Offline.
Forum Stats
Member
Level 13
Programmer
Response to Vector or png? 2009-02-22 14:03:54 Reply

Vectors by far

RockLou
RockLou
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Vector or png? 2009-02-22 14:17:18 Reply

What if it's a massive vector image with tons of shapes and shit in it?


Play my epic rpg NAO - The Awakening

... but I'm legally obligated not to say that.

Jephz
Jephz
  • Member since: Nov. 29, 2007
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to Vector or png? 2009-02-22 14:19:54 Reply

Still beats Bitmaps. Unless the bitmap file size isn't very large and you have over 100 mcs in the vector.

Deadclever23
Deadclever23
  • Member since: Nov. 27, 2006
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Vector or png? 2009-02-22 14:23:10 Reply

At 2/22/09 02:17 PM, RockLou wrote: What if it's a massive vector image with tons of shapes and shit in it?

Also you can cache as bitmap in order to save some processing.


"To live is the rarest thing in the world. Most people exist, that is all."
- Oscar Wilde

BBS Signature
TVK
TVK
  • Member since: Jan. 20, 2005
  • Offline.
Forum Stats
Member
Level 13
Programmer
Response to Vector or png? 2009-02-22 14:24:09 Reply

Bitmaps in Flash should avoided at all time unless there's no other choice

RockLou
RockLou
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Vector or png? 2009-02-22 14:35:02 Reply

At 2/22/09 02:19 PM, Jephz wrote: Still beats Bitmaps. Unless the bitmap file size isn't very large and you have over 100 mcs in the vector.

ok, you guys have convinced me to leave out as much jpgs as possible. It's weird though, until now I've only heard the opposite. There's still a huge part that'll be made into a bitmap. It's actually pretty much like you say, I think it has even OVER 100 mcs in it.


Play my epic rpg NAO - The Awakening

... but I'm legally obligated not to say that.

Polioman
Polioman
  • Member since: Jul. 6, 2006
  • Offline.
Forum Stats
Member
Level 14
Programmer
Response to Vector or png? 2009-02-22 14:42:04 Reply

Vectors, no question.


..::: AS3: Little Essay :::....:::AS3: Programming Sex:::..
||Nosejobs only result in bigger noses.||

Skeddels
Skeddels
  • Member since: Dec. 13, 2008
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Vector or png? 2009-02-22 14:57:48 Reply

Whenever I must import an external image I often convert it to a vector beforehand.


Slinky + Escalator = Everlasting Fun!

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to Vector or png? 2009-02-22 15:03:14 Reply

bitmaps render faster but use more memory.

Very simple vector shapes are faster than bitmaps

Juice-Tin
Juice-Tin
  • Member since: Feb. 3, 2001
  • Offline.
Forum Stats
Member
Level 09
Game Developer
Response to Vector or png? 2009-02-22 15:19:44 Reply

Lots of vectors on the screen makes flash really slow. Bitmaps would be faster for this.

But- you can make vectors be rendered as bitmaps, which is good, except if you do, you can't rotate or scale them, because then they would need to be re-cached as bitmaps everytime, making them even slower.

For things that need to be rotated or scaled, if there's tons of them, best choice would be bitmaps.


BBS Signature
LeechmasterB
LeechmasterB
  • Member since: Apr. 1, 2005
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Vector or png? 2009-02-22 15:53:28 Reply

Don't listen to the guys. ^^

First of it entirely depends on what you want to do.

Vectors:
- strength smaller filesize
- weakness worse performance / slower rendering time

PNG/BITMAPS:
- strength faster rendering time
- weakness bigger filesize

That simple... the flash renderer can render bitmaps far quicker then vector graphics.

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Vector or png? 2009-02-22 16:37:48 Reply

At 2/22/09 03:53 PM, LeechmasterB wrote: Don't listen to the guys. ^^
That simple... the flash renderer can render bitmaps far quicker then vector graphics.

Agreed. For large detailed/scrolling backgrounds in particular, pngs/bmps are far less CPU intensive, because there's little rendering involved. Vectors are generally fine for the smaller stuff. If you have no reason to use exclusively one or the other, then use bitmaps for the backgrounds/layouts and vectors for the sprites etc.


- - Flash - Music - Images - -

BBS Signature
RockLou
RockLou
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Vector or png? 2009-02-22 19:48:46 Reply

Thank you. Now I know what I need to know!


Play my epic rpg NAO - The Awakening

... but I'm legally obligated not to say that.

EvanHayes
EvanHayes
  • Member since: Jan. 13, 2007
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to Vector or png? 2009-02-22 20:19:35 Reply

yes,denvish is correct. but if you have something that is a vector and dont feel like exporting it then use

cacheAsBitmap = true

that way it will treat the vector just like an image. vectors are smaller file size wise but run slower during run time in games if it is moving on the x or y axis. such as a scrolling background. but if you use cacheAsBitmap on something that is rotated or flipped it may have an undesired effect :P


Grah i feel so unknown, SK8MORE god damn :/ EvanHayes seems like a much more serious name than sk8more,so i changed it.

RockLou
RockLou
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Vector or png? 2009-02-22 20:28:56 Reply

At 2/22/09 08:19 PM, EvanHayes wrote: that way it will treat the vector just like an image. vectors are smaller file size wise but run slower during run time in games if it is moving on the x or y axis. such as a scrolling background. but if you use cacheAsBitmap on something that is rotated or flipped it may have an undesired effect :P

Will that cache every vector in the flash?


Play my epic rpg NAO - The Awakening

... but I'm legally obligated not to say that.

Johnny
Johnny
  • Member since: Apr. 17, 2004
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to Vector or png? 2009-02-22 20:35:26 Reply

At 2/22/09 03:53 PM, LeechmasterB wrote: Don't listen to the guys. ^^
First of it entirely depends on what you want to do.

Exactly that. Don't listen to the rest of the guys.


Perpetually looking for time to return to the arts.

BBS Signature