Main Menu

tokima

Started by acorn98, January 20, 2004, 03:52:54 PM

Previous topic - Next topic

acorn98

www.tokima.com uses the jPCT API. It's up and in beta - enjoy.

EgonOlsen

Looks great and proves that simple vertex-lighting can still produce very nice results. However, i noticed two issues while running around in the level: There's some Z-fighting when polygons overlap. But that's a "problem" with the model, not with the code. It's not that bad anyway.
I assume it's somehow based on the fps-demo? If so, on which version? Older versions did the actual movement in the timer-thread and with the upgrade to a P4 with Hyperthreading, i noticed that this isn't a good idea, because it leads to threading issues (like when the timer-thread is working on a rotation-matrix the main-thread uses for rendering). This results in parts of the geometry rendered wrong or distorted for a frame. And this is exactly what i noticed when running around in the level. Note that i never experienced this on none-HT CPUs like Athlons, so it's difficult to explain and debug. Have a look at the newer version of the fps-demo to see how i'm doing it now. As a rule of thumb: Never let any other thread than the main-thread (the thread that does the rendering) modify the camera or some object's matrices. Not the timer-thread and not an Event-Listener-thread (like a Key- or Mouse-Listener) because you may run into trouble. And it's a real pain to debug this stuff...believe me... :wink:
But now back to running around in this world... :D

acorn98

Thanks for the feedback - very handy. There's some bad poly overlap in places, mainly due to my abilities with 3dsMAX - I'm still getting to grips with it. My next effort should be considerably cleaner.

Yes, it's an fps adaptation - I can't remember which version exactly, but I think it was from around mid December. I don't have the source with me but I suspect I may have modded the camera in a mouse listener, and there are probably a variety of other coding misdemeanours! I'll revisit the code and improve it.

My next step is to get networking in there for multiplayer. I've got some old code somewhere which should do the trick, and it'll make the thing much more interesting.

...by the way - that fps source was fantastic. I'll fix the site up and add a proper credit to JPCT.net  :wink:

EgonOlsen

Quote from: "acorn98"There's some bad poly overlap in places, mainly due to my abilities with 3dsMAX - I'm still getting to grips with it. My next effort should be considerably cleaner.
.......by the way - that fps source was fantastic.
Yes...i noticed that there seems to be one (or some) large polygon below the street's actual polygons which "shines through" due to inaccuracies in the zBuffer (caused by the nature of it...nothing i can do about it). That's causing most of the z-fighting problems and it hurts fillrate and the octree. You should try to get rid of it IMHO.
The newer versions of the fps-code are even better... :wink: (No multi-threading issues anymore).
Keep up the good work. I really like the mood of this level.

acorn98

There were a couple of places where I had some gaps between street objects that I couldn't fix easily, and I found that the sky background was bleeding through. To patch it, I threw in a big plane under the street to block it off - I'll see about patching it properly.

Also, I have a couple of very long fences with a tiny repeating texture which seems to warp into a diagonal line - I think it started happening when I stretched the object to its current length (which is pretty big). Is it a bug, do you think?

I'll grab your latest fps source and have a look through, and remodel mine accordingly. I sometimes get the odd frame which flashes, which I
figured was down to the threads getting in a bit of a mess.

I wanted to make something quite dark and oppressive - I'll keep adding to it (work permitting) and see what develops.

Thanks for the tips!

[/quote]

EgonOlsen

Quote from: "acorn98"Also, I have a couple of very long fences with a tiny repeating texture which seems to warp into a diagonal line - I think it started happening when I stretched the object to its current length (which is pretty big). Is it a bug, do you think?

Are you talking about this? :



(i applied some "Gamma" to it...)

I'm not sure what that is exactly...could it be that the u/v-coordinates are very high here? Like (1000,1000) / (1000,1001) / (1001,1001) for such a triangle instead of (0,0) / (0,1) / (1,1)? That's the only idea i have ATM, because it can result in an overflow somehow. The renderer uses fixed point math for the coordinates but even 32bits are not enough sometimes. I think the highest value possible should be around (+-)256 or (+-)512...i not quite sure ATM. Could that be a problem here?

acorn98

that's it!  I suspected it might be an overflow or somesuch.

It's not a huge problem because I can work around it. The original fences were about 1/3 the length, and they looked fine, so I can tweak the model to make it go away.

raft

Quote from: "EgonOlsen"As a rule of thumb: Never let any other thread than the main-thread (the thread that does the rendering) modify the camera or some object's matrices. Not the timer-thread and not an Event-Listener-thread (like a Key- or Mouse-Listener) because you may run into trouble. And it's a real pain to debug this stuff...believe me... :wink:

it is quite true that debugging a multi-threaded application is a real pain. however using timers greatly eases some tasks.

you may consider using javax.swing.Timer instead of java.util.Timer since the former is executed in awt's event dispatching thread. assuming your rendering is done in paint or paintComponent methods you end up with a thread-safe timer mechanism.

Quoter a f t

acorn98


Raven

Wow. Looks awesome -- great design work there! And great effects when opening the xxxx (don't want to give anything away).  :wink:

The blitted text is good too, however, I would suggest that the "operate" button doesn't move the camera. I also found it a bit hard to know wether I was clicking the right place or wether there really was nothing to click on.

I just wish it was longer! It was really fun and spooky. Reminds me of one of my favorite old games: "Deja-vu".

More!

-Raven

acorn98

Thanks for the feedback Raven. I've hired some graphics/modelling/audio talent to turn this into a proper full-length game.

I'll have a think about ways to improve the clues that something is happening when you click stuff :)

EgonOlsen

Quote from: "acorn98"I'll have a think about ways to improve the clues that something is happening when you click stuff :)
I think that the cursor should change somehow if you can interact with an item (get a green glow around it or something).
Great artwork and a cool mood (as usual!). About gameplay: I've found the card and opened the suitcase. Am i supposed to do anything else?
A technical question: Are you using any of jPCT's optimizations for indoor scenes (like Config.isIndoor and Config.zTrick)?

Edit: Oh, and i would appreciate if movement were a little faster. Maybe a 30-50% speedup.

acorn98

A changed cursor is a good idea - much less frustrating!

Unfortunately, there's nothing more to do after the briefcase is open in the posted version, which is little more than a sandbox right now.

Regarding optimisation.. As you rightly point out, it's way too slow at present, and it will be optimised soon. I'm not too worried though - I think it'll be quite easy to do. The thing that really hurt the speed was when I stopped merging objects into one mega-object (I ran into problems with object picking) so I'll go back to merging the walls/floor. Also, my isIndoor=false, my farPlane is huge, so there's plenty of stuff for me to tweak  :)

Right now, the modeller is busy building new scenes, and trial audio loops and clips are being prepared. Once we have enough scenes we'll storyboard it properly and see what happens.

I thought that scripting a good story would be easy.. it's hard!  :lol:

acorn98

I have added a bunch of optimisations for speed and improved lighting  here:

http://www.tokima.com/2005a/

I've removed the map from the JAR for testing purposes, so loading time takes a while longer.

Raven

Actually.. It doesn't seem to finish loading here on my end.
5 bars left of loading it just stops.

:(

-Hrafn "Raven"