So I want to have ability to check is something is within the line of sight of the enemy character in a 2d top down game. I have created this function: func is_in_line_of_sight(thing): var space = get_world_2d().direct_space_state if thing != null: var line_of_sight_obstacle = space.intersect_ray(gl...
What is a good practice about using class_name. Would you register all your objects as classes. For instance say you have a game with some enemies Sectoid Sectoid Commander Thin Man Outsider Floater Heavy Floater Cyberdisc Drone Muton Muton Elite Berserker Chryssalid Zombie Sectopod Ethereal Uber Et...
Is there a written Godot finite State tutorial? I have tried to follow videos on this and each and every one of them is unnecessarily complicated. I would like a simple written tutorial that shows: How to create state machine The easiest possible way to change between states The simplest possible wa...
I am trying to move enemy in directions facing in a top down game. I have no idea how to just make it go in direction it is looking at I would be grateful for some pointers on where I can find this info. Solved it! But if there is a better way of doing it I am open to suggestions. export var speed :...
u/faxfrag asked a good question in this thread. I would like to expand on it by asking how to organize whole project not just scene. When where do you save all your scripts and and scenes and how do you arrange them. I used to have separate folders for "scenes" and "scripts" but now I have modifie
Can someone what is the advantage in doing var my_var setget my_var_set, my_var_get func my_var_set(new_value): my_var = new_value func my_var_get(): return my_var # Getter must return a value. over just changing my_var normally like this my_value = new_value and skipping both getter and setter func...
Godot 3.1 stable is just around a corner. As someone who only used 3.0.6 so far what are the changes in 3.1 that will benefit me as 2d developer the most. I am most interested in trying my hands on static typing. As a dyslexic code readability is crucial for me. Any thing that helps me making my cod...
If I have a bunch of helper functions that share functionality between different scenes. Things like is_damaged, play_death_animation or left_room etc Is it good idea to put those helpers in some sort of auto load and then just call it helper.is_damaged() or hold I do it some other godot specific wa...
Is there a way to exclude nodes from being affect by canvas modulate? At the end of my game I want whole game to go grey apart of popup that asks player if they want to try again and can't figure out how to not make popup go grey as well.
I am trying to build my naming convention so I am more consistent in my style and have question. Why this is classed as something I should never do? x = 100 y = 100 velocity = 500 I have always done that and don't see what is wrong with this approach?
I want to up my games in making UI and general comfort of expirience when playing my games. I don't know where to start. Ideally I wouldn't mind some longer in depth course maybe Udemy and the like. When I search for UX courses there most of them are Web based I am unsure how well will that translat...
I was advised to post my comment as stand alone post. I wasn't going to do it. In a past I have received some serious backlash when providing criticism of fellow developers. Fuck it here it goes. My post is in response to this article and discussion that followed. Let's look at the developers that h
I see warnings like this in every tutorial Be careful to never scale your collision shapes in the editor. The “Scale” property in the Inspector should remain (1, 1). When changing sizing the collision shape, you should always use the size handles, not the Node2D scale handles. Scaling a shape can re...