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 - C3R14L.K1L4

Pages: 1 [2] 3 4
16
Support / Re: jPCT benchmark?
« on: March 14, 2009, 12:29:23 am »
Great news!

17
Support / Re: NPC Spaceship Navigation System
« on: February 26, 2009, 11:04:52 pm »
LOL!
Glad to help ;)

18
Projects / Re: Goal Game Simulator
« on: February 26, 2009, 04:53:46 pm »
Yeah, I know  ;D I'm always disabling to get the maximum performance... love seeing huge fps but some games don't like that (like my proggy).
I remember one of those, Wipeout XL / 2097 for PC... damm, always touching the track's walls... unplayable...

19
Support / Re: NPC Spaceship Navigation System
« on: February 26, 2009, 04:50:34 pm »
Humm, I have been thinking, if you want the 'bodies' to show all those behaviours and more, perhaps the best would be to implement a physics engine (you already have a simple one), and then using some little reactive functions for the ships like:

Code: [Select]
get my destination();
pos = get my position();
apply me my thrust(pos);
//--physics
apply me external forces();
compute coordinates using inertial mass and forces();
//etc...

I.e, according to the ship's desired destination you apply it's thrust (force) and all external forces (whatever they are like friction, gravitational etc.) to the ship's body. Then you compute it's new coordinates from the resulting total force / energy. Remember, in space the ship's inertia mantains it's movement for some time...
(this is a very simplified physics engine but its more than enough for your game ;))

20
Support / Re: NPC Spaceship Navigation System
« on: February 25, 2009, 09:00:22 pm »
Yep, one I've used before is an interpolation titled Catmull–Rom spline. Here's the code:

Code: [Select]
float catmullRomSpline (float p1, float p2, float p3, float p4, float t) {
return(0.5*((-p1 + 3*p2 -3*p3 + p4)*t*t*t
+ (2*p1 -5*p2 + 4*p3 - p4)*t*t
+ (-p1+p3)*t
+ 2*p2));
}

Because it is a cubic interpolation, it requires 4 positions, interpolating between the 2 middle ones (t=0.0 gives p2, t=1.0 gives p3).
But to use maximum rotation angles I suggest the other option.

21
Projects / Re: Goal Game Simulator
« on: February 25, 2009, 08:50:54 pm »
No problem.

It happens because the graphics's thread (handling jPCT stuff) isn't time synchronized. This one just executes at maximum speed and calls Thread.yield() so that the other thread (the one for AI) can do it's stuff. Because the purpose of the project was AI development, I couldn't loose time on visuals and etc. :P but I'll correct when I got the time.

PS: Perhaps forcing V-Sync on the driver as a temporary solution...

22
Projects / Goal Game Simulator
« on: February 25, 2009, 04:10:25 pm »
Hello there,

I've finished my AI's project and delivered it to the teacher :P
As it uses this wonderful API, if anyone wants to check go to this link:

http://student.dei.uc.pt/~jcgonc/productions.htm
Its on the section 'Goal Game Simulation'.

Keyboard keys are the usual ones from the FPS / simulator games.

23
Support / Re: Java Game Programming Question
« on: February 25, 2009, 04:02:51 pm »
Why don't you check in a debugger? For instance, in eclipse (the one I use), start debugging the program, when your program appears to hang, press the pause icon on the debug perspective. Then check the threads and their callstack.

24
Support / Re: NPC Spaceship Navigation System
« on: February 25, 2009, 03:57:53 pm »
Hi,

you may want to check my AI project (Goal Game Simulation), where I use some of those techniques (smooth path following) but in my case things may be a 'little' different than yours. In the SoldierAgent's code there's a function where I set a upper limit for the rotation of the agents (bots), 'calculateRotationStep'. This function is used to set a new direction vector (rotated using the maximum allowed angle step) for the agent.

In my program this is only done on a plane (xOz) but I think you can adapt it to tri-dimensional space.

Heres the site:
http://student.dei.uc.pt/~jcgonc/productions.htm

25
Support / Re: Init AA when not supported
« on: February 12, 2009, 01:26:45 am »
There is the extension WGL_ARB_pixel_format, now the problem is that if lwjgl has it (or similar).

26
Support / Re: Okino Website Claims 3DS Exports Cameras
« on: February 12, 2009, 01:12:00 am »
I've played with this for a whole day and I couldn't retrieve that chunk's id... Perhaps my brain's low on fuel, but I think we need a real hacker here. I've also checked jme (j monkey engine) and it has some code to process the camera chunk, but does nothing with it. About the unknown chunk, there's no reference to it in jme's source.

27
Support / Re: Init AA when not supported
« on: February 12, 2009, 01:07:08 am »
One may do something like i'm doing in Robombs, i.e. open a small native GL window behind a JFrame, do you queries, close both([...)

You have one possible solution... I've never used lwjgl (but I've used OpenGL) so I don't know how it creates windows and sets up pixel formats but for what I've seen in <native> OpenGL there are extensions and ways to get this information (like hardware mapping units, maximum texture size, number of lights, etc.)

However, I've found this in NeHe's tutorials, which I quote:

Quote from: Colt "MainRoach" McAnlis
This next bit needs to be added inside the CreateWindowGL function, the original code is left, with where you need to make modifications. Basically, we're doing a bit of overkill to get the job done. We can't request the pixel format (to query the multisampling) until we've created a window. But we can't create a FSAA screen, unless we know the pixel format will support it. Kinda the chicken and the egg thing. So, what I've done, is a little 2 pass system; We create the window, query the pixelFormat, then destroy/remake the window if multisampling is supported. Kinda nifty...

This is for the win32 case, but I'll bet there is a better way to do things...

28
Support / Re: Init AA when not supported
« on: February 09, 2009, 08:41:39 pm »
Can't the coder ask the available pixel formats, choose one of them and initialize the canvas with it?

29
Bugs / Empty properties exception on Wavefront's material loading
« on: February 06, 2009, 02:42:17 am »
When I load a material description where it's last material definition has empty properties, like the following example:

Code: [Select]
newmtl Explorer_Default
Ka 0.117647 0.117647 0.117647
Kd 0.752941 0.752941 0.752941
Ks 0.752941 0.752941 0.752941
illum 2
Ns 8
map_Kd
map_bump
bump
map_opacity
map_d
refl
map_kS
map_kA
map_Ns

I get this error on jPCT:

Code: [Select]
File models\bzz_Drunk_transparent.mtl loaded...643 bytes
Processing new material textures_alpha_t1!
Processing new material textures_alpha_l1!
Processing new material Explorer_Default!
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at java.lang.String.substring(String.java:1905)
        at com.threed.jpct.Loader.loadOBJ(Unknown Source)
        at com.threed.jpct.Loader.loadOBJ(Unknown Source)
        at CK.IA.Engine.loadObj(Engine.java:465)
        at CK.IA.Engine.loadAndSetupModels(Engine.java:380)
        at CK.IA.Engine.initializeScene(Engine.java:279)
        at CK.IA.Engine.initialize(Engine.java:225)
        at CK.IA.Engine.<init>(Engine.java:64)
        at CK.IA.Engine.main(Engine.java:25)

I don't know which of the:

Code: [Select]
map_Kd
map_bump
bump
map_opacity
map_d
refl
map_kS
map_kA
map_Ns

causes the problem, but if I remove them, leaving only those "tags" with description, the loading goes nice and well. But quite boring to remove when an *.obj has lots of materials...
Only happens at the last material definition, if all the others before also have empty definitions, the loader only "explodes" at the last material.

(This is caused by Deep Exploration, I don't know why, but mine always stores materials with all tags, empty or with parameters.)

30
Support / Re: Midi Volume (Not jPCT But Java)
« on: February 06, 2009, 12:02:18 am »
Nice, you corrected the volume change ;) Now I don't have to press down/up 128 times ;D
Anyway, here's the debug from my 'regular' machine:

Code: [Select]
12 MIDI Devices:
    kX Control SB0244 10k2 [a000]
    kX Uart SB0244 10k2 [a000]
    kX Uart2 SB0244 10k2 [a000]
    Microsoft MIDI Mapper
    Microsoft GS Wavetable SW Synth
    kX Control SB0244 10k2 [a000]
    kX Synth SB0244 10k2 [a000]
    kX Synth2 SB0244 10k2 [a000]
    kX Uart SB0244 10k2 [a000]
    kX Uart2 SB0244 10k2 [a000]
    Real Time Sequencer
    Java Sound Synthesizer
Using 'Real Time Sequencer' as the Sequencer.
Variable 'sequencer' is NOT an instance of Synthesizer
Using 'Java Sound Synthesizer' as the Synthesizer.
Method 'getDefaultSoundbank()' did NOT return 'null'.

And from my laptop:

Code: [Select]
4 MIDI Devices:
    Microsoft MIDI Mapper
    Microsoft GS Wavetable SW Synth
    Real Time Sequencer
    Java Sound Synthesizer
Using 'Real Time Sequencer' as the Sequencer.
Variable 'sequencer' is NOT an instance of Synthesizer
Using 'Java Sound Synthesizer' as the Synthesizer.
Method 'getDefaultSoundbank()' did NOT return 'null'.

Edit: added jdk version:

Code: [Select]
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)

Pages: 1 [2] 3 4