Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (654)
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  
  Texture Mapping  (Read 1580 times)
0 Members and 1 Guest are viewing this topic.
Offline nickdotjava

Junior Devvie

I have fallen to the dark side.  I'm using DX9

« Posted 2003-06-23 14:28:24 »

I was looking at the examples included with the source, and they use the AWT.  Is there a way to use textures while staying away from AWT?


"Oh ya, that's trivial.  I should have it done in an hour."
Offline psiegel

Junior Devvie

Adamant about gaming.

« Reply #1 - Posted 2003-06-23 14:46:01 »

The way I'm doing it, and the way Cas does it, is to write a class that uses AWT to load images and convert them into a proprietary file format.  Then you can ditch the converter class in your final distributable.  

I could spam this topic with a bunch of source code, but you'd probably be better off just taking a look at how Cas does int SPGL.  Look in the spgl-tools branch, I think it's called something clever like ImageConverter.


Paul Siegel
Adamant Games, Inc.
Offline nickdotjava

Junior Devvie

I have fallen to the dark side.  I'm using DX9

« Reply #2 - Posted 2003-06-23 20:50:10 »

So what you're doing is using another class that you've (or CAS) has written that loads the image file using the AWT, and then converts it to your own format?  And your program uses that new format when it's run?


"Oh ya, that's trivial.  I should have it done in an hour."
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »

Medals: 556
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #3 - Posted 2003-06-23 22:01:02 »


Cas Smiley

Offline tom
« Reply #4 - Posted 2003-07-05 18:39:29 »

You could also write your own TGA loader. TGA is a standard file format supported by most paint programs. It is easy to write a loader and the format is very well documented. Look at under graphics files.

This way you can use a standard graphics file format without using awt or inventing your own format.

Happy coding!

Offline cfmdobbie

Senior Devvie

Medals: 1

Who, me?

« Reply #5 - Posted 2003-07-05 22:09:39 »

That's what I've done as well.  I knocked up TGA, SGI/RGB and 24-bit BMP loaders.  I think SGI/RGB was probably the easiest.

Half the fun of writing your own loaders is using paint applications to test your output code to see whether the spec is actually correct.  Many times I've found things like pixel-formats being *slightly* different from reality.  Fun for all the family!

Hellomynameis Charlie Dobbie.
Offline kevglass

« JGO Spiffy Duke »

Medals: 272
Projects: 25
Exp: 18 years

Coder, Trainee Pixel Artist, Game Reviewer

« Reply #6 - Posted 2003-07-06 04:46:17 »

Could you make these loaders available as a library, or are they specific to your project?


Offline cfmdobbie

Senior Devvie

Medals: 1

Who, me?

« Reply #7 - Posted 2003-07-14 00:52:49 »

Hi Kev, sorry for the late reply.

Well, they're not specific to my project in that I can pull them out with a couple of utility classes and they'll stand alone, but they are specific in that they only handle what I need - all I can really say is that they work fine for what I use them for, and for files generated by the applications I use!

Ach, give them a go - if they're not what you want, you can always get a good start on writing your own loaders from them.  I've archived them up and written a little readme:

Hellomynameis Charlie Dobbie.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

bilznatch (15 views)
2015-08-04 11:03:17

SHC (38 views)
2015-08-01 03:58:20

Jesse (24 views)
2015-07-29 04:35:27

Riven (44 views)
2015-07-27 16:38:00

Riven (25 views)
2015-07-27 15:35:20

Riven (27 views)
2015-07-27 12:26:13

Riven (18 views)
2015-07-27 12:23:39

BurntPizza (40 views)
2015-07-25 00:14:37

BurntPizza (48 views)
2015-07-24 22:06:39

BurntPizza (33 views)
2015-07-24 06:06:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!