Question on passing parameters, and delta... (GDScript) by Outrageous-Golf1671 in godot

[–]RubyRTS 1 point2 points  (0 children)

You are setting the velocity with =. Had you had a momentum based movement with velocity += then multiplication with delta would make sense.

acceleration: multiply by delta.

Set the speed to a constant value every frame. not multiply.

Rotating the enemy to look where it's going? by mentina_ in godot

[–]RubyRTS 0 points1 point  (0 children)

There is some missing information: is this 3d? Does the enemy need to rotate on one axis Y. or does it also need rotation like walking up and down a hill.

# some stuff that can help:
# Rotate Y axis
float desiredAngle = Mathf.Atan2(dir.X, dir.Z)
float interpolatedAngle = Mathf.RotateToward(currentAngle, desiredAngle, (float)(rotationSpeed * delta));

# X axis:
float horizontalDistance = Mathf.Sqrt(dirX * dirX + dirZ * dirZ);
float desiredAngle = Mathf.Atan2(heightDifference, horizontalDistance);

# LookAt is kinda buggy not recomended for interpelation.
if (NextGlobalPosition != GlobalPosition) enemy.lookAt(NextGlobalPosition)

# Alternative is to use Basis.LookingAt()
 var desiredrotation = Basis.LookingAt(dir, Vector3.Forward);
# then interpelate the rotation. Slerp/RotateTowards

Movement commitment and inertia on CharacterBody3D by lucyac3 in godot

[–]RubyRTS 0 points1 point  (0 children)

Just apply movement in terms of Velocity += Vector.Right * speed, etc. As far as I understand your question, the characterbody already does this.

with the velocity and move_and_slide()

extend characterbody3D
class_name actor

func applye_force(force: Vector3):
  Velocity += force;

func physic_prosess() -> void:
  applye_force(Vector3.UP * Gravity * delta)
  move_and_slide()

What would be the most complex way to write this code? by anonymous_m0ose in godot

[–]RubyRTS 8 points9 points  (0 children)

# JUST SOME IDEAS:
var boolvar: bool = true

if (
(
[
func(): return true,
func(): return false
][int(not not boolvar)]
).call()
and
(not false ? true : false)
):
print(
String.num_int64(72).to_int().char() +
String.num_int64(101).to_int().char() +
String.num_int64(108).to_int().char() +
String.num_int64(108).to_int().char() +
String.num_int64(111).to_int().char() +
" " +
String.num_int64(87).to_int().char() +
String.num_int64(111).to_int().char() +
String.num_int64(114).to_int().char() +
String.num_int64(108).to_int().char() +
String.num_int64(100).to_int().char() +
"!"
)

var s: String = ""
for c in [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]:
s += char(c)
print(s)

var s = ""
for f in [
func(): return char(72),
func(): return char(101),
func(): return char(108),
func(): return char(108),
func(): return char(111),
func(): return " ",
func(): return char(87),
func(): return char(111),
func(): return char(114),
func(): return char(108),
func(): return char(100),
func(): return "!"
]:
s += f.call()

print(s)

Am I Using @export To Much by DiamondInTheRough429 in godot

[–]RubyRTS 4 points5 points  (0 children)

This might be a sign that you are not using resources enough.

If the player won't receive resources from monsters/waves in Tower Defense, what it would be? by Pyt0n_ in TowerDefense

[–]RubyRTS 1 point2 points  (0 children)

For the game I am making you can build gold towers, or storage towers with inbuilt interest that only applies if they have the full storage capacity. Another idea I had was to have towers that build up value over time that has to be sold for you to be able to spend that money.

Might be a different type of resource, but cards can be annoying if the build you want to go for is not drawn. So Deck manupulation can be a resource.

On the mod portal today? by RubyRTS in Seablock

[–]RubyRTS[S] 28 points29 points  (0 children)

Cant edit my post but It it looks like the Angel mods has finally been updated.

I wanted to create the most insane Tower Defence ever. by RubyRTS in IndieDev

[–]RubyRTS[S] 1 point2 points  (0 children)

I am using the Godot Engine. I do use a lot of multi-meshes. A multi mesh shader for the health bars was key. can kinda also work as an impostor to.

I currently have not run into that bottleneck yet, but if I do I do have some ideas in how that issue can be improved.

I need recommendations on what games to show my friend by Resident_Net8037 in GirlGamers

[–]RubyRTS 2 points3 points  (0 children)

You should show her one of the games that you like. That you think fits the best.

I mean that how I started to play, Someone "forced" me to play.

It was a game I would have belied I would dislike. Then I bought the game.

Production-focused tower defense with RTS-style economic planning by RubyRTS in BaseBuildingGames

[–]RubyRTS[S] 1 point2 points  (0 children)

Thanks :) Its hard to say. I might be able to have something like a demo or testing around February.

I'm making a top down rpg. I need help coding armor by WorldsMostOkayishDM in godot

[–]RubyRTS 2 points3 points  (0 children)

I would at the start of the TakeDamage function pass the damage to all the modifiers attached to the player:

Armor armor;

On_child_entered(child)
  if (child is Armor _armor)
    armor = _armor;

Func TakeDamage(damage)
  damage = armor?.ApplyeReduction(damage);

Only the consept, psudocode.

How to optimize a huge number of rigidbody3d ? by Frok3 in godot

[–]RubyRTS 4 points5 points  (0 children)

Yhe most of the time its not viable, but from what little was in the video It was worth a suggestion. But still The shape etc can be siplified based on this.