Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (582)
Games in Android Showcase (163)
games submitted by our members
Games in WIP (632)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Xith3D Forums / per face textures on: 2004-06-06 10:26:43
hi all,

how does one use multiple textures in the way that each face has it's own image? as i see it, you can attach only one texture to an Appearance, and a Texture only contains one image.

thanks in advance,
2  Java Game APIs & Engines / Java 3D / constant fps strategy on: 2004-06-03 13:10:19
it may be that this was asked before, but if, i couldn't find the thread Smiley

what are your strategies to get a constant fps rate? i'm using a typical main loop:

while(running) {

except that i don't have a good strategy for sync(), and that's why i'm asking Smiley

ok, thanks in advance
3  Java Game APIs & Engines / Xith3D Forums / Re: moving Camera on: 2004-06-02 19:03:16
sorry  Smiley, now i see nothing even in the first place. imho it has no effect on the camera movement, since lookat() is a method of the view's current transformation,  which is getting overwritten by view.setTransform() during the movement.

so i checked the rotation matrices before and after the movement and (surprise again) the view's orientation is different.

so i just store the rotation matrix of the view everytime it rotates and do a Tranform3D.mul() everytime the view translates. it works. but now that i read that, it sounds quite obvious... hm, even einstein said that simply talking about can solve a problem Wink

btw, does xith provide methods for "local" translations ie translations relative to the object's coordinate system (meaning that (0, 0, 1f) always moves you forward regardless how the cameras rotation is)? in plain opengl i used some simple trigs for this, but then, this was c.

ok, thanks.
4  Java Game APIs & Engines / Xith3D Forums / Re: moving Camera on: 2004-06-02 17:19:28
damn, it just won't work  Smiley

ok, some code:

object creation (just a cube for simplicity):

        Geometry g = Cube.createCubeViaTriangles(0, 0, 0, 1, true);
        Shape3D shape = new Shape3D(g);
        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(0, 0, 4.0f));
        TransformGroup transformGroup = new TransformGroup(transform);
                new Vector3f(0, 0, 0),
                new Vector3f(0, 0, 10f),
                new Vector3f(0, 1, 0)


so the cube is 4 units away from the view which is at the origin.

but when this:

        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(0, 0, -1.0f));

gets executed (via keylistener), the cube vanishes. the view is now one unit farther away from the cube, so it should still be visible (it doesn't matter to what point the view is translated, i tried many things). is it possible that the information which way is up is somehow lost (last param from lookat())? or did i forget something?
5  Java Game APIs & Engines / Xith3D Forums / Re: moving Camera on: 2004-06-02 12:58:02
Hi adenthar!

I do like this:

        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(xPosition, yPosition, zPosition));

somehow this does not work for me  Smiley

my initial setting for the view:

                new Vector3f(0, 0, 0),
                new Vector3f( 0, 0, 10),
                new Vector3f( 0, 1, 0)

i can see my objects, and the current translation of the view is 0, 0, 0 (surprise). but when i do this:

        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(0, 0, 1));

i can see nothing. what did i do wrong?

thanks in advance
6  Java Game APIs & Engines / Java Sound & OpenAL / midi and on: 2004-01-12 11:16:02
hi there,

if you want to play midi music in your game you need a soundbank file ( which ships with the jdk but not with the jre. my question: can i ship the file with my game or are there any licensing issues? the file is also available for download at
, so i think it should be okay to include it  in my download. am i right?

7  Game Development / Newbie & Debugging Questions / Re: newbie question (sort of) on: 2003-12-22 12:31:49
Whats the size of your background image (kb)? Reducing the size of the image file or tweaking the Image loading could help.

it's a 30kb jpeg. but doesn't java convert it into it's own data format when it's loaded? and what do you mean by "tweaking the image loading"? i use getResourceAsStream() and a MediaTracker, but the loading time does not matter (display a fancy progress bar and the player is content Smiley).

8  Game Development / Newbie & Debugging Questions / Re: newbie question (sort of) on: 2003-12-22 11:21:24
This is a good resource too:
Its probably the same thing actually

actually i'm doing nearly the same in my little experiment (i took a look around here before i did post Wink). i was just wondering about scrolling a big background image around, which seemed a bit slow to me. hm, maybe i should use tiles for the background also. i was maybe expecting too much concerning speed Smiley. i did a small j'n'r game ages ago in pascal on a 386dx40 in 320x200 and the background scrolling was very fast, but that was done by directly modifying the linear vga memory (mode13, $0a000 and y*320+x, these things i won't forget for a lifetime Smiley).

as a start i wanted to create a similar game using my native tongue, because j'n'r games are so damn addictive Smiley.

9  Game Development / Newbie & Debugging Questions / newbie question (sort of) on: 2003-12-21 00:52:44
hi there,

this is my first post here, so hi there Smiley.

i'm working with java for some years (server & normal gui apps), did some c++ gaming stuff (mostly 3d, using opengl, irrlicht).

since i want to learn java2d and game programming (2d) in java in general, i started with a very simple experiment: a scrolling background. the render loop looks like this:

Graphics g;
for (int i = 0; i < 1000; i++) {                  
    g = (Graphics) strategy.getDrawGraphics();    
    g.drawImage(img, 0, 0, 640, 480, i, 0, i + 640, 480, null);    
    g.dispose();                         ;

it runs very slow. i use a java.awt.Window with a size of 640x480. what am i wrong about?

the second thing i want to ask:
what is (in general) a good way or technique to do these image stuff (scrolling and drawing sprites)? i do not want to use a third-party api like gage cos i want to learn how it works Smiley.

ok, cu,
Pages: [1]
Ralphanese (18 views)
2015-05-28 16:52:52

theagentd (31 views)
2015-05-27 22:21:17

theagentd (35 views)
2015-05-27 22:21:08

CopyableCougar4 (25 views)
2015-05-27 19:24:50

MrMapcom (24 views)
2015-05-23 20:26:16

MrMapcom (32 views)
2015-05-23 20:23:34

Waterwolf (37 views)
2015-05-20 15:01:45

chrislo27 (44 views)
2015-05-20 03:42:21

BurntPizza (79 views)
2015-05-10 15:53:18

FrozenShade (64 views)
2015-05-07 09:11:21
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

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00 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!