# darkdesigns

Members

12

100 Neutral

• Rank
Member
1. ## How do you find a normal to a point on an ellipse?

[quote name='Bungalow 12' timestamp='1331064171' post='4919881'] once I have the slope of the tangent line I simply take the negative reciprocal (perpendicular) of that slope and I have my normal. [/quote] 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: > x[sup]2[/sup]/a[sup]2[/sup] + y[sup]2[/sup]/b[sup]2[/sup] - 1 = 0 > 2x/a[sup]2[/sup] + (2y/b[sup]2[/sup]) * (dy/dx) = 0 // first differential > (dy/dx) = - (x * b[sup]2[/sup]) / (y * a[sup]2[/sup]) // slope > (dy/dx) = (y * a[sup]2[/sup]) / (x * b[sup]2[/sup]) // normal in differential form > (dy/dx) = (pt.y * a[sup]2[/sup]) / (pt.x * b[sup]2[/sup]) // 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 Cheers ~dd~
2. ## Getting Function Body From Script File

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? Cheers ~dd~
3. ## College Degree

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. Cheers ~dd~
4. ## Son of Nor

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? Cheers ~dd~
5. ## Axis aligned ellipse collisions?

[quote name='B O N E S' timestamp='1331002338' post='4919661'] There are a lot of articles on ellipse collisions/intersections but most of them are for rotated ellipses too [/quote] 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. Cheers ~dd~ 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
6. ## Plot a Course through a Grid

Looks like what you need are Pathfinding algorithms. [url="http://en.wikipedia.org/wiki/Pathfinding"]http://en.wikipedia.org/wiki/Pathfinding[/url] Try Dijkstra's path finding algorithm, since (IMO) it's the easiest to begin with. A* algorithm is faster, but I'd encourage you to first get a working implementation and understanding of Dijkstra's before using A*. Fire pits, alligators etc can be represented by MAX_INT (i.e. very large) values for edge weights. Cheers ~dd~
7. ## Anonymous Agony. [FILE #0 BETA OUT!]

[quote] In specific, you are teaching predators how to become effective predators by using conversations as teaching aids.[/quote] While I agree that the game authors should check with a country's laws before releasing this there (since there are varying degrees of control and ratings), I don't think this is a new problem. The same argument was made two decades ago when Doom was released, and has been rehashed time and again that violence in games encourages violence in real life Cheers ~dd~
8. ## Question about aircraft physics.

Hmm, I guess I'll need to read more to help you then. But a final naive question: do you have a working elevator in your aircraft tail modeled in your equations? [url="http://en.wikipedia.org/wiki/Elevator_(aircraft)"]http://en.wikipedia.org/wiki/Elevator_(aircraft)[/url]
9. ## Anonymous Agony. [FILE #0 BETA OUT!]

Interesting, dark and relevant in today's world. Nice! Looks like you guys have put a great deal of effort into this. My only comment, FWIW, would be to avoid building cliched characters. A brooding punk, a little sister and an overworked cop are good (but overused) roles, and it'll be great if you can build multiple faces or sides to the same person. A punk being a punk all the time is boring and shallow. Cheers ~dd~
10. ## Question about aircraft physics.

I'll admit I don't know much about aircraft wing physics other than regular college math, but it is hard to answer your question without looking at the equations you're using for calculating your motion. A quick Google led me to a site ([url="http://www.ajdesigner.com/phpwinglift/wing_lift_equation_force.php"]http://www.ajdesigner.com/phpwinglift/wing_lift_equation_force.php[/url]) that list a few equations for calculating different wing forces. These equations are in the scalar format, so you might want to find (or make) vector versions to include the direction. A general observation: you mention that your aircraft climbs instead of diving. Are you sure you're using the right wing surface (it should be the top surface) for calculating dives? It looks like your lift force continues to point upwards even when you're diving. Cheers ~dd~
11. ## Pixel Art Help

Drawing/sketching on existing images is an interesting way to get in. Draw something, anything! Pick up a newspaper and draw mustaches on women or swords in people's hands. Sketching is fun too, and doodling over existing images helps break the "starting barrier" present when you start with a blank sheet. The same applies to pixel art. Open some pixel art from the games of previous decades (even MS Paint is enough, if you're on Windows) and try adding your own touches and modifications to them. As others have pointed out, the key is to get confidence and practice, and draw whenever you can, as much as you can. Cheers ~dd~