• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

128 Neutral

About reaper93

  • Rank
  1. 2D Animation Keyframe Export

    I ended up finding one in the end, the tool is called Skeleton v1.1 for anybody who finds this thread in the future in need of a similar product. The GUI editor is fairly decent for a free product, as it does everything I need at no cost and it is fairly stable, so props to the coder. http://www.freewarefiles.com/Skeleton-V_program_22273.html
  2. 2D Animation Keyframe Export

    I am looking for a tool that will allow me to define 2D animations(skeleton) using simple shapes and keyframes, but then export the keyframes into textual data which basically defines the position and orientation of the shapes making up each frame. Its really the positional/rotational data I am interested in. I have looked into a tool called Synfig that seemed promising but it does not do the custom export or textual export data that I require. I really want to avoid writing a tool myself in C# as I have enough coding to be getting on with, does anybody have any ideas, my last resort will probably be to go back to 3DS Max and create animations in there, then write a custom export script ignoring the Y axis (or Z). I imagine the maths will be a little more complex tho as it wont just be X,Y positon + theta for rotation angle anymore. If there are any tools that can do what I need, please shout :)
  3. Okay, so i have made some progress. I now have a ragdoll in my game world using Farseer Physics engine with my own textures tied to the different body parts, obviously he is all floppy, and cant do anything like run, walk, standup... Now what I have decided to do is have some animation data that will basically control the 2D ragdoll sprite, there will be a weighting system, so when the character is idle, running/walking w.e the animation system with have 90% of the control, at which point the postional and rotational data from the keyframe data will be applied to the model. Whenever there is a collision however or something happens to the character in the physical world, the weighting system will favour the physics over animation for a short period of time for each successive collision, (time probably being relational to the force of impact). Now the only thing really standing in my way at the moment is generating animation data that will give me positional and rotation info, I could write a tool to allow me to create animations, but I want to avoid this if at all possible, does anybody know of anything that is already available that will allow me to define basic line drawings in a root -> child structure and allow me to create keyframes and then export the positional/rotational data for each frame into a text format that I can parse in my engine? Will a flash editor let me do something like this? edit: http://synfig.org/ this tool seems hopeful, need to investigate export formats [Edited by - reaper93 on March 3, 2010 4:59:18 PM]
  4. yes thats exactly the kind of effect I am going for FunkyMonkey, but obviously mixed with preset animations, blending between the two somehow, dont see why so many people think it would be odd. I have already integrated JibLibX into my XNA game as I was going to go with the solution I suggested above but I will take a look at what Box2D can offer before I go ahead with that, ideally I want to stick with the 2D approach and 2D physics engine, I heard the 360 can struggle with heavier apps. Somebody has already started a port it seems, not sure how complete it is, but its a bonus as it will run on the 360 which is my target platform. http://code.google.com/p/box2dx/ hmmm wheres the source code... only dlls, looks like farseer is in a much bettr state. Thanks alot for your input! Reading the article too. [Edited by - reaper93 on March 2, 2010 6:28:59 PM]
  5. Quote:Original post by JTippetts If you're going to do a render to texture of the model, why not just use an orthographic view and just render it to the screen instead? Not sure why you need to do an intermediate RTT step. You can still get that "spritey feel" to the game due to the ortho projection, minus all the weird hassle of trying to 2D-ify ragdoll. Is this just basically projecting the rendered scene onto the viewport without doing the extra transform from camera -> world space? My 3d maths is abit rusty, havvnt done much graphics programming lately.
  6. Quote:Original post by antmj2317 Hi Reaper, Knowing only the basics of physics, I have to agree that it would be very odd to see this effect in 2D. Depending on what happens to the player(being hit or being burned) the player would respond with different predefined animations. I'm not sure if there's a way around and achieving a realistic reaction without moving a fully rigged model. You can of course construct the images and just direct the code to the proper animation in conventional fashion. Yeh, I have already considered this solution but the problem I have with it is it is just too precalculated, I may want more dynamic movement for example he gets hit on leg, so his body gives way, or he gets hit on the head and basically the physics model just takes over allowing for natural movement. Or lets say he was trying to jump onto a ledge, but he just misses it and his foot gets caught on the edge, I would expect him to fall flat on his face while colliding with the floor. I will only be going for a basic stickman style of artwork but I want to make up for the simple styles with immersive player-world interaction. What if I do the work in 3D but ignore the collision detection tests in the Z axis and then simply render the results from a fixed camera angle. That way we still get a 2D perspective of the game but the motion and physics are all fully modelled? So something like: Start frame 1.From sprites in the scene, do per pixel collision tests. 2.If collision is detected for main player character, apply a force to the player model (full 3d physical model, in memory only, not displayed). 3.Allow physics engine to work out new model position. 4.Render model from a side view onto a texture in memory. 5.Use that texture as the sprite for the player character. End frame Does this sound viable? Not quite sure how I would map the collision detected from the sprite into a position to apply a force on the actual 3d player character, maths question I suppose. ps Thanks for the responses so far, all helpful, any suggestions or obvious downfalls of the method i have suggested would be great.
  7. Quote:Original post by Zahlman I'm a little confused how you expect "ragdoll physics" to work with sprites. Are you going to be applying 2D rotations or something? I think the basic idea is that you define a model skeleton (basically, the geometry of a stick-figure), and have the physics calculate the final position of each endpoint; then, along each bone, you render the corresponding "flesh" sprite. I don't see how keyframes would figure into it. That said, I can't imagine it looking terribly good with 2D artwork. :/ I see your point about the ragdoll without rotation. The effect I am going for is basically a 2D game but I want the player character to be effected by the world environment, hence if something is thrown at him, he will react realisticly rather than some predefined animation that is basically just repeated all the time. Regarding the approach you mentioned, I imagine your talking about skinning, and just modelling the skeleton in a tool like 3DS max, I will have to look into the fbx or .x file format to see if they support the physics constraints I will need. Perhaps I will have to just got for the 3D player character, and use a skeleton system with skinning like you said, from there I can do all the character ragdoll calculations in 3D. I would probably just ignore the Z or Y (whichever is forward/back) when doing collision detections. [Edited by - reaper93 on February 27, 2010 5:50:04 AM]
  8. I have recently started work on a 2D platformer with XNA, the game basically uses sprite animations, now for me these sprite animations for player movement are a little restrictive and as seen as I am doing per pixel collision I thought it would be clever if I had a blend between ragdoll style physics and sprite animation. i.e player character runs into a wall, on collision there is a blend between current animation frame and ragdoll physics Is there any toolchains or custom data format out there that are specially made for 2D sprite based models with extensions for bones/keyframe animations or will I have to write my own? Ideally I want to keep my current sprite animations but I dont think this is going to be possible as there is no way of linking this together with physical data in a sprite format not unless something exists like I mentioned above... I could spend some time in writing a custom max exporter/importer but I want to avoid this if at all possible, besides MAX is designed for creating 3D models, if I am mistaken please say. There is a tool I found that converts a 3D model to 2D sprite sheets, which is along the right lines, but its animations/bone data that I want as well. http://www.torquepowered.com/community/blogs/view/16207 Can anybody give advice or make any suggestions? Thanks Rama
  9. Java problem

    so your saying if you have this code it breaks? Quote: bool flag = false; while(!flag){ flag = true; } If thats the case then theres probably something wrong with your build enviroment because that is perfectly valid code, otherwise check your stack trace, logs and try debugging, its hard to believe that a simple while loop wont work unless your programming it wrong.
  10. Arrays of Classes

    When you define an array of pointers they will simply be pointing to some random memory location. You have to alocate your instances of your objects and store its pointer address in the array using new Also I am unsure about your design methods, you said you have 11 subclasses??? It is a good idea to seperate objects that have different responsibilites and roles from each other so you can encapsulate behaviour. You can also use inheritance to allow objects to inherit base level functionality. Is this what you mean when you say you have 11 subclasses???
  11. XNA vs DirectX

    One good point about using XNA is you can easily distrubute a build to the 360, dont rule that out. And plus its much easier to get a completed product using XNA then a one man army stunt with C++/DX. C sharp is very powerful and if you use it properly, the speed loss can be easily worth it.
  12. Veterens and experienced..... HELP US!!!!!

    don't get dragged down to much with what language to learn, most programmers know at least 2 or 3 to an intermediate - advanced level and learning a new one is usually straight forward once you have your grounding. Just because you start learning C++ for example does not mean you will have to start from scratch when moving to another language. When I was at University we did purely C++, but after graduating last year I have used C++, Java, C#, Python and XPath all professionaly, key thing is to get good programming with a language of your choice, then afterwards progression to another is usually easy. The only recommendation I would make it make sure you start on a language that is Object Orientated, hence stay away from C, you need OO these days unless you want to go into driver development and really low level stuff :) There is plenty of books out there which will be more useful then any forum posts for learning a language. Good Luck!
  13. (C++) Passing a class as a functions argument

    Well it depends, if your function declaration takes a reference: Hero myHero; void print(Hero & hero) { hero.get_name(); //Returns the name } However if you use a pointer: Hero* myHero = new Hero(); void print(Hero * hero) { hero->get_name(); //Returns the name } Don't try to fight against the compiler, learn the language first then write the code. In C++ you can pass parameters into functions in two ways: 1) By Value 2) By Reference If you are dealing with complex objects you should never really pass by value as when the function is called it will create a full copy of the object on the stack. Pass by reference means it passes "a reference" to the object you passed in, hence it basically reuses the object you created in your main function. If you are not going to modify it you can pass it as a const reference (but make sure your getters are const functions). In the first example above you are passing by reference, in the second you are passing by value but it is not inefficient as you are only passing a pointer. A pointer is basically a memory address and takes up 4 bytes of memory, even though your object itself is larger, you are just passing the memory address of where it lives, which is why you have to use the dereference (->) in order to access its member, by reference however gives you direct access which is why we can access it using (.) If your not getting any output it could be an issue with how you are getting / setting your string objects, it could be that you are returning a new instance of string (hence its empty) or you are not setting them properly. Just a case of debbuging and reading up on the std::string (which I presume you are using)
  14. (C++) Passing a class as a functions argument

    You don't need to specify the keyword class in your function definition You should probably make your variables private unless your going to use inheritance and create derived versions of hero btw, besides you have provided setters and getters for all the stats so they are accessible anyhow.
  15. Bad pointers in class destructors? (C++)

    its good coding practice to initialise pointers to null and make sure you check for a null before attempting to use them, also make sure you null them out after you have deleted the memory, it can help to avoid debugging nightmares, esp as your code base gets larger
  • Advertisement