0
101 Feb 12, 2003 at 08:25

hm yeah actually you need to know how to program stuff.. then using an api (part of “how do i program stuff”) is easy once you got access to the docu.. and.. the docu is great:D

In response to point to a polygon
0
101 Feb 12, 2003 at 02:44

This might be a start, you must first find the distance to the plane containing the poly. Like so.

//NOTE:
/*
both the vectorstruct and the pointstruct are float X,Y,Z; values, to make things simplier
N1is the polys normal
POP is ANY point on that plane, AKA one of the 3 verts of the triangle poly
P1, is the point checking the distance from
*/

float PointPlaneDistance(VectorStruct N1, PointStruct POP, PointStruct P1)
{
float Distance;

Distance = ((N1.X*P1.X + N1.Y*P1.Y + N1.Z*P1.Z + (-N1.X*POP.X - N1.Y*POP.Y - N1.Z*POP.Z)));

return Distance;
}

That will return the distance to the plane (if negative you are behind the plane)
If you need to find the distance to a poly, that is not a perpendicular plane line, you would have to find the distance to each of the lines, and see which is closest, why? Because if you arent closest to the face (Plane distance) then you have to be off to the side of one of the lines, thus the perpendicular to one of those lines is the closest point. Got it?

//This returns the closest point on the line (which of the lines of the triangle you pass) along with the
// distance in a pass by value.
NOTE:
/*
SP1 is segment end point one, sp2 is segment end point 2, p1 is the point checking from, and distance is self explanitory
POI is point of impact, or the closest point on the line
Build vector simply creates a NON normalized vector
dot vector, is self explanitory
Step point along vector does exactly what it says, it moves the point along the vector passes, along with the distance passed, and returns the new point.
*/

PointStruct ClosestLineSegmentPoint(PointStruct SP1, PointStruct SP2, PointStruct P1, float& Distance)
{
//This directly returns a point, and also pass by returns the distance.
VectorStruct Vec[4];
PointStruct POI;
float c1, c2, c3;

Vec[0] = BuildVector(SP2, SP1);
Vec[1] = BuildVector(P1, SP1);
Vec[2] = BuildVector(P1, SP2);

//Dot product of the first 2 vectors
c1 = DotVectors(Vec[0], Vec[1]);

if(c1<=0)
{
Distance = sqrt(DotVectors(Vec[1], Vec[1]));
POI = SP1;
}

else
{
//Dot product of the next 2 vectors
c2 = DotVectors(Vec[0], Vec[0]);

if(c2<=c1)
{
Distance = sqrt(DotVectors(Vec[2], Vec[2]));
POI = SP2;
}

else
{
c3 = c1/c2;

//Holding variable of new point
POI = StepPointAlongVector(SP1, Vec[0], c3);
Vec[3] = BuildVector(P1, POI);

Distance = DotVectors(Vec[3], Vec[3]);
}
}

return POI;
}

Hope this helps, sorry for the quick post, but off to more coding.

0
101 Feb 12, 2003 at 02:40

[in no way am I trying to shoot your harmony jam session (your view ;7 ) down in any way but it’s hard to ask this question without coming off as offensive. please bear with me]

can I ask you to elaborate on why or where in SDL you have a problem? I don’t mean problem - lack of a better phrase.

I’m curious and I’d like to see your point of view. I made an engine [still in development] and it uses SDL for windowing and input. I made a middle/manager class that controls window placement and behavior, and the input via SDL. granted, I sort of ‘embraced’ SDL and now, I’d like a difference in opinion. maybe there is something that some of us failed to see.

thanks.

In response to Game Theory
0
101 Feb 12, 2003 at 02:32

I dont believe that above code snippet will ever create a Gimble lock. Because it uses a temp variable so that the rotation of one axis dosnt over ride the other axis, upon compleation. Thus things dont go negative. I have yet to have any problems with it any ways, if someone could come up with an instance that the above code dosnt work, let me know. I will have to run some calcs to figure that out, and see if it is possible with that code.

0
101 Feb 12, 2003 at 02:28

I also agree that GLUT is getting a little out dated, BUT I still use it. WHY? Because i said so, just kidding, actualy its because I find it much easier to work with than SDL, SDL seems to be a little over bearing with the CONTROL of the flow of code. Now probly the BIGGEST bitch people have with GLUT is SLOW input, I simply set a BOOL value (table) When the key is pressed, and check that value each time, so input is not a concern of mine. The other major problem is the glutSwapBuffers, which indeed is a bit slow, but all in all it works nicely. I think SDL has promise, but I dont think I will use it, because like I said, it tends to have a control issue, that and its not as easy of a syntax.

In response to Java or C#?
0
101 Feb 12, 2003 at 00:20

Well, originaly microsoft was contracted with sun to use there java VM. However, microsoft desided to go and create there own java. (Which went against the contract, consiquently causing sun to sue MS.) The latest court decision I believe may now force microsoft to follow through and have the sun java vm included in windows release.

But basicly, C# is a JAVA clone.

In response to hehe
0
101 Feb 12, 2003 at 00:13

I am! :huh:

In response to DirectSound issues
0
101 Feb 12, 2003 at 00:12

Sad to found out that there is no information related to audio software development.

Is there any game developpers wants to share knowledge?

In response to Java or C#?
0
101 Feb 11, 2003 at 21:43

interesting point. if it’s not obvious from the general thread of this forum, I’m a bit anti-m$but with all things considered, I agree with you. I find nothing new with c# that java doesn’t already do. maybe it’s just so that m$ can have a product against sun’s popular java. or maybe there’s something more in the fine print that you and I have missed. anyway, I’d like to ask if anyone here thinks that anybody can write 10 pages about the difference in c# and java. I have to write a scientific argumentative research paper for my technical writing class [for my related field, which is CS] and if you guys think you can write 10 pages on the _SCIENCE_ aspect of it, then I would gladly write about the topic and share with you folks.

-thanks

0
101 Feb 11, 2003 at 21:37

and to add with what baldurk said, most of the gaming industry seeks to release a game [or whatever] quickly - for either quicker profits and/or patent of a certain feature. although, I’ve never heard of anybody patenting a certain feature. for example, I had an idea for a first-person shooter to be able to use multiple guns and have multiple lock-on’s and with the release of lucasarts’ bounty hunter, I’m afraid to even release it. I guess I could claim prior art, unless they truly implemented the idea a while back… but I’m getting off topic.

but yeah, I imagine that to some people the sooner they make a release, the sooner they can make a name for themselves and will use already-made tools if it serves them in their best interest. I guess it’s more of a personal/’ethical’ opinion.

-regards

In response to GLExcess
0
101 Feb 11, 2003 at 21:30

oh yes it is.

eye + ear candy with a hint of elegance…

…syke :lol:

In response to Java or C#?
0
101 Feb 11, 2003 at 19:55

*cough*worlddomination*cough*

flamebait aside, I really don’t know.

In response to GLExcess
0
101 Feb 11, 2003 at 19:44

if he does, let me know. That’s simply THE best demo I’ve ever seen. Bar none

In response to Troubles with Portals...
0
101 Feb 11, 2003 at 18:34

I would recommend not to use a box, just a rectangle placed in the “middle” of the AABB. You could then use the edge vertices of the quad to build a caped pyramid from these vertices (the new view frustum). Just compute the plane of the view point and each adjacent quad vertex and use this for the next oclusion test. Of course you might want to do something like test if the plane area of the quad restricted by the quad vertices intersects the previous frustum in the recursion to determen if the portal is even visible, so that you won’t process too many portals.

Btw. I haven’t made a portal engine yet, so this is just a pure hypothesis, but I hope that might help (or actually work) :rolleyes:

Cheers

0
101 Feb 11, 2003 at 18:21

lots of people are impatient and want to get going soon. Most now do not want to learn low-level stuff.

0
101 Feb 11, 2003 at 17:01

@apex

Have you tried the D3DXCreateTextureFromFileEx function with the color key?

Unfortunatly that damn call takes like 14 parameters. The quick and easy way to do it, is to use D3DXCreateTextureFromFile(). What you need to do though, is open your image editor and MASK the areas you want transparent, then invert the selection (effectivly MASK’ing what you want visible) go to the chanels panel (or how ever your editor manages channels) and make sure that masked is saved as Alpha mask. Save the file as something.tga . Targa files save the mask..

The sprite should now be transparent except for what is masked.

0
101 Feb 11, 2003 at 16:54

Hmm… I find the idea of a gaming package quite un prof. :blink: But the thing is that many people want their product ready fast (the industry at large tends to like that :P) and I generally have nothing against it, but I find it quite daunting that the comming generation of graphics programmers (system programmers in general) won’t really know the low-level stuff and will lack the skill to go down into the dirt to fix something they find poorly implemented, if they even notice it… I my self am quite worried, that I’ve never writen a rasterizer my self, I’m sure I would be able to do, but it still bugs me that I actually started at too high a level :unsure: Still I think that I’m at a very much lower level (or higher to be exact :P) than many of the people that would use these kind of packages (like glut) would be. I’m not totally sure about the stuff in the package beeing advertised, but I think that even DX9 without any such tools is too much filled with tools. I know I don’t have to use them, and for the most part I do leave the extensions out of my code, but it still bugs me :D

Just my honest opinnion B)

Cheers!

0
101 Feb 11, 2003 at 15:37

opengl.org

0
101 Feb 11, 2003 at 15:08

comp.graphics.algorithms

In response to Octree Questions
0
101 Feb 11, 2003 at 15:06

I’ll have a go at this one. Correct me if I’m wrong.

1) From your description.. each leaf will have a list of objects contained in that leaf. Wont each object have its own list of vertices and materials (which can be accessed by one simple pointer dereference)?

2) why would you duplicate your object? 2 nodes can point to the same object. Or perhaps the parent node should contain that object.

3) Only create the children nodes as you need them. i.e. you shouldn’t create every single child node for the “large” node because the node doesn’t contain anything. This also depends on memory issues. The tree could potentially take up a lot of memory if you create every node initially.

4) perhaps you can consider one “particle system” as one object. not as a million small objects.

In response to Model Editing
0
101 Feb 11, 2003 at 14:59
0
101 Feb 11, 2003 at 14:55

GeForce2- quite like it. Also have a TNT2 waiting for a machine.

In response to Good OGL books
0
101 Feb 11, 2003 at 14:52

I’d say the Red Book and the Nehe tutorials would be all thats needed.

0
101 Feb 11, 2003 at 14:14

You could use an alpha mask

0
101 Feb 11, 2003 at 05:25

I found it from www.opengl.org
And I am really happy that I found it!

Welcome to DevMaster, a community-driven game development website of posts and resources!

indie × 4
ios × 3
android × 2
mobile × 1
native × 1
macos × 1
sound × 1
music × 1
networking × 1
testing × 1
multiplayer × 1
3d-engine × 1