When we talk about the use of deadly force and home invasion, we typically talk about your occupied habitation – your house.
If someone comes into your backyard, that’s not the same situation at all; backyard, front yard, and even if you have a fence in the backyard, that’s not a home invasion.
You typically cannot use such force if someone’s just trespassing in your backyard.
In Texas, it is a crime to shoot somebody if they’re just standing in your yard. You have property rights that allow you to use force to get people off your property, but that is different from a deadly force like shooting, stabbing, or hitting with the bat.
If that person, on the other hand, has a weapon and is coming at you, then you’re allowed to use deadly force to protect yourself and your property.