Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - EgonOlsen

Pages: 1 ... 805 806 [807] 808 809 ... 823
12091
Support / lightmaps
« on: February 28, 2004, 05:48:00 pm »
We had a little discussion about how to do lighting in jPCT here:

http://www.jpct.net/forum/viewtopic.php?t=70

As you can see from the thread above, lightmaps (or multiple u/v-coordinates) are not supported ATM. You may ask yourself, why both features you asked for are not present in the current version. Maybe this thread can answer this:

http://www.jpct.net/forum/viewtopic.php?t=89

Hope this helps.

12092
German corner / Wie installiere ich jpct ?
« on: February 28, 2004, 05:39:15 pm »
?? Da kann man so eigentlich nichts direkt installieren oder starten. Starten kannst du höchsten die Batch-Dateien im examples-Verzeichnis, um die Beispiele anzuschauen.
jPCT ist eine API zum Entwickeln von Java-Applikationen oder Applets (wenns Sinn macht von mir aus auch Servlets), d.h. du brauchst ein JDK von Sun dazu und/oder eine entsprechende Entwicklungsumgebung, zumindest aber einen Texteditor und Java-Kenntnisse.
Falls du das alles hast, musst du nicht viel tun. Im lib-Verzeichnis findest du nach dem Auspacken die jpct.jar und die Windows-Variante von LWJGL. Zumindest die jpct.jar musst du in den Klassenpfad einbinden (oder im Falle einer Entwicklungsumgebung wie JBuilder (siehe auch den anderen Thread in diesem Forum) ins Projekt aufnehmen) und dann kannst du z.B. die Quellen im examples-Verzeichnis neu kompilieren und ändern.
Ich hoffe, das hilft...oder habe ich deine Frage falsch verstanden?

12093
German corner / Tutorials
« on: February 28, 2004, 05:31:45 pm »
Mir ist nicht ganz klar, was du mit "GUI für Applets" meinst? Eine Entwicklungsumgebung für Java? Evtl. mit einem GUI-Builder drin? Falls ja, dann empfehle ich JBuilder9 in der Personal Edition. Die gibt es (kostenlos) hier:

http://www.borland.com/products/downloads/download_jbuilder.html

Du musst den JBuilder (leider recht groß) und den Schlüssel runterladen. Damit bekommst eine ,wie ich finde, nette Entwicklungsumgebung, in die man dann auch die jar-Files in jPCTs lib-Verzeichnis einbinden kann und dann kannst du damit loslegen.
Ansonten gibt es nicht Ellipse und Netbeans, aber ich persönlich kann dazu nicht viel sagen, da ich sie kaum verwendet habe.
256MB sollten es für jede dieser Umgebungen aber schon sein. Was die Tutorials angeht: Die sind nicht von mir und ich weiß nicht, wie da der Stand ist und ob da noch was passiert. Ich habe hier zwei Vorversionen davon rumliegen, aber die möchte ich nicht einfach ohne Einverständnis des Erstellers "freischalten".

12094
Feedback / Volume shadows
« on: February 28, 2004, 05:20:59 pm »
Currently not, i'm sorry. This is due to the way jPCT works to support software as well as hardware rendering. I'm thinking about a kind of jPCT2 which will be hardware only and most likely support shadows, but it's still a long way to go.
For jPCT, no support for shadows is available.

12095
Bugs / CloneObject and lighting
« on: February 25, 2004, 11:22:57 pm »
Calling build() on anything that isn't a dummy object is required in almost every case (or call World.buildAllObjects()...but that can only build the objects that have already been attached to the world). I thought about handling this internally, but there are too many places in the code, where a correctly "builded" object is required, so this would result in a gazillion of "if (!hasBeenBuild) {this.build();} in the code and that's quite ugly.
Another problem is, that the engine can't decide if it's a good time to build an object or not.
That's why it's up to the user to call build(). However, calling build on the template is sufficient. There's no need to call it on cloned objects because they inherit the mesh data from the source.

12096
Bugs / CloneObject and lighting
« on: February 25, 2004, 07:57:16 am »
Have you called build() on them, i.e.

Code: [Select]
enemyTemplate.build();

12097
Support / Set up
« on: February 24, 2004, 10:21:20 pm »
I just installed a Linux on a spare machine and got jPCT to work without a hassle. The command line looks like this:

Code: [Select]
java -Djava.library.path=lib/lwjgl-0.8/ -cp lib/lwjgl-0.8/lwjgl.jar:jpct.jar ......

You still need to download the Linux binaries for LWJGL of course.

12098
News / jPCT and Linux
« on: February 24, 2004, 10:12:50 pm »
I finally tested jPCT in combination with LWJGL running under Linux (Knoppix, based on Debian) and it just worked:

 

12099
Support / Illuminating objects
« on: February 24, 2004, 06:45:31 pm »
Quote from: "acorn98"
Not sure I understand - it's seems very complex! I wasn't sure how the problem manifests itself - are you saying that the collision detection becomes inaccurate when it exceeds a tick?
No, it doesn't get inaccurate and yes, it seems to be complex...but it isn't. The problem lies in the way the movement of the camera and/or objects is synchronized with the framerate. The current approach assumes that collision detection doesn't consume much time compared to the rendering itself. It's a bit difficult to understand...that's why i wasn't aware of it for some time (and maybe why i killed a thread in another forum with this question... :wink: ). An example: Imagine your job is to make one step forward for every second that has elapsed (that's the "collision detection") and then say "blahblah" (that's the "rendering"). You start at 0, so you just say "blahblah". After that, 1 second has passed and you make one step (which takes a second too in this example) and say "blahblah" again. Now you have to make 2 steps, because two seconds have passed since the last time you moved forward (one during the first step and one while saying "blahblah")...then you have to make three steps, then four...and finally, you are just walking forward without saying "blahblah" in a reasonable time. If we modify this example and assume that the step takes not one second, but 1/10th of a second, it's no longer a problem.
I think a solution would be to ignore the time spent in the collision detection and just count the rendering time. This may lead to slower movement in some situations where a lot of collisions are taking place, but does that really matter...???
Anyway, i don't think that this will happen to you...i never happened to me except in a special test case. But if it ever does, you may remember this thread... :wink:

Quote
I haven't implemented any collision detection yet
Oh, you actually did: the camera-world collision detection.

12100
Support / Illuminating objects
« on: February 19, 2004, 11:32:06 pm »
Quote from: "acorn98"
I've had a look at the fps source - I see what you mean. I'll do it that way. Thanks.
I've just discovered that this can cause problems in cases where the collision detection takes a lot of time compared to the rendering (shouldn't be the case in tokima, so i wouldn't worry about it for now, but maybe it's good to know what may happen). It took me some hours to figure this out and the problem is:

The execution time of the loop that's counting the ticks depends on the number of ticks (go figure... :wink: ). If the collision detection (or whatever there is inside the loop) takes much longer than a tick, you start the rendering with lets say 1 tick already spend on the loop. After the rendering you are at 2 (or 3 or 4...it doesn't matter, because rendering time is independent from the number of ticks passed in the loop). Now you enter the loop with 2 ticks...and that causes the loop to run for at least 2 ticks, because one run takes 1 tick in this example. So we start the rendering with 2 ticks and 3 ticks have elapsed after it. Now we enter the loop with 3 ticks...and it takes 3 ticks to complete...and so on. In the end, we are at a tick-count of 50 or 100 or 1000 when entering the loop and we can start measuring in seconds per frame instead of frames per second.
To summerize this: The problem may occur if the loop executes in more than one tick over a longer period of time. I've never experienced this problem when running around in Quake levels or similar but i ran into it when doing a lot of collision detection stuff in the loop. Keep this in mind...

12101
Support / Illuminating objects
« on: February 18, 2004, 11:55:54 pm »
Quote from: "acorn98"
I've moved all the movement code into the main thread, just before performing rendering and all the other draw operations.

All the jerkiness has disappeared. *much* better.
Yes, it's much better this way. However, movement speed seems to depend on framerate now. It's a good idea to keep the timer thread but only to generate "game ticks" and move according to the number of ticks passed since the last frame. The fps-example is doing this for example.

12102
Support / Illuminating objects
« on: February 18, 2004, 06:13:59 pm »
OT: Trying out the newest tokima version, i noticed that you still seem to do movement and collision detection in a thread separated from the render loop, because i'm still getting these occasional "hickups", where the level geometry looks wrong for a frame.
I strongly suggest to address this topic as early as possible, because it may lead to really strange bugs in further development (trust me...i've spend two days to find a bug in collision detection when it was triggered from two different threads).

BTW: I really like the tokima website. Looks very "stylish".

12103
Support / Illuminating objects
« on: February 18, 2004, 05:54:49 pm »
Well, it's possible to set an additional color for an object (using Object3D.setAdditionalColor(java.awt.Color col)). But lighting is multiplicative when using the OpenGL/SoftGL-renderer and so the object will look like fully illuminated even if it isn't...but it won't look white.
The only way to achieve this, is to replace the texture for the object with a white one (but that's rather slow and works only if the object has one texture only (like an MD2-model or similar)) or by replacing the texture of the object in the TextureManager using TextureManager.replaceTexture(...). Problem with this is, that you'll replace the texture for all objects using this texture. It could be possible to do something like this:

Code: [Select]


// init
Texture t=new Texture(...);
texMan.addTexture("tex1", t);
texMan.addTexture("tex2", t);
texMan.addTexture("tex3", t);

obj1.setTexture("tex1");
obj1.setTexture("tex2");
obj1.setTexture("tex3");

// replace

texMan.replaceTexture("tex1", whiteTexture);
texMan.replaceTexture("tex2", redTexture);
texMan.replaceTexture("tex3", blueTexture);

...

// replace again

texMan.replaceTexture("tex1", t);
texMan.replaceTexture("tex2", t);
texMan.replaceTexture("tex3", t);



But i never tried to add the same texture multiple times to the Manager that way...it should work, but i'm not sure.

Hope this helps.

12104
Support / Transparency
« on: February 15, 2004, 04:55:56 pm »
Yes, setTransparency(int) is the way to go. A 3DS-model may contain this information, but jPCT can't make use of it, because it requires transparency on a per object level, not per polygon. So you have to make sure that your windows (or whatever...) are objects of their own and then set the transparency "by hand" after loading.

12105
Support / edges
« on: February 13, 2004, 12:29:43 am »
0.98 is out and therefor i've removed the beta-jar. Now you can use the official version of it...it includes the refresh()-method as well as some other stuff.

Pages: 1 ... 805 806 [807] 808 809 ... 823