Personal Website Made With Armory

If I was misunderstand :pensive:
I was imagining the pages changing like a web site…
Don’t worry about it.

I’m looking forward to more.
Thank you!

1 Like

@WLv0 Yeah, it won’t work with page changing… it will work more like a normal game.
You go to a cube/hotspot (later to be replaced by something more pretty than a cube) and by clicking on it, or pressing space, it will open a new “page” but always in 3D space and in-game.

I’m really waiting for the Grease Pencil to get full implementation, because then we could maybe use Armory as a true replacement for Flash. Creating an all-Armory website would then be as possible as an all-Flash website.
But Armory for web seems like a cool thing with a lot of potential.

1 Like

Thanks @OkyDooky!
…And perhaps create entire menus and UI’s with Grease Pencil too, like for the RPG’s and Beat them Up life bars, that would be cool :slight_smile:

1 Like

I have one doubt.

https://rogper.github.io
Now the character just moves (more like pans) Left, Up, Right, Down…

  • Is it possible for it to rotate in the direction it walks!?

My plan to solve this would be to make 4 walk cycles animations, one with it rotating to each side, but, if we can do it with the nodes, I could just make one walk cycle animation for all directions.

I have tried to give it some rotation force, but then the character just keeps spinning :laughing: :sweat_smile: which is a good Super Mario World kind of move, but not the desired for this case.

I hope this Saturday I can continue the work, the last one I’ve been sick with a normal but nasty flu!

  • Is it possible for it to rotate in the direction it walks!?

Yes… But a direction vector should be normalized.

Here is some example:
look_to_vector_example.blend (965.2 KB)

You can manipulate the direction vector to make the object move relatively to where the camera is facing using the Vector to Orientation node and a horizontal axis object

2 Likes

Hi,

You don’t need to calculate the direction in which you move, since you are the one inputting the movement directions via WSAD or click inputs. So, you just need to turn according to inputs.

So, for each “turn”, you can use the “Tween Rotation” nodes and rotate your character when any of WSAD keys are pressed.

For example Keyboard[Started, D] -> Tween Rotation-> Set Object Rotation. This would gradually rotate your player when D is pressed. Then you can play your walk animations and move the player.

1 Like

Thank you very much @knowledgenude and @QuantumCoderQC!

(This was edited after testing the demo file :slight_smile: )
Tomorrow I’ll implement both methods before making a decision!
Just tried the @knowledgenude demo and works perfectly! Awesome actually, as even works with diagonals and such!

I’ll report and show the results here tomorrow!
Until then!

1 Like

https://rogper.github.io
Good morning friends!
Well, I actually had partial success.
I used the simplest way possible described by @QuantumCoderQC, because:

  • Seems to fit better in my previous configuration.
  • I like the more Japanese RPG feeling it has.

The updates:

  • The character now turns (hard turns actually) in the direction it walks;
  • Both keyboard and mouse click work.

    The thing is :thinking: I most surely made it all wrong because the Tween Rotation seems to don’t do anything at all. My guess is that it should smooth the turns, correct? As such I have a few questions:
  • What the “Tween Rotation” node is actually supposed to do!?
  • I had a really hard time using “Degrees” values to turn it in the correct direction. It would always turn a little bit off, when to the sides, and when turning to the back (180º) would just result in a 90º turn to the left. Using Quaternion rotation values apparently solved it completely! Why is that happening!?

Best regards
Rogério

1 Like

I’m starting to understand @knowledgenude example! :slight_smile:

I was able to implement it too :slight_smile:

I like the more RPG look better, but this one does allow for smooth turns :smiley: and for a natural movement.

The fast hack I made:

1 Like

A friend of my confirmed me that it works on his cell phone too :slight_smile:
…on mine it’s all black… I did use some things that aren’t on the default “mobile” render path… I need to try the exact default settings.

That was my first thought, as well! You could even use it to produce effects, since it’s scalable, programmable, and can have effects applied to it and even use textures. Plus, this way we can have a greater range of 2D games. Could even have anime cinematics that would all be done in-engine.
One main benefit to using Grease Pencil for UI is it is basically scalable vector graphics+ and would be resolution and aspect ratio-independent.

1 Like

Both the examples looks cool.

as for the rotation tween, it interpolates rotation between two given rotations with time. at each interpolation step, tick output is called. You may read more about these nodes in the documentation at armory wiki page.

For better result in case of tween node, connect a set object rotation node to the tick output of the tween node. and connect rotation output of the tween node to the rotation input of set object rotation node. Now the object should turn smoothly.

But I think @ knowledgenude’s method looks quite good on the character.

1 Like

Thank you very much @QuantumCoderQC for the added explanations about the tween rotation! I now understood it completely!
If not earlier I’ll try it first thing on Saturday! :slight_smile:

1 Like

Hello friends!
@QuantumCoderQC I’ve implemented your tween rotation advice and it now tweens stably.

https://rogper.github.io/

  • I had to make some duplication to have motion and rotation separated because the motion has to be in “Down” mode and rotation in “Started” mode for the 3 different inputs.
  • I had to include a “Get Object Location” node to define the original position on the tween rotation nodes

Bugs/unwanted things, caused by this:

  • Keyboard movement doesn’t understand diagonals (2 buttons pressed simultaneously) so just keeps the last one… which is acceptable I think;
  • Mouse and Touch work great when you press and release each time you want to go a new direction… :thinking: unfortunately if you keep the mouse/touch pressed while dragging the mouse to other rotations it has no way to know that it should turn to the respective side, so it just keeps the last position.

Is there a way to force the user to press once to go to each direction and as soon the mouse leaves the zone hot spot the charactor stops until it’s pressed again a new direction?

1 Like

I’m such an idiot :sweat_smile:
I have animated my walk cycle and I’m don’t make any idea how to play it on the armature :thinking:
I’ve made many attempts with the most promising node “Play Action From” but it just froze all the motion. I’ve tested it in several locations even directly connected to the keyboard output.

(still WIP, I’ll improve it later, it’s just to test the logic)

Ok, so questions:

  • Do I need to make a logic node tree for the armature too!?
  • Can’t I just do some node magic like: If motion is true then play the “rogper-Walk” Action on the armature “rogper”?

Awesome! Looks much better now.

Did you mean “Get Object Rotation Node”? I forgot to mention that in my previous post…

This becomes a bit complicated, since now you have to rotate the player 45 deg instead of 90. And look for all possible button combinations.

If such diagonal rotations are needed, I would suggest to go with @ knowledgenude’s method, since this give a more FPS like movement with easier diagonal movements

For this, you could use something like a state change detection. So what you can do (on mouse down) is to compare the names of the object on the frame before, and the current frame.

This is how the logic goes:

  1. On init → Set the value of a string variable to something like “blank”
  2. On mouse down → get the name of the object under the cursor and check if it is the same as that of the value in the string
    3a. If yes, do nothing. (this means the cursor did not move to a different “direction”)
    3b. If no, rotate the player and set the value of the string with the name of the new object. (this means the cursor moved to a different “direction”)

You may use “set variable” and “get variable” nodes to set the name of the object in he string variable.

1 Like

To animate the character, you need to have at least 2 animations to its armature. An idle animation (could be just a 2 key-frame animation) and a walk animation.

You have to play the walk animation when any of the four W, S, A and D keys are pressed and with Started and not Down. The Play animation from node must be called only once to start the animation. If it is used every frame, it restarts the animation every frame, hence the “freezing”

Once walk animation is started, you need to stop the character when keys are released. For this, you can play the “idle” animation when all of the 4 keys are released state. Then the character stops walking.

1 Like

Thank you very much @QuantumCoderQC, you’re awesome!
Yes, indeed I meant “Get Object Rotation” sorry for the mistake! :slight_smile:

If not sooner, next Saturday I’ll try to implement all your feedback!

I’ve tried to activate the animation, but I had no success yet… so I just added a tree and a Dynamic bench :laughing:


https://rogper.github.io

If not sooner, see you next Saturday! :slight_smile:

2 Likes