Code Monkey home page Code Monkey logo

godot-3-demos's People

Contributors

aaronfranke avatar abreulima avatar adonispujols avatar akien-mga avatar c6y avatar dashorty-tester avatar davcri avatar guilhermehto avatar hodes avatar hrk4649 avatar koltpenny avatar likelakers2 avatar mateusai avatar mistertaftcreates avatar mitchcurtis avatar nagidev avatar nathanlovato avatar robin-wils avatar samdal avatar seanbone avatar webinspectinc avatar wolfgangsenff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-3-demos's Issues

Please add a hacktoberfest topic for godot users to contribute

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?

What is the expected behavior?

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Feature request

Describe the problem you're trying to solve.

Tell us which solutions you've explored, the solution you would pick, and why you think it would be the best for everyone.

Other

Other information

Thick outlines in diagonal direction in outline shader

Hi, I just watched the video on the outline shader. I notices an error: When you shift the outline into the four diagonal directions by vec2(size.x, size.y) etc., then the outline on diagonal edges of the sprite will be too thick by a factor of sqrt(2). (this is because the vector (size.x, size.y) is longer than the vectors (size.x,0) and (size.y,0).

The effect is very subtle, but if you look closely, you see that the outline of your circle is a little bit too thick in the four diagonal directions. This can probably be solved by dividing the diagonal vectors by sqrt(0.5).

Vector2 parse error in Camera2DRig example

After importing the Camera2DRig example, a Vector2 parse error appears in file:

2018/03-16-camera-2d-rig/end/characters/camera/grid-snapper.gd

Function jump_to_grid_position() code body should read:

position = grid_position * grid_size
instead of:
position = Vector2(grid_position * grid_size)

godot-demos/2018/04-24-finite-state-machine/ 'previous' not working

I'm submitting a...

  • [x ] Bug report.
  • Feature request.

Bug report

What is the current behavior?
The 'previous' functionality is not working

What is the expected behavior?
To go to the previous state

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Found the problem in '/player_v2/state_machine.gd'
func _change_state(state_name):
if not _active:
return
current_state.exit()

if state_name == "previous":
	states_stack.pop_front()
else:
	states_stack[0] = states_map[state_name] <-- **Remove this**
        states_stack.push_front(states_map[state_name]) <-- **Replace with this**

current_state = states_stack[0]
emit_signal("state_changed", current_state)

if state_name != "previous":  <-- **Remove this**
	current_state.enter() <-- **We whant to enter the previous state**

godot-demos/2018/09-11-input-actions-remapping lack of gamepad support

I'm submitting a...

  • Bug report.
  • Feature request.

What is the current behavior?
Using a gamepad to assign buttons / axis crashes the program.

What is the expected behavior?
The program should detect the button press on gamepad and then I should be able to use that button during the game.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Run the program
  2. Bring up the Input mapper with ESC
  3. Select Custom profile
  4. Press any Change button
  5. Press a button / axis on any gamepad
  6. The game crashes

Other information
Errors:
Invalid get index 'scancode' (on base: 'InputEventJoypadButton'). (pressing a button)
Invalid get index 'scancode' (on base: 'InputEventJoypadMotion'). (using an analog stick)

The program expects a keyboard input and assumes that we're passing input events that contain the scancode variable, which doesn't exist on gamepad. Instead, button_index should be used for buttons. Analog sticks however are a bit tricky, because one axis represents both directions, so we need to use both axis and value used.

Remove all enum names

As mentioned in #33, in Godot 3.1, you must access named enums starting with their identifier or you'll get an error.

As there are many demos here, I think we should remove all enum names and test every project individually to see if it imports and runs in 3.1.

Steps

  • Create a log of files that contain more than one enum and skip replacing enum names in those: there might be conflicts with the enum members, so we should check these manually. There should be few files with that, but I think I've written scripts with 2 enums in the past.
  • Create a shell script to find and remove all enum names, e.g. enum STATES { ... } -> enum { ... }. Sed should be enough there
  • Write a script that tries and runs every demo, and checks for the error code. As Godot works as a cli tool, we should be able to automate the testing process.

2019 05 28 The project crashes when exported

The issue

The Godot project "Godot and Android" seems to close immediately when I run it on a android device.

I have tried two different phones. It might be a problem at my side. I submit this in case someone else also has this problem. My other Godot projects have the same issue.

Editor settings and system information

Setting Value
OS Arch Linux
Godot version v3.2.2.stable.official
Adb /usr/bin/adb
Jarsigner /usr/bin/jarsigner
Debug Keystore /home/rmw/.android/debug.keystore
Custom Build Sdk Path /usr/lib/jvm/java-8-openjdk

Bug: Godot Nodes 101: Raycast2D Gun Tutorial code.

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?

This relates to the Godot Nodes 101: Raycast2D Gun Tutorial code.

After completing the tutorial video at Godot Nodes 101: Raycast2D Gun Tutorial I move the Player up and left so it approaches a target, obstacle or turret diagonally and when pressing fire, the ray (even when in-line and within range) doesn't collide with anything so no hit is generated.

If the Player is stationary and pointing up and left with any target, obstacle or turret in-line and within range of the ray and I press fire, the ray collides and a hit is generated.

What is the expected behavior?

Moving the Player diagonally up and left whilst firing at a target that is in line and in range should produce a hit.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Enable the 'Visible Collision Shapes' option.
  2. Run the Godot Nodes 101: Raycast2D Gun Tutorial code.
  3. Do what I describe above in "What is the current behaviour" section.

Broken submodule 2017/tools/tileset template

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

This folder has a broken submodule. It causes issues when trying to clone the project.

Either the submodule should be fixed, or it should be removed, or it should be replaced with just having a copy of the files placed into this repo.

get_player_world_pos() instead of get_player_grid_pos()

Godot-30-days-tutorial-challenge-2017/start/04-Custom camera with instant room transitions/Camera.gd
The function is called get_player_grid_pos() in the video tutorial. In line 5 and 14 of the template it is called "get_player_world_pos()", which could be confusing.

AStar demo crashes when the character can't find a path to a tile

Hello!

Is there an elegant solution to prevent the demo from crashing when the character is trapped and tries to find a path to a tile outside?

trapped

This would be useful for cases when an enemy is surrounded or the terrain changes.

I tried a few things but I'm not familiar with the code to get a solution!

Astar demo doesn't run

May simply be issue with current Godot master, but putting here just in case.
Editor gives error at line 114 of pathfind_aster.gd:

Parser Error: Function signature doesn't match the parent. Parent signature is: 'NodePath get_path()'

Replacing occurrences of get_path() with get_path_thing() resolves error and project runs fine.

Rewrite the readme

  • Improve description
  • Add playlist link
  • Add Kickstarter link
  • Add picture(s)

Finite State Machine doesn't enter Walk state after Attacking

I'm submitting a bug probably. I am maybe wrong, but I tried using the fine state machine in my project and I got a bug where the walk animation wouldn't play if you held down walk keys before attack is finished. That didn't seem right and I thought i changed something poorly. But after I tested it in your example as well it is the same. It's hard to spot without actual animations.

  • [ x] Bug report.
  • Feature request.

What is the current behavior?
You never enter walk animation but you are able to move. So the walk animation is never played.

What is the expected behavior?
You will enter walk state after finishing the attack.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Add print() to Walk state enter and to sword animation finished

"Enum" keyword not available in older Godot versions

I started following the video tutorials, arriving at the third where I encountered the following little problem:
running "01 - Custom camera project" with an old version of Godot returns this error:
Unexpected token: Identifier: enum

It seems that GDScript introduced enum in the 2.1.3 version but I didn't find any warning/recommendations in the first three videos about this; maybe an annotation in the third youtube video at around minute 2 (when the script containing the enum keyword is showed), could help in clearing doubts.

Keep up the great work Nathan! ๐Ÿ˜„

Slight typo in `heal` for Finite State Machine

I'm submitting a bug report

  • [x ] Bug report.
  • Feature request.

Bug report

What is the current behavior?
When you heal beyond the current max health, it chooses the value above the max health. Further, if you heal once but it isn't enough to fully heal you, it currently would still fully heal you regardless.

What is the expected behavior?
The variable name max_health implies it is a value that cannot be exceeded, so it should be choosing the minimum of the current and max health values.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Open FSM project
  2. Code it so you only heal a single hit point when healing, take nearly-fatal damage
  3. Heal - notice it chooses max_health because it's the max of the current health and the max.

I'll be opening a PR to fix this shortly.

Errors in Finite State Machine demo

In the Finite State Machine demo (file 2018/04-24-finite-state-machine/player/weapon/sword.gd), there are several errors of the type:

Identifier 'IDLE' is not declared in the current scope.

This is because the two enums are being called incorrectly: syntax changed as of Godot 3.1 alpha 3. I'm also not sure how it would have worked previously (Godot newbie here), since both STATES and ATTACK_INPUT_STATES have an IDLE state, and I'm not seeing how the two should be distinguished in previous Godot versions.

PS: thank you so much for all the work you've put into these demos, as well as your YouTube tutorials. Wonderful resource, makes getting started with Godot super easy and fun!

Error in enum in project from 2018

In the example 2018/screen-size you need change enum code to:

enum DIRECTIONS { TOP_BOTTOM, BOTTOM_TOP, LEFT_RIGHT, RIGHT_LEFT } 
export(DIRECTIONS) var direction

You left put DIRECTIONS before the values.

Can't load title_screen project

I imported the title screen project in the 2018 directory. If I try to edit it, the whole thing crashes out. if I try to run it, I get the following errors. Am I doing something wrong?

ERROR: _load_data: Condition "!f" is true. Returned: ERR_CANT_OPEN
At: scene/resources/texture.cpp:502
ERROR: Failed loading resource: res://.import/logo.png-c700766299fba61bf4d7abb2b84574d9.stex.
At: core/io/resource_loader.cpp:278
ERROR: Failed loading resource: res://title_screen/logo.png.
At: core/io/resource_loader.cpp:278
ERROR: poll: res://title_screen/TitleScreen.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://title_screen/logo.png
At: scene/resources/resource_format_text.cpp:440
ERROR: Failed to load resource 'res://title_screen/TitleScreen.tscn'.
At: core/io/resource_loader.cpp:208
ERROR: Failed loading resource: res://title_screen/TitleScreen.tscn.
At: core/io/resource_loader.cpp:278
ERROR: Failed loading scene: res://title_screen/TitleScreen.tscn
At: main/main.cpp:1864
debugger-agent: Unable to listen on 1696
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2071
ERROR: clear: Resources Still in use at Exit!
At: core/resource.cpp:476

Fix collision node set to disabled in the Attack tutorial

The collision node for the sword node in the starting project is automatically set to disabled. While the end project uses the animation editor to toggle this on and off. The video tutorial uses the monitoring variable for the sword node itself to have the same effect. For the sword collision to work however, it also needs the collision2D node to not be disabled and this is never talked about in the video tutorial. This might confuse a significant amount of people following the video tutorial and caused me to send quite some time trying to find the reason why the main character's sword wouldn't detect the enemies.

The CollisionPolygon2D node for the sword scene in the starting project should be enabled.

404 link in making tools tutorial and outdated zip

I'm submitting a...

  • Bug report.

Bug report

What is the current behavior?

There's a broken link in the description of the tutorial:
Making Tools in Godot -- GDQuest Guest Tutorial
https://www.youtube.com/watch?v=QHCdeBzdmlA

The broken link leads to:
https://github.com/GDquest/godot-3-tutorial-projects/releases/tag/2018-01-25-tool-mode

What is the expected behavior?

The correct link is:
https://github.com/GDQuest/godot-demos/tree/master/2018/01-25-tool-draw-in-viewport

It might also be best to update the file: godot-draw-in-viewport-tutorial.zip

Because it was made before the commit:
Automagically corrected files with one enum 014018c

The commit solved the error message:

The identifier "WAIT" isn't declared in the current scope.

for every use of the enum constants:
enum STATES_MIND { WAIT, MOVE }
in both the start and end projects.

There are no errors in the latest versions of start and end projects:
https://github.com/GDQuest/godot-demos/tree/master/2018/01-25-tool-draw-in-viewport

This was tested by downloading the start and end directories from GitHub,
using the download page: https://downgit.github.io/#/home

Maybe the start and end projects also should be opened once and resaved,
before making the new zip file, because the following message appears on startup:

The following project settings file was generated by an older engine version, and needs to be converted for this version

System Info

Godot v3.4.stable.official [206ba70f4]
Windows 21H1

Error in final/11-Save settings with ConfigFile/Settings.gd

Hello,

I think there's an error in the load_settings() function :
var val = _settings[section][key]
Shouldn't it be :
var val = _config_file.get_value(section,key)

By the way, the "values" array in the same function seems to be useless too.

Thank you very much for all your videos on Youtube, they are all of a great help for someone trying to understand and use godot :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.