_id
int64 0
49
| text
stringlengths 71
4.19k
|
---|---|
3 | Suitable interpolation for animating explosions Is there a standard interpolation function for animating explosions? Like there is with smoothstep or smootherstep for walking animations or cars going from point A to B. I'm assuming the explosion needs to grow very fast at the beginning and then slow down how much in relation to the default linear interpolation, I don't know. I've tried inverse smoothstep and inverse squared from this article Interpolation Tricks, but none quite cuts it, maybe I'm applying them wrong. |
3 | How to make my model's top section rotate without rotating the entire model? I'm trying to learn a bit of Maya modeling so that I can be self sufficient when it comes to creating super basic assets for my game development. I'm trying to understand skeletal rigging and how it modifies the model geometry itself. I've got the most basic model a cube with proportions that make it into a 3D rectangle. I've rigged it with a very simplistic skeleton. My goal is to learn how all of this works, and create a character that has motion similar to maybe the magic carpet from Aladdin it's a rectangle but the edges somewhat move like it has arms and legs. When I rotate some joints, it distorts the entire model. I added a bit more geometry thinking that it'd allow the top section of my model to rotate a bit more without having to deform the entire model, but it still just seems to do the same thing. How can I make the top section of my model be capable of moving forward and backward in such a way that it does not cause the entire model to move forward? Here are some screenshots to help explain and show my situation ... This is my model and skeleton (I told you it was super basic, lol) ... And here is what happens when I rotate around the neck joint ... And here is sort of what I was hoping to achieve ... |
3 | How to convert fbx with animations to dae I am making an ARKit app, and I need to implement animations. Our 3D artist has provided these files as fbx with animations. All resources I find online about animated models in ARKit talk about dae (Collada) files with animation. Is there a way to convert an fbx file with animations to a dae file containing the animations? I tried asking our artist to export a DAE file, but that didn't appear to work as he has no experience with DAE files. The animation didn't seem to play. I have also tried an online converter (http www.greentoken.de onlineconv ), but that failed to perform the conversion. |
3 | Number of iterations to real time I have an animation of traffic. I have 20 cars in road network, each car have a starting node and end node. Each car know how much distance does it need to travel in order to reach the end node. I move cars each 20 ms for 10 px. To move all cars from their start node to end node I need 60 iterations. That is 60 20ms 1200ms. Now I want to convert this time, or use data that I have, to a real time where car move 50km h. How can I do that? Any idea? |
3 | How can I get my first person character in Unity to move to a ledge with an animation? I'm trying to get this to happen The character walks up to a large crate, the player presses a button, and an animation starts playing where the character climbs up on to the crate. (all in first person view). So far I tried this with normal "First Person Controller" Prefab in Unity. My code so far function OnTriggerStay(other Collider) if(other.tag "GrabZone") if(Input.GetKeyDown("e")) animation.Play("JumpToLedge") However when i use this on The FPC it will always play from the position the animation is created on. I also tried to create an empty game object, placing the FPC in there. Gives same effect. I also tried just animating the graphics of the FPC alone. This seems to work but since the Character Controller itself is not animated that stays onthe ground. So the whole FPC wont work anymore. Is there anyway i could let this animation play on the local position the player is on at that time? Or can you think of any other logical solution for a grab and climb? |
3 | Managing animations for object state transitions I'm looking for an optimized way to handle simple state transitions on my game objects. By "simple" I mean not more than 1 2 actions per object, and most algorithms are linear. For example, I have an UI element that implements a switch (like a light switch) and it has two states "up" (lights turned on) and "down" (lights turned off). Let's say I want to make it so that I can switch the switch from one state to another, and update its presentation in a smooth way using linear interpolation (move the foreground sprite up or down). The question is if I should always check if the object should update its state (every frame), or should I add remove this object from the update loop on demand, or is there any other (better) way of handling this situation? Currently I have it implemented the following way my object has a boolean variable called animated and in my onframe loop I have the following code if (this.animated) calculate new positions for the sprite else do nothing And it would appear to me that this kind of code is not very well optimized. How to handle this kind of things better? |
3 | Creating a large amount of sprites and animations For my AP U.S. Government and Politics class, I am making a spinoff of Mortal Kombat. Because of time constraints, I'm using an open source version of the game and want to create new characters. I have about two weeks to do the project and can invest about 1 4 hours most days. I want it to look as nice as it can with the limited knowledge, skill, and time that I have. What programs or techniques would be best for a beginner with my time constraint? |
3 | How do I make a flickering engine exhaust animation using only bone animation? I'm trying to replicate the flickering engine exhaust animation in this SketchFab model. SketchFab doesn't support particle systems, so the animation must be a simple bone animation. Can someone help me understand how to achieve such an effect? My best guess is animated opacity, but I don t know how to replicate it. My final goal is to use it in a Unity 5 mobile game. |
3 | Game engine animation management Usually in a game scene there might be tens of animations going on at the same time, each being in its own state. I wonder usually how is this managed in game engines? Do they just stack a variable indicating the state of the animation on entity? Or do they use a separate animation system to keep all states? |
3 | What is morph target animation? I've been using Adobe Flash and its keyframe based animation for some years. I recently about heard morph targets animation from Wikipedia. It seems that the morph target animation is also keyframe based. What are the differences between Flash's animation and morph target animation? |
3 | Rain World How to have intelligent movement animation? In the project RainWorld the characters seem to move "intelligently" as they move "unrestricted". They seem to know "how" to move their limbs and "what" needs to be done. Here for an example the lizard seems to know how to move his body after he got struck by a weapon. Also here it looks as if it is intelligently grasping the long ladder using the jet thinging to climb itself up. I had been looking into many sources to find out how such gets done but with no significant result. I need help to point myself to the right direction. Edit I have figured out from dev log that characters are just bunch of boxs connected bounded by an elastic bound "string". But the way the character moves still eludes me. |
3 | UE4 BlendSpace is not working as intended I am trying to set up a rifle aiming blendspace in UE4. I downloaded animations from Mixamo, added root bone and retargeted them to UE4. Then I set up the BS, but the legs of the character are behaving weirdly, they are twitching, going through each other. The animations work fine on their own, but behave that way in the BS, especially in the transition areas. Here is the video Video Here is my BS Here is how I am setting Speed and Direction variables used in the BS Can someone please help me with this? I am new to UE4. How do I fix this and get a smooth Animation Blend Space? |
3 | How do I play an animation using lib3ds? I am having trouble playing an animation of a .3ds object using lib3ds. I am able to load the .3ds model with lib3ds. But I can't find a way to play (for example) my 'walk' animation. Where can I find the animation data and how can I play the animation using lib3ds? |
3 | How can I generate isometric sprite sheets from 3D animations? I want to generate sprite sheets for an isometric projection of various 3d assets purchased from the Unity3D asset store. I'd preferably also render the normal maps. I am a programmer, but new to 3D modeling software (Blender, etc.) I found two tools for this SpriteForge and SpriteWorks, but neither supports enough formats to be worth their cost. There must be an efficient way of isometrically rendering various animations of a 3d assets in Blender mdash but I don't know how. How can I do this? |
3 | SDL sprite animation problem I'm currently drawing my character from a single file, and my sprite class handles it taking the file path as an argument. Now, I need to add a simple animation, cycling between two frames. The problem is that I have the other animation frame in another file, not in the same file as the first frame. How can I handle the animation without loading and unloading the two files and without merging the files into one? |
3 | Are there alternatives to Vertex Tweening? Now that I'm getting into animating 3D entities in my game, I was wondering what the best approach for this would be. I did some research and came across something called "Vertex Tweening". However, most of these articles (like this one http archive.gamedev.net archive reference articles article2017.html) are from 2003, if not older! In a DirectX 9 game which makes proper use of HLSL to do its rendering magic, is Vertex Tweening still the way to go these days (anno 2013), or are there other techniques I'm not aware of yet? |
3 | Doom style 2.5D Movement Animations I've started working on a demo for my 2.5D game. For a basic scene I figured I would just use the good old fashioned doom sprites textured to a double sided plane. Simple enough. But I've been scratching my head as to how to display the proper sprite animation relative to the player viewing the sprite...if that makes since. For example suppose I have three players in the scene Players A, B, and C as such Player C should see player A as Here's an example of what I think player A should look like from C's perspective While player B would see player A as follows My current idea is that for any given player, I will need to know the current direction of each other player, and where they are located moving to relativly. From this, I could calculate which sprite image is required. Is this correct? What improvements optimizations could be made? EDIT Total number of directions will be 8 as depicted below For each direction there are two sprites (to show walking movement, sprites for the right hand directions are mirrors of the left) EDIT 2 Got this working and have a simple javascript threejs example for anyone interested https github.com commanderZiltoid threejs 2.5d fps |
3 | What technique would I use to animate a 2D curling tentacle? I have played around in Cocos2D X and I think I understand the limitations of sprite based animation fairly well. I want to have a game with some characters curling and extending a tentacle which varies in length and amount of curl depending on the terrain. Maybe imagine a sloth swinging from a tree but with arms that stretch at times (Gumby character?). Is there a name for such a technique? Would this be a variant on Animating Bezier Curves as seen in Jason Davies's example or discussed in this blog on tweening control points? I'm a very experienced polyglot programmer but relatively naive in games and graphics. |
3 | Where to store polygons and polygon animation? I thought about making something with ApeOut graphics long before it came out and its release motivated me to try I'm having tons of fun but I stumbled upon a pickle. I can imagine storing polygons is a very common task in game development. I'm prototyping with pygame and currently store each polygon as a list of Vector2 coordinates vertices on a 10x10 field and keep these lists in a Python dict. This can't be a good practice. Is there an established format to store list of vertices (preferably supported by some free editor)? I was thinking about SVG but it works with curves and I only need straight edges. Or is SVG still the better option? What's a sensible way to store frames of an animation for such polygon (e.g. quot deer quot lowering its head when eating or moving its shoulders while walking, etc. legs will be driven by invert kinematics)? Right now I'm thinking about each animation being a list of frames where each frame is list of vertices but it'll become unmanageable if I don't separate animations to different files. What I have so far shapes I edit this in my head, was fun, slowly becomes a nightmare 'deer' (5,0), (4,1), (2,0), (3,1), (2,1), (1,0), (1,1), (4,2), (3,3), (4,5), (3,7), (3,8), (5,10), (7,8), (7,7), (6,5), (7,3), (6,2), (9,1), (9,0), (8,1), (7,1), (8,0), (6,1) , def loadShape(name, size) resolution 10 10x10 verts shapes.get(name) scaled tuple((point 0 resolution size, point 1 resolution size)) for point in verts surface pygame.Surface((size, size), pygame.SRCALPHA) pygame.draw.polygon(surface, colors.get(name), scaled) return surface |
3 | Sprite animation with "overlapping" animations? I'm trying to implement my own sprite animation system, and so far I've got it working quite nicely. I store each animation as a "take" which basically denotes the row of the animation in the sprite sheet, the starting frame and the number of frame. These takes are created during start up and played by calling play(takeID) on the animation. The player is split into four sprites head, torso, arms and legs, and different animations can be played on each of these separately from the other parts. Now, this works fine for situations where I only need a single animation (walking, idling, running, swinging a sword etc.), but I need a more complex animation system for situations where the player performs multiple things at the same time, for example walking while swinging a sword. I've tried to break down the requirements of the animation system by using the example above, and I've found these cases 1. Player swings the sword 1.1. Play swinging animation 1.2. When done, play idle animation 2. Player starts walking 2.1. Play walking animation until player stops 2.2. Play idle animation when player stops 3. Player walks and swings the sword 3.1. Play walking animation 3.2. Replace the animation of the hands by a swinging animation 3.3. When swinging animation is done, revert back to the "walking hands" animation 4. Player walks, initiates a swing and stops walking during the swing 4.1. Play walking animation 4.2. Replace the animation of the hands by a swinging animation 4.3. (Player stops walking during the swing) 4.4. Stop walking animation and play idle animation for all other body parts except the hands 4.5. When swinging animation is done, play idle animation for hands I've tried fiddling around with "overriding" animations where the animation with the higher priority (in this case, the "swinging" animation) would be shown instead of the lower priority animation (the walking animation) while updating still both simultaneously to maintain the correct rhythm of the original animation. However, I have trouble getting it to work properly. The "reversion to idle animation" is a rather challenging task if I have just the single walking animation, I can stop it and then play the idle animation (or rather, the "idle frame"), but when the sword swinging is added, it becomes more difficult to know when to swap to the idle animation. So, to conclude with my question has anyone faced a similar problem? How should I tackle this issue? |
3 | Animator on a WorldSpace Canvas Ok, so I have my world space canvas attached to the player object. In my script I have a reference like this GameObject myWorldCanvas Awake() myWorldCanvas transform.FindChild("nameOfObject").gameObject Then when the right conditions are met I simply activate the object like this myWorldCanvas.SeActive(true) This worked perfectly until I added a animator to the object. If I manually enable disable the object in the scene the animation works perfectly(it just changes the scale to give it a pop effect), but when the object is activated by my script the animation still plays and changes the scale values but nothing is rendered. In play mode if I manually enable disable the animation works. Any ideas ? If you need more info or screens let me know. Edit the canvas has some buttons as children and when I mouse over something seems to be refreshed and the images show up on screen. Edit Further test have show that manually disabling and enabling the Canvas component also shows the images, but If the canvas and game object are enabled from a script nothing shows up on the screen. Edit I solved the problem by disabling the canvas component on the first key of the animation and then enabling it on the second one where the Y scale is set to 0. This seems more like a hack and I dont like it. Does anyone have a idea why this is happening ? |
3 | Running one action on multiple sprites simultaneously I have created a spiraling animation for a football. I want to be able to run it on 2 sprites simultaneously. This is what I have done CCAnimation footballAnim CCAnimation animationWithFrame "Football" frameCount 60 delay 0.005f spiral CCAnimate actionWithAnimation footballAnim CCRepeatForever repeat CCRepeatForever actionWithAction spiral Sprite1 runAction repeat Sprite2 runAction repeat However, the action is only run on the first sprite. What am I doing wrong? |
3 | How to handle sprite speed when objects move using Box2d? I have a basic platformer using Box2d that works great. However, I now want to stop using my default square, and implement some running and jumping animations. How can I ensure that When running, the speed of the running sprite is correct with the current player speed, as to prevent the sprite from 'moonwalking'. When jumping, play the correct frames at the right moments? I imagine I need to check the vertical velocity and if this is zero again while jumping I'm at the highest point, but how do I track where to initiate the landing animation? |
3 | How to make an action perform only after an animation has run? I have an actor who has some animations. Animations perform based on some actor states (animation blueprint of actor) Conditions at the Event Tick (similar to while loop) The actor changes perfectly from animation to animation. What I'd like to do is for it to damage an enemy as soon as the attack animation is over. I tried some codes... In this one, for example This variable (minionAtk) modifies the state of the actor. See the image below in the event (which is only called when the minionAtk is true) that I can successfully change the state of the actor (to the attacking state) Animation Blueprint Transition But since the change from true to false is done instantly, the attack animation is not even shown. To solve this, I put a delay and a condition so that the event could not be called again while the execution of cycle (attack animation end attack animation) ended So when the actor is in the attacking state, the attack animation usually performs. After 5 seconds the animation stops. It turns out that in this time interval the animation does not play only once. I imagine there is a way to do the time calculation that the animation lasts, and based on that set the delay time. But better than that, I wondered if there was no way to know when the animation was finished and from that, change the variable to false and perform the damage action. Thinking about it I researched and found this https answers.unrealengine.com questions 329698 animation damage.html But I came across this error This blueprint (self) is not a BTTask BlueprintBase, therefore ' Target ' must have a connection. Error link https answers.unrealengine.com questions 549437 error this blueprint self is not a therefore self.html I also saw something about sphere traces, attached to an actor socket. But in my case I don't want to apply the damage just in case of contact of the actor's arm (armed or unarmed) to the target, it would be something as seen in MOBA style games. It would be like a basic attack from Garen Yasuo Darius. |
3 | How to animate a character from a sprite sheet? I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character. I downloaded a free sprite sheet which has 12 (3x4) character sprites. What is the general method to animate the character? I see why having all the character animations in one file can be useful, but I don't understand how it would be done. I don't want code or anything, I just want to know how you normally use the sprite sheet to animate a character so I code it afterwards. |
3 | Calculate smooth transition between local space angles I'm trying to calculate direction of moving character (to rotate it's animation). I have something like this Character can have 4 cardinal directions. The rotation is calculated from the current cardinal direction. So for example For north we have 90 degrees from N to W and 90 degrees from N to E. From E to N we have 90 degrees and from E to S we have 90 degrees. The problem occurs when character is switching directions.It happens at about half the distance between cardinal directions. At this point current rotation is switching from negative to positive number (or other way around), and there is noticeable hitch. When for example going from E to N, it switches to N direction but it was at about 45 degrees which in N space it places for a frame or two between N and W directions. Why do I calculate angles in cardinal direction space ? Animations are prepared for strafing or moving backward (or any other angle) and I need to assume that the direction of animation is 0 degrees and calculate from here. Is there way to smoothly change angle between cardinal directions ? For now I tried to lerping between them when switching (which improved overall look but is far from smooth transition), tried to track from which direction the switch is coming, but it didn't really improved anything. FVector Right Character gt GetActorRightVector() FVector Forward Character gt GetActorForwardVector() FTransform Transform Character gt GetTransform() FVector CurrentAcceleration CMC gt GetCurrentAcceleration() FVector CurrentVelocity CMC gt Velocity FVector AccelerationDirection CurrentAcceleration.GetSafeNormal2D() FVector VelocityDirection CurrentVelocity.GetSafeNormal2D() FVector LocalAcceleration Transform.InverseTransformVectorNoScale(AccelerationDirection) FVector LocalVelocity Transform.InverseTransformVectorNoScale(VelocityDirection) float DeltaTime Output.AnimInstanceProxy gt GetDeltaSeconds() float Atan2Angle FMath Atan2(LocalVelocity.Y, LocalVelocity.X) const int32 ChildIndex FMath RoundToInt((Atan2Angle 2 PI) 4) 4 float VelAngle FMath RadiansToDegrees(VelQuat.GetAngle()) float OldOrient CurrentOrient EFCardinalDirection Dir static cast lt EFCardinalDirection gt (ChildIndex) EFCardinalDirection OldDir static cast lt EFCardinalDirection gt (OldDirection) float DirDot 0 main switch wihin which I determine from where calculate angle. switch (Dir) case EFCardinalDirection N FQuat ForwardQuat FQuat FindBetween(Forward, CurrentVelocity) float OrientN FRotator(ForwardQuat).Yaw CurrentOrient OrientN FMath FInterpConstantTo(OldOrient, OrientN, DeltaTime, 300.0f) break case EFCardinalDirection E FQuat LeftQuat FQuat FindBetween(Right, CurrentVelocity) float OrientE FRotator(LeftQuat).Yaw CurrentOrient OrientE FMath FInterpConstantTo(OldOrient, OrientE, DeltaTime, 300.0f) break case EFCardinalDirection S FQuat BackQuat FQuat FindBetween(Forward ( 1), CurrentVelocity) float OrientS FRotator(BackQuat).Yaw CurrentOrient OrientS break case EFCardinalDirection W FQuat RightQuat FQuat FindBetween(Right ( 1), CurrentVelocity) float OrientW FRotator(RightQuat).Yaw CurrentOrient OrientW FMath FInterpConstantTo(OldOrient, OrientW, DeltaTime, 300.0f) break default break |
3 | How can I generate isometric sprite sheets from 3D animations? I want to generate sprite sheets for an isometric projection of various 3d assets purchased from the Unity3D asset store. I'd preferably also render the normal maps. I am a programmer, but new to 3D modeling software (Blender, etc.) I found two tools for this SpriteForge and SpriteWorks, but neither supports enough formats to be worth their cost. There must be an efficient way of isometrically rendering various animations of a 3d assets in Blender mdash but I don't know how. How can I do this? |
3 | Exporting distinct images from a sprite sheet using GIMP I have recently found that in Photoshop there is a script that enables you to export individual images on different layers into distinct png images on disk. Is it GIMP capable of doing the same thing and how? I have a sprite sheet (png image) and there are 36 perfectly aligned images in 4 rows (64x64 pixels each). I have to cut and export 36 times. Can be GIMP of some help here? I don't have Photoshop. |
3 | How can I generate isometric sprite sheets from 3D animations? I want to generate sprite sheets for an isometric projection of various 3d assets purchased from the Unity3D asset store. I'd preferably also render the normal maps. I am a programmer, but new to 3D modeling software (Blender, etc.) I found two tools for this SpriteForge and SpriteWorks, but neither supports enough formats to be worth their cost. There must be an efficient way of isometrically rendering various animations of a 3d assets in Blender mdash but I don't know how. How can I do this? |
3 | Animated Typing Memory Usage with Immutable Strings Right now I'm programming a game that has an animated typing effect typically seen in older 1980's and 90's role playing games. An example can be seen here. The typing effect is generated by taking a target string and rendering a substring of it each frame. The length of the substring is initially zero, but it is incremented every few hundred milliseconds. This gives the impression that the string is being typed out. The pseudocode would more or less look like var message "This is some dialogue." var substringLength 0 if (someTimeHasPassed) render(message.substring(0, substringLength) substringLength This works great, but I'm using a garbage collected language with immutable strings. Every few milliseconds, I create a new substring on the heap. Garbage collections become very frequent and I receive memory warnings on mobile devices. Is there a way to generate this typing effect without creating lots of strings in memory? |
3 | How do a make a smooth animation with images of different sizes in pygame? I have an animation where my player swings his sword, with 5 images in pygame. The normal resting image is 14x22, and the rest are 13x23, 21x23, 18x23, and 18x23. I am having trouble with my character 'Jumping' when he swings his sword, since the size of my image is constantly changing. Could anyone help my with this? Here's my code for the animation elif keys pg.K SPACE now pg.time.get ticks() try if now self.last update gt self.frame rate if self.direction 'left' self.game.player img self.game.playerattackleft self.frame self.frame 1 self.last update now except IndexError self.frame 0 Thanks. |
3 | How do I make a 2D sprite flash green when tapped? I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried setting the color of the sprite via SpriteRenderer's function SetColor, and it blended the color with the initial gray color of the sprite, so I got a very dark green even though I'm really sure I didn't mess up the values when I created the color. Now I'm trying to get my flashing effect by using separate images. I have the images I need, and I have a message getting logged when I tap the circle, I just need to setup a non looping animation and trigger that animation in my code. |
3 | I do not understand the code version of time based sprite animation? I'm Universo and for the longest time had coding issues around the concept of time based sprite animation basically, do not know how to implement it and any code or explanation simple or complex that I've found has been extremely confusing to me and was hoping to have a kind person walk me through the code step by step, explaining exactly how this is implemented correctly. Here's what, I believe to know about the concept and or idea for time based sprite animation it is to construct a delay or halt of some code statement using time of some kind in milliseconds with a collection of moving images and or sprites however any attempts from the tutorial's or my own brain have resulted in inaccurate various speed sprite animations and not the consistent stable speed, Id appreciate and be grateful for here's some code to show my progress and perhaps help you understand my position in this mess baring in mind, I prefer my code be as extremely simple and speedy as possible within the limitations, of course JavaScript with HTML5 Canvas window.onload function () var canvas document.getElementById( quot canvas quot ) get the canvas object var ctx canvas.getContext( quot 2d quot ) make sure we have a context for that canvas so we can draw stuff var FrameSize 120 120 pixels var FrameNumber 0 obvious var img new Image() make a image object img.src 'sprite ani.png' url to the image var last 0 no idea function Render() ctx.clearRect(0,0 ,640,480) clear screen now performance.now() to get the current timestamp in milliseconds delta now last last is 0, how does this work? last now last is now, why? if(delta gt 20 what does this value represent??) FrameNumber FrameNumber 1 increment FrameNumber by 1 could have been FrameNumber delta 20 No idea why I need to keep this the same number?? if(FrameNumber gt 4) just to make sure this is the end of the frame number sequence FrameNumber 0 to reset the frame number ctx.drawImage(img,FrameSize FrameNumber,0,120,120,0,0,120,120) perticularly draw a sequence of images and switch each individual image in that sequence based on the equation FrameSize (number to multiply the pixels by) multiply operator symbol FrameNumber (the pixels for the FrameSize to multiply with) window.requestAnimationFrame(Render) do the Raf stuff part one window.requestAnimationFrame(Render) do the raf stuff part two As you can see, it's extremely simple yet, I'm still struggling to not only understand it but extremely simply implement it, I'm not a fan of over complicated coding hence why I ditched c ages ago. Could someone in extremely simple english guide me through time based sprite animation in the context of JavaScript preferably, Id also really appreciate various time based sprite animation methods being explained too in extremely simple terms but not holding out, I thank you for reading this far. |
3 | How do I support animation with frames of different sizes? I'm trying to create a simple top view 2D rpg, in the style of Zelda and Secret of Mana, using PyGame. I've managed to make the beginnings of a game, with an animated character walking around. However, when I start animating attacks, I'm running into problems because the sprite with the sword slash is bigger than the walking sprite. This makes the character appear to be jumping around when attacking. I managed to handle the problem by defining a center of gravity, so to speak, for each image, and apply a suitable offset at each frame in the animation to make the center of the character stay at the same place throughout the animation. I defined a dictionary of lists of images (instances of pygame.Surface), where I pick out the correct list by the state of the character, so for example there is one list for walking left, and then I loop over the list to get the animation. To handle the offset, I similarly created a dictionary of lists of offsets, looping over those in the same way. However, I'm not entirely pleased with this implementation, so I'm looking for a more elegant solution. I tried to add an attribute called offset to each instance of the pygame.Surface class, to hold the offset for each image, but the Surface class doesn't allow new attributes to be set. I then thought about subclassing pygame.Surface, which would allow me to set any attribute I wanted, but then I couldn't load my images with pygame.image.load without a lot of extra code. I imagine everyone who makes a game with animations where the size of the sprite changes between frames would have to deal with this problem, so if anyone could suggest an elegant implementation, that would be great. If example code with PyGame is available, that would be even greater. |
3 | MVC How To Handle Animations? I am working on a turn based game that utilizes the model, view, controller design pattern to separate logic from input from rendering. I am still a little new to the pattern, but from my understanding I have laid out the following MVC system. The model(s) comprise a set of pawns with game flow and interaction logic. Pawns models know how to interact with each other and the model world, but only when signaled to do so via function calls. (i.e. pawn.move(startLocation, endLocation) or pawn.attack(enemyPawn)) The view(s) make up everything that is viewable by the player. This includes menus, visual representations of the pawns models, and any user interface components like cursors and buttons. The view(s) query the model for data to draw visual representations of pawns. The view(s) also can dispatch user interface events to any observers interested in these events. The controller(s) handle all transition and input logic. When an interesting user interface or input events occur, the controller decides what the model should do and signals the model to do it. The controller also handles swapping out of views when necessary. I know there are many ways to implement MVC and I am open to suggestions if something seems off with this design, but the real problem I am having is how to handle animations in the view. Say the user commands a pawn to move 5 spaces North and 1 space West. I want an animation to show this over several seconds. How would I handle something like that? |
3 | How to Generate Spritesheet from a 'problematic' animated Symbol in Flash Pro CS6? In the new Flash Pro CS6 there is an option to generate spriteheet from a symbol. I used these tutorials http www.adobe.com devnet flash articles using sprite sheet generator.html http tv.adobe.com watch cs6 creative cloud feature tour for web generating sprite sheets using flash professional cs6 And it works really well! An artist I'm working with created a bunch of assets for a game. One of them is a walking person as seen from a top down view. You can find the .fla here https docs.google.com folder d 0B3L2bumwc4onRGhLcGNId1p2Szg edit (If this does not work let me know, it is the first time I used Google Drive to share files) 1 .When I press ctrl enter I can see it is moving. When I look for the animation, I do not seem to find it. When I select to create a spritesheet, flash suggest creating a spritesheet with one frame in the base pose and no other (animation) frames. What is causing this and how do I correct it? 2 .I want to convert it to a sprite sheet for 32 angles of movement. Is there any magical easy way to get this done? Is there a workaround without using Flash CS6 to do the same thing? |
3 | Pre calculating skeletal animation data I'm working on skeletal animation and so far I've got the skeleton drawn with interpolated animation working (just on the cpu still). I was thinking about changing my file format for my skeleton and animations to have fully calculated matrices stored. Right now I calculate my matrices recursively by multiplying the parent's world matrix(absolute matrix) by the childs joint matrix, same thing with each frame of animation. I think it would be a good idea to just export all of this pre calculated to my model format so I could just send these matrices to the shader for skinning. Is there any reason I should not do this? Edit Calculating the matrices is negligible by itself on a rather small skeleton anyway but is there any reason I should calculate them at run time or just pre calculate in my file format? I think this sums up my question better. |
3 | How to make my animation play once? In 3ds max, I've made a Cannon that sets itself up, but I only want this animation to play once, here's where I'm trying to make it loop only once When I click the toggle at the bottom, it stops the animation for constantly looping, but when I click 'Save', and run my game, it still continues to loop. What am I doing wrong? |
3 | Is there an easier way to get sprites from a spritesheet One issue I have when working with API's such as Monogame and SFML unlike with Game Engines like Unity and Unreal is trying to extract sprites from a spritesheet. I know the method of doing it but it becomes really annoying when you use spritesheets for example that have lots of different sized sprites that are scattered all around the spritesheet. Everything seems to need to be perfectly sized and aligned to be able to extract the sprites correctly, unless you're using a game engine like Unity where you can do something like draw boxes around the sprites you want, no matter the size or position, or have this done for you. What workflow can I use to quickly select the portions of the image corresponding to each sprite and use those extracted sprites right away in code instead of splitting the sprites into seperate .png's and using them? |
3 | Compensate for animation time in multiplayer network game I'm developing a multiplayer turn based card game. In certain scenarios, the clients are required to perform an animation before moving on with the game. For example, the server informs the clients to animate dealing cards to all players. This animation takes around 5 seconds. Afterwards, the server informs a client to make a move, with a timer showing how long they have to play. How can the server wait for the animation to finish before moving on and starting a timer and informing a client to play? The timer obviously needs to start after the animations are complete. I've thought of the following 1) Hardcode the animation durations on the server side and delay sending out the next message to the clients until after the duration of the animation. 2) Have the clients inform the server when an animation is complete. ..but I feel that there should be a better way. Is there any other way to do this? |
3 | 2D Scaling a character with multiple RigidBody2Ds? So, this example is in the Godot Engine, but other engines porbably have this kind of problem, too I have a character with multiple RigidBody2Ds, that also has a bone skeleton for animation over them. Now, the problem is, that Godot's physics engine handles the transforms of the bodies, so they won't scale properly. If you scale the children (CollisionShape2Ds and Sprites) the positions will be off. Is anybody aware of a proper way to work around this? Being able to scale these kind of characters would be awesome. Thanks for all your answers. Greetings, Footurist |
3 | How can I render a wave effect like the one used in California Games' surfing mini game? Well, I'm trying to study XNA, and I'm trying to make a California Games inspired surfing game. I got the surfer guy done, and it's working very well but I don't have any idea on how I should draw the wave coming and animate it. If you don't remember what the game looks like, here it is. The wave I'm talking about is the one which is coming from the left at around the 00 40 mark |
3 | Syncing first person arms and enemy character for struggle in games Some FPS have it where your arms are struggling or doing something melee to a character model. Both the arms and the character you're interacting with are sync'd up in the animation. What's the general idea behind how that syncing is done? |
3 | How to reset AnimatedSprite? In Godot v2, it seems that AnimatedSprite had a method set frame() see here. But in v3, this method does not seem to exist anymore. Only 3 methods are available see here bool is playing () void play (String anim quot quot , bool backwards false ) void stop () What is the way to reset an animation in Godot 3? |
3 | Objective C Moving UIView along a curved path I'm not sure if I am approaching this the correct way. In my app, when a user touches the screen I capture the point and create an arc from a fixed point to that touch point. I then want to move a UIView along that arc. Here's my code ViewController.m method to "shoot" object KIP Projectile creates the arc, KIP Character creates the object I want to move along the arc ... get arc for trajectory KIP Projectile vThisProjectile KIP Projectile alloc initWithFrame CGRectMake(51.0, fatElvisCenterPoint 30.0, touchPoint.x, 60.0) vThisProjectile.backgroundColor UIColor clearColor self.view addSubview vThisProjectile ... KIP Character thisChar KIP Character alloc initWithFrame CGRectMake(51, objCenterPoint 5, imgThisChar.size.width, imgThisChar.size.height) thisChar.backgroundColor UIColor clearColor thisChar.charID charID thisChar.charType 2 thisChar.strCharType "Projectile" thisChar.imgMyImage imgThisChar thisChar.myArc vThisProjectile thisChar buildImage thisChar traceArc in KIP Projectile I build the arc using this code (CGMutablePathRef) createArcPathFromBottomOfRect (CGRect) rect (CGFloat) arcHeight CGRect arcRect CGRectMake(rect.origin.x, rect.origin.y rect.size.height arcHeight, rect.size.width, arcHeight) CGFloat arcRadius (arcRect.size.height 2) (pow(arcRect.size.width, 2) (8 arcRect.size.height)) CGPoint arcCenter CGPointMake(arcRect.origin.x arcRect.size.width 2, arcRect.origin.y arcRadius) CGFloat angle acos(arcRect.size.width (2 arcRadius)) CGFloat startAngle radians(180) angle CGFloat endAngle radians(360) angle CGMutablePathRef path CGPathCreateMutable() CGPathAddArc(path, NULL, arcCenter.x, arcCenter.y, arcRadius, startAngle, endAngle, 0) return path (void)drawRect (CGRect)rect CGContextRef currentContext UIGraphicsGetCurrentContext() myArcPath self createArcPathFromBottomOfRect self.bounds 30.0 CGContextSetLineWidth(currentContext, 1) CGFloat red 4 1.0f, 0.0f, 0.0f, 1.0f CGContextSetStrokeColor(currentContext, red) CGContextAddPath(currentContext, myArcPath) CGContextStrokePath(currentContext) Works fine. The arc is displayed with a red stroke on the screen. In KIP Character, which has been passed it's relevant arc, I am using this code but getting no results. (void) traceArc CGMutablePathRef myArc myArc.myArcPath Set up path movement CAKeyframeAnimation pathAnimation CAKeyframeAnimation animationWithKeyPath "position" pathAnimation.calculationMode kCAAnimationPaced pathAnimation.fillMode kCAFillModeForwards pathAnimation.removedOnCompletion NO pathAnimation.path myArc CGPathRelease(myArc) self.layer addAnimation pathAnimation forKey "savingAnimation" Any help here would be appreciated. |
3 | How to animate large and complex sprites with modular parts I am trying to animate sprites like metal slug bosses. But they can't be animated as regular and squared sprites because the have multiple moving parts at same time. Considering i am talking about arcade games, frameworks like spine and mecanim did not exist in that time. I am seeking for techiques to do that, but only found examples animating simple sprite sheets. Does somebody know how was it done ? Link to slug flyer sprite sheet Link to big shiee boss sprite sheet |
3 | How to get smooth parallax in a wrap around world I'm working on a multiplayer space shooter a la Star Control melee. The background of the game consists of several layers of tiles sprites making up a parallax effect of clouds and stars. The player ship is always centered in the viewport. The game world has a fixed size and implements wrap around, so that any object that passes the game world bounds is instantly teleported to the other side. To make the transition seamless when reaching game bounds , all objects but the player ship are also rendered outside the game bounds if they are on the other side of the screen. This makes chasing a ship, for example feel seamless. Right now the x and y values of the background tile offsets are determined by the position of the player ship in the game world. bg1.tilePosition.x playerShip.x 0.01 bg1.tilePosition.y playerShip.y 0.01 bg2.tilePosition.x playerShip.x 0.02 bg2.tilePosition.y playerShip.y 0.02 My problem is with the parallax background when the player reaches the game world bounds. If the ship jumps from x position 1000 to position 0, for example, then all the tile positions jump resulting in a jerky movement. In the following gif I made a semi white transparent background for the game world so you can see exactly the parallax jump as soon as the purple ship wraps around the game world How can I avoid this so that the parallax background is always smooth? Things I've thought of Not changing the position of the player when it wraps around, then use a modulo of the game world size for positioning. I can't do that because it will make the game data dirtier and harder to work with plus it increases network bandwidth which I want to avoid Tying the tile offset to input. The player ship can move without input from collisions inertia so that's no help |
3 | Godot Animation only playing First Frame I have tried checking if it is already playing, stopping animations before and putting it in a separate function. Whenever I jump it should play 4 Frames of my animated sprite. But it only plays first. const FLOOR Vector2(0, 1) const SPEED 500 const GRAVITY 20 const JUMP 600 func physics process(delta) pos.y GRAVITY if Input.is action pressed("ui right") pos.x SPEED Sprite.play("Run") Sprite.flip h false elif Input.is action pressed("ui left") pos.x SPEED Sprite.play("Run") Sprite.flip h true else pos.x 0 Sprite.play("Idle") if is on floor() if Input.is action just pressed("ui up") pos.y JUMP else if pos.y lt 0 Sprite.play("Jump") else Sprite.play("Fall") pos move and slide(pos,FLOOR) |
3 | how to use .getTransform to get the current coordinates of translated rotating object I m stuck trying to figure out how to use .getTransform to determine what pointA (x1,y1) and pointB (x2,y2) of each of my lines would be after translate and rotate. I've found other answers but they don't seem to target exactly what I need nor do I fully understand the matrix that gets returned. From the snippet provided you can see that my lines always return their original values. I know there's a formula for this, or a way to use the matrix, I just don't know it or how I would implement it. What I need is the start and end points of every line. The plan will be to rotate (animated spinning) them to any angle and have those coordinates get used for ray casting. I've previously done this from a center point out or one direction to another but not with so many lines using the rotate method. I have tried the same thing with boxes and just can't seem to grasp how I can get the rotated coordinates. Here's the snippet let canvas document.getElementById("canvas") let ctx canvas.getContext("2d") canvas.width 200 canvas.height 180 class Rays constructor(x1, y1, x2, y2) this.x1 x1 this.y1 y1 this.x2 x2 this.y2 y2 draw() ctx.save() ctx.translate(canvas.width 2,canvas.height 2) ctx.rotate(45 (Math.PI 180)) ctx.beginPath() ctx.strokeStyle 'black' ctx.moveTo(this.x1, this.y1) ctx.lineTo(this.x2, this.y2) ctx.stroke() ctx.closePath() ctx.restore() let rays function createRays() due to translate i have to push some lines in the negative and some positive this causes an overlap of one line in the center. for (let i 0 i lt 26 i ) let x1 i lt 13 ? 10 i i 10 canvas.width 2 20 let y1 canvas.height let x2 i lt 13 ? 10 i i 10 canvas.width 2 20 let y2 canvas.height rays.push(new Rays(x1, y1, x2, y2)) enter angle here createRays() let count 0 just used to stop it from constantly console logging rays.x1 function drawRays() for (let i 0 i lt rays.length i ) rays i .draw() count lt 1 ? console.log(rays i .x1) false count drawRays() console.log(ctx.getTransform()) function animate() ctx.clearRect(0, 0, canvas.width, canvas.height) ctx.fillStyle "lightgrey" ctx.fillRect(0,0,canvas.width,canvas.height) drawRays() requestAnimationFrame(animate) animate() lt canvas id "canvas" gt lt canvas gt |
3 | Setting up images for frame animation I am learning the basics of iPhone frame animation. I have code that loops through 15 images to do an animation (void)viewDidLoad super viewDidLoad UIImageView iv UIImageView alloc initWithFrame CGRectMake(40, 40, 95, 70) NSMutableArray arr NSMutableArray alloc init for(int i 1 i lt 15 i ) UIImage img UIImage imageNamed NSString stringWithFormat "someImage 02d", i arr addObject img iv.animationImages arr iv.animationDuration 1.0 2 self.view addSubview iv iv startAnimating I want to load images of Link from a picture I found on the internet. How can I take this image (available as a png) and load the unique parts of the image? I have heard of people putting multiple images into a single PNG to improve performance. How do I extract the individual images into an array for use in code like the above? Please keep in mind this is my first time doing frame animation. I realize this code can likely be improved. I'm trying to keep things simple. |
3 | How do I calculate the new Quaternions from translated points? The code below is for a rag doll using Verlet method, I have the correct points (or joints) positions, I just need the correct Quaternions, otherwise the resulting model looks like in the picture, I'm constraining the body to the bind pose on purpose for testing purposes. Based on the two points, their position and quaternion, what will the new Quaternion be for each translated point? struct Point XMVECTOR position 0,0,0 XMVECTOR quaternion 0,0,0, 1 Point p1 Point p2 p1.position 0.0f,0.3f, 0.1f p2.position 1.0,0.3f,0.1f |
3 | What is the movement represented by this sprite animation? Fire Emblem 7 is a sprite based game with some interesting sprite art aesthetics. For example, see this sheet of one of the main characters, Lyn On the last frames of the critical hit, the artist used some kind of slash effect to represent the entire motion of the sword in a single frame. It looks really appealing on video. I have two questions What is this effect called? How or why did the artist arrive at that result? For example, why are those "spikes" where they are, and why is the "end" of the line fatter? |
3 | How can I make background elements wrap around the screen? I'm looking to make my clouds wrap around the screen in my game (like the picture). Right now it just continues off the screen. The current movement code is Cloud.center CGPointMake(Cloud.center.x 0.032, Cloud.center.y) |
3 | Unity How to transition to a different animation during the blend phase? I have a set of animations Idle, start walking, stop walking, and walking full speed. I have the animations all blending nicely...and the controls are fairly responsive during most of the motion...but there are odd transitions where the blends take away control I can't transition to the walking animations when I am blending between the "stop walking" and "Idle" animations, for instance. How do I get the animations to transfer during the blend phase?? |
3 | Unable to enable IK on someone else's rig I'm using someone else's character rig for reference but I'm not sure how I can enable IK solvers for the arms. The hand controller has a NURBS control with an ikBlend attribute, but when I try to use the "Enable IK Solvers" tool, I get an error saying the attribute is locked or connected. Clicking "Unlock Selected" on the attribute doesn't fix it. Breaking the connections also breaks the ability for it to drive the enabled disabled state of the IK handle. The rigged character can be downloaded here if anyone wants to try to help me out http www.antcgi.com 2014 06 03 free model 15 kila lods rig dynamics |
3 | UE 4.25.3 can't make layered animations to work I want to make my character's upper body animations not connected to the lower body. For example, I have this set of animations Running Jumping Crouching Kick Sliding Idle with sword Sword attack I need the idle with sword and sword attack animations override upperbody for every other animation, but the slide and kick. So, I want my character to hold his hand with the sword in front and do sword attack even while running and jumping. I tried using layered animation like in every tutorial on Youtube. I created the upperbody slot, created a montage for my desired upperbody animation, added the Layered blend per bone node in the animBP and set the bone there, but it doesn't work. I don't know if I've missed something. |
3 | How do I create logic that mirrors the visual state of the game without tying the logic to the animation? I'm implementing a type of action that depends on the completion of an animation specifically, a character throwing a grenade should, at the end of the animation, spawn a grenade. This seems to imply that I should be creating code that reacts to the completion of the animation, code that depends on the framerate when the last frame is displayed, or immediately after, the processes that spawn a grenade should run. I've been reading around and it seems that the consensus is that tying physics to the animation is bad practice. I can code some workarounds that decouples the animation from the logic. I am thinking that I can add an observer to the mix that pings all interested pieces of code that "the animation finished", or the like, so the animation doesn't know anything about the logic, and vice versa. I can code workarounds, but they're that, workarounds. They're code that's trying to detach logic from the event that triggers it, but they're inherently bound together a grenade should spawn after a character throws it. If animation and logic are to run separately, how should I implement a grenade spawning system that doesn't take the character animation frames into account? |
3 | Export Maya Animation Data I have a pretty simple character rig animation. How can I export the raw data of that animation? I'm looking for some way to export a raw text array of data that tells exactly what every joint does on every frame. This means rotation, translation, etc. EDIT Thanks for the answers so far. We are looking for a way to get something like this This would be one joint of a 14 frame animation. lt joint gt lt name gt rightShoulder lt name gt lt xPos gt 12 14 16 18 19 20 21 24 26 28 32 34 36 38 lt xPos gt lt yPos gt 100 99 98 97 96 95 94 93 92 91 90 91 92 95 lt yPos gt lt joint gt We are also trying to keep the file lightweight. So we will be ONLY including this data, no meshes, cameras or anything else. I've been looking into .DAE but it seems pretty heavy. Any suggestions? If nothing standard works, how would one go about writing their own Maya exporter? Does something like this seem possible? |
3 | Why do 3D animations have framerates As far as I'm aware, all 3D animation software (Maya, Blender...) has framerates. That is, keyframes can only be placed on discrete points in time. Why is that? Why can't animation keyframes be placed at any point in time? The animations are interpolated in the game engine anyway, the game framerate is rarely the same as the animation framerate and even then, somethimes the game's frames land inbetween the animation's frames and we see the interpolated animation anyway. |
3 | Who should handle animations when game logic is separated from rendering? Suppose I have a tile based game and I want the step to be 1 tile but also want the movement to be smooth while the player is getting there. If I understand correctly, the only way to achieve this would be making a series of small movements where the increment is a percentage of a tile. My question is should the game logic thread send the animations to the rendering thread? What is the best way to go about it? |
3 | Disjointed bones in 3ds Max Are they a problem? The title sums up my question fairly well. I'm working with a biped, and I'm not sure whether to put the extra effort into connecting all the bones, or just to leave spaces between each of them. What do you think? Screenshot http i.imgur.com pfbLSDt.png |
3 | Creating Animations Without Hardcore Art for 2D Action RPG I'm working on a 2D action RPG. One of the issues I run into is art in the vein of Flash games like FF7, Secret of Mana, or Epic Battle Fantasy, I would like to actually display the weapon with the player while they're walking around, and swap it out with a different image when they change weapons. As a simple example, if I have a bronze and gold sword, when walking around, attacking, etc. you would see the bronze or gold sword image accordingly. This is an oversimplifcation, because I'm not sticking to only recolouring based on the weapon I may actually change the design (not 100 sure about this yet). As such, my core question is how can I design this to minimize the amount of artwork I need to make for each weapon? It seems like I need to create standardized weapon sizes (eg. 18x36px sword), positions relative to the character to show them for each frame, and I need to create a sprite sheet for each frame. (I have four directional images for walking, each with four frames of animation.) This means, per weapon, I need another 4x4 frames of animation that's a lot (for a non artist like me). The other approach would be programmatic animation but how will that work? I have to worry about Positioning must be always similar for each weapon (different sizes?) Occlusion the whole weapon appears when looking down, but most of it is hidden when looking up how can I standardize this? For reference, see (really) FF7 they did a fairly decent job of this, albeit in 3D. Sample |
3 | Calculate smooth transition between local space angles I'm trying to calculate direction of moving character (to rotate it's animation). I have something like this Character can have 4 cardinal directions. The rotation is calculated from the current cardinal direction. So for example For north we have 90 degrees from N to W and 90 degrees from N to E. From E to N we have 90 degrees and from E to S we have 90 degrees. The problem occurs when character is switching directions.It happens at about half the distance between cardinal directions. At this point current rotation is switching from negative to positive number (or other way around), and there is noticeable hitch. When for example going from E to N, it switches to N direction but it was at about 45 degrees which in N space it places for a frame or two between N and W directions. Why do I calculate angles in cardinal direction space ? Animations are prepared for strafing or moving backward (or any other angle) and I need to assume that the direction of animation is 0 degrees and calculate from here. Is there way to smoothly change angle between cardinal directions ? For now I tried to lerping between them when switching (which improved overall look but is far from smooth transition), tried to track from which direction the switch is coming, but it didn't really improved anything. FVector Right Character gt GetActorRightVector() FVector Forward Character gt GetActorForwardVector() FTransform Transform Character gt GetTransform() FVector CurrentAcceleration CMC gt GetCurrentAcceleration() FVector CurrentVelocity CMC gt Velocity FVector AccelerationDirection CurrentAcceleration.GetSafeNormal2D() FVector VelocityDirection CurrentVelocity.GetSafeNormal2D() FVector LocalAcceleration Transform.InverseTransformVectorNoScale(AccelerationDirection) FVector LocalVelocity Transform.InverseTransformVectorNoScale(VelocityDirection) float DeltaTime Output.AnimInstanceProxy gt GetDeltaSeconds() float Atan2Angle FMath Atan2(LocalVelocity.Y, LocalVelocity.X) const int32 ChildIndex FMath RoundToInt((Atan2Angle 2 PI) 4) 4 float VelAngle FMath RadiansToDegrees(VelQuat.GetAngle()) float OldOrient CurrentOrient EFCardinalDirection Dir static cast lt EFCardinalDirection gt (ChildIndex) EFCardinalDirection OldDir static cast lt EFCardinalDirection gt (OldDirection) float DirDot 0 main switch wihin which I determine from where calculate angle. switch (Dir) case EFCardinalDirection N FQuat ForwardQuat FQuat FindBetween(Forward, CurrentVelocity) float OrientN FRotator(ForwardQuat).Yaw CurrentOrient OrientN FMath FInterpConstantTo(OldOrient, OrientN, DeltaTime, 300.0f) break case EFCardinalDirection E FQuat LeftQuat FQuat FindBetween(Right, CurrentVelocity) float OrientE FRotator(LeftQuat).Yaw CurrentOrient OrientE FMath FInterpConstantTo(OldOrient, OrientE, DeltaTime, 300.0f) break case EFCardinalDirection S FQuat BackQuat FQuat FindBetween(Forward ( 1), CurrentVelocity) float OrientS FRotator(BackQuat).Yaw CurrentOrient OrientS break case EFCardinalDirection W FQuat RightQuat FQuat FindBetween(Right ( 1), CurrentVelocity) float OrientW FRotator(RightQuat).Yaw CurrentOrient OrientW FMath FInterpConstantTo(OldOrient, OrientW, DeltaTime, 300.0f) break default break |
3 | How can I reduce memory use when implementing an animation in UE4? We've already made a tank's track spline animation but it's using a lot of memory because it's implemented inside a tick function. So, it needs to check every second but as you may know it requires a lot of resources if there will be more than 10 tanks.. Is there an optimal solution for this problem? Have others faced these kind of problems? It would be great if the solution was in blueprints. |
3 | Animator on a WorldSpace Canvas Ok, so I have my world space canvas attached to the player object. In my script I have a reference like this GameObject myWorldCanvas Awake() myWorldCanvas transform.FindChild("nameOfObject").gameObject Then when the right conditions are met I simply activate the object like this myWorldCanvas.SeActive(true) This worked perfectly until I added a animator to the object. If I manually enable disable the object in the scene the animation works perfectly(it just changes the scale to give it a pop effect), but when the object is activated by my script the animation still plays and changes the scale values but nothing is rendered. In play mode if I manually enable disable the animation works. Any ideas ? If you need more info or screens let me know. Edit the canvas has some buttons as children and when I mouse over something seems to be refreshed and the images show up on screen. Edit Further test have show that manually disabling and enabling the Canvas component also shows the images, but If the canvas and game object are enabled from a script nothing shows up on the screen. Edit I solved the problem by disabling the canvas component on the first key of the animation and then enabling it on the second one where the Y scale is set to 0. This seems more like a hack and I dont like it. Does anyone have a idea why this is happening ? |
3 | How to Generate Spritesheet from a 'problematic' animated Symbol in Flash Pro CS6? In the new Flash Pro CS6 there is an option to generate spriteheet from a symbol. I used these tutorials http www.adobe.com devnet flash articles using sprite sheet generator.html http tv.adobe.com watch cs6 creative cloud feature tour for web generating sprite sheets using flash professional cs6 And it works really well! An artist I'm working with created a bunch of assets for a game. One of them is a walking person as seen from a top down view. You can find the .fla here https docs.google.com folder d 0B3L2bumwc4onRGhLcGNId1p2Szg edit (If this does not work let me know, it is the first time I used Google Drive to share files) 1 .When I press ctrl enter I can see it is moving. When I look for the animation, I do not seem to find it. When I select to create a spritesheet, flash suggest creating a spritesheet with one frame in the base pose and no other (animation) frames. What is causing this and how do I correct it? 2 .I want to convert it to a sprite sheet for 32 angles of movement. Is there any magical easy way to get this done? Is there a workaround without using Flash CS6 to do the same thing? |
3 | Why are my Mecanim animation curves not staying within the entered range? I have an in place animation that I added curves to (In the rigged FBX which has the animation). I created 2 float parameters in the relevant controller with the same names as the curves in the animation clip. Now, when I get the value of the float using animator.GetFloat(), the values I get are not in the value range I entered in the curves. My range is between 0.0f and 4.0f but what I get is approximately 0.6f to 0.03f. Why is this? From what I could gather from other threads, there is some blending going on with some other curves. What is this blending? And if there is some blending happening, how can I remove that? I'm using Unity 5.1.1. |
3 | Should I use procedural animation? I have started to make a fantasy 3d fps swordplay game and I want to add animations. I don't want to animate everything by hand because it would take a lot of time, so I decided to use procedural animation. I would certainly use IK (starting with simple reaching an object with hand ...). I also assume procedural generation of animations will make less animations to do by hand (I can blend animations ...). I want also to have a planner for animation which would simplify complex animations those which can be split to a sequence run and then jump, jump and then roll or which are separable legs running and torso swinging with sword . I want for example a character to chop a head of a big troll. If troll crouches character would just chop his head off, if it is standing he would climb on a troll. I know that I would have to describe the state ("troll is low", "troll is high", "chop troll head" ..) which would imply what regions animation will be in (if there is a gap between them character would jump), which would imply what places character can have some of legs and hands or would choose an predefined animation. My main goal is simplicity of coding, but I want my game to be looking cool also. Is it worthy to use procedural animation or does it make more troubles that it solves? (there can be lot of twiddling ...) I am using Blender Game Engine (therefore Python for scripting, and Bullet Physics). |
3 | Lightweight sprite animation software Does anyone know of a good lightweight sprite animator solution? I've created a couple of spritesheets using TexturePacker, but I'd like to, for example, create an XML file that tells me frames one through three are part of animation X, and frames 4 through 6 are part of animation Y. I am primarily a OSX developer. |
3 | What are the pros and cons of these voxel data file formats? .VXL .VOX .KVX .KV6 .V3A .V3B I am trying to decide whether it's worth going with any of the above, or some other, or if I should roll my own. The deciding factors in order of importance are Animation support (I am aware this is a difficult aspect when it comes to voxels), using voxel deltas or numerical transform descriptions. Simplicity (or at least a concise format) Compression From what I can tell, the Tiberian Sun VXL format is the only one which is designed for animation, but Ken Silverman of Voxelstein3D fame claimed that VXL does not support animation (in a single file, were his words). So I wonder if maybe there are not two different .VXL formats, since it seems an obvious choice of file extension for voxel data... could be from a medical imaging context. I do need someone with solid experience of voxel formats to come and comment on the practical pros and cons, in their experience. Consider this question in the same way you might compare JPG to PNG to GIF. |
3 | Common way of animating 'motion' for walk cycle animations I've just posted this at the Blender artists' forums before realising I would probably get a better response from a more game development specific audience, so apologies for cross posting! It's for the right reasons ) I'm a programmer trying to animate a character walking for a game project, using Ogre. I've made a very simple walk cycle in Blender and exported it to Ogre, and it plays just fine. By fine, I mean it works, but there's terrible foot sliding. This is because I just animated the walk in place (at the origin) in Blender, and of course I don't know what "speed of walk" that corresponds to, so when I move the character in game the motion doesn't necessarily match up with the movement of the feet in the animation. So my question is what's the normal approach for this kind of thing? At work we use Maya, and the animators either animate a special 'moveTrans' node that represents the "position" of the character (or have the exporter generate it for them from the movement of the root node), then the game can read this to know how fast the animation moves the character. So in the Maya file, the character will walk forward for one cycle and this extra node will follow along with them by their feet. I've not seen anything like this in open source land, and there's certainly no provision for that in the Ogre Exporter script. What do you chaps normally do for this? |
3 | Playing an animation in Godot I have been working on making a platformer in Godot but can't seem to get a walk cycle to play when I press left or right. extends KinematicBody2D export (int) var run speed 300 export (int) var jump speed 400 export (int) var gravity 1000 var velocity Vector2() var jumping false func get input() velocity.x 0 var right Input.is action pressed('ui right') var left Input.is action pressed('ui left') var jump Input.is action just pressed('ui select') if jump and is on floor() jumping true velocity.y jump speed if right velocity.x run speed if left velocity.x run speed if left or right and jumping ! false get node("AnimationPlayer").play('walkcyc') if left or right and jumping ! true AnimatedSprite.animation 'run' AnimatedSprite.flip h velocity.x lt 0 if is on floor() and velocity.x 0 or velocity.y 0 AnimatedSprite.animation 'stand' AnimatedSprite.flip v false AnimatedSprite.flip h velocity.x lt 0 if jumping ! false AnimatedSprite.animation 'jump' AnimatedSprite.flip v false AnimatedSprite.flip h velocity.x lt 0 func physics process(delta) get input() velocity.y gravity delta if jumping and is on floor() jumping false velocity move and slide(velocity, Vector2(0, 1)) |
3 | What are the basic systems used to implement a combat system like in Devil May Cry 5? My basic observations from playing DMC5 and other Character Action games a lot are the following... There are a lot of different Animations that blend into each other. These Animations are triggered by input sequences of varying complexity. Input to Animation time feels very responsive. My question is what systems does one use to organize all these animations with their input sequences and make it responsive. |
3 | FPS Android game that moves the gun as user swipes the screen I am Making a First Person shooter game for android. Gun moves in all directions I swipe left right up or down. But the speed is so slow. How can i increase it's Speed.Here is my code. void FixedUpdate () foreach (Touch t in Input.touches) if (t.phase TouchPhase.Began) initialTouch t else if (t.phase TouchPhase.Moved amp amp !hasSwiped) float deltaX initialTouch.position.x t.position.x float deltaY initialTouch.position.y t.position.y distance formula distance Mathf.Sqrt((deltaX deltaX) (deltaY deltaY)) bool swipeSideways Mathf.Abs (deltaX) gt Mathf.Abs (deltaY) if (distance gt 100f) if (swipeSideways amp amp deltaX gt 0) this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) else if (swipeSideways amp amp deltaX lt 0) swipe right this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) hasSwiped true else if (t.phase TouchPhase.Ended) initialTouch new Touch () hasSwiped false |
3 | Why (SDL) animated filled circle leaves trail of movement? I'm trying to achieve proper animation using SDL. Used flags are SDL HWSURFACE and SDL DOUBLEBUF. That what I'm getting is technically smooth (I think), but I can figure out what should I do to remove that trail? My animation is time based (I'm calculating displacement with delta time). Link to to video https vimeo.com 62065078 my (every frame) drawing function is like for(int x 0 x lt screen gt w x) for(int y 0 y lt screen gt h y) draw pixel(screen, x, y, 136, 136, 136) and ball filledCircleColor(screen, ball.x, ball.y, 17, 0x000000ff) and finally SDL Flip(screen) main loop is for( ) curr ts stopwatch seconds elapsed(sw) d time curr ts prev ts prev ts curr ts cpSpaceStep(space, d time) draw scene(screen) |
3 | How do I create a simple animation for use in Unity? I'm trying to create a simple shrinking animation for use in Unity. The goal is to create an animation that shrinks the object to be 0.1 scale. I've created an Animator Controller with an empty state, and an Animation, and assigned the Animation into the Animator Controller's empty state's "Motion" slot, but I have no idea what to do next. This is what the inspector looks like on the Animation When I click "Open", nothing happens. There doesn't seem to be any area to edit the animation. I have no idea where to start, sorry if the question isn't detailed enough. |
3 | How do I make "weaponsclash" animations adapating to parameters Meaning how do I build my animations system so that I can have swords blocking each other? I honestly believe this is the hardest part of a game I need animations to interact with each other. If a monster uses attack 1 on hero 2, then both NPCs have to play a different animation based on, A, How big these NPCs are. I need them to be able to be scaled (monsters can grow, but when it jumps on a small player, it still has to look just as fitting as with other sizes) B, Speed of the monster when it runs up for the attack. C, Countless other things I suppose. How do I achieve this? KI, Pathfinding... all that is meaningless unless I can build a believable combat system. |
3 | What is next to interpolate camera position with smooth speed changes? I am working on a path camera to be used in demo playback. (3d game) The spline math used is catmull rom. I am on my second attempt to get constant position speed ( (someone else is doing rotation). The path cam keyframes are position time. I have a step now when the path is recalculated, it also generates the arc distance time lookup table which I have normalized. I have the duration of each segment(k through k 1)as well as each segments linear velocity calculated from that data. I am not very good at reading anything except basic equations. I could use an explanation or psuedo code of what is needed next in order to get the camera to smoothly accelerate or decelerate depending on the velocity of the next segment. Right now it's instant changes and no good. I tried googling for hours and was going in circles. |
3 | How to change an animated sprite's images per second from script? Consider an AnimatedSprite with an animation of 9 .png files and a setting of 5 images per second. How can I change the number of images per second from script? |
3 | How long should a user's input be delayed? For browsing the web, the UX site has a great answer. My question is about games, not forms. How long from the time a button is pressed, should the player's character react? On the one hand, instantaneous could be nice. But how would that affect the visuals? I would expect some sort of preparation for the character's actions. For example, jumping would require some bending of the knees first. Swinging a sword would involve raising the sword in hand first. Neglecting these preliminary animations could feel better, but may not look nice. So should that preparation animation not exist? Should it be 100 ms? Can it be up to 500 ms? On the other hand, many games add intentional delays to require timing by the player. Falcooooo punch! This is not what I am asking for this question, but I figured I should mention it. So assuming we want instantaneous results for the player, how much time can be designated to the preliminary animations? Does 100 ms (as referred to for the forms answer) also apply to games? Or is there some other strategy used to find a good sweet spot? And to address the inevitable "You must playtest!" answers absolutely! But what is a good starting point? As an indie developer, I don't have the ability to iterate much on animations. |
3 | My sprite walking animation code doesn't work at all This is my first time doing code for a game so I followed some online tutorials. When I got to the walking and the jumping animation I just can't get it to work whatever I do. I tried multiple codes but it doesn't work. My animation code right now animation if (!place meeting(x,y 1,Owhitetile)) sprite index Scute character jump right image speed 0 if(sign(vspeed) lt 0) image index 0 else image speed 1 if(hspeed 0) sprite index Scute character right else sprite index Scute character walk All my code so far player imput key left keyboard check (vk left) key right keyboard check (vk right) key jump keyboard check pressed (vk space) calculate movement var move key right key left hspeed move walksp vspeed vspeed grv if (place meeting(x,y 1,Owhitetile)) and (key jump) vspeed 7 horizontal colision if (place meeting(x hspeed,y,Owhitetile)) while (!place meeting(x sign(hspeed),y,Owhitetile)) x x sign(hspeed) hspeed 0 x x hspeed vertical colision if (place meeting(x,y vspeed,Owhitetile)) while (!place meeting(x,y sign(vspeed),Owhitetile)) y y sign(vspeed) vspeed 0 y y vspeed player death if (place meeting(x,y vspeed,Ospikes)) instance destroy() game restart() animation if (!place meeting(x,y 1,Owhitetile)) sprite index Scute character jump right image speed 0 if(sign(vspeed) lt 0) image index 0 else image speed 1 if(hspeed 0) sprite index Scute character right else sprite index Scute character walk |
3 | Root Animation unusual position and non root animation snaps back Im trying to do a stop animation . when i release the W key then from Run it will do this animation then goto IDLE . But somehow this is not working right. as you see in those videos below. So how do i achieve this ? Im using animation from mixamo. After Root Motion http i.imgur.com JwY98P2.gifv Before Root Motion https fat.gfycat.com ReflectingMealyCrane.mp4 |
3 | Blender to UE4 Custom rig has bones ending up in the wrong place I'm trying to create a custom mesh and rig in stock Blender 2.8 and export it via .fbx to stock UE 4.23. Unfortunately, the bones of the skeleton end up in entirely the wrong place. In short, the bones behave strangely. From what I can tell, the child of the root bone seems to fold into the root, dragging along all its own children. The weirdest part about this is that everything works perfectly fine in UE4. The animations work and so does everything else (aside from the usual scaling woes), only that added sockets end up in the wrong place. If I try to transform any of the bones in any way, the mesh goes completely haywire. I already watched Epic's latest stream on this topic and tried to replicate the thing from that stream, but it has the same problem. I tried renaming the Armature to "Root", having a separate root bone, having no dedicated root bone at all, moving the rig and mesh around, applying those movements, having different spots for the pivot point set, different combinations of all those, in addition to trying different Blender UE pipeline "tricks" from earlier Blender versions like playing around with the scaling, but nothing has any effect. From what I have gathered, renaming the Armature or messing with Blender's scaling isn't a wise choice anyway, since apparently this can cause severe problems down the road. I'm starting to run out of ideas, hopefully somebody can help me out. |
3 | How to tween animated sprites? So I have an animated sprite of 15 frames, needless to say, at 15 frames, it plays jumpy with a low frame rate. I want to increase that, by somehow tweening or generating intermediates between the authored animation frames. I found tools that do frame interpolation for video, and I'm wondering whether similar techniques could be applied to sprite sequences. Do you know any methods I could use to tween my sprites? |
3 | Synchronizing actions with animations across network I'm working on a project which allows players to take actions in time limited turns. All players are connected to a central server, which is authoritative. That means the server sends info that a turn for given player has started and the time remaining to take an action. This leads to problems when client side animations are involved. Each action has an associated animation, which takes some time to complete. The player should be able to initiate the action within given time, and the next player show start his turn when any animations complete. Obviously, the server has no notion of animations, but still needs to take them into account and start the next turn at proper time point. I'm not sure how to solve this problem. Possible solutions I came up with Constant animation time and built in delay The server will have a built in delay after an action has been taken, before starting the next turn. Problems seems an artificial construct animation times need to be exact Not waiting for animations The server can simply broadcast action effects without any delay, and go to the next turn. Problems will look very strange for the players since the effects will become visible before the animation completes possible overlapping animations across turns Sending actions along with animation times The client can send the animation time for given action, which the server will use as a delay for the next turn. Problems obvious cheating possibility (players can use the delay for "extra time") So, given above, all my ideas are simply bad. Therefore the question remains is there an existing solution for such class of problems? |
3 | Animating Two Objects' Interaction? I want to animate a character who could be doing any number of things. Say for example, I want the character to get into bed, under the covers. Do I animate the character and the sheets moving together? Separately? If separately do I need to call both animations simultaneously to ensure it fits together properly? Or, if two characters are going to hug. Do I animate them hugging or just animate them separately hugging and try to align them in game? |
3 | Should Animations in Turn Based Games Happen Before or After State Transitions? I'm planning a roguelike game and I'm unsure how to design for animations. Since a roguelike is turn based, the game model is discrete and would have no intermediate states during an animation(?). I've come up with two possible approaches Perform state transitions immediately upon input and compute the animations that occurred. In the case of a moving character, draw the animation as a member of the destination tile (instead of the static sprite) and coming from the origin tile. Compute animations before transitioning and transition the state asynchronously after the animation completes. Draw moving objects as members of their origin tile so that they arrive immediately before the state transition. Do developers of this type of game tend to prefer approach 1 or 2 (or some third option) and why? |
3 | Compensate for animation time in multiplayer network game I'm developing a multiplayer turn based card game. In certain scenarios, the clients are required to perform an animation before moving on with the game. For example, the server informs the clients to animate dealing cards to all players. This animation takes around 5 seconds. Afterwards, the server informs a client to make a move, with a timer showing how long they have to play. How can the server wait for the animation to finish before moving on and starting a timer and informing a client to play? The timer obviously needs to start after the animations are complete. I've thought of the following 1) Hardcode the animation durations on the server side and delay sending out the next message to the clients until after the duration of the animation. 2) Have the clients inform the server when an animation is complete. ..but I feel that there should be a better way. Is there any other way to do this? |
3 | My sprite walking animation code doesn't work at all This is my first time doing code for a game so I followed some online tutorials. When I got to the walking and the jumping animation I just can't get it to work whatever I do. I tried multiple codes but it doesn't work. My animation code right now animation if (!place meeting(x,y 1,Owhitetile)) sprite index Scute character jump right image speed 0 if(sign(vspeed) lt 0) image index 0 else image speed 1 if(hspeed 0) sprite index Scute character right else sprite index Scute character walk All my code so far player imput key left keyboard check (vk left) key right keyboard check (vk right) key jump keyboard check pressed (vk space) calculate movement var move key right key left hspeed move walksp vspeed vspeed grv if (place meeting(x,y 1,Owhitetile)) and (key jump) vspeed 7 horizontal colision if (place meeting(x hspeed,y,Owhitetile)) while (!place meeting(x sign(hspeed),y,Owhitetile)) x x sign(hspeed) hspeed 0 x x hspeed vertical colision if (place meeting(x,y vspeed,Owhitetile)) while (!place meeting(x,y sign(vspeed),Owhitetile)) y y sign(vspeed) vspeed 0 y y vspeed player death if (place meeting(x,y vspeed,Ospikes)) instance destroy() game restart() animation if (!place meeting(x,y 1,Owhitetile)) sprite index Scute character jump right image speed 0 if(sign(vspeed) lt 0) image index 0 else image speed 1 if(hspeed 0) sprite index Scute character right else sprite index Scute character walk |
3 | Turn based game in HTML JS CSS new joiner messes with state of game while animations are still running for other players I developed a playing cards web app using HTML JS CSS. Communication with the server is performed using WebSocket. The server is developed in Java Spring. The game proposes to join one of the many available tables where you can immediately perform an action. The players who are already in the table are perfectly in sync with each other, as when they receive a message from the server, I show a screen overlay preventing them from clicking on any element on the table while an animation is running. After the animation is terminated, the game becomes available and runs normally. My problem is that if a new player joins the table after a message has been sent by the server, then he can perform an action while the animation is still running for the other players, thus starting a new animation for them at the same time and the game becomes messy. Is there a way to either prevent the new joiner from performing an action before the animation has ended for the rest of the players ? Do you have any other idea how I can solve this issue ? Thanks for your help |
3 | Are the Minecraft animations hardcoded into the game? I would like to know how the animation system works in minecraft. I get a feeling that all the mobs are hardcoded into the game. Did notch really sit there and create the matrices for all the animation bones by hand? I like recreating games for fun, so I would like to know how he did this. Also, if he truly does hardcode them... is there a better way? |
3 | Putting each animation on a thread I'm trying to make my game as friendly to multi core as possible. as such, i'm putting each animation on a new thread. I was hoping someone could check out my proof of concept code in java an example of usage is as follows ThreadedAnimation ta new ThreadedAnimation() Thread tat new Thread(ta) tat.start() ta.getCurrentFrame() where the threadedAnimation class is as follows public class ThreadedAnimation implements Runnable boolean init false, toFinish false, toStop false synchronized info short delay delay in ms Image frames array for the frames public Image currentFrame null for pulling the frame int currentFrameNumber 0 simmillar representation. to go barebones, I would just return the int and not the number. public ThreadedAnimation(short del, Image fram) if(del.length fram.length) currentFrame fram 0 else System.out.println("bad animation detected") public ThreadedAnimation() delay null frames null Override public void run() if(init) while(!toFinish amp amp !toStop) currentFrameNumber 0 while(!toStop amp amp !(currentFrameNumber gt frames.length)) long currentTime System.currentTimeMillis() while((System.currentTimeMillis() currentTime) lt delay currentFrameNumber ) The reason I don't put TrySleep(delay i ) is because the thread is interrupted every time we try and get the image. TrySleep(10) currentFrameNumber currentFrame frames currentFrameNumber private void TrySleep(int i) try Thread.sleep(i) catch (InterruptedException e) e.printStackTrace() public synchronized void finish() toFinish true public synchronized void stop() stops animation where it stands and kills toStop true public synchronized Image getCurrentFrame() return currentFrame |
3 | Blender to UE4 Custom rig has bones ending up in the wrong place I'm trying to create a custom mesh and rig in stock Blender 2.8 and export it via .fbx to stock UE 4.23. Unfortunately, the bones of the skeleton end up in entirely the wrong place. In short, the bones behave strangely. From what I can tell, the child of the root bone seems to fold into the root, dragging along all its own children. The weirdest part about this is that everything works perfectly fine in UE4. The animations work and so does everything else (aside from the usual scaling woes), only that added sockets end up in the wrong place. If I try to transform any of the bones in any way, the mesh goes completely haywire. I already watched Epic's latest stream on this topic and tried to replicate the thing from that stream, but it has the same problem. I tried renaming the Armature to "Root", having a separate root bone, having no dedicated root bone at all, moving the rig and mesh around, applying those movements, having different spots for the pivot point set, different combinations of all those, in addition to trying different Blender UE pipeline "tricks" from earlier Blender versions like playing around with the scaling, but nothing has any effect. From what I have gathered, renaming the Armature or messing with Blender's scaling isn't a wise choice anyway, since apparently this can cause severe problems down the road. I'm starting to run out of ideas, hopefully somebody can help me out. |
3 | Timing in fighting game using animations time? I am developing a 2D fighting game in C . I have made the basic components such as moving, guarding and even a combo system that works perfectly well. My main concern now is that I want the game to be as balanced as possible, and thus I am entering a testing phase. I am even requesting the help of my father to play against as no AI has been implemented (yet). In the game you can chain attacks using a punch kick (PK) button. But you can also charge the attack by pressing the PK button longer, which basically pauses the animation, resuming it when the attack is fully charged or the player releases the button. One thing that I have noticed is that if your opponent is simply pressing the PK button when being hit, it can counter attack pretty easily if you end up charging your attack. This behaviour basically makes charging useless, because it can never go through if your opponent knows that. So my point is that I need to add a delay so that the counter cannot occur (I do not want it to, because the game is based on an actual PS2 game where you cannot counter that way for the record, there is a way to escape, either by pressing the guard button, or by hitting a button at the right timing to teleport behind and counter). To add this delay, I can either modify the actual duration of the "damage" animation so that it does what I want or I can internally add a timer where the character enters a state where he cannot do anything. I would want to go for the first one, since that way you SEE that you cannot counter using a punch since you are still in the damage animation. But the thing is that each character has its own set of animations and thus in theory, the developer or the designer (which is me in both cases) can modify the duration of one character while the others still have an old value. My question is thus more on the design level. Is it a good idea to let the timing be decided via animation duration? Is it what is actually done ? If I have fifty characters when I discover another timing issue, it would mean to modify the animation of each and every one of them... But adding a timer internally seems more like a patch that actual fine tuning... |
3 | Pre calculating skeletal animation data I'm working on skeletal animation and so far I've got the skeleton drawn with interpolated animation working (just on the cpu still). I was thinking about changing my file format for my skeleton and animations to have fully calculated matrices stored. Right now I calculate my matrices recursively by multiplying the parent's world matrix(absolute matrix) by the childs joint matrix, same thing with each frame of animation. I think it would be a good idea to just export all of this pre calculated to my model format so I could just send these matrices to the shader for skinning. Is there any reason I should not do this? Edit Calculating the matrices is negligible by itself on a rather small skeleton anyway but is there any reason I should calculate them at run time or just pre calculate in my file format? I think this sums up my question better. |
3 | HTML5 Canvas Tileset Animation How to do in HTML5 canvas Image animating? I am have this code now http jsfiddle.net WnjB6 1 In here I am can add animations something like Animation.add('stand', 0, 1, 2, 3, 4, 5 ) But how to play this animation? My image drawing function is drawTile(canvasX, canvasY, tile, tileWidth, tileHeight) Animation 'stand' return 0, 1, 2, 3, 4, 5 I am need something like when I am run Animation.play('stand') run animation from 'stand' array. I am try to do this something like one day, but no have more idea how. ( Thanks and sorry for my bad English language. |
3 | How to avoid wagon wheel illusion of a rotating gun barrel reversing direction? I didn't know which forum to post this in, but I'm going to try here first. I am making a shotgun with 3 barrels which spin. However, I also want it to have kickback in the animation, but every time I add that recoil it breaks the animation, making a strange wagon wheel style illusion. No matter what I try, it always reappears once I add the recoil. Here is the animation Here is how the animation is supposed to be perceived, with the barrels spinning in one direction But this is what I often see when I look at it, where it seems to snap backwards one step It may be a bit hard to see, but if you look at it long enough it will flip between the two, similar to that animation of a ballerina which can be spinning in either direction. I have tried having it only spin when it is down, only spin when it is up, changing the interpolation of the spinning and of the recoil, everything I can think of, but none of it works. How do I solve this problem? Can I stop the optical illusion while keeping the recoil? |
3 | Exporting the frames in a Flash CS5.5 animation and possibly creating the spritesheet Some time ago, I asked a question here to know what would be the best way to create animations when making an Android game and I got great answers. I did what people told me there by exporting each frame from a Flash animation manually and creating the spritesheet also manually and it was very tedious. Now, I changed project and this one is going to contain a lot more animations and I feel like there has to be a better way to to export each frame individually and possibly create my spritesheets in an automated manner. My designer is using Flash CS5.5 and I was wondering if all of this was possible, as I can't find an option or code examples on how to save each frame individually. If this is not possible using Flash, please recommend me another program that can be used to create animations without having to create each frame on its own. I'd rather keep Flash as my designer knows how to use it and it's giving great results. |
3 | Maintain proper symbol order when applying an armature in flash I am trying to animate a character's leg in flash CS 5.5 for a game I am working on. I decided to use the bone tool because it's awesome. The problem I am having, however, is that for my character to be animated properly, the symbols that make up his leg (upper leg, lower leg, and shoe) need to be on top of each other in a specific way (otherwise the shoe looks like its next to the leg, etc). Applying the bones results in the following problem the first symbol I apply it to is placed in the rear on the armature layer, the next on top of it, and so on, until the final symbol is already on top. I need them to be in the opposite order, but arrange send to back does nothing on the armature layer. How can I fix this? tl dr The bone tool is not maintaining the stacking order of my objects, please help. Thanks for helping ). |
3 | 2D Scaling a character with multiple RigidBody2Ds? So, this example is in the Godot Engine, but other engines porbably have this kind of problem, too I have a character with multiple RigidBody2Ds, that also has a bone skeleton for animation over them. Now, the problem is, that Godot's physics engine handles the transforms of the bodies, so they won't scale properly. If you scale the children (CollisionShape2Ds and Sprites) the positions will be off. Is anybody aware of a proper way to work around this? Being able to scale these kind of characters would be awesome. Thanks for all your answers. Greetings, Footurist |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.