OldProgie2

Members
  • Content count

    124
  • Joined

  • Last visited

Community Reputation

158 Neutral

About OldProgie2

  • Rank
    Member
  1. Air flow while programming

    Quote:Original post by Anddos I am sat here with a fan on because i am finding it hard to program without it , is airflow really important and how come you dont see loads of fans in game developer videos in there office , how can they cope with sitting in the room without the right amount of fresh air. Because large companies treat their staff more like cattle than people. (Sorry, that's wrong. Cattle get better treatment.)
  2. Spark movement in car crash?

    Quote:Original post by b_thangvn Hi OldProgie2, That's formula is great, I'm getting some result on my spark. I have some more questions if you don't mind: - So spread should be a vector with some default value, or should it be some random vector? You could treat it as a scalar as long as your random element is a vector. You could also use it as a vector to change the 'shape' of the particle emitter. i.e, you could have a long, narrow trail of sparks. Quote:Original post by b_thangvn- I still have trouble with world space. How do you keep the spark visible when the car moves really fast? If you keep the sparks alive for long enough and you can see the car and the wall, you should be able to see them. One factor you may need to play with is the 'life' of the spark. Quote:Original post by b_thangvn P.S. Sorry, I need to clarify about the formula: so in the instance of the vehicle gliding against the wall, is it: V1 - Velocity of the wall V2 - Velocity of the vehicle ? Thanks. In this instance yes, but it could also be the velocities of two cars that are colliding, or a piece of debris hitting the car.
  3. Spark movement in car crash?

    Quote:Original post by b_thangvn should I model the spark in world space or in model space? I can see each has advantages and disadvantages: I would go world space, then you can handle all particles using the same sytems and reference points. In terms of how the particles would move (from the initial collision), there would be a random distribution of velocities between the two surfaces, centred on the half way point. E.g if the car's bodywork (travelling at say 20m.s^-1) is colliding with a static wall, the particles would generally be travelling at around the 10m.s^-1 mark. The spread of velocities would depend on the reletive hardness of the surfaces and drag co-efficents, and would really be treated as an empirical value. It's something you can play around with to get it looking right. If you have two cars colliding , one travelling at 20m.s^1 and one at 10m.s^-1, the central point would be 15m.s^-1 You could start of with this formula and modify for dramatic effect. Vp=(V1 - V2)/drag + V2 + rand * spread Play around with values of drag (starting at around 2.0f) and spread. rand should be a random number between -0.1 and +0.1 Note that these should be vector values.
  4. Spark movement in car crash?

    A spark is actually just a point source of light (a glowing particle), but it appears as a line to the observer due to persistence of vision. Therefore, if you want to model it correctly you should track it's position 'on screen' as would be viewed by the camera, then stretch this point across several of those positions. E.g p[t], p[t-.02ms], p[t-.04ms], ... Just be aware though that there is a theatrical element to this. Sometimes although physically correct, it just won't 'look' right and you may want to modify the spark trajectories to get the look that you feels right or is the most dramatic.
  5. moving a vehicle up a hill w/o rigid body dynamics

    Quote:Original post by morborborb Am i crazy? Probably ;). It would probably actually be simpler in this case to use some simple physics. Having got so far though, you could just add in some sort of ajdustment to the velocity based on the angle of the vehicle, e.g. v = v - c * sin(a), where v is your velocity, c is a constant and a is your angle (with 0 degrees meaning it's on a flat bit, -a going down hill and +a going up hill). Therefore, as you go down hill, you will be adding to the velocity, and going up hill you will be subtracting from the velocity. You can vary the value of c to get something that looks right.
  6. What, to..do...

    [quote]Original post by Ploofafa Quote:Original post by OldProgie2 Quote:Original post by Ploofafa You may be lucky, but it's a very small chance. Hypothetically, would it not be true that if I were to create and maintain the next Farmville (crazy, I know =P) Farmville was not created by one siingle individual. Take a look here http://en.wikipedia.org/wiki/Zynga That's not feasable for an individual with no financial backing, but as I said, you may be lucky but it's a small chance. Quote:Original post by Ploofafa I would never truly have to work another day of my life (aside from the maintenance and updates / additional content)? That in itself would be a full time job for many people. If you don't want to work, you would have to create the team, the infrastructure and the reputation and IP required for someone to buy it.
  7. What, to..do...

    Quote:Original post by Ploofafa is it possible to earn a decent living being an Indie Game Developer? Realistically, No. There have been a small number of people in the past who have had the right idea/product at the right time and have gone on to make money, but things have changed. You may be lucky, but it's a very small chance. You can make games and make some 'pocket money', but don't give up the day job (or school). I don't want to shatter your dreams, but I also don't want you to lose sight of real life.
  8. Input fighting game

    Have a key map. Your input system will handle key up/down events and update this map. Any systems that are interested in the state of the keys will take a copy of that map and query it in some way for the information it wants. e.g. (in pseudocode) class KeyMap { map m_keyMap; handleKeyEvent(event e) { if (e.keydown) { map(e.key).keyDown = true; } if (e.keyup) { map(e.key).keyDown = false; } } map &getKeys() { return m_keyMap; } }
  9. No, but it helps (in some cases). If you can get your head around object orientation then some problems are relatively trivial. It can be difficult to do though if you are deeply entrenched in the old C style (structured programming) methodologies. Having said that, not every problem lends itself to object oriented techniques. Look at what you are trying to create and see if you can break it down into models. If you can (and easily) chances are an OOP approach will help. Let the solution fit the problem, not the other way around.
  10. Calculating torque force to self-right a rigid body

    The magnitude of the force would be proportional to the sine of the angle between 'up' and your 'tilt' vector. e.g, f = c sin(alpha) You could use an empirical value for the constant, or you could work things out a little more accurately by calculating the force exerted on you model by gravity.
  11. variable speed sound playback

    The problem does not lie in your audio implementation, it lies in your game. You need to make it handle variable frame rates. You usually do this by passing a timestep into your update functions. If you don't fix your game, then not only will the audio be out of sync, but your game will also play differently on different systems. You *can* adapt your audio to fit by using time stretching techniques, but you will find that a LOT harder than fixing your game. Take a look (google) at FFTs (Fast Fourrier Transforms) to see what you would be up against.
  12. Bounding Box and Gravity

    Quote:Original post by Dekasa Plane position = acceleration + velocity + original position. That is not correct. The correct formula expressed in those terms would be x = x1 + ut + 1/2at^2, where u is initial velocity and a is acceleration. Quote:Original post by Dekasa So, more than not, find a nice, lowish number to represent gravity, and subtract that from your plane's Y position every frame. I'd go into more detail, but I'm not sure where your math is, nor do I know how accurate physically you want this to actually be. For a more correct use, on each (game time) frame use velocity = velocity + acceleration (in this case -g) position = position + velocity
  13. Wondering if I am ready to start 2d... advice?

    The only way to tell really is to try it and see. If you find it too hard, take a step back and try again. Don't worry too much about setting up screens and so on, feel free to take a sample and start modifying it. Doing something fun without getting bogged down in the nitty gritty is a great way to maintain your interest. At the end of the day, setting up your rendering environment is something you will only do occasionally, so don't worry about it too much. Just have fun.
  14. How to represent acceleration as a vector?

    Quote:Original post by KulSeran Quote: With acceleration, how can I represent it as a vector? I mean acceleration is just a number (eg. 12 m/s and a 3D vector has 3 components). I know a vector has direction and length, and I am guessing that the length is what determines the acceleration? Yup! So you'd do like: Wrong. Acceleration is a vector. If it was not then you would not be able to use Newtons equations of motion such as p=ut + 1/2 at^2, as you would be mixing vectors and scalars willy nilly. Acceleration occurs to to a force being applied. F=MA (force = mass times accleration) or A = F/M. The force applied has a direction and magnitude (i.e. a vector). In the case of a spaceship with a rocket engine, the propellent would be ejected from the rear of the ship, so (using 2d for simplicity) we can work out the force vector as Fx=Fsin(a) and Fy=Fcos(a) where F is the magnitude of the force and a is the angle of direction. We can then plug this into any of the equations of motion we wish as expressed by vectors, e.g. distance traveled in time t with an inital velocity of u and a constant acceleration a = ut+1/2 at^2.
  15. visual studio problem

    It's a beta, which means it requires testing. Report the issue to Microsoft so they can try to fix it. Other than that, it's very difficult for anyone here to diagnose the problem remotely.