Tag Info

Hot answers tagged

4

As long as your movement space isn't Euclidean and things can block an entire grid space, you'll have this problem. If you want people to not "play the grid" you're probably going to have to not use a grid.


3

One way to do it is to keep track of the Front and Up normalized vectors and transform the front vector whenever your character turns, and calculate the Right vector using cross product ( I am assuming Up vector won't rotate). Or you can keep track of the three vectors and rotate them. Once you rotate them you update the position by adding the offset in the ...


2

Your question is a bit wider than you exposed I think. Player and Map are two objects and should be thought as it. They are not different, from an engine point of view, of a ping-pong table or a flying toaster. That said the question is : how to make NORMAL objects findable and communicate? For a map / player relation I usually put responsability... on a ...


1

You might want to take a look at these articles. They are a bit old; however I think they cover what you are looking for. Coordinated Unit Movement Implementing Coordinated Unit Movement


1

The setLinearVelocity method literally sets the Box2D body's x- and y-velocities to the given values. That means if the parameter for x is set, the character will begin moving horizontally. However, if the parameter for y is zero, the character will stop moving vertically. To fix this, you could either pass the character's current y-velocity in the ...


1

Look at what's happening. SaveX is 300, SaveY is 0. When you normalize moveVec you take the Vector (300,0) and resize it to be a length of 1, which makes it (1,0). You test to see if 300 > your position, if so you add moveVec.getX(), otherwise you subtract. So you move 1 to the right. You then test to see if 0 > your position, if so you add ...


1

The white vector is the correct vector with the code you have. If you're only ever adding integers to your position, the movement is going to be at increments of 45 degrees. That's restricted to orthogonal and diagonal movement only. If you want free movement you should be normalizing the movement vector. Check to see if the libraries you're using have a ...


1

from looking at the docs I have found your issue public static void rotateM (float[] m, int mOffset, float a, float x, float y, float z) Added in API level 1 Rotates matrix m in place by angle a (in degrees) around the axis (x, y, z). Parameters: m source matrix mOffset index into m where the matrix starts a angle to rotate in ...


1

If I understand, your question is about the building of the formation (arrival of the enemies from outside the screen into a "space-invaders like" formation (aka end-formation)). Having played this game a lot, here is how I think they have done it: They have a handful of "incoming trajectories" which come from out of the screen to an end-point roughly in ...



Only top voted, non community-wiki answers of a minimum length are eligible