[Disscussion] Which is better for mobile games, PNG or SVG? (2024)

This topic has been deleted. Only users with topic management privileges can see it.

  • QOffline

    QOffline

    q8phantom

    wrote on last edited by

    #1

    I want to make several 2D games for mobile platforms, mainly using Qt for iOS, Android, Symbian, MeeGo and whatever supported by Qt (WP7?).

    I've made one game already using PNGs. (Card game : Dewan of kout )
    http://itunes.apple.com/us/app/dewan-of-kout/id491157833?mt=8
    http://store.ovi.com/content/208820

    I'm thinking of making a game similar to that one, and also another game similar to "battleheart":http://www.youtube.com/watch?v=0VqlJ_AvFS8

    What do you think is the best option, PNG files or SVG files or other formats? Which is better for mobile games, PNG or SVG?

    and BTW, I'm using QGraphicsView with bunch of QGraphicsPixmapItem

    Bests
    Ahmed

    1 ReplyLast reply

    1

  • SOffline

    SOffline

    sierdzioModerators

    wrote on last edited by

    #2

    PNG is the way to go. You can use SVG internally to get good quality, but the resulting game should be using PNGs. Reason is quite simple: displaying (parsing and drawing) SVG files takes a lot more time (IIRC, time is a few orders of magnitude longer).

    (Z(:^

    1 ReplyLast reply

    1

  • QOffline

    [quote author="sierdzio" date="1328868566"]PNG is the way to go. You can use SVG internally to get good quality, but the resulting game should be using PNGs. Reason is quite simple: displaying (parsing and drawing) SVG files takes a lot more time (IIRC, time is a few orders of magnitude longer).[/quote]

    The thing is I liked the way how you can make Sprite sheets easliy in SVG

    Also, the rumor about the new screen res of the iPad 3, am creating screen res independent games :)

    1 ReplyLast reply

    1

  • SOffline

    SOffline

    sierdzioModerators

    wrote on last edited by

    #4

    I know, it would be nice and easy to go with SVG, but it seems that the choice is this:

    • either go with PNG and go through pain of generating separate files for various resolutions
    • or try SVG and suffer from performance loses (or, if the amount of SVG content is not too large, the battery might get hit even though performance would stay decent)

    (Z(:^

    1 ReplyLast reply

    1

  • SOffline

    SOffline

    sierdzioModerators

    wrote on last edited by

    #5

    Anyway, you can try benchmarking both approaches to see what is the real difference. I've seen comparison somewhere, but can't seem to be able to find it now.

    (Z(:^

    1 ReplyLast reply

  • QOffline

    QOffline

    q8phantom

    wrote on last edited by

    #6

    Ok, let's ask another question,

    In both cases, I'm scaling my images!

    In PNGs, I scale images to a percentage where it looks good on screen.

    So I will do in SVGs

    BTW, I'm searching the internet for SVG Files to do comparison

    Bests

    1 ReplyLast reply

  • SOffline

    SOffline

    sierdzioModerators

    wrote on last edited by

    #7

    take any Linux icon pack, they're full of SVGs, and usually come with prerendered PNGs, too.

    (Z(:^

    1 ReplyLast reply

  • JOffline

    JOffline

    Jake007

    wrote on last edited by

    #8

    You can have images saved as SVG and when you start your game, you resize them to desired resolution and save them ( only to RAM) as png or bmp ( preferably to bmp for better performance) with which your work with.

    Code is poetry

    1 ReplyLast reply

  • QOffline

    QOffline

    q8phantom

    wrote on last edited by

    #9

    Thank you that's a great idea

    [quote author="Jake007" date="1328980764"]You can have images saved as SVG and when you start your game, you resize them to desired resolution and save them ( only to RAM) as png or bmp ( preferably to bmp for better performance) with which your work with. [/quote]

    Anyways I have made a comparison if anyone want source code let me know.

    1 ReplyLast reply

  • QOffline

    QOffline

    q8phantom

    wrote on last edited by

    #10

    Can anyone give me hints on how to resize the an svg and then convert it

    I will appreciate a code snippet

    Bests

    1 ReplyLast reply

  • QOffline

    QOffline

    q8phantom

    wrote on last edited by

    #11

    Code snippet

    You can multiply the size to any size you like for the SVG Item or set the size customly in the QPixmap constructor

    Bests

    @ QSvgRenderer renderer;
    renderer.load(QLatin1String("Head.svg"));
    QPixmap image(renderer.defaultSize()2);
    image.fill(Qt::transparent);
    QPainter painter(&image);
    renderer.render(&painter);
    QGraphicsPixmapItem
    item = new QGraphicsPixmapItem(image);
    @

    1 ReplyLast reply

    1

  • GOffline

    GOffline

    Gianluca

    wrote on last edited by

    #12

    Hello,
    I read this discussion, and I like the hybrid approach to load the .svg and convert them to pixmap and then render it.
    Because, it is seems a very good approach for get a perfect balance between the resolution independence of .svg with the speed of drawing of a pixmap...
    I'm wondering if the QML Image item use this approach when you set a .svg image as source ...
    anyone know the performances of QML Image item on .svg images ??

    1 ReplyLast reply

[Disscussion] Which is better for mobile games, PNG or SVG? (2024)
Top Articles
Master Commodity Trading: Essential Tips & Strategies
Mac vs PC: The Never-Ending Debate
Bible Gateway passage: 2 Kings 6 - English Standard Version
A2 Key preparation | Cambridge English
Walmart Academy Core Test Questions And Answers
Fredatmcd.read.inkling.com
Gossip Bakery Palm Springs Cindy
Pocatello Temple Prayer Roll
Margaret Whitton Feet
Jug Cousin Crossword Clue
What is a TN-C-S Earthing System? Definition, Meaning, Diagrams
575Mm In Inches
Pollen Count In Brandon Fl
공지/공고 - 10 Things That Your Family Teach You About Triple Bunk Bed With Mattresses
Www.yourtotalrewards/Carrier
South Bend Weather Underground
Genesis 1 Mission Loot Table
Gulfstream Entries Results
Technische Informatica | Studeren bij hogeschool Saxion | Hogeschool Saxion
Boyfriend (2018) | KDrama Recaps on Dramabeans
2004 Toyota Corolla Fuse Box Location
George Hamilton Deck Commercial
Milton Shealy Funeral Home Obituaries
How to Use a Self-Service Car Wash | YourMechanic Advice
Www Craigslist Com Corpus Christi
Top Songs On Octane 2022
Lockstraps Net Worth
Sites Like Av.nyuu
Ed Iskenderian Net Worth
Quiktrip Maple And West
Best Restaurants In Financial District Nyc
Ww0.0Gomovie
Basis Ahwatukee Calendar 2022-23
Crime Graphics Tcsd
What Time Does Sam's Club Gas Close Today
Premier Solto Hotel by Corendon (Cesme)
Pinterest Shadowban Checker
Florida Lottery Powerball Double Play
Acura Rdx Screen Won't Turn On
Roane County Arrests Today
Cocaine Bear Showtimes Near Phoenix Theatres Laurel Park
My Location To Pilot Truck Stop
Craigslist Furniture Brownsville Tx
844-793-3456
Washington Craigslist Housing
Dairyland Car Insurance Review (2024)
Livvy Fune
Craiglsist Cars
Frommer's Philadelphia & the Amish Country (2007) (Frommer's Complete) - PDF Free Download
WSOP NEWS: THE-WORLD-SERIES-OF-POKER-RELEASES-INITIAL-DATES-FOR-2024-25-WSOP-CIRCUIT-SCHEDULE
7Th Gear Exotics Tampa
Pamela Dunlap Motorcycle Accident
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6207

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.