Tag Info

New answers tagged

0

I am working with AndEngine (2D, based on OpenGL) and AndEngine's approach to animation is to have one tiled texture where each tile is a frame. You can have 12 frames in a texture 1x12, 2x6 or 3x4. Because graphics hardware is very capable when dealing with textures, showing a region of the texture is very fast. Based on what engine do you use, or whether ...


1

For absolute laziness, it might be possible to just use those images as a background; it may end up being the joke of the class that 20MB of your 20.3MB game is just the menu background, but if you haven't slept for days some people are okay with that. Some options I can think of for animations: Use a spritesheet. This isn't a good idea here, but often ...


0

ios objective-c version: CGSize winSize = [CCDirector sharedDirector].winSize; CCSprite *player = [CCSprite spriteWithFile:@"Games1.png"]; player.position = ccp(player.contentSize.width/2, winSize.height/2); CCActionInterval *a = [CCOrbitCamera actionWithDuration:2 radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:360 angleX:0 deltaAngleX:0]; [self ...


1

The way I would do it would be to have my character object have it's own render method, and a member variable to hold direction data. You could make an enum to define the different possible states if you wanted to. Then within the render method, check what state the direction is in (possibly using a switch/case) and render the corresponding sprite. Wherever ...


0

Here's a trick to simplify things, based on the fact that all slots are the same size and shape: Run a physics simulation with random input parameters but instead of rendering it just store the ball position and wheel rotation for each frame so you can replay it later. Work out which slot the ball has landed in. Calculate the angle between that slot and ...


0

If you developed the demo in the video on your own you should be able to understand what is needed for the movement animations. You need to post examples of attempts at coding the movement. In simple terms; You need to capture the movement event(s), you then need to specify which animation(s) to use in those events.


4

Each object should have its own bone. Each bone should be unconnected to the others and able to move freely. This allows you to animate each bone, with position and rotation, while still keeping the model as one. Each bone is really just a matrix to apply to the vertices under it's control. It's simple to imagine applying a translation and rotation to each ...


0

If you read the conversation. You see that my helpers were true. But to handle the problem easily we bought an extension to Unity what did what was necessery. I'm sure that the problem also can be solved with the following methods: Workaround: Bone animation (Remake the whole thing with bones) Simulation in Unity: Use cloth simulation in Unity with Unity ...


0

The projectile is added to projectileSheet, but being removed from current layer or scene, rather than removing from projectileSheet. The last line of spriteMoveFinished should be projectileSheet.removeChild(sprite, true); or better use sprite.removeFromParentAndCleanup(true);


0

OpenGL can do more things that I care to shake a stick at in a comment. Among the thing it can do in relation to images is transform a given image (using shaders), clip an image and zoom an image(texture mapping). So if what you want to do is create some kind of wavy mist, yes you can do this without drawing a million pictures of mist and loading them: You ...


4

You are essentially creating 3 coordinate systems when you only need 2. The coordinate system for your grid is 0 to 800. Your "real" space is a normalized position from 0 to 1.0. And your "screen" space is measured from 0 to whatever your pixel width is. You will always need to convert between some kind of world coordinate system and screen space in order ...


1

Vertex tweening for animation is an outdated technique, and there aren't many good reasons to use it in modern graphics code. I'm fairly certain it isn't even supported at the API level in D3D10+ (although you could always still implement it yourself). One of the big problems with it is that it requires complete copies of the vertex data for each keyframe, ...


1

Your NS and VS KeyboardState objects are never used. Because of this, you are never checking against your current KeyboardState. You will need to do something like: VS = Keyboard.GetState()


1

Please note that although you said that you wanted to check if D and W keys were pressed simultanously, you don't. What you do is, you check if the D key is down. Next, you check if the W key is down. Nothing in your code makes sure that both are down at the very same time. Any time you call GetState you query the keyboard for it's state. In your code, you ...


2

I would recommend using Console.WriteLine("some text") in the future to determine whether or not your code gets reached, in this case: if (Keyboard.GetState().IsKeyDown(Keys.D) && Keyboard.GetState().IsKeyDown(Keys.W)) { Console.WriteLine("D and W pressed!"); jumpRight(gameTime); vel.X = +2; } If the message is printed, it could be ...


1

One way to make such an effect is UV animation. The UV is a texture coordinates, as XYZ is the objects coordinates, what is done here is simple. Given the following texture with the mention that it needs to have an alpha channel so that we can exclude the blue color and leave just the clouds, it is going to be applied to a quad Let the upper left ...


1

vTime is a float, but you're passing it as an int, since you're using glUniform1i(). Adding integer values to your texcoords has no effect. Use glUniform1f() instead.


0

Try setting up a rotation matrix for both sprites. Rotation matrix - Wikipedia Set the point to where you want to rotate. Although to make it an easier point of reference, I would rotate at the point where the bow crosses the arrow. If i knew what language you're programming in I could look up more information to help. If you haven't worked with matrices ...



Top 50 recent answers are included