Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  TGAImage  (Read 6439 times)
0 Members and 1 Guest are viewing this topic.
Offline vydias

Senior Newbie

Welcome to my world!

« Posted 2003-07-05 17:37:14 »

Is this the only Image option for loading textures currently available for jogl? If so when will there be support for other image options, like the Texture class that lwgl uses?

I'm only asking because I am interested in porting our 2d rts game engine over to jogl. We already have all of our 2d images sprite rendered so I am looking at building a 3d engine that simply displays the unit sprites as images on a transparent Rect.  So all unit Rects would always be facing the user and depending on their move direction/camera angle I'd simply change the Rect with a different unit facing (ala Myth 1/2).

I've never used TGA images but I'm guessing that they only have opaque support. Any tips available?

Offline abies

Senior Devvie

« Reply #1 - Posted 2003-07-05 20:57:52 »


I've never used TGA images but I'm guessing that they only have opaque support. Any tips available?

TGA has support for full alpha (8-bit). Just be sure that you use non-compressed TGAs - simple loaders do not support compression.

Artur Biesiadowski
Offline cfmdobbie

Senior Devvie

Medals: 1

Who, me?

« Reply #2 - Posted 2003-07-05 22:04:36 »

Yeah, TGAs are very cool - they can be raw or run-length encoded, support up to 32-bit colour, including an 8-bit alpha plane, support using the lower left as the origin etc.  Well worth looking at.

(I personally think SGIs/RGBs are cooler, but TGAs come a close second!)

However, if you already have all your sprites generated, you'll either have to convert all your graphics to TGA or write a loader for your current format.

Hellomynameis Charlie Dobbie.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline vydias

Senior Newbie

Welcome to my world!

« Reply #3 - Posted 2003-07-06 07:08:55 »

Only problem with using TGA that I can see is when you have 30 different unit images with 300-400 frames of animation each and you have 2d sprites of these (high poly) already rendered out and the file size of the TGA images are 10-20mb each compared with their gif file sizes of 400-800kb each. Our program is downloaded and I don't think people would appreciate us going from 33mb to a 300mb download size Shocked

No doubt I'd have to drop some frames but even still the download would be at least a 4x increase in size just for unit images, not to mention buildings, terrain and terrain objects.

So I will have to write my own gif-to-TGA file format conversion class. Has anyone already done this who could share their code? Or at least provide a link for the TGA format, after a few searches on this I've come up empty. If one of the developers could comment about the possibility of future support in this area I'd shelf my plans in this area and wait for a Sun solution.
8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161