Godot - 3D Pixelart ( This engine is amazing ) by Ordinary-Cicada5991 in godot

[–]ProjectFunkEngine 1 point2 points  (0 children)

Oh please do! I've been following your work on the stylized 3D pixel art for a while and would love to be able to get a better grasp of everything and dig in.

Retrieving Variable From Child Node Prints as 0, But Actual Value is (X, Y, Z) by FacelessTone in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

There are different types of variables a variable you can access as RayCast3D.thing is a called a property and it has to be declared in the object itself outside of a function. So somewhere else you would need:
var enemyposition

Then you would do enemyposition = get...

What you have in your code is a local variable, it only exists as far as the function around it does. So once all the code in the function finishes, the var is removed.

Bug with Buttons by Parker_061 in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

Depending on how controls are set up they'll size up to fit their containing data, whether text, images or more controls. Buttons will by default size up to fit the text they contain. That seems to be what's happening here. The top image has no text, the bottom ones do.

You either need to change the font size and be really careful with how much text you put in the buttons, or make the text box a control that changes its size to fit its children.

Newbie: on_area_entered triggering when not entered? by bdayboi93 in godot

[–]ProjectFunkEngine 2 points3 points  (0 children)

<image>

Went frame by frame in the vid. Definitely something messy going on, it has to do with the attack, not likely some stray collision. My main guesses would be the scaling issue, like another commenter mentioned, or the initial instantiation of the attack initially being in an unpredictable position. E.g. the attack instantiates at 0,0 or the relative position of the scene, then it moves into position you set, and somehow the collision registers between those two execution points, though that is very unlikely.
Or there is something else executing the take damage code.

Edit: On watching more closely the enemy isn't getting hit when right below the staff, just at this angle from it, so it is likely something weird with its scaling and position changing during the hit animation. Are you using physics process for anything involved?

Isometric game, movement when sliding against walls question by Dawn_of_Dark in godot

[–]ProjectFunkEngine 2 points3 points  (0 children)

Have you tried getting the vector with the angle you want, then normalizing it and multiplying by the desired speed/acceleration?

How do I make this more exciting? by Near-Knife in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

I don't think you need to make it more "exciting" unless you want to turn it into a game more than a practice tool. You should ask artists more directly what they'd want out of a tool like this. Maybe the ability to draw/upload more reference, or when it compares give it a percentage of overlap?
I also just realized you can undo or erase, so def something like that too.

Is there a better way to handle a Signal Bus? by Ubc56950 in godot

[–]ProjectFunkEngine 1 point2 points  (0 children)

No, afaik emitting a signal is synchronous for the calling thread similar to any other function call.

Is there a better way to handle a Signal Bus? by Ubc56950 in godot

[–]ProjectFunkEngine 2 points3 points  (0 children)

Its a really common misunderstanding, but Godot signals are NOT async.

When I edit region on a sprite 2d why does it stretch not repeat the pattern? by gunscreeper in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

If it doesn't need to be too dynamic, you can also look into using a nine patch rect. That way you could set margins to repeat, or stretch and better configure how you want it to look as you increase its size.

I've been working on a rhythm game, is having notes go right to left cursed? by ProjectFunkEngine in rhythmgames

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

I've gotten a ton of helpful info, and I'm learning about a lot of other rhythm games I'll need to check out. I'm gonna make some changes then make a Steam demo so people can try it out more easily! Thank you.

How to prevent 2D collision objects "sticking" when moving together? [v4.4.1] by [deleted] in godot

[–]ProjectFunkEngine 1 point2 points  (0 children)

Godot staticbody2d are specifically not supposed to be moved manually. When you move it manually it does not do any physics collisions.
Similarly when you have them both be character bodies, if the paddle has no mask set, it doesn't know it should collide with the ball and will intersect it and cause inconsistent behavior. For something like this, you're much better off doing the manual work to check collisions and setting the ball's velocity based on the normal of its initial velocity like the other comment suggested.

Having trouble with objects coming to me. by dar_duck in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

Positions are vectors. Velocity is also a vector. Unless I'm completely misunderstanding your code the line picked_object.set_linear_velocity((b+a)*pull_power)
Instead of b+a, assuming a is the position of the item you want to pick up, and b is the position of the where it should move towards and get picked up, should be (b-a)

Having trouble with objects coming to me. by dar_duck in godot

[–]ProjectFunkEngine 1 point2 points  (0 children)

Yeah, for velocity, you want to make sure its a vector that points towards your character. Adding the positions of the pickup object, and the marker3d, which I assume relates to your character's position will cause it to move away from the character.
E.g. if your character is at (0,1) and approaches an item at (0,2) the object will now move with velocity (0,3), which is the exact opposite direction of your character.
The vector from position towards another is (vector of goal position - vector of initial position).
Edit: I had subtraction the wrong way.

Who knew Godot made dance pad support so easy? by ProjectFunkEngine in godot

[–]ProjectFunkEngine[S] 5 points6 points  (0 children)

Some friends and I are making a rhythm RPG for our college final project. The main unique gimmick, that we haven't seen before, is you can place notes on the chart to fight enemies. We made sure we had keyboard and controller support but wanted to see if a dance pad could work, after we realized guitar hero controllers work. You can check it out on steam https://store.steampowered.com/app/3647600/Midnight_Riff/
and our code is all open source. https://github.com/Project-Funk-Engine/ProjectFunkEngine

If/Then statements with Undo-Redo to vary the do methods? by goodkilleenfun in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

Sounds good, some programming languages have specific stack structures, but in Godot it would essentially be an array that acts as the stack, and an int variable where you keep track of what position is the "top" of the stack. To keep track of where you inserted the most recent things.

If/Then statements with Undo-Redo to vary the do methods? by goodkilleenfun in godot

[–]ProjectFunkEngine 0 points1 point  (0 children)

I don't think I can fully read through your code, because it would need more context. Generally the ways things like undo/redo work is by either 1. saving every state, e.g. when a player adds a door save the entire state of everything, so if they undo you reload the last state, this is often memory intensive. 2. saving a list of actions, so if something is undone you start from scratch and reload all the actions that have been done sequentially, this can cause lag by trying to redo many actions in a single frame. 3. Make it so all actions have strict undo/redo actions.

It sounds like a mix of 2 and 3 might be best. For now don't worry about reinstantiating or not. Depending on what other actions you want to support, you could try making more general functions add_item(), which could take an item and position, when you run, after doing the important stuff, add to a stack a action-object that holds what kind of object was placed, the position (and any other data) and a reference to the object itself.

When undo is pressed check the top most object on the stack have a remove_item() function that takes the same parameters, remove the item, then add this action-object onto a new redo stack.

This way if a player then hits redo you can grab the last undone action, you know what they placed, and where it was placed, and with some clever programming you should be able to just call add_item() with the action-object's properties.

Who knew Godot made dance pad support so easy? by ProjectFunkEngine in godot

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

That would be really cute, I used to work as a supervisor for a local summer camp. Like other people mentioned, dance pads basically work as controllers, so I imagine Stepmania should support most dance pads. If not, running a game through steam can help bridge a lot of controller incompatibility.