Jump to content


  • Content Count

  • Joined

  • Last visited

About alex2020

  • Rank
  • Birthday October 30

Profile Information

  • Gender
  • Interests
    game dev, xna, mono game
  1. ok for simplicity i skipped the "only per key frame check" and check for variables and tags in every update loop. But i found another problem. In my landFromJump animation i placed a variable (setNextAnimation = idle) at the last frame. Its never reached because of the delta time. If i place a variable or tag at the last 17 frames of the animation its never reached. (1000 frames / 60 fps => 16.6 frames) If i place it before frame 982 its working fine. if (animator.FrameData.AnimationVars.ContainsKey("setNextAnimation")) { if (animator.FrameData.AnimationVars["setNextAnimation"].StringValue != "") { string nextAnimation = animator.FrameData.AnimationVars["setNextAnimation"].StringValue; animator.Transition(nextAnimation, 0.5f); } } I tried the AnimationFinished Event but it don´t know the variables either if i place them on the last frames.
  2. Hi i wrote a class for script processing (for the tags and variables) but i don´t want it to run on every update. Is there a way to check if the frame is a keyframe ? like: // pseudocode: if (animator->isKeyframe()){ doMyScript(); }
  3. Hi, i´m trying to implement some kind of normal mapping in monogame. For this i have to switch the character map in the draw loop. Is this possible? It seems like i have to wait until the next update until the character map changes takes effect. I draw the player to a rendertarget, then i push a character map to the player (the normal map) and draw the player again to my normalmap-rendertarget. Then i use a shader to combine those two rendertargets. Or do you have a better idea for this? Maybe 2 player objects with different character maps, but i thinks it will be difficult to keep both in sync...
  4. how do i use the new SpriterDotNet.MonoGame.Importer.dll ? greetings alex
  5. Sry for the late response. I got it working. After updating from vs 2015 to vs2017 i created new projects with .net Standard and copied the code over. For some unknown reason nuget installed everytime in one of my libs old Spriter 1.5.0. After Clearing the nuget cache and manually deleting the files nuget worked again. But the monogame.portable was not working. I had to remove monogame.portable and add monogame.portable.opengl to my Windows project. (Android worked) I dont know why the automatic switch for the portable wasnt working. But now its working again.
  6. I created a new library in dot net standard 2 and copied my code over. The code is working (no Errors) and spriter.net 1.6.1 is includet via nuget. My Android and windows game projecty include the lib and complain that monogame is not compatible with dot net Standard 2.0. (or 1.0) How is your project Setup for such a case?
  7. I´m currently using Portable Class Libraries for my shared code in monogame. If i update your package in nuget to 1.6.1 it tries to install around 30 .net packages and fails. Would you recommend to create a new shared project in .Net Standard and copy my old shared code over?
  8. My MonoGameAnimator does not have a public Method GetPosition as shown in your link. I am using the nuget Package 1.6.0 Am i missing something?
  9. Hi Looda, thanks for the nice monogame implementation. is there a easy way to get action point information? i use this as helper method: public Vector2 GetPointPosition(string pointName) { if (hasPoint(pointName)) { return new Vector2( animator.FrameData.PointData[pointName].X, animator.FrameData.PointData[pointName].Y); } return Vector2.Zero; } private bool hasPoint(string pointName) { return animator.FrameData.PointData.ContainsKey(pointName); } but this gives me only the original spriter point without scaling, flipping or rotation from the base animation. So my question is: Is there a way to get the transformed action point or a helper to do this for me? Background: Im making a mono game with mouse aim (run and gun style). So i m having a player animator with feet, body and head. And a 2. animator with the arms and gun animation. i rotate the arms animation to point toward the mouse. animationArms.Rotation = rotation; But the action point at the gun for spawning bullets is not rotated. regards alex
  • Create New...