How to Simply Load a JPG or PNG image?

Discussion in 'Game Development (Technical)' started by bantamcitygames, Dec 14, 2005.

  1. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    Yeah, I wonder why people are developing Linux when there’s already a very good operating system?.. ;)
     
  2. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    Why use Linux when you could write your own operating system from scratch?
     
  3. Vorax

    Original Member

    Joined:
    Jan 21, 2005
    Messages:
    349
    Likes Received:
    0
    If your only objective is to create a game, then I agree.

    However, there are many reasons to create a game. For those who want to build their own engine, the final goal is secondary to the challenge itself.
     
  4. Alex Saveliev

    Original Member

    Joined:
    Jun 8, 2005
    Messages:
    31
    Likes Received:
    0
    That's exactly what Linus did, right? :)
    Wrote his own OS completely from scratch...
     
  5. bantamcitygames

    Administrator Original Member Indie Author Greenlit

    Joined:
    Jul 27, 2004
    Messages:
    1,731
    Likes Received:
    78
    Steve, I know what you are saying... but the thing is, I already have Invadazoid written in C++/DirectX, so do I spend all of my 5 hours per week porting it over to the popcap framework (which at the moment looks very foreign to me, which would mean learning how everything works again) or can I just drop in some png/jpg2000 code in a couple hours and be done with it? I'd love to have a better framework than I have, but I just don't have the time.
     
  6. Savant

    Original Member

    Joined:
    Feb 8, 2005
    Messages:
    1,674
    Likes Received:
    0
    That's sort of a weird statement. If you feel/believe that PopCap would be better, how would it not be worth your time to convert to it? The time/effort saved in the long run should vastly outweigh whatever initial pain there is for conversion.

    It's like that "sharpening the saw" story.

    "I've been sawing like crazy on this tree! It's taking me hours. I'm exhausted."

    "So why don't you sharpen the saw?"

    "I'm too busy sawing!"
     
  7. svero

    Moderator Original Member Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    3,392
    Likes Received:
    6
    Well I don't know about Invadazoid. If its just to improve the work on a game already completed then I suppose it would be easier to just drop the extra code in and rebuild it without porting. Given that Invadazoid was released some time ago I assumed this was for work on a new title, where you'd likely save time by moving to a new framework in the long run if you're still struggling with png file loading and other basic stuff that the other gamelibs do.
     
  8. bantamcitygames

    Administrator Original Member Indie Author Greenlit

    Joined:
    Jul 27, 2004
    Messages:
    1,731
    Likes Received:
    78
    You're right... it seems like a much easier way of making games that I have been doing, and maybe I will move to popcap if I get up the initiative to "just do it". I guess we'll see!! :D
     
  9. MrGoldfish

    Original Member

    Joined:
    Jul 28, 2005
    Messages:
    50
    Likes Received:
    2
    You can use the D3DXCreateTextureFromFileEx function to load in graphic files under Direct3D. It supports .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga formats. It really is a lifesaver.
     
  10. cliffski

    Moderator Original Member

    Joined:
    Jul 27, 2004
    Messages:
    3,897
    Likes Received:
    0
    not in directx7, it's just dds bitmap and simple tga then.
     
  11. bantamcitygames

    Administrator Original Member Indie Author Greenlit

    Joined:
    Jul 27, 2004
    Messages:
    1,731
    Likes Received:
    78
    Since this original discussion, I'm now struggling to decide between torque 2d and 3d for my next game. I would have preferred TGB (2d), but they cut back the real time networking to be turn based and my next game will be a real time multiplayer game. Does anyone know why they did this? I mean the engine already supported real-time networking...
     
  12. woo

    woo
    Original Member

    Joined:
    Jun 21, 2006
    Messages:
    135
    Likes Received:
    0
    The biggest reason I've heard was that there wasn't a simple, generic way to handle real-time networking and that's really why it isn't "in the box". If you purchase TGE + TGB (with source), you have the full networking code... there's a tutorial for how to take the real time network code from TGE and use it in a TGB game. The "turn based" network support that's in the box is a bit of a misnomer as it can handle more than just turn based games but it's not real-time either. Anyway, with a little effort, TGB is definitely capable of doing real-time networking.

    I hope that helps.
    -Andrew Douglas
    http://theoreticalgames.com
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer