So basically I used an example 2D tile collision method from medium.com and have made some slight changes to improve it for my situation.
It works great for 32px x 32px sprite and 16px tileset.
I'm trying to figure out what I need to do to add "wall sliding":
What I mean is basically say...
I am trying to figure out the math for a Gaussian Function or Normal Distribution bell curve.
This is the equation given for this, but I'm having trouble figuring out how to make use of it for my purposes.
This is what I need to be able to do:
Input the following values: The width of the...
I'll come in hard and true: I suck at mathematics.
I know that:
xx = lerp(xx, 10, 0.25);
Can also be written as:
xx = xx + ((10 - xx) * 0.25);
Let's say I give xx a starting value of 100 in a create event and I put the lerp() function above in the step event. How can I calculate...
A couple days ago I asked the question "If there was a clock that halves it's speed every 12 hours, when would it reach midnight?". This spurred a long discussion about different ways to interpret the problem and a variety of answers.
Which brings to my attention that there are several people...
While writing a script to resolve 3D collisions, I encountered a problem and I can't quite figure it out!
I have a rectangular prism with varying width, height and depth. I also have a point located within this prism (A) and a normalized directional vector (d).
If a ray is cast from A...
Are you ready? MATH CHALLENGE!!
Are you excited? I hope you're excited. Actually, I'm hoping someone around here is great with maths and can help me out. I do okay with math, and can usually, eventually find the answer for things that are not too complicated, but this one is...
I've been trying to figure this out for a while and haven't found the answer.
Height of ellipse,
Width of ellipse,
Xposition of vector,
Ypostion of vector,
Direction of vector.
Find the distance to the edge of the ellipse starting at the vector (x,y) and moving in its direction.
I've a little personal project about converting mocap data from 3ds max ASE file to Spine skeletons.
I have no idea about quaternion conversions and after searching forum I found quaternionGetx and other scripts by Slayer64
But after trying a lot of combinations couldn't get usable results...
I don't know about you but I really get tired of re-implementing vector and matrix math for every 3D project started. This extension is my solution. I decided to make a professional library that integrates well as if included in the engine by default.
You can purchase the extension via the...
I'm working on a game that helps kids develop math quickness in times table exercises and I'm trying to figure out what's the best approach to put on screen exercises randomly but with memory, so that every round a new exercise appears, but its multiples are different than the ones in the...
Hi everyone, I'm having completing what I feel is probably a simple equation to complete a simple action. What I'm trying to do is make a simple lighting system. I have an object "oLight" and as I walk past it, my shadow casts in the opposite direction. It works well, however, I'd like to make...
I've got a little question about comparing values with if condition, so when I check the value if it's equal to 0, I check if it's value is equal to 0.0000 or it's value is between the 0.0000 and 0.9999? Some of my variables have non-integer values in my game.
So if my first...
EDIT: Holy crap, my english is truly bad, I'm sorry about that. I meant this:
A = 15;
B = 15;
C = 20;
if (A + B > C)
A += B - ...;
At the next step B is adding its value to A (15 + 15 = 30), however B will make A to become higher than C (30 > 20), and I don't...
Hi there, I am using Game Maker 8.0 pro to build an evolution simulator. What I need to do now, is to write a script that could draw a cartesian graph (X-Y) from a table of values that are stored in a grid. It would be like turning the following into a continuous line on the screen:
dsin is the function that should have been used instead of sin. Big difference it seems.
I am at a loss, it might be because I am applying sin() wrong... I want to find a missing length of a triangle and I can't.
I am checking: a = c·sin(A)/sin(C)
But the other values don't add up...
I'm trying to create a function analogous to point_in_rectangle() for checking if an object is in a 3D area.
My idea was to, first, check if the distance between the center of the region and the object being checked is less than or equal to one half of the diagonal of the cube (the diameter of...
Maybe someone with better maths skills than mine can help me figure this out.
Basically, if I know my character sprite is 32x32 and my floor tiles are also 32x32, knowing that I want my jump duration to last exactly 1 sec (0.5 s to reach peak height) and I want to be able to jump 64 pixel high...
I want to divide a square or rectangle of an integer side length into a desired number of squares of random integer side lengths. I need this to create an effect where an object is shattered into multiple pieces. In the destroy event of the object to be shattered, multiple piece objects are...