Smooth Character turning / Natürlich Charakterdrehung

  • #10, by afrlmeMonday, 22. September 2014, 17:39 10 years ago
    I don't know how long it would take me to me write functions for this but first things first would be for the devs to create the internal hook function code.

    Otherwise it means we have to mess about ourselves creating loops to listen out for the various character states, main character is no problem but things start getting more complicated if you take any npc characters into account that move around the screen.

    Imperator

    7278 Posts


  • #11, by MachtnixTuesday, 23. September 2014, 18:11 10 years ago
    I don't know how long it would take me to me write functions for this


    It was a hidden compliment... :-)

    Thread Captain

    1097 Posts

  • #12, by Lord7evenTuesday, 23. September 2014, 20:39 10 years ago
    I thought a bit more about this "Turn-Function". I guess there are probably two ways to do this.

    The simple way:
    ... would be to add some checkbox like "Turn before move/look in direction (or at an object)". And I guess this would be not that hard for the devs to make it, since most of what's needed for this is already there. You can set that the character looks at the object that was clicked in the first "Game Settings" screen. Characters can change their angle of movement by waypoints. And it also shows the correct angle of walking animation. ;-)
    So the engine should know in which direction the character looks and to which angle the character turns to do an action or walking. If you fit that together, it's not that hard to change the characters angle one by one until it gets to the right direction.
    But this would be more or less a cheap way to do it. You could not set animations for the turning, it would simple just set the standing frame for a few milliseconds.

    The right way:
    ... would be the ability to set turning animations. I just think about the 3d models. But I would have no idea to do something like that. ;-)

    Don't get me wrong. I have no idea how the devs programmed all the actions, I just thought out loud here and that may be something for the future to think about it. A hook function like mentioned in this thread would be very helpful for the moment.

    Newbie

    40 Posts

  • #13, by afrlmeTuesday, 23. September 2014, 21:29 10 years ago
    I think the rotating of a character is more complicated than that. It depends on how you want it to turn... Sure you could have the character stop & then rotate through the available character directions based on current direction to target direction, but I think that would just interrupt the dynamic flow of movement.

    Stand still & turn & look down at your legs & feet when you do & see what happens. People don't just swivel with feet planted on the ground, well not unless you are on a smooth surface. When walking & turning your foot on the ground swivels while your other leg/foot keeps the momentum going, even if you slow down slightly.

    The complication in this is preventing the regular begin walk from triggering & replacing it with a script that gets current direction & calculates target direction & works out which will be the direction it will end up facing before setting off as well as determining whether to rotate clockwise or counter-clockwise.

    On top of that, you need to save the destination & destination actions & then restore them for when character can start walking.

    Rotation while character is already in motion would be quite difficult I think as to make it look realistic you would have to get current walk frame, slow down the character & force the frames during rotation to make sure it plays the correct frame.

    I do believe that I could calculate the angle of the next direction based on the position relative from character current position to direction position, but this does not take into consideration the way system borders or the way system paths. I've already done the calculations for aligning characters to an object or other character. The scripts for that are available on the wiki but they aren't perfect as they are calculated with the character center which as you know is often placed in the feet region of the character.

    Imperator

    7278 Posts

  • #14, by MachtnixTuesday, 23. September 2014, 21:38 10 years ago
    I think, Visionaire starts as a tool for 2D-gaming. It's core is only a flat scene for some flat characters to move on. This 3D-thing is a big step into a new universe. It's at its beginning yet. All this new problems (lighting, polygons, texturing, shadows, camera view, perspectives, and, and, and...) have to solve now for a long time and there will be A LOT OF new really big problems. I think to turn a character is one of this (a little one...).

    But for the "simple" 2D-developing you don't need a real "turn"-option, because it depends on the wishes of the game-maker if he wants them. All "animations" are simple frames, made by drawing or maybe a 3D-tool. You can realize a fake turn with on-board-tools, it's a hard work, I know.

    I think, Vis has to solve all this old 2D-bugs and possibilities first BEFORE discovering this new 3D-country. Better way-systems. Use flat movies as objects. Better item management. Editor functions. Better memory management. Better sound import, and so on.
    Its like railway: you have reputation trains at 300 km/h for showing-off, but you can't get from one village to another village next by... ;-)

    If I want to use more real characters I will work with Unity3D or something like that. Because: 3D-problems multiply themselves. You have imported 3D-people walking now. Fine. Looks great, does it? Suddenly you want a special light. Spots. Sunlight. You want clouds or fog. Transparency. You want smooth shadows. You want reflexions. You want collisions. Physically correct of course. Windblowing. You want normals or displacement, and, and..... In Germany we say "Es ist ein Fass ohne Boden"...
    I'm not sure this is the right way for a little developer team... For me a GOOD 2D-engine is better than a BAD engine for everything...

    Sorry, thats my opinion.

    Machtnix

    Thread Captain

    1097 Posts

  • #15, by afrlmeTuesday, 23. September 2014, 21:56 10 years ago
    I wasn't talking about the 3D side of the engine at all. Completely irrelevant to me as I have no intention of using it.

    I was talking about the math & equations of making the character rotate, whether basic or realistically.

    I agree that the 2D stuff should be focused on first & it is the main priority still. The devs are fixing the bugs they find or that are mentioned & they have been releasing updates quickly (in comparison to before).

    The editor & ui stuff though is not as simple to fix, based on what I've been told. It would require a complete rewrite make the editor more dynamic & modern as it would require a custom ui. The current one is built around wxwidgets, which has limitations. In other words, it's not a quick fix.

    Imperator

    7278 Posts

  • #16, by MachtnixTuesday, 23. September 2014, 22:22 10 years ago
    It wasn't against you.
    Lord7even wrote s.th. about the "right" way using 3D. For me it's the luxurious way ;-)
    Only saying that's a "real" character turn is the very last point on my to-do-agenda. And thats right: turn isn't that simple.
    You know the movie "Asterix and Cleopatra?" The Egyptian queen is on her magnificence litter to visit Julius Caesar (incognito of course...) and at the end she turns back... lol
    I played some Final Fantasy X - XIII not long ago. Great renderings. But NO convincing character turns... it looks funny.

    Machtnix

    Thread Captain

    1097 Posts

  • #17, by afrlmeTuesday, 23. September 2014, 22:48 10 years ago
    I think that is called "flipping"? Where they instantly snap the character from one direction to another. I saw that in one of the recent top seller commercial games & I can't say that I was very impressed to see the character snapping instantly from front to back as it just looked wrong.

    I don't think FF games have ever really bothered about animating things correctly. I have played FF7 countless times over the years, shit graphics & all but their character animations have always been lacking. They tend to mostly just focus on making the games look pretty from about FF10 onwards.

    Imperator

    7278 Posts

  • #18, by MachtnixTuesday, 23. September 2014, 23:33 10 years ago
    If I play a 2D-game like Monkey Island 1+2 it doesn't bother me, but If I have this excellent renderings it seems miscasted. Because often there are 3D-worlds with realistic environment. But Final Fantasy shows a game style of well coloured fantasy without great realistic demands. It's only fun.
    If I play The Last of Us, such flipping would make me laugh... (Sometimes Ellie turns looking into the wall, but the character movements are mostly perfect...)

    Machtnix

    Thread Captain

    1097 Posts

  • #19, by afrlmeTuesday, 23. September 2014, 23:45 10 years ago
    Ooh I played The Last of Us when I was on vacation in the UK. Played it last year as well. I petted the giraffe, which I completely missed the first time I played it. Really good game considering it comes from developers of "Crash Bandicoot" I think they made? I played their Drake games too which were sort of fun, but they felt like cheap Tomb Raider knock-offs & they were full of annoying pun jokes.

    I think it was Watchdogs game that has the flipping character, but I'm not 100% sure. I played it a couple months back. That game was really overrated I think as are the GTA games. I much prefer red dead & mafia 2. Saints row 3 & 4 were fun to play as they don't take themselves very seriously.

    Imperator

    7278 Posts

  • #20, by MachtnixTuesday, 23. September 2014, 23:50 10 years ago
    Now it TURNS to off-topic,.... *lol*

    Thread Captain

    1097 Posts