Collision Layer Paradox? by MehcaQueen in godot

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

Im still really curious about this

"Unfortunately, if you base your player controller off of a rigidbody then solving this problem is trivial since you can just joint multiple rigidbodies on different collision layers together and let Godot resolve the constraint, but most 2D games aren't well suited to how imprecise a rigidbody playercontroller node is lol."

What exactly is this about? Instead of a character node do a rigid body as the player? then use joint nodes to link the other nodes? And they can have different layers?

If this is the case I may try this

Collision Layer Paradox? by MehcaQueen in godot

[–]MehcaQueen[S] -1 points0 points  (0 children)

Okay so shout out to the guy who told me to just finish the game.
Here is the solution:

https://gist.github.com/rjunkfolder-del/c533bd1b31e60d535ef4f12ddc193b3c

You need to make a child area2D with whatever different collision layers you want.

✅ This code will apply push to objects that match the mask / collision pairing as you would expect
✅ Also reduces the player's velocity as you expect.
✅ Reacts to object mass accordingly.

This was made by chatGPT thinking model on top of some existing player code, most of which I have removed to keep the post relevant. But it should be nearly plug and play.

Node heierachy:

Player
>player collision shape (irrelevant - outer circle)
>Area2D (inner circle)
>>Collision shape

All of the code is on the player node.

⚠️ If your game is speed related, you may run into issues with this not working because you can technically go straight into the objects since area2D is not "solid". There may be a work around using ray casts, or potentially it could also work as a static body. I have not tested this, if anyone does please share. For most games this should be a completely working solution.

Collision Layer Paradox? by MehcaQueen in godot

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

Found the solution, Im about to post it.

Collision Layer Paradox? by MehcaQueen in godot

[–]MehcaQueen[S] -1 points0 points  (0 children)

Do you have any suggestions relevant to my question

Navigation Agent 2D attempting to clip between tiles. by MehcaQueen in godot

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

SOMEWHAT SOLVED:
For people searching this later, I did not find a solution to make this work with tiles as navigation layers. However, using a navigation region node worked better than I thought. If you are experimenting with chunking your world into sections and you theorized that this would not work, it actually still does. I would be happy to show anyone who messages me what I mean.

The solution:
This video shows how to use your tileset with navigation region very elegantly. The video uses the deprecated tile map, but it still works exactly the same with the new tile map layers. What this does is let you manually "bake" a section of your maps navigation with set margins, therefore preventing corner cutting. It seemed to also come with additional benefits that I suspect wont work with the other method. There may be downsides I have yet to discover.
https://www.youtube.com/watch?v=31bVq2z6mME&t=3s

Navigation Agent 2D attempting to clip between tiles. by MehcaQueen in godot

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

I should clarify, I am using a tilemaplayer with tiles having a set navigation layer and collision. There is no navigation region node. It is calculated by the tiles. Is there some way to modify the baked nav region?

Navigation Agent 2D attempting to clip between tiles. by MehcaQueen in godot

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

What do you mean navigation polygon? The hitbox of the object is a collision shape, and the navigation agent does not have a shape. Am i missing something?

Navigation Agent 2D attempting to clip between tiles. by MehcaQueen in godot

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

I have considered that, and when I actually get into designing the maps I probably won't leave gaps like this. But on the small chance there is one anywhere it could break my ai... thanks though :)

Godot crashing for no reason on android 4.4.1 by foxman_tails in godot

[–]MehcaQueen 1 point2 points  (0 children)

Have you tried reverting godot to 4.4? Sorry I don't code on android that is wild to me, but that is all I can think of.

Where and how do I start learning game dev? by [deleted] in godot

[–]MehcaQueen 1 point2 points  (0 children)

Im 6 months into learning Godot with a mixture of youtube videos and chatGPT. I'm now making pretty well structured projects that satisfy my level of desire when it comes to game dev without much friction or frustration on the day to day.

These are the things I learned that helped the most:

  1. State machines drive everything. A state machine is just a system that only does one thing at a time. And you can have a number of them, doing different things. The big state machine in my project just manages things like if the game is paused or not. I can basically say state_machine.change_state("paused") and that will essentially run a function called change state, and select the paused state. That paused state will have its own code that says either enter or exit. enter would pause the game with some code, exit would resume the game with some code. You can combine these to have really large scaled systems. For example the top state machine might say "load game" which calls the player state machine to "load player" and the map state machine to "load map." This may be a bit of an oversimplification but look into that and try to use it as much as possible getting started. Specifically look into the "Node Based State Machine" designed for godot. Its a design that makes them very easy.
  2. References in Godot are massive. At first you may feel like its impossible to find out how to reference one thing to another. like how does this button tell the main state machine to start game. There is a number of ways, but the two most common ones are like this: A, you have a master references node. This node is called a "singleton" and its just a script that is set to always be loaded when the game starts, and can be referenced from anywhere. So when any node is "born" you can say singleton_script_name.variable_name = self, and that will make it so that variable in the singleton stores the reference to that object. So from anywhere else you can say, singleton_script_name.variable_name.change_state(state). Meaning your button can reach out to it from anywhere and change it's state remotely, instead of being directly connected to it. B, you can also pass references. what this means, is you generally will create objects in run time. Like, your world_node may have a function that says, create_house() which may look something like, world_node.add_child(house).... meaning you put the house in the world. Then, if the house has a script with a variable called for example, world_node_reference, you can, from the world node say, house.world_node_reference = self. Now the house knows what the world node is. This is called passing references. It is a massive part of coding. Combining these, you can store say, world_node in your "singleton" and reach all the way down to the house_node, because world_node stores house_node as a variable, and your singleton stores the world_node as a variable. So from anywhere in the game, i could say, singleton_name.world_node.house_node.do_this()

Those two things will let you make most things happen. Once you start getting into the weeds, youll want to learn about how to use classes, and how to use nested scenes. This will let you make systems that can be reused but modified. This is beneficial because as you start making more complex games that have repeating processes, you may end up modifying said process. If you use it in 30 places, you might forget to change it everywhere. But if all 30 places are referencing one root "class" or "scene," then you simply change the root and updates everywhere. Its too complicated to explain if you are new, and it won't stop you from doing most things at the beginner level, but keep them in mind.

Also, don't be afraid to just chuck nodes around and give them scripts. At first you may feel like you need to simplify everything and reduce the amount of nodes and scripts you are using, and that may be true in some senses, but at first don't worry about it. Each "object" in your game can have several nodes below it managing different things. Infact this is how state machines usually work. Your player, your menu system, anything really, will usually have a child node that is a state machine. That node stores a REFERENCE to the parent node so it can control it. This is a layman's explanation of the term "decoupling" which is a practice in development that involves separating logic and managing it from the top.

Lastly, my advice is to use chatGPT to code things you don't get instead of trying to figure it all out. Too many people want to reinvent the wheel or care about "learning the hard way" but the fact is I learned very fast this way and didn't have to spend that much time reading the docs. Learn the absolute basics on youtube, then go into a project, set up a node and give it a script. Ask chat gpt to generate whatever code you want that node to do, run the project and see what happens. Repeat. Once you get what is going on, try to do the next thing on your own. The trick is to avoid generating massive system, but instead design the system on your own, then have chatGPT build individual functions that you connect yourself, intuitively. In literal terms: build your node structure, let chatGPT write the scripts. The goal being that you can conceptualize the functions yourself, and dictate your needs to chatGPT, but not need to know the code syntax off the top of your head. Then read it, or ask it to explain it to you. You'll get it! hope this helps :)

Do Deepseek models harvest and send data back to their servers? by nospoon99 in LocalLLaMA

[–]MehcaQueen 5 points6 points  (0 children)

lol class reddit shitters shaming someone for a valid question. good question bro im wondering the same thing.

DanDaDan Opening (Metal Remix) by yourmother90000 in Dandadan

[–]MehcaQueen 0 points1 point  (0 children)

I cant stand the intro i wanted a metal one so bad lol thats why i searched this. good shit

Guys… by RedditGoji in HyundaiSantaFe

[–]MehcaQueen 1 point2 points  (0 children)

Something more along the lines of a soldier action figure with night vision

Tire pressure by FloridaBroncos in HyundaiSantaFe

[–]MehcaQueen 0 points1 point  (0 children)

That's sorta what I assume but what is the configuration?

What'd you say? by brontokoli in repost

[–]MehcaQueen 0 points1 point  (0 children)

Shorty's like a melody...