Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About darkdesigns

  • Rank
  1. darkdesigns

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

    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. darkdesigns

    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. darkdesigns

    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. darkdesigns

    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. darkdesigns

    Axis aligned ellipse collisions?

    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. darkdesigns

    Plot a Course through a Grid

    Looks like what you need are Pathfinding algorithms. http://en.wikipedia.org/wiki/Pathfinding 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. darkdesigns

    Anonymous Agony. [FILE #0 BETA OUT!]

    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. darkdesigns

    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? http://en.wikipedia.org/wiki/Elevator_(aircraft)
  9. darkdesigns

    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. darkdesigns

    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 (http://www.ajdesigner.com/phpwinglift/wing_lift_equation_force.php) 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. darkdesigns

    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~
  12. What I want is an algorithm which can pregenerate adjacency sets for the common radii.[/quote] What do you mean by common radii? Or do you mean all radii? Since you're pregenerating this just once, why not just bruteforce it? You don't really care if it runs for a few minutes while you go get a drink, since the users of your games will never experience this. Brute-force solution (roughly accurate): 1. For each cell in the given color matrix, (keep incrementing RADIUS in desired range) |-- a. iterate from (cell_x - RADIUS, cell_y - RADIUS) to (cell_x + RADIUS, cell_y + RADIUS): |----- i. check if the given coordinate satisfies the circle equation, i.e. (cell_x - point_x)^2 + (cell_y - point_y)^2 <= RADIUS^2. [1] |----- ii. If yes, add the coordinate (point_x, point_y) to a temporary list. |-- b. Add the list as the value in a temporary hash, with the key being the RADIUS value. This hash then becomes the value to a master hash with the key (cell_x + "," + cell_y). You can use priority lists to keep the cell coordinates sorted by color if you want. I'd just say keep this simple, since it's easy to get carried away for precomputing things and write unnecessarily elaborate solutions. [1] http://en.wikipedia.org/wiki/Circle#Equations
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!