Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

144 Neutral

About Neosmyle

  • Rank
  1. Neosmyle

    Destructable walls

    Upon finding a collision, I'd find the 3d volume of the wall that was "damaged." Then break this up into a number of random chunks, leave the rest of the wall intact, and apply physics calculations to each of the chunks, forces being gravity, and some force caused by the collision. In order to use this approach, some research has to be done to figure out what "regions" of walls become damaged in certain instances, and thus, what we would cause to "crumble away."
  2. Neosmyle

    Consistency in Time Travel

    This is just another case of the well-known "grandfather paradox", where a time-traveller goes back in time and kills his grandfather, thus ceasing to exist. There are several resolutions. One is that there are "parallel universes." You would go back into a parallel timeline, kill your grandfather, and never be born in that universe, but, 50 years later in your origin universe, you would still be born as normal. Another is that each physical particle has its own relative timeline, and there is no one "stream." In this case, your body, and the particles it consists of would travel back 50 years, and nothing would prevent you from killing your grandfather. At the same time, there would be no mystical forces that could "figure out" that you shouldn't exist, so nothing would happen. A third theory is that the probability of causing an event that would lead to a paradox is zero. Imagine a billiard ball that was hit into a wormhole that would lead back into the path of the ball, causing it to collide with itself. The self-consistency principle says that the billiard ball could only knock itself slightly off course, which would in turn send it into the wormhole at a slightly different angle, etc, etc. This is known as a causal loop. Of course, it doesn't matter which you pick. It's all theoretical, for now and a long time in the future.
  3. Sadly, I think the only thing limiting this so called "player-skill-based" type of RPG is the very limited input devices that a computer possesses. The most you can do is click your mouse in certain locations and enter certain combinations of buttons. It would take a lot of work to create a combat system that a) has a suitable learning curve (not too shallow or steep, and more importantly, without a "ceiling", so that players could always improve) b) made strategic sense (logical and not random) and c) had a great "fun-factor" If those challenges could be met, it would be a great idea. Though you still might want to incorporate some sort of level-based progress throughout the game, so that perhaps someone who wasnt so naturally talented at the battle system, but had played for months, couldnt be beaten by first-week players. This could be in the form of improved items, improved damage, etc.
  4. Neosmyle

    Cars in real life

    http://auto.howstuffworks.com/differential3.htm Differentials are used so that two wheels connected to the same axle can rotate at different speeds. Theres a pretty animation showing exactly how it works on that site. In a RWD car, the front wheels are not on a connected axle, so there is no need for a differential. The back wheels have one differential so that while going around turns, they can move at different speeds (otherwise, one wheel would scuff on the road surface). In an AWD car, 3 differentials are needed: one in the front axle, one in the back axle, and one in the shaft connecting the front and back, so that they can all spin at different speeds. Most differentials are open differentials. A Limited Slip Differential distributes power to the wheel with the most traction, so that, for example, if one wheel is on ice, and the other isn't, you can still move forward, and not waste all your torque spinning the wheel that is going nowhere. A LSD also makes doing donuts (burnout in a circle) much easier, since the lateral movement of the car will put more weight on one wheel. With an open differential, there is a chance that that wheel won't "lock up" (spin without traction), but with an LSD, more power will be applied to that wheel, letting it overcome the friction with the road.
  5. Quote:PICKY: In C#, there isn't an operator[], there are indexers. And with a linked list, you would have to loop through each item until you have reached the desired... they aren't stored in a line in memory. He wasn't talking about doing that in C#. He said that for a such an implementation in C++, there was an alternate implementation in C#. Reread.
  6. Neosmyle

    Best Patch Engines?

    Quote:BOOL PatchEngine_ApplyPatch(void* _pOldData, UINT _OldDataSize, void* _pPatchData, UINT _PatchSize, void** _ppNewData, UINT* _pNewDataSize); What is it that you're looking for? Do you want to directly modify the process's memory? Then why not just overwrite it? If you're intending to compare data of different sizes, what determines the size of the output data? Why would it be in a different location or a different size? Do you just want to know the differences between two chunks of memory? If so, what would you do with it? What size memory blocks are we talking about? Would it always be "instruction" (process) code? You've given practically no idea about what exactly you want to do, or why. How many times must we reiterate "if you tell us your intent, we'll be able to help you better, or suggest a different method" on this forum? Yet people still give vague, incomprehensible demands, and proceed to ignore others when they try to help: Quote:You didnt read my postings...
  7. Neosmyle

    Modifying the Bresenham Line Algorithm

    Well, looking at your picture for a second, I worked out a fairly simple method, which I *think* should work universally. I don't really want to talk about major and minor axises here, so we can just assume that when I say in the y-axis, I mean the minor axis, and x-axis is the major axis. I'm doing it like that because it responds to the OP's diagram. deltaY = maxY - minY, deltaX = maxX - minX. First off, we must understand that the only difference between your desired output, and the Bresenham algo, is that two pixels must sometimes (usually) be drawn in the y-axis instead of one. The added pixel will either be above or below the output returned by the Bresenham algo, or only one pixel will be drawn. To relate this to the diagram, there is only one pixel drawn at the endpoints, and 2 pixels drawn in the y-axis for every other point. To determine whether the added pixel will be above, below, or not drawn, we must make liberal use of (deltaY * i) MOD deltaX. i would be your iterator as you go along each pixel in the major axis. if (((deltaY * i) % deltaX) == 0) { //no added pixel } else if ((((deltaY * i) % deltaX)-((deltaY * (i-1))) % deltaX) * (((deltaY * (i-1)) % deltaX)-((deltaY * (i-2)) % deltaX)) < 0) { //add pixel below Bresenham line } else { //add pixel above Bresenham line } That big if statement is a bit hard to follow, I'll try to explain with an example. Here's a listing of (deltaY * i) % (deltaX) for the OP's diagram (deltaY = 8, deltaX = 11) 0, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 0 You can see that the endpoints are 0, which validates the first if statement, and the 2nd if statement (I don't want to explain it TOO fully) means that when the differences between the two pairs preceding the pixel you're drawing have different signs, you must add a pixel below where you're drawing. Example: 0, 8, (5, 2, 10), 7, 4, 1, 9, 6, 3, 0 0, 8, 5, (2, 10, 7), 4, 1, 9, 6, 3, 0 0, 8, 5, 2, 10, 7, (4, 1, 9), 6, 3, 0 0, 8, 5, 2, 10, 7, 4, (1, 9, 6), 3, 0 The third number in each of those triplets will need to have a pixel added below the Bresenham-returned result, the others will have a pixel added above, and the 0's means only one pixel will be drawn. I hope this was clear enough, and I hope my code isn't broken.
  8. Neosmyle

    Math Cosmetics!

    Ack, try to stay away from the homework questions. But while I'm here, I guess the reasoning behind the (y2-y1)/(x2-x1) is that if the line has a positive slope, you will be left with a positive numerator and denominator. (EDIT: and if the line has a negative slope, either numerator or denominator will be negative. So P2-P1 lets you work with negatives less. Everyone hates negatives hahaha =) Official rules about it would be stupid, as the two are perfectly equivalent (y2-y1) / (x2-x1) -(y2-y1) / -(x2-x1) (y1-y2) / (x1-x2)
  9. Neosmyle

    Silly Slope Question

    Basically it's just clarifying that slope is positive if y increases with x. Like so: / and negative if y decreases as x increases: \
  10. Neosmyle

    Power from Gravity

    The funny thing I find about the whole "perpetual motion machine" concept is that one that worked would be pointless. You couldn't actually power anything with it! Even if you could get something to stay in motion forever, as soon as you hooked up any sort of motor/etc to it, it would stop. Reminds me of a funny idea I had as a little kid. I thought, what if you had a hollow sphere that was perfectly mirrored on the inside, and managed to shoot a beam of light into the ball without letting it escape. Being naive, as I was, I then thought you would have an endless light source - something that glowed forever. I neglected the fact that all the light you had stored would have to stay in the sphere and not actually do anything. What would happen is the ball would be a completely normal object, which when broken, would emit a flash of light. Basically, it applies to a PMM in that you'd apply a small force to get it moving, and that is all the force you would ever be able to get back out of it.
  11. Quote:Original post by Thorin_nz The cross product is quite different. It generates a vector that is right angle to both of the input vectors. The vector returned by a cross product is said to be orthagonal to the first two. That is the equivalent of a "right angle" in three dimensions. In case you're having trouble visualizing the cross product, understand that any two normalized vectors A and B in three dimensional space will be form exactly one plane, unless A = B, A = -B, or A or B have no length. Now you can imagine this plane lying flat on a table. The cross product will be either pointing up or pointing down (orthagonal to the table, in the "3rd dimension"). To determine whether it is pointing up or down, use the "right hand rule." The right hand rule states that if you point the fingers of your right hand in the direction of A, then curl your fingers towards B, your thumb will be pointing in the direction of the cross product. Therefore, the cross product is not commutative. More specifically, AxB (generally) equals -(BxA).
  12. Neosmyle

    Reason for Terminal Velocity?

    Well, as I understand it, gravity is acceleration based on position. However, on the surface of the Earth, the differences in acceleration are so small that we simply give it a constant: g = 9.8 m/s/s. Wind resistance is accel(decel)eration based on velocity. As such, it is variable throughout the free-fall. Because it is variable, terminal velocity is the velocity when the deceleration caused by wind resistance is equal to the downward acceleration, or ~9.8m/s/s.
  13. Normals are needed for lighting calculations.
  • 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!