In response to reply on Math problem
0
109 Jan 03, 2014 at 21:47

That’s 3 separate equations, and Stainless’ equation uses 2 unknown and 1 known, unsolvable. Yours is the same, 1 known and 1 unknown, still unsolvable. Each of the 3 equations can’t really be incorporated together can they?. Would the quadratic equation be useful here?

0
101 Jan 03, 2014 at 20:47

Ok. Khan will have to do.

In response to reply on Math problem
0
167 Jan 03, 2014 at 20:27

You have also C = A*cos(alpha) and C = B*cos(beta). Together with Stainless’ equation C = 10/tan(beta) + 10/tan(alpha), that’s three equations in three unknowns, so should be solvable, in principle.

In response to reply on Math problem
0
109 Jan 03, 2014 at 19:17

ok, but now we are back to “how to find beta and alpha”?

0
179 Jan 03, 2014 at 16:00

You’ll have to find that out :) Just taking a quick glance, they have linear algebra on there plus some calculus, geometry, and trig stuff. They also cover parametric equations and Cartesian coordinates, which is good. If this is something you’re doing on your own time, then give it a try. Though I personally wouldn’t recommend any online or free courses as a substitute for the real thing.

1
179 Jan 03, 2014 at 15:49

I haven’t used shadow volumes in a long time (since the widespread of shader support in consumer hardware). Shadow casting is one of those problems that currently doesn’t have an ideal technical implementation yet. Both solutions have their pros and cons, but shadow maps give you much more bang for your buck. Easier to implement, smooth looking penumbras, generally lower performance impact (but this can vary on shadow map complexity too), and independent of scene/geometry complexity.

Personally, I can’t wait until real-time ray tracing becomes more of a reality. Working with lights and shadows in a ray tracer is vastly more intuitive than messing around with hack’ish solutions.

0
101 Jan 03, 2014 at 15:07

Excited to start working on some great games in 2014! Send me a message :)

0
106 Jan 03, 2014 at 12:22

Sorry, I realized this does not publish my email. Please write to: juan {at} okamstudio {dot} com.

0
102 Jan 03, 2014 at 10:39

It sounds great! Especially for linux users like me! How can I get in touch with you? Just use the contact form on your website?

In response to Math problem
1
151 Jan 03, 2014 at 08:04

Ok this is just thinking aloud… but

d = A sin (alpha);    // d is the third side of the triangle formed by A and C, alpha is the angle between A and C
e = B sin (beta);      // e is the third side of the triangle formed by B and C, beta is the angle between B and C
c1 = 10 / tan(alpha); // c1 is x coordinate of the intersection point
C - c1 = 10 / tan(beta);


so ….

C = 10/tan(beta) + 10/tan(alpha);


That should be enough to get you started

0
101 Jan 02, 2014 at 09:10

Is there any game math related concept not taught at khan academy

0
179 Jan 02, 2014 at 06:24

I don’t know anything about Khan academy, so I can’t say. Quick glance at their topics indicate they do cover the basics, so I suppose you could start there. You might have questions and it helps to have a professor / teaching assistant to help with that.

0
101 Jan 01, 2014 at 17:55

@TheNut: Khan academy is a good place to start, right? They’ve everything from maths to physics and it’s free to use.

0
179 Jan 01, 2014 at 17:13

Generally you should know linear algebra. Any 1st year University course (and book) will cover enough material for you to get by. Vectors and matrices are broad topics and their complexity is determined with what you do with them. For example, vector dot, cross, magnitude, or matrix determinant, quaternions, euler angles, etc. It’s not enough to simply know these operations, but what they’re for and why you do it. That could take a bit of time to absorb because the field of mathematics and 3D graphics (or gameplay, or physics, etc.) are not often intertwined. Alternatively, there’s many frameworks out there like XNA and DirectXTK (the successor to XNA) that include all these math routines for you. This reduces the problem to simply understanding 3D space.

I would say calculus is not as important as algebra. You could probably get by without knowing any calculus. It’s certainly nice to know and if you ever plan on writing a scientific module like any type of simulator (particle, physics, cloth), then you will definitely need some calculus background (in addition to algebra).

Once you get a handle for the above, the rest will come on its own. You will dive into topics that are very specific and require its own research. For example, Bezier curves, colour space, HDR, noise, random number generators, and intersection testing (which uses Algebra) will be topics you run into at some point.

In response to reply on OpenGL matrix
0
109 Jan 01, 2014 at 05:05

It’s no big deal, it only does that when I tilt a lot, like > 45 deg. I’m still learning about all that matrices stuff in OpenGL.

Thanks Reed for your help. Have a Happy New Year….

In response to reply on OpenGL matrix
0
167 Jan 01, 2014 at 04:52

Hmm. It shouldn’t be affecting the depth value of objects. You can see for yourself that the matrix doesn’t change Z values; it only affects Y values. I haven’t tried this myself but as far as I can envision in my head, the pseudo-pitch should only slide things around, not make them expand/contract on screen.

Your code looks correct though, so I’m not sure what’s going on.

0
109 Dec 31, 2013 at 22:19

About C4 Engine?

http://www.terathon.com/

In response to reply on OpenGL matrix
0
109 Dec 31, 2013 at 18:40

Never mind about shearing too much the more I pitch up/dn, that’s expected.

But when I pan up/dn, it works but it also affect the Z, meaning, it’s also moving away or closer. Is that normal too?

In response to reply on OpenGL matrix
0
109 Dec 31, 2013 at 17:49

oh I see what you mean! It’s working, but it’s not quite right. Here is what I do. My matrices are in row major but I transpose them before sending them to OpenGL using glLoadMatrixf…

My view matrix M1…

Z = CamDir; // CamDir is vec3(0,0,-1) rotated by CamRot then normalized.
X = Normalize(Cross(Vec3(0,1,0),Z));
Y = Cross(Z,X);
M1 = (
X.x,  X.y,  X.z,  0,
Y.x,  Y.y,  Y.z,  0,
Z.x,  Z.y,  Z.z,  0,
0,   0,     0,  1
);


Then your shear matrix M2…

a = tan(CamRot.x); // CamRot is already Deg->Rad
M2 = (
1,  0,  0,  0,
0,  1,  0,  0,
0,  a,  1,  0,
0,  0,  0,  1,
);


Then the cam pos matrix M3…

M3 = (
1,  0,  0,  -CamPos.x,
0,  1,  0,  -CamPos.y,
0,  0,  1,  -CamPos.z,
0,  0,  0,  1,
);


Then I build the view matrix by doing…

ModelViewMatrix = m2*m1*m3

It looks good, and verticals are verticals, I have depth too, but it shear too much the more I pitch up/dn.

0
101 Dec 31, 2013 at 17:12

Could you list the maths needed (vectors, matrices etc.)

0
179 Dec 31, 2013 at 16:49

As Stainless mentioned, engine development never really stops. Depending on the complexity of your project and your goals, you could get something up and running within as little as a couple weeks to a couple months. Either way, your engine will undergo improvements as your understanding of the APIs and engineering skills improve.

I often avoid 3rd party libraries unless they are provided with a flexible license and provide simple enough functionality that it imposes minimal risk and size. If feasible, I’ll write my own portable code to provide the functionality. For example, I ported most of the important parts of the .NET BCL and WPF over to C++. I now enjoy the ease and productive benefits of working with the .NET API in a multi-platform C++ engine. Some of the 3rd party libraries I use solve other complex problems I didn’t want to spend time on: * Box2D * Bullet physics * Various DB connectors * LUA * libjpeg * OpenSSL * Xiph stuff * Zlib

For all other stuff like supporting BMP, PNG, TGA, HDR, WAV, SVG, TTF, OBJ, ZIP, HTTP, etc. I wrote my own code. It was both an educational exercise and to provide small, lightweight, and portable code to use. This is over a span of many years of course. Each new year brings in new features and more productive frameworks. It’s an evolving process.

0
101 Dec 31, 2013 at 14:28

@vilem: I will probably release it for linux. Thanks.

In response to reply on GLSL and different GPUs
0
117 Dec 31, 2013 at 12:34

I’ll answer Reed in this reply too - yup I’m looking to some example of your point 1 - e.g. do you know some example of this (or better full implementation - but I doubt that exists)? Because this is what I’ve been looking for.

0
117 Dec 31, 2013 at 12:31

Just a little note to Direct3D vs. OpenGL, once you learn one of them to some extent, it’s very easy to switch to another. I also recommend you to try also OpenGL once you are finished with Direct3D, it might be viable for future - e.g. you might decide to F.e. release your engine for Linux.

In response to reply on GLSL and different GPUs
0
151 Dec 31, 2013 at 10:40

Yes, but there are ways of managing this.

1) Single shader and translation layer

Write your shaders in your own macro language and translate it into the correct version of GLSL before compilation

2) Subroutines

Write an include file for each GLSL version and write the shaders using only these subroutines.Change the include file on the fly.

Or you can use one of the freeware translation libraries that are out there. I can’t remember the name of the one I have used, but it converts opengl into direct3d on the fly. This is particularly useful in windows as you can use pixwin to debug.

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

indie × 5
ios × 3
android × 3
algorithm × 1
effects × 1
physics × 1
iphone × 1
c# × 1
mobile × 1
native × 1
macos × 1
sound × 1
music × 1
networking × 1
testing × 1
multiplayer × 1
3d-engine × 1
shaders × 1
gaming × 1