Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 12: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,
verence
2  Java Game APIs & Engines / Java 3D / constant fps strategy on: 2004-06-03 15: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) {
   calculation();
   renderFrame();
   sync();
}

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 21: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 19:19:28
damn, it just won't work  Smiley

ok, some code:

object creation (just a cube for simplicity):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
        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);
        transformGroup.addChild(shape);
        scene.addChild(transformGroup);
       
        view.getTransform().lookAt(
                new Vector3f(0, 0, 0),
                new Vector3f(0, 0, 10f),
                new Vector3f(0, 1, 0)
        );

        view.setFrontClipDistance(0.1f);
        view.setBackClipDistance(100f);


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

but when this:

1  
2  
3  
        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(0, 0, -1.0f));
        view.setTransform(transform);


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 14:58:02
Quote
Hi adenthar!

I do like this:

1  
2  
3  
        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(xPosition, yPosition, zPosition));
        view.setTransform3D(transform);


somehow this does not work for me  Smiley

my initial setting for the view:

1  
2  
3  
4  
5  
        view.getTransform().lookAt(
                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:

1  
2  
3  
        Transform3D transform = new Transform3D();
        transform.setTranslation(new Vector3f(0, 0, 1));
        view.setTransform(transform);


i can see nothing. what did i do wrong?

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

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

greets,
verence
7  Game Development / Newbie & Debugging Questions / Re: newbie question (sort of) on: 2003-12-22 13:31:49
Quote
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).

greets
8  Game Development / Newbie & Debugging Questions / Re: newbie question (sort of) on: 2003-12-22 12:21:24
Quote
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.

greets
9  Game Development / Newbie & Debugging Questions / newbie question (sort of) on: 2003-12-21 01: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:

1  
2  
3  
4  
5  
6  
7  
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();                              
    strategy.show();
}


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,
verence
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (26 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (34 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org 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‑gaming.org
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!