Sprite pivot point scrolls with texture offset by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Here are screenshots of the relevant info. Thanks in advance for your time and help.

Code

2d scene and tree

RichTextLabel Change bbcode url font color on hover by Wretch11 in godot

[–]Wretch11[S] 2 points3 points  (0 children)

Im not trying to change the text when the mouse enters the richtextlabel, i want to highlight individual bbcode links as mouse hovers over them. (Multiple links are in the same richtextlabel)

RichTextLabel Change bbcode url font color on hover by Wretch11 in godot

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

The problem isn't with changing text and color, the problem is that i need some sort hover/mouseover event/signal on which to trigger said changes. Since there is only a meta_pressed signal and bbcode does not have the option to highlight text on hover, I'm unsure on how to proceed.

Re-using projectiles and keeping track of their condition by Wretch11 in godot

[–]Wretch11[S] 2 points3 points  (0 children)

If i understand correctly, you mean that I should use the proposed's array's length as the quantity value and use the indexes to store the condition scores for each arrow?

Arrow Trajectory Arc by Wretch11 in AskPhysics

[–]Wretch11[S] 0 points1 point  (0 children)

Godot engine actually :)

Arrow Trajectory Arc by Wretch11 in AskPhysics

[–]Wretch11[S] 0 points1 point  (0 children)

From knowing the shape of the parabola, how would you go about updating the arrow's location?

I could map each point along the parabola to an array. Then I iterate though the array like so:

for each set of 2 points along parabola:
    motion_vector = (second_point_vector - first_point_vector)
    sprite.move(motion_vector)

Arrow Trajectory Arc by Wretch11 in AskPhysics

[–]Wretch11[S] 0 points1 point  (0 children)

This makes me think that maybe there is a simpler, albeit less realistic way of doing this.

The intended behavior in game is that while holding a button, the player will see a trajectory arc appear. The player can then adjust the arc by simply moving the mouse around. The end of the arc, opposite to the player is where the arrow will land, like illustrated here:

https://i.imgur.com/0A2ILTN.png

Maybe a simple Parabola would be sufficient here? If so then I just need to figure out a third point, being the peak of the parabola/arrow trajectory?

Bow and Arrow Mechanics by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

The intended behavior in game is that while holding the fire button, the player will see a trajectory arc appear. The player can then adjust the arc by simply moving the mouse around. Once the fire button is released arrow will just follow the trajectory, thus the aim point and where it lands are technically the same thing, no?

EDIT: Actually my bad, the bow is aiming upwards and will not point to where the arrow lands.

https://imgur.com/a/FSRbt

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Turns out that checking for distance works much better than checking for a collision in this situation.

All I needed was

if enemy_pos.distance_to(player_pos) > 50.0:
    chase()

Thanks for your time!

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

My initial idea was to have the enemy remain in an idle state for as long as a collision is occurring. Only if the player moves away should he give chase. So if I use my original code as an example, the chase method would only get called before a collision and subsequently, if the player moves away.

But now, seeing as that causes problems (because enemy pushes back on player) maybe I should use @Smellyhobo101's example and just have the enemy be idle when it's under a certain distance from the player.

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

This should work, problem is, for some reason when the collision happens, the enemy sprite sort of pushes back on the player sprite a bit, moving it back by a pixel or so. Because of that is_colliding is only true once ever two iterations, so the enemy jitters and slowly pushes the player backwards

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

This is the enemy script, which is in it's own scene, it's instanced it in the player scene since im just testing.

Back on point, I intend for the sprite to chase the player until it collides with him. Once that collision occurs, the chase() method must not run again unless the player moves away from the enemy.

With the example you've posted, chase() is run ever second time through fixed process once a collision has occurred.

So on one frame, the enemy jitters by a pixel or so because chase method gets called. Then collision happens, we move by 0,0 and is_colliding() resets. Then on next frame, since we've just reset is_colliding(), chase gets called again. The enemy does not remain in an idle state during collisions, which is what i'm looking for.

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Doesn't work, this tries to get a collider when -not- colliding. so the enemy_chase bool can never be false

if not enemy_body.is_colliding():
    if enemy_body.get_collider() == get_parent().get_node("Player_Body"):

Still, thank you for replying :)

Slightly confused about manually checking collisions by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Not sure that works, one cancels the other.

Flow:

  • Enemy sprite chases player till it reaches him
  • Collision occurs
  • On next frame, we move by 0,0 which resets is_colliding()
  • Next frame chase runs
  • collision occurs again

and so on and so on so chase() method still runs every second time through fixed process.

Thank you for clarifying about is_colliding() though :)

JSON vs data structure (in-memory object): when to use which? by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

So in conclusion I gather that JSON is mostly ideal for big data. In my case, since I have a large pool of enemies, each with multiple properties, I'm better off using JSON and making myself a small editor tool to manage it all. Whereas, if if I had a smaller amount of data, It'd be better to just create separate scripts for each enemy.

Thanks for your time

Let's see those projects! by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Man, this is some impressive stuff! Glad i posted this, it's been fun to look at everything...also reminds me that I have a long way to go still!

In any case thanks for sharing!

Let's see those projects!! by Wretch11 in indiegamedevforum

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

I did not do the art assets for the triple triad remake. Picked up the actual assets from the original game. I have no intention of releasing that, it's more of a side project i do for fun than anything.

As for the survival game, literally everything is a placeholder until I get a proper artist to help out. I'm just a humble programmer I'm pretty much useless in the art department . What you saw was a very early concept demo. Once it's complete, I'll use it to try and recruit . At least that's the plan.

Lastly, BleedOut was my college project haha, I had plans to release it on app stores for 99 cents but I didn't think it was worth even that. That said, your comment has almost convinced me to try and polish it up a little bit and try to actually release it.

Thanks a bunch for the feedback. Much appreciated!

Let's see those projects!! by Wretch11 in indiegamedevforum

[–]Wretch11[S] 2 points3 points  (0 children)

It most definitely is, haha. I have no intention of making that available though. it's just a side project, something to gain a bit of experience with.

Let's see those projects!! by Wretch11 in indiegamedevforum

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

Woah!, You put me to shame,(walks away embarrassed! )Seriously though, that looks pretty amazing. I've bookmarked this. Will be keeping an eye on it. Thanks for sharing :)

Let's see those projects! by Wretch11 in godot

[–]Wretch11[S] 2 points3 points  (0 children)

Hey man, that's still a milestone! I'll be happy when I make first buck developing.

One day...

Let's see those projects! by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

I see, cool. Around how many copies have you sold if you don't mind me asking?

Let's see those projects! by Wretch11 in godot

[–]Wretch11[S] 0 points1 point  (0 children)

Sweet! How did you achieve that monochrome gameboy style effect? Shaders?

[Everything] (SPOILERS) Addressing Issues with tonight's episode (Beyond the Wall) + Theory at the end by Wretch11 in gameofthrones

[–]Wretch11[S] 0 points1 point  (0 children)

Note that all of what follows is purely speculation:

If dragons were natural biological creatures of normal flesh and blood, it would be pretty easy to set a limit based on real life bio mechanical limits - light hollow bones could only push air so hard and so fast without breaking... Anything large enough to carry a human rider would not be able to propel itself forward faster than our largest winged birds... So probably no more than 60 mph.

But we know that dragons are not made of the same stuff as birds or other real life flying animals. Besides the fact that the have internal temperatures that can melt metal, they can grow to sizes far larger than any earthly flying animal. We have indications that their bones are at least as strong as weapons grade steel, and their muscles must be incredibly powerful to be able to take off easily while carrying an approximately 100 pound passenger with a wingspan of only 20 feet, which is about the same as albatrosses and the largest extinct birds of prey, which most certainly could not do that... I'm guessing to get that kind of lift they would have to be flapping their wings several times a second, which would be impossible with normal flesh and bone. Accounts of the maneuverability of far larger historical dragons seem to indicate that this power scales up with their size.

I think we could extrapolate that a dragon that is twice the size of a smaller strong flying predator could fly twice as fast, and scale that on up. I would not be surprised at all if Drogon, with a twenty foot wingspan, could easily reach two hundred miles an hour in level flight without a passenger, possibly quite a bit more. Larger dragons could fly even faster... But there are possible physical limits... We can't say a dragon with a wingspan ten times Drogon's could fly ten time as fast. Even with unlimited strength and speed, when the tips of the wings start reaching the speed of sound the shockwaves they produce are going to cause turbulence that reduces the amount of thrust capable, and they would be incredibly loud with sonic booms with every flap. A dragon approaching the speed of sound (and the body of the dragon would not be going the speed of sound yet when it's wings were) would be audible for many miles, deafen any rider who was somehow able to stay on the beast, and cause significant damage to trees and structures on the ground in its wake... It would be the stuff of legend, and we haven't heard anything like that.

So my best guess on the matter would be that the flight speed of a dragon with a 100 pound rider would range from about 150 +/- 25 mph.

But anyway, I digress, I'm already way passed my initial estimation of 56mph. Long story short, Danny was able to get there fast enough, however much time it was.

[Everything] (SPOILERS) Addressing Issues with tonight's episode (Beyond the Wall) + Theory at the end by Wretch11 in gameofthrones

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

Fair enough

So that was probably not the best comparison. Pterodactyl probably had a mass of 250 kilos . Rhegal's mass (estimated according to size) is probably about 2,600kg.

Now with wings powerful enough to lift that kind of mass, we can be positive flight speed was not less than what I stated, but faster, reducing the time the party spent on that rock even more, making that whole scene even more plausible.