2018-01-04 17:16:18

Hi there. Since my studing topic is not related to physics and stuff, I can't learn the formulas and for my game creations i really need some of them. I searched the google but unfortunately some websites provide formulas with pictures so i don't understand them since i'm fully blind.
Would someone please give me a manual(A website, a post, file or what ever)? I cannot purchase stuff from amazon just to mention big_smile
thanks

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-01-04 19:01:21 (edited by visualstudio 2018-01-04 22:19:22)

hello kianoosh
first, i have to tell you that you have to check out many websites and forums to learn about physics and it requires some math calculations
and, i dont think that bgt can handle such a thing (you might be able to write a wrapper for ode (open dynamics engine) for bgt (you cant write wrappers around bullet (which is a really complete library which GTA IV and GTA V use) because it uses C++ classes)
for your information, i didnt check ode's API stuff (but as it says, it has a c interface) it might have structs (i dont know how to deal with them in bgt)
but if you want to learn them
0 (prerequisits). learn about linear math, vectors, matrix, and so on and so forth
1. learn about rigid body dynamics
2. learn about soft body dynamics (might be optional)
3. learn about mass, inertia, gravity, velocity, torque, impulse, force, etc (the neuton laws which are 3 rools)
4. learn about collision shapes (these are related to rigid bodies and soft bodies)
5. learn about ray casting
if you require more information and such, you can contact me on skype and such if i can, i will help you
edit: soft body dynamic might be  optional according to your requirements (soft bodies are ropes, cloth, etc)

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2018-01-05 00:21:32 (edited by kianoosh 2018-01-05 00:22:01)

dude. Not that physic system. I mean the physic formulas such as calculating gravity(I know this one big_smile ), or the one that i need to find out which is calculating time to do something based on the player's speed. This sort of things not physic in reallity like bodys or colitions.

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-01-05 02:02:52

Hm, I think what your looking for is Vectors, Kinematic Physics, and Linear Algebra, which covers a bit of ground but those term's may help your search. I did come across a rather interesting blog on Vectors for Game Developers that may help though:

[Linear Algebra for Game Developers: Part 1]
[Linear Algebra for Game Developers: Part 2]
[Linear Algebra for Game Developers: Part 3]
[Linear Algebra for Game Developers: Part 4]

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

2018-01-05 02:03:22 (edited by Ethin 2018-01-05 02:05:00)

@kianoosh, if I understand you correctly your trying to implement your own physics engine. Is that right? If so, forget it -- BGT is nowhere near equipped to handle realtime physics calculations, and lots and lots and lots can change within half a second when physics involved. You'd be reinventing the wheel -- go with a physics engine that does all of that for you. If you really want to go ahead with this though, beware that your in a single-threaded environment and I don't know how you'd be able to run lots of loops to ensure that all the calculations are right and you don't have incorrect ones while at the same time operating the game without those.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-01-05 09:07:03

@kianoosh,
these systems (collision detection etc) use physics formula to calculate game physics for you (as physics engines do)
as magurp244 posted some links, i have to say that these are the prerequisits of using physics in your game.
ethin is right as a physics engine should be simulated using a delta time and using different loops
let me give you an example:
suppos we have a ball 50 meters above the ground (the hello world example on bulletphysics)
its collision shape is a sphere shape and we have a static shape (ground which isnt moving as maybe a box shape or a static plane shape), the mass of the static shape is 0 which says it doesnt move or doesnt affected by gravity
now, the ball starts falling down (9.81 meters per second*the mass of the ball) on each time step
when the ball falls to the ground (collision), it doesnt fall because it is on the ground or better to say, on our static plane shape
this was the simplest example of physics calculation

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2018-01-05 11:31:26

Knitpick: the acceleration due to gravity does not require mass, unless you are talking about the planetary scale or greater. v.y-=9.8*dt will suffice.
This is not as horrifically complex and power-demanding as everyone is making it out to be (The NES has 2kb of RAM; the Genesis has around 65kb.) If you're making an audiogame, BGT can handle the physics. (It will lag like Windows Vista with more than a small number of active objects per frame, but that's a problem for most indie developers regardless.)

The simplest stuff to be aware of: BGT vectors can be added and subtracted, multiplied or divided by scalers, and therefore make loads of calculations much simpler than they could be. If you're doing your own geometry, axis-aligned boxes are enough for most audiogames. It helps greatly to try to keep a consistent framerate, and therefore a constant change in time from frame to frame. This means you should use timers almost exclusively to maintain the framerate, and for very little else, if at all.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up

2018-01-05 15:59:53 (edited by kianoosh 2018-01-05 16:01:06)

thanks guys. ifin no i'm not going to create my own physics engine. Just some simple formulas to make my game ai(s) more smart. For example  they would fire like an idiot even if they were close to a wall but with a formula i somewhat fixed it. But that formula made things worse because it uses for loops and the game checks the formula when each person takes one step and the range is the person's weapon range. So imagin a person with a sniper in hand with 700 tiles range, how it can break things with loads of for loops. Although i found out the solution but that was just an instance

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri