Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Mar 2012
Offline Last Active Mar 16 2012 09:26 PM

Posts I've Made

In Topic: How do you find a normal to a point on an ellipse?

06 March 2012 - 03:25 PM

once I have the slope of the tangent line I simply take the negative reciprocal (perpendicular) of that slope and I have my normal.

Don't you have to integrate it back once you're done? And include a constant offset after that. I'm a bit rusty with this, but here's my worksheet:

> x2/a2 + y2/b2 - 1 = 0
> 2x/a2 + (2y/b2) * (dy/dx) = 0       // first differential
> (dy/dx) = - (x * b2) / (y * a2)       // slope
> (dy/dx) = (y * a2) / (x * b2)       // normal in differential form
> (dy/dx) = (pt.y * a2) / (pt.x * b2)       // Now replace with actual intersection coordinates
> (dy/dx) = k       // The RHS is going to be a constant value now, say, k
> y = k * x + C       // integrate back to get actual line
> C = pt.y - pt.x * k       // since the intersection point also lies on the line

Hope this helps


In Topic: Getting Function Body From Script File

06 March 2012 - 01:28 PM

How about splitting them into multiple files? Put related functions (GUI generated etc) in a file, and show that to the user for editing. Is it really important to show each function separately? And if so, is it really important to store all functions in the same physical file?


In Topic: College Degree

06 March 2012 - 03:14 AM

Why not just get a Masters in Game Design or Development? Or a course in whichever area of game development interests you?

Depends on where you are geographically, but several universities across the world have specialized degrees in game development and teach various aspects (storyboarding, graphics, engine development etc) and provide sufficient hands-on game dev experience. University of Pennsylvania, USA has a good course and provide plenty of team-oriented game development assignments. They do have some math (vectors, drawing algorithms, collision detection etc) though. Some other universities offer courses with lower amounts of math, but therefore focus less on core graphics programming (programming, not artwork) and more on other aspects.

The experience/interest you mention appears to be more inclined to front-end/web-based/mobile games, so you might or might not enjoy the courses I mentioned above. YMMV.

Of course, the anti-answer is to not do a college degree in games and instead learn it yourself using online resources and build games for fun. Your game might even become popular! Minecraft is an indie game, and not from a big game studio or company. There is nothing unusual about this and a large number of game developers are self-taught and never did game-oriented courses.


In Topic: Son of Nor

06 March 2012 - 02:56 AM

I like the ability to terraform using telekinesis! Will make for fun deathmatches, I can imagine myself raising a mound of sand in front of me and then throwing a boulder as a combo! And maybe casting a quick burn spell somewhere after that.

Does telekinesis work for other environmental objects like trees and thin walls?

Also, given that the hurricane can lift small rocks, can it also uproot trees or tear down weak buildings?


In Topic: Axis aligned ellipse collisions?

06 March 2012 - 02:25 AM

There are a lot of articles on ellipse collisions/intersections but most of them are for rotated ellipses too

If the equations in the docs you're reading also work for rotated ellipses, why not just simplify them by replacing the rotation angles with 0 or 180 degrees?

If you absolutely promise that the two ellipses are not rotated relative to each other, then just find the line equation between the center points of the two ellipses, and then solve that equation for any one ellipse's equation to find points of intersection of that line on the ellipse. Then check if these points are on or inside the second ellipse (by replacing the x & y coordinates of the points in the ellipse equation and checking if the result is <= 0).

If you haven't done collision detection yourself before, it'll be useful if you read up the equations representing different shapes and try this exercise on paper and then programming it. Otherwise all physics engines have a collision detection module built-in, so you just need to give it the shapes and it'll do the rest. Box2d is one such physics engine, but I don't think it does ellipses yet.


PS: You will get two points per ellipse, since the line joining the centers will cut each ellipse in two places.
PPS: Let me know if you need some help on solving the ellipse equations