Compare commits

..

2 Commits

Author SHA1 Message Date
Aaron Franke
342f27e327 Merge pull request #407 from aaronfranke/3.1
Remove BPM Sync demo from the 3.1 branch
2020-02-10 19:21:38 -05:00
Aaron Franke
4d10544dd9 Remove BPM Sync demo from the 3.1 branch 2020-02-10 19:13:49 -05:00
933 changed files with 5461 additions and 16067 deletions

6
.github/CODEOWNERS vendored
View File

@@ -1,6 +0,0 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# Owners can be @users, @org/teams or emails
/misc/2.5d @aaronfranke
/mono/2.5d @aaronfranke

18
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,18 @@
<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
-->
**Which demo project is affected:**
<!-- Specify the project name or path. -->
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
**Issue description:**
<!-- What happened, and what was expected. -->
**Screenshots of issue:**
<!-- Drag in an image, or link in the form of "![]()". If not relevant, remove this section. -->

View File

@@ -1,34 +0,0 @@
---
name: Bug Report
about: Report a bug with one of the demo projects.
title: ''
labels: bug
assignees: ''
---
<!--
Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
Only submit an issue if it is reproducible with the latest stable Godot version.
-->
**Which demo project is affected:**
<!-- Specify the project name or path. -->
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
**Issue description:**
<!-- What happened, what was expected, and what went wrong. -->
**Screenshots of issue:**
<!--
This section is optional.
Drag in an image, or post an image with a link in the form of:
![Alt Text Here](https://pbs.twimg.com/media/DW5AJnZVAAM1805?format=jpg)
-->

View File

@@ -1,19 +0,0 @@
---
name: Feature / Enhancement Request
about: Adding new features or improving existing ones.
title: ''
labels: enhancement
assignees: ''
---
<!--
Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
-->
**Which demo project is affected:**
<!-- Specify the project name or path. -->
**Description:**

View File

@@ -1,24 +0,0 @@
<!--
Only submit a pull request if all of the following conditions are met:
* It must work with the latest stable Godot version. Do not submit a
pull request if it only works with alpha/beta builds.
* It must follow all of the Godot style guides, including the GDScript
style guide and the C# style guide.
* The demo should not be overcomplicated. Simplicity is usually preferred.
* If you are submitting a new demo, please ensure that it includes a
README file similar to the other demos.
* If you are submitting a copy of a demo translated to C# etc:
* Please ensure that there is a good reason to have this demo translated.
We don't want to have multiple copies of every single project.
* Please ensure that the code mirrors the original closely.
* In the project.godot file and in the README, include "with C#" etc in
the title, and also include a link to the original in the README.
-->

View File

@@ -1,18 +0,0 @@
dist: bionic
stages:
- build
matrix:
include:
- name: Static checks (format.sh)
stage: build
os: linux
addons:
apt:
packages:
- dos2unix
- recode
script:
- bash ./format.sh

View File

@@ -1,27 +0,0 @@
# Dodge the Creeps
This is a simple game where your character must move
and avoid the enemies for as long as possible.
This is a finished version of the game featured in the
["Your first game"](https://docs.godotengine.org/en/latest/getting_started/step_by_step/your_first_game.html)
tutorial in the documentation. For more details,
consider following the tutorial in the documentation.
Language: GDScript
Renderer: GLES 3 (particles are not available in GLES 2)
Note: There is a C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/dodge_the_creeps).
## Screenshots
![GIF from the documentation](https://docs.godotengine.org/en/latest/_images/dodge_preview.gif)
## Licenses
`art/House In a Forest Loop.ogg` Copyright &copy; 2012 [HorrorPen](https://opengameart.org/users/horrorpen), [CC-BY 3.0: Attribution](http://creativecommons.org/licenses/by/3.0/). Source: https://opengameart.org/content/loop-house-in-a-forest
Images are from "Abstract Platformer". Copyright &copy; 2010-2020 kenney.nl, [CC0 1.0 Universal](http://creativecommons.org/publicdomain/zero/1.0/). Source: https://www.kenney.nl/assets/abstract-platformer
Font is "Xolonium". Copyright &copy; 2011-2016 Severin Meyer <sev.ch@web.de>, with Reserved Font Name Xolonium, SIL open font license version 1.1. Details are in `fonts/LICENSE.txt`.

View File

@@ -0,0 +1,2 @@
"Abstract Platformer" by kenney.nl is licensed under http://creativecommons.org/publicdomain/zero/1.0/
"House in a Forest Loop" by https://opengameart.org/users/horrorpen is licensed under http://creativecommons.org/licenses/by/3.0/

View File

@@ -1,94 +1,94 @@
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
with Reserved Font Name Xolonium.
This Font Software is licensed under the SIL Open Font License,
Version 1.1. This license is copied below, and is also available
with a FAQ at <http://scripts.sil.org/OFL>
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
with Reserved Font Name Xolonium.
This Font Software is licensed under the SIL Open Font License,
Version 1.1. This license is copied below, and is also available
with a FAQ at <http://scripts.sil.org/OFL>
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -16,12 +16,6 @@ _global_script_class_icons={
[application]
config/name="Dodge the Creeps"
config/description="This is a simple game where your character must move
and avoid the enemies for as long as possible.
This is a finished version of the game featured in the 'Your first game'
tutorial in the documentation, but ported to C#. For more details,
consider following the tutorial in the documentation."
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"

View File

@@ -1,30 +0,0 @@
# Hierarchical Finite State Machine
This example shows how to apply the State machine programming
pattern in GDscript, including Hierarchical States, and a
pushdown automaton.
Language: GDScript
Renderer: GLES 2
## Why use a state machine
States are common in games. You can use the pattern to:
1. Separate each behavior and transitions between behaviors,
thus make scripts shorter and easier to manage.
2. Respect the Single Responsibility Principle.
Each State object represents one action.
3. Improve your code's structure. Look at the scene tree and
FileSystem tab: without looking at the code, you'll know
what the Player can or cannot do.
You can read more about States in the excellent
[Game Programming Patterns ebook](https://gameprogrammingpatterns.com/state.html).
## Screenshots
![Screenshot](screenshots/fsm-attack.png)

View File

@@ -115,7 +115,7 @@ align = 1
valign = 1
uppercase = true
script = ExtResource( 15 )
[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
[connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"]
[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
[connection signal="animation_finished" from="AnimationPlayer" to="StateMachine" method="_on_animation_finished"]
[connection signal="attack_finished" from="BodyPivot/WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"]

View File

@@ -15,10 +15,7 @@ _global_script_class_icons={
[application]
config/name="Hierarchical Finite State Machine"
config/description="This example shows how to apply the State machine programming
pattern in GDscript, including Hierarchical States, and a
pushdown automaton."
config/name="Hierarchical Finite State Machine example"
run/main_scene="res://Demo.tscn"
config/icon="res://icon.png"
@@ -100,5 +97,4 @@ attack={
[rendering]
quality/driver/driver_name="GLES2"
environment/default_environment="res://default_env.tres"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -7,9 +7,10 @@ extends Node
signal state_changed(current_state)
# You should set a starting node from the inspector or on the node that inherits
# from this state machine interface. If you don't, the game will default to
# the first state in the state machine's children.
# You must set a starting node from the inspector or on
# the node that inherits from this state machine interface.
# If you don't the game will crash (on purpose, so you won't
# forget to initialize the state machine).
export(NodePath) var start_state
var states_map = {}
@@ -59,14 +60,14 @@ 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]
current_state = states_stack[0]
emit_signal("state_changed", current_state)
if state_name != "previous":
current_state.enter()

View File

@@ -10,23 +10,19 @@ bg_color = Color( 1, 1, 1, 1 )
[node name="PaintRoot" type="Control"]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DrawingAreaBG" type="Panel" parent="."]
margin_left = 350.0
margin_right = 1280.0
margin_bottom = 720.0
custom_styles/panelf = SubResource( 1 )
custom_styles/panel = SubResource( 1 )
custom_styles/panelnc = SubResource( 1 )
[node name="PaintControl" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TLPos" type="Position2D" parent="PaintControl"]
position = Vector2( 350, 0 )
@@ -141,6 +137,7 @@ text = "Brush shape: Circle"
align = 1
[node name="ButtonShapeBox" type="Button" parent="ToolsPanel/BrushSettings"]
editor/display_folded = true
margin_left = 100.0
margin_top = 100.0
margin_right = 160.0
@@ -154,6 +151,7 @@ region_enabled = true
region_rect = Rect2( 0, 16, 16, 16 )
[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"]
editor/display_folded = true
margin_left = 190.0
margin_top = 100.0
margin_right = 250.0

View File

@@ -1,13 +0,0 @@
# GD Paint
GD Paint is a simple image editor made using Godot and GDScript.
It supports different types of "brushes": a basic pen/pencil
and eraser, as well as a rectangle and a circle brush.
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/gdpaint.png)

View File

@@ -16,9 +16,6 @@ _global_script_class_icons={
[application]
config/name="GD Paint"
config/description="GD Paint is a simple image editor made using Godot and GDScript.
It supports different types of 'brushes': a basic pen/pencil
and eraser, as well as a rectangle and a circle brush."
run/main_scene="res://Paint_root.tscn"
config/icon="res://icon.png"
@@ -35,5 +32,4 @@ singletons=[ ]
[rendering]
quality/driver/driver_name="GLES2"
environment/default_environment="res://default_env.tres"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,18 +1,13 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
radiance_size = 4
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
sky_curve = 0.25
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
ground_curve = 0.01
sun_energy = 16.0
[resource]
background_mode = 2
background_sky = SubResource( 1 )
fog_height_min = 0.0
fog_height_max = 100.0
ssao_quality = 0

View File

@@ -0,0 +1,36 @@
extends TileMap
enum CellType { EMPTY = -1, ACTOR, OBSTACLE, OBJECT }
func _ready():
for child in get_children():
set_cellv(world_to_map(child.position), child.type)
func get_cell_pawn(coordinates):
for node in get_children():
if world_to_map(node.position) == coordinates:
return(node)
func request_move(pawn, direction):
var cell_start = world_to_map(pawn.position)
var cell_target = cell_start + direction
var cell_target_type = get_cellv(cell_target)
match cell_target_type:
CellType.EMPTY:
return update_pawn_position(pawn, cell_start, cell_target)
CellType.OBJECT:
var object_pawn = get_cell_pawn(cell_target)
object_pawn.queue_free()
return update_pawn_position(pawn, cell_start, cell_target)
CellType.ACTOR:
var pawn_name = get_cell_pawn(cell_target).name
print("Cell %s contains %s" % [cell_target, pawn_name])
func update_pawn_position(pawn, cell_start, cell_target):
set_cellv(cell_target, pawn.type)
set_cellv(cell_start, CellType.EMPTY)
return map_to_world(cell_target) + cell_size / 2

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,84 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://pawns/actor.gd" type="Script" id=1]
[ext_resource path="res://pawns/sprites/character.png" type="Texture" id=2]
[sub_resource type="Animation" id=1]
resource_name = "bump"
length = 0.1
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("Pivot/Sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.02, 0.04, 0.06, 0.08, 0.1 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( -1.5, -9 ), Vector2( 6.5, 2.5 ), Vector2( -11.5, 8.5 ), Vector2( 4, -5 ), Vector2( 0, 0 ) ]
}
[sub_resource type="Animation" id=2]
resource_name = "walk"
length = 0.25
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath("Pivot/Sprite:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = false
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.25 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0.9375, 0, 1 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Pivot/Sprite:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.1, 0.15, 0.25 ),
"transitions": PoolRealArray( 1, 0.303143, 2.61003, 1 ),
"update": 0,
"values": [ Vector2( 1.43051e-06, -1.90735e-06 ), Vector2( 1.43051e-06, -1.90735e-06 ), Vector2( 0, -20 ), Vector2( 1.43051e-06, -1.90735e-06 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Pivot/Sprite:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.25 ),
"transitions": PoolRealArray( 1, 0.354553, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1.20007, 0.917384 ), Vector2( 0.916712, 1.13495 ), Vector2( 1, 1 ) ]
}
[node name="Actor" type="Node2D"]
position = Vector2( 32, 32 )
z_index = 1
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/bump = SubResource( 1 )
anims/walk = SubResource( 2 )
[node name="Tween" type="Tween" parent="."]
[node name="Pivot" type="Position2D" parent="."]
[node name="Sprite" type="Sprite" parent="Pivot"]
position = Vector2( 1.43051e-06, -1.90735e-06 )
texture = ExtResource( 2 )
centered = false
offset = Vector2( -32, -32 )

View File

@@ -0,0 +1,55 @@
extends "pawn.gd"
onready var grid = get_parent()
func _ready():
update_look_direction(Vector2.RIGHT)
func _process(_delta):
var input_direction = get_input_direction()
if not input_direction:
return
update_look_direction(input_direction)
var target_position = grid.request_move(self, input_direction)
if target_position:
move_to(target_position)
else:
bump()
func get_input_direction():
return Vector2(
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
)
func update_look_direction(direction):
$Pivot/Sprite.rotation = direction.angle()
func move_to(target_position):
set_process(false)
$AnimationPlayer.play("walk")
# Move the node to the target cell instantly,
# and animate the sprite moving from the start to the target cell
var move_direction = (target_position - position).normalized()
$Tween.interpolate_property($Pivot, "position", - move_direction * 32, Vector2(), $AnimationPlayer.current_animation_length, Tween.TRANS_LINEAR, Tween.EASE_IN)
position = target_position
$Tween.start()
# Stop the function execution until the animation finished
yield($AnimationPlayer, "animation_finished")
set_process(true)
func bump():
set_process(false)
$AnimationPlayer.play("bump")
yield($AnimationPlayer, "animation_finished")
set_process(true)

View File

@@ -0,0 +1,5 @@
extends Node2D
enum CellType { ACTOR, OBSTACLE, OBJECT }
#warning-ignore:unused_class_variable
export(CellType) var type = CellType.ACTOR

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/character.png-98ed16816c5b464731c4fa68fe5b8613.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://pawns/sprites/character.png"
dest_files=[ "res://.import/character.png-98ed16816c5b464731c4fa68fe5b8613.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/character_grey.png-a95d64c2e947e85f04dd1c6474e46965.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://pawns/sprites/character_grey.png"
dest_files=[ "res://.import/character_grey.png-a95d64c2e947e85f04dd1c6474e46965.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
path="res://.import/star.png-4f164f82cf41ace82182660f1be8e68d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
source_file="res://pawns/sprites/star.png"
dest_files=[ "res://.import/star.png-4f164f82cf41ace82182660f1be8e68d.stex" ]
[params]

View File

@@ -0,0 +1,66 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]
config/name="Grid Movement"
run/main_scene="res://Game.tscn"
config/icon="res://icon.png"
[display]
window/size/width=1280
window/size/height=720
window/stretch/mode="2d"
window/stretch/aspect="expand"
[input]
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
}
move_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
}
[rendering]
environment/default_environment="res://default_env.tres"

View File

@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://tilesets/grid/actor.png" type="Texture" id=1]
[ext_resource path="res://tilesets/grid/obstacle.png" type="Texture" id=2]
[ext_resource path="res://tilesets/grid/object.png" type="Texture" id=3]
[node name="Node2D" type="Node2D"]
[node name="Actor" type="Sprite" parent="."]
position = Vector2( 32, 32 )
texture = ExtResource( 1 )
[node name="Obstacle" type="Sprite" parent="."]
position = Vector2( 96, 32 )
texture = ExtResource( 2 )
[node name="Object" type="Sprite" parent="."]
position = Vector2( 160, 32 )
texture = ExtResource( 3 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/godot.png-a942b208c71d1b44958f34d302d011ec.stex"
path="res://.import/actor.png-6a88af8a7bcb079732153877dfb0db8b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/cube/godot.png"
dest_files=[ "res://.import/godot.png-a942b208c71d1b44958f34d302d011ec.stex" ]
source_file="res://tilesets/grid/actor.png"
dest_files=[ "res://.import/actor.png-6a88af8a7bcb079732153877dfb0db8b.stex" ]
[params]

View File

@@ -0,0 +1,37 @@
[gd_resource type="TileSet" load_steps=4 format=2]
[ext_resource path="res://tilesets/grid/actor.png" type="Texture" id=1]
[ext_resource path="res://tilesets/grid/obstacle.png" type="Texture" id=2]
[ext_resource path="res://tilesets/grid/object.png" type="Texture" id=3]
[resource]
0/name = "Actor"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 64, 64 )
0/is_autotile = false
0/occluder_offset = Vector2( 32, 32 )
0/navigation_offset = Vector2( 32, 32 )
0/shapes = [ ]
1/name = "Obstacle"
1/texture = ExtResource( 2 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 0, 0, 64, 64 )
1/is_autotile = false
1/occluder_offset = Vector2( 32, 32 )
1/navigation_offset = Vector2( 32, 32 )
1/shapes = [ ]
2/name = "Object"
2/texture = ExtResource( 3 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 0, 0, 64, 64 )
2/is_autotile = false
2/occluder_offset = Vector2( 32, 32 )
2/navigation_offset = Vector2( 32, 32 )
2/shapes = [ ]
_sections_unfolded = [ "0", "1" ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/obstacle.png-06287f6b2d26dd03335fd87ab78c2cc2.stex"
path="res://.import/object.png-3e89ebfb3424e8759914732b2b0130c1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/obstacle.png"
dest_files=[ "res://.import/obstacle.png-06287f6b2d26dd03335fd87ab78c2cc2.stex" ]
source_file="res://tilesets/grid/object.png"
dest_files=[ "res://.import/object.png-3e89ebfb3424e8759914732b2b0130c1.stex" ]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/princess.png-359cb1d8a4fd115119b22ac7899e2787.stex"
path="res://.import/obstacle.png-9f01dd1d06d7b99515918b65b46bd6c1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/princess.png"
dest_files=[ "res://.import/princess.png-359cb1d8a4fd115119b22ac7899e2787.stex" ]
source_file="res://tilesets/grid/obstacle.png"
dest_files=[ "res://.import/obstacle.png-9f01dd1d06d7b99515918b65b46bd6c1.stex" ]
[params]

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://tilesets/grid_lines/grid_lines.png" type="Texture" id=1]
[node name="TileSet" type="Node2D"]
[node name="Grass" type="Sprite" parent="."]
position = Vector2( 32, 32 )
texture = ExtResource( 1 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/long_obstacle.png-d70ee394f796e1de9a423783aa84ec5d.stex"
path="res://.import/grid_lines.png-beef853b47aa830c8383e5f6cc4d03ce.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/long_obstacle.png"
dest_files=[ "res://.import/long_obstacle.png-d70ee394f796e1de9a423783aa84ec5d.stex" ]
source_file="res://tilesets/grid_lines/grid_lines.png"
dest_files=[ "res://.import/grid_lines.png-beef853b47aa830c8383e5f6cc4d03ce.stex" ]
[params]

View File

@@ -0,0 +1,16 @@
[gd_resource type="TileSet" load_steps=2 format=2]
[ext_resource path="res://tilesets/grid_lines/grid_lines.png" type="Texture" id=1]
[resource]
0/name = "Grass"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 64, 64 )
0/is_autotile = false
0/occluder_offset = Vector2( 32, 32 )
0/navigation_offset = Vector2( 32, 32 )
0/shapes = [ ]

View File

@@ -1,16 +0,0 @@
# HDR for 2D
Simple demo how to use High Dynamic Range (HDR) in a 2D game,
via the WorldEnvironment node.
Just slide the cave image left and right to observe the HDR effect at work.
Language: GDScript
Renderer: GLES 3 (HDR is not available in GLES 2)
## Screenshots
![Screenshot](screenshots/left.png)
![Screenshot](screenshots/right.png)

View File

@@ -16,10 +16,6 @@ _global_script_class_icons={
[application]
config/name="HDR for 2D"
config/description="Simple demo how to use High Dynamic Range (HDR) in a 2D game,
via the WorldEnvironment node.
Just slide the cave image left and right to observe the HDR effect at work."
run/main_scene="res://beach_cave.tscn"
config/icon="res://icon.png"
run/name=""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

View File

@@ -1,11 +0,0 @@
# Hexagonal Game
Very simple demo showing a hexagonal TileMap and TileSet.
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/hex.png)

View File

@@ -16,9 +16,9 @@ _global_script_class_icons={
[application]
config/name="Hexagonal Game"
config/description="Very simple demo showing a hexagonal TileMap and TileSet."
run/main_scene="res://map.tscn"
config/icon="res://icon.png"
run/name=""
[display]
@@ -66,5 +66,4 @@ move_up={
[rendering]
quality/driver/driver_name="GLES2"
environment/default_clear_color=Color( 0.172549, 0.219608, 0.129412, 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

View File

@@ -1,12 +1,12 @@
extends KinematicBody2D
const MOTION_SPEED = 160 # Pixels/second.
const MOTION_SPEED = 160 # Pixels/second
func _physics_process(_delta):
var motion = Vector2()
motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
motion.y *= 0.57735056839 # tan(30 degrees).
motion.y *= 0.5
motion = motion.normalized() * MOTION_SPEED
#warning-ignore:return_value_discarded
move_and_slide(motion)

View File

@@ -1,24 +0,0 @@
# Isometric Game
This demo shows a traditional isometric view with depth sorting.
A character can move around the level and will also slide around objects,
as well as be occluded when standing in front or behind them.
Language: GDScript
Renderer: GLES 2
## How does it work?
The level uses a [`TileMap`](https://docs.godotengine.org/en/latest/classes/class_tilemap.html#class-tilemap)
in which the tiles have different vertical offsets.
The walls, doors, and pillars each have
[`StaticBody2D`](https://docs.godotengine.org/en/latest/classes/class_staticbody2d.html)
and [`CollisionPolygon2D`](https://docs.godotengine.org/en/latest/classes/class_collisionpolygon2d.html)
at their base. The player also has a collider at its base,
which makes the player collide with the level.
## Screenshots
![Screenshot](screenshots/isometric.png)

View File

@@ -10,9 +10,8 @@ mode = 1
tile_set = ExtResource( 1 )
cell_size = Vector2( 128, 64 )
cell_tile_origin = 1
centered_textures = true
format = 1
tile_data = PoolIntArray( -917493, 0, 0, -917492, 0, 0, -917491, 0, 0, -917490, 0, 0, -851957, 0, 0, -851956, 0, 0, -851955, 0, 0, -851954, 0, 0, -786421, 0, 0, -786420, 1, 0, -786419, 0, -1200553578, -786418, 0, 0, -720885, 0, 0, -720884, 0, 0, -720883, 0, -1200553578, -720882, 0, 0, -655349, 0, 0, -655348, 1, 0, -655347, 0, -1200553578, -655346, 0, 0, -589813, 0, 0, -589812, 1, 0, -589811, 0, -1200553578, -589810, 0, 0, -524277, 0, 0, -524276, 0, 0, -524275, 1, -1200553578, -524274, 0, 0, -458747, 0, 0, -458746, 0, 0, -458745, 0, 0, -458744, 0, 0, -458743, 0, 0, -458742, 0, 0, -458741, 0, 0, -458740, 0, 0, -458739, 0, -1200553578, -458738, 0, 0, -393211, 0, 0, -393210, 0, 0, -393209, 0, 0, -393208, 0, 0, -393207, 0, 0, -393206, 0, 0, -393205, 0, 0, -393204, 0, 0, -393203, 0, -1200553578, -393202, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, -1200553578, -327672, 1, -1200553578, -327671, 1, -1200553578, -327670, 1, 0, -327669, 1, 0, -327668, 1, 0, -327667, 0, -1200553578, -327666, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, -1200553578, -262136, 0, -1200553578, -262135, 0, -1200553578, -262134, 0, -1200553578, -262133, 0, -1200553578, -262132, 0, -1200553578, -262131, 0, -1200553578, -262130, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, -1200553578, -196600, 0, -1200553578, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, -1200553578, -131064, 0, -1200553578, -131063, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, -1200553578, -65528, 0, -1200553578, -65527, 0, 0, 5, 0, 0, 6, 0, 0, 7, 1, -1200553578, 8, 0, -1200553578, 9, 0, 0, 65541, 0, 0, 65542, 0, 0, 65543, 0, -1200553578, 65544, 0, -1200553578, 65545, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, -1200553578, 131080, 0, -1200553578, 131081, 0, 0, 196613, 0, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0 )
tile_data = PoolIntArray( -851956, 0, -1200553578, -851955, 0, -1200553578, -851954, 0, -1200553578, -786420, 1, -1200553578, -786419, 0, -1200553578, -786418, 0, -1200553578, -720884, 0, -1200553578, -720883, 0, -1200553578, -720882, 0, -1200553578, -655348, 1, -1200553578, -655347, 0, -1200553578, -655346, 0, -1200553578, -589812, 1, -1200553578, -589811, 0, -1200553578, -589810, 0, -1200553578, -524276, 0, -1200553578, -524275, 1, -1200553578, -524274, 0, -1200553578, -458740, 0, -1200553578, -458739, 0, -1200553578, -458738, 0, -1200553578, -393210, 0, -1200553578, -393209, 0, -1200553578, -393208, 0, -1200553578, -393207, 0, -1200553578, -393206, 0, -1200553578, -393205, 0, -1200553578, -393204, 0, -1200553578, -393203, 0, -1200553578, -393202, 0, -1200553578, -327674, 0, -1200553578, -327673, 0, -1200553578, -327672, 1, -1200553578, -327671, 1, -1200553578, -327670, 1, -1200553578, -327669, 1, -1200553578, -327668, 1, -1200553578, -327667, 0, -1200553578, -327666, 0, -1200553578, -262138, 0, -1200553578, -262137, 0, -1200553578, -262136, 0, -1200553578, -262135, 0, -1200553578, -262134, 0, -1200553578, -262133, 0, -1200553578, -262132, 0, -1200553578, -262131, 0, -1200553578, -262130, 0, -1200553578, -196602, 0, -1200553578, -196601, 0, -1200553578, -196600, 0, -1200553578, -196599, 0, -1200553578, -196598, 0, -1200553578, -196597, 0, -1200553578, -196596, 0, -1200553578, -196595, 0, -1200553578, -196594, 0, -1200553578, -131066, 0, -1200553578, -131065, 0, -1200553578, -131064, 0, -1200553578, -131063, 0, -1200553578, -65530, 0, -1200553578, -65529, 0, -1200553578, -65528, 0, -1200553578, -65527, 0, -1200553578, 6, 0, -1200553578, 7, 1, -1200553578, 8, 0, -1200553578, 9, 0, -1200553578, 65542, 0, -1200553578, 65543, 0, -1200553578, 65544, 0, -1200553578, 65545, 0, -1200553578, 131078, 0, -1200553578, 131079, 0, -1200553578, 131080, 0, -1200553578, 131081, 0, -1200553578, 196614, 0, -1200553578, 196615, 0, -1200553578, 196616, 0, -1200553578 )
[node name="Walls" type="TileMap" parent="."]
mode = 1
@@ -20,9 +19,8 @@ tile_set = ExtResource( 1 )
cell_size = Vector2( 128, 64 )
cell_tile_origin = 1
cell_y_sort = true
centered_textures = true
format = 1
tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, 0, -458741, 2, 0, -458740, 2, 0, -458738, 2, 0, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262129, 2, -1200553578, -196603, 2, 0, -196601, 3, 0, -196593, 2, -1200553578, -131067, 2, 0, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, 0, -65530, 2, 0, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, 0, 65541, 2, -1200553578, 65546, 2, 0, 131077, 2, -1200553578, 131081, 3, 0, 131082, 2, 0, 196613, 2, -1200553578, 196618, 2, 0, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, 0, 262153, 2, 0, 262154, 2, 0 )
tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, -1200553578, -458741, 2, -1200553578, -458740, 2, -1200553578, -458738, 2, -1200553578, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393205, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262129, 2, -1200553578, -196603, 2, 0, -196601, 3, 0, -196593, 2, -1200553578, -131067, 2, 0, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, 0, -65530, 2, 0, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, 0, 65541, 2, -1200553578, 65546, 2, 0, 131077, 2, -1200553578, 131081, 3, 0, 131082, 2, 0, 196613, 2, -1200553578, 196618, 2, 0, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, -1200553578, 262153, 2, -1200553578, 262154, 2, -1200553578 )
[node name="Troll" parent="Walls" instance=ExtResource( 2 )]
position = Vector2( 368.142, 347.007 )

View File

@@ -16,10 +16,6 @@ _global_script_class_icons={
[application]
config/name="Isometric Game"
config/description="This demo shows a traditional isometric view with depth sorting.
A character can move around the level and will also slide around objects,
as well as be occluded when standing in front or behind them."
run/main_scene="res://dungeon.tscn"
config/icon="res://icon.png"
@@ -78,5 +74,4 @@ use_pixel_snap=true
[rendering]
quality/driver/driver_name="GLES2"
environment/default_clear_color=Color( 0.0784314, 0.105882, 0.145098, 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

View File

@@ -3,80 +3,80 @@
[ext_resource path="res://isotiles.png" type="Texture" id=1]
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 0, -32, 64, 0, 0, 32, -64, 0 )
points = PoolVector2Array( -4, -30, 60, 2, -4, 34, -68, 2 )
[sub_resource type="ConvexPolygonShape2D" id=2]
points = PoolVector2Array( -24, -12, -10, -22, 10, -22, 24, -12, 24, 2, 10, 12, -10, 12, -24, 2 )
points = PoolVector2Array( -4, -22, 12, -22, 28, -6, 4, 10, -4, 10, -20, -6 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( -40, 16, 24, -16, 40, -8, -24, 24 )
points = PoolVector2Array( -21.905, 23.3748, 50.095, -8.62516, 66.095, -0.62516, -5.90501, 31.3748 )
[resource]
0/name = "Base"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/tex_offset = Vector2( -66, -42 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 28, 75, 135, 105 )
0/region = Rect2( 28, 92, 132, 84 )
0/tile_mode = 0
0/occluder_offset = Vector2( 67.5, 52.5 )
0/navigation_offset = Vector2( 67.5, 52.5 )
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shapes = [ ]
0/z_index = 0
1/name = "Base2"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/tex_offset = Vector2( -66, -42 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 221, 75, 135, 105 )
1/region = Rect2( 220, 92, 132, 84 )
1/tile_mode = 0
1/occluder_offset = Vector2( 67.5, 52.5 )
1/navigation_offset = Vector2( 67.5, 52.5 )
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shapes = [ ]
1/z_index = 0
2/name = "Wall"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, -32 )
2/tex_offset = Vector2( -69.3109, -99.8051 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 28, 220, 140, 140 )
2/region = Rect2( 28, 220, 132, 136 )
2/tile_mode = 0
2/occluder_offset = Vector2( 70, 70 )
2/navigation_offset = Vector2( 70, 70 )
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 1 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 70, 70 )
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
2/z_index = 0
3/name = "Column"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, -32 )
3/tex_offset = Vector2( -69.5632, -100.446 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 259, 241, 55, 95 )
3/region = Rect2( 220, 220, 132, 136 )
3/tile_mode = 0
3/occluder_offset = Vector2( 27.5, 47.5 )
3/navigation_offset = Vector2( 27.5, 47.5 )
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 2 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 29.5, 47.5 )
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
3/z_index = 0
4/name = "Door1"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, -25 )
4/tex_offset = Vector2( -50.3623, -90.8164 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 54, 426, 85, 110 )
4/region = Rect2( 24, 408, 132, 136 )
4/tile_mode = 0
4/occluder_offset = Vector2( 42.5, 55 )
4/navigation_offset = Vector2( 42.5, 55 )
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 42.5, 55 )
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
4/z_index = 0

View File

@@ -5,49 +5,56 @@
[node name="TilesetEdit" type="Node2D"]
[node name="Base" type="Sprite" parent="."]
position = Vector2( 150.049, 61.1264 )
texture = ExtResource( 1 )
centered = false
offset = Vector2( -66, -42 )
region_enabled = true
region_rect = Rect2( 28, 75, 135, 105 )
region_rect = Rect2( 28, 92, 132, 84 )
[node name="Base2" type="Sprite" parent="."]
position = Vector2( 200, 0 )
position = Vector2( 257.013, 124.86 )
texture = ExtResource( 1 )
centered = false
offset = Vector2( -66, -42 )
region_enabled = true
region_rect = Rect2( 221, 75, 135, 105 )
region_rect = Rect2( 220, 92, 132, 84 )
[node name="Wall" type="Sprite" parent="."]
position = Vector2( 400, 0 )
position = Vector2( 421.311, 137.805 )
texture = ExtResource( 1 )
offset = Vector2( 0, -32 )
centered = false
offset = Vector2( -69.3109, -99.8051 )
region_enabled = true
region_rect = Rect2( 28, 220, 140, 140 )
region_rect = Rect2( 28, 220, 132, 136 )
[node name="StaticBody2D" type="StaticBody2D" parent="Wall"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/StaticBody2D"]
polygon = PoolVector2Array( -64, 0, 0, 32, 64, 0, 0, -32 )
[node name="collision" type="CollisionPolygon2D" parent="Wall/StaticBody2D"]
polygon = PoolVector2Array( -68, 2, -4, 34, 60, 2, -4, -30 )
[node name="Column" type="Sprite" parent="."]
position = Vector2( 600, 0 )
position = Vector2( 359.563, 266.446 )
texture = ExtResource( 1 )
offset = Vector2( 0, -32 )
centered = false
offset = Vector2( -69.5632, -100.446 )
region_enabled = true
region_rect = Rect2( 259, 241, 55, 95 )
region_rect = Rect2( 220, 220, 132, 136 )
[node name="StaticBody2D" type="StaticBody2D" parent="Column"]
[node name="StaticBody" type="StaticBody2D" parent="Column"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody2D"]
position = Vector2( 2, 0 )
polygon = PoolVector2Array( -24, 2, -10, 12, 10, 12, 24, 2, 24, -12, 10, -22, -10, -22, -24, -12 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody"]
polygon = PoolVector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 )
[node name="Door1" type="Sprite" parent="."]
position = Vector2( 800, 0 )
position = Vector2( -24.1548, 142.216 )
texture = ExtResource( 1 )
offset = Vector2( 0, -25 )
centered = false
offset = Vector2( -50.3623, -90.8164 )
region_enabled = true
region_rect = Rect2( 54, 426, 85, 110 )
region_rect = Rect2( 24, 408, 132, 136 )
[node name="StaticBody2D" type="StaticBody2D" parent="Door1"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Door1/StaticBody2D"]
polygon = PoolVector2Array( -24, 24, 40, -8, 24, -16, -40, 16 )
polygon = PoolVector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 )

View File

@@ -1,6 +1,6 @@
extends KinematicBody2D
const MOTION_SPEED = 160 # Pixels/second.
const MOTION_SPEED = 160 # Pixels/second
func _physics_process(_delta):
var motion = Vector2()

View File

@@ -10,10 +10,11 @@ radius = 16.0
script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( -4, -28 )
position = Vector2( -3.94334, -36.924 )
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -0.342697, -0.980721 )
shape = SubResource( 1 )
[node name="Camera2D" type="Camera2D" parent="."]

View File

@@ -1,14 +0,0 @@
# Kinematic Character 2D
Example of how to make a kinematic character controller in 2D using
[`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
The character moves around, is affected by moving platforms,
can jump through one-way collision platforms, etc.
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/kinematic.png)

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/circle.png-65a28e998f412b3cddff971e28b7d768.stex"
path="res://.import/circle.png-10953cad44a8947fbdd4128a631e9e52.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/circle.png"
dest_files=[ "res://.import/circle.png-65a28e998f412b3cddff971e28b7d768.stex" ]
source_file="res://circle.png"
dest_files=[ "res://.import/circle.png-10953cad44a8947fbdd4128a631e9e52.stex" ]
[params]

View File

@@ -1,5 +0,0 @@
extends Node
func _on_body_entered(body):
if body.name == "Player":
$"../WinText".show()

View File

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/long_obstacle.png-1b33440a15b4db156b2a9ec7e9a2a80e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://long_obstacle.png"
dest_files=[ "res://.import/long_obstacle.png-1b33440a15b4db156b2a9ec7e9a2a80e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
path="res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
source_file="res://obstacle.png"
dest_files=[ "res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex" ]
[params]

View File

@@ -0,0 +1,57 @@
extends KinematicBody2D
# Angle in degrees towards either side that the player can consider "floor".
const FLOOR_ANGLE_TOLERANCE = 40
const WALK_FORCE = 600
const WALK_MIN_SPEED = 10
const WALK_MAX_SPEED = 200
const STOP_FORCE = 1300
const JUMP_SPEED = 200
const JUMP_MAX_AIRBORNE_TIME = 0.2
const SLIDE_STOP_VELOCITY = 1.0 # Pixels/second
const SLIDE_STOP_MIN_TRAVEL = 1.0 # Pixels
var velocity = Vector2()
var on_air_time = 100
var jumping = false
var prev_jump_pressed = false
onready var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
func _physics_process(delta):
var force = Vector2(0, gravity)
var walk = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
var jump = Input.is_action_pressed("jump")
if (velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED) or (velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED):
force.x += WALK_FORCE * walk
if abs(walk) < 0.5:
var vsign = sign(velocity.x)
var vlen = abs(velocity.x)
vlen -= STOP_FORCE * delta
if vlen < 0:
vlen = 0
velocity.x = vlen * vsign
# Integrate forces to velocity.
velocity += force * delta
# Integrate velocity into motion and move.
velocity = move_and_slide(velocity, Vector2.UP)
if is_on_floor():
on_air_time = 0
if jumping and velocity.y > 0:
# If falling, no longer jumping.
jumping = false
if on_air_time < JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping:
# Jump must also be allowed to happen if the character left the floor a little bit ago.
# Makes controls more snappy.
velocity.y = -JUMP_SPEED
jumping = true
on_air_time += delta
prev_jump_pressed = jump

View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/player.png-1ad27fc2a62fa126eae918723933dd6f.stex"
path="res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/player.png"
dest_files=[ "res://.import/player.png-1ad27fc2a62fa126eae918723933dd6f.stex" ]
source_file="res://player.png"
dest_files=[ "res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex" ]
[params]

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://player/player.gd" type="Script" id=1]
[ext_resource path="res://player/player.png" type="Texture" id=2]
[ext_resource path="res://player.gd" type="Script" id=1]
[ext_resource path="res://player.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7, 7 )

View File

@@ -1,32 +0,0 @@
extends KinematicBody2D
const WALK_FORCE = 600
const WALK_MAX_SPEED = 200
const STOP_FORCE = 1300
const JUMP_SPEED = 200
var velocity = Vector2()
onready var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
func _physics_process(delta):
# Horizontal movement code. First, get the player's input.
var walk = WALK_FORCE * (Input.get_action_strength("move_right") - Input.get_action_strength("move_left"))
# Slow down the player if they're not trying to move.
if abs(walk) < WALK_FORCE * 0.2:
# The velocity, slowed down a bit, and then reassigned.
velocity.x = move_toward(velocity.x, 0, STOP_FORCE * delta)
else:
velocity.x += walk * delta
# Clamp to the maximum horizontal movement speed.
velocity.x = clamp(velocity.x, -WALK_MAX_SPEED, WALK_MAX_SPEED)
# Vertical movement code. Apply gravity.
velocity.y += gravity * delta
# Move based on the velocity and snap to the ground.
velocity = move_and_slide_with_snap(velocity, Vector2.DOWN, Vector2.UP)
# Check for jumping. is_on_floor() must be called after movement code.
if is_on_floor() and Input.is_action_just_pressed("jump"):
velocity.y = -JUMP_SPEED

View File

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 495 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
path="res://.import/princess.png-9b4caf2cfe324ae3734249d5b559d39d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
source_file="res://princess.png"
dest_files=[ "res://.import/princess.png-9b4caf2cfe324ae3734249d5b559d39d.stex" ]
[params]

View File

@@ -15,10 +15,7 @@ _global_script_class_icons={
[application]
config/name="Kinematic Character 2D"
config/description="Example of how to make a kinematic character controller in 2D using
KinematicBody2D. The character moves around, is affected by moving
platforms, can jump through one-way collision platforms, etc."
config/name="Kinematic Character"
run/main_scene="res://world.tscn"
config/icon="res://icon.png"
@@ -74,5 +71,4 @@ multithread/thread_rid_pool_prealloc=60
[rendering]
quality/driver/driver_name="GLES2"
environment/default_clear_color=Color( 0.156, 0.1325, 0.25, 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,6 @@
extends Node2D
func _on_princess_body_enter(body):
# The name of this editor-generated callback is unfortunate.
if body.get_name() == "Player":
$WinText.show()

View File

@@ -1,11 +1,11 @@
[gd_scene load_steps=19 format=2]
[ext_resource path="res://level/obstacle.png" type="Texture" id=2]
[ext_resource path="res://player/player.tscn" type="PackedScene" id=3]
[ext_resource path="res://level/princess.png" type="Texture" id=4]
[ext_resource path="res://level/circle.png" type="Texture" id=5]
[ext_resource path="res://level/long_obstacle.png" type="Texture" id=6]
[ext_resource path="res://level/princess.gd" type="Script" id=7]
[ext_resource path="res://world.gd" type="Script" id=1]
[ext_resource path="res://obstacle.png" type="Texture" id=2]
[ext_resource path="res://player.tscn" type="PackedScene" id=3]
[ext_resource path="res://princess.png" type="Texture" id=4]
[ext_resource path="res://circle.png" type="Texture" id=5]
[ext_resource path="res://long_obstacle.png" type="Texture" id=6]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8, 8 )
@@ -19,11 +19,6 @@ extents = Vector2( 8, 8 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 8, 8 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 8, 8 )
0/shape = SubResource( 1 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
@@ -117,6 +112,7 @@ extents = Vector2( 8, 8 )
extents = Vector2( 32, 8 )
[node name="World" type="Node2D"]
script = ExtResource( 1 )
[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource( 2 )
@@ -158,7 +154,6 @@ anims/updown = SubResource( 6 )
[node name="Princess" type="Area2D" parent="."]
position = Vector2( 97, 72 )
script = ExtResource( 7 )
[node name="Collision" type="CollisionShape2D" parent="Princess"]
shape = SubResource( 7 )
@@ -266,4 +261,4 @@ shape = SubResource( 12 )
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2( 265, 247 )
current = true
[connection signal="body_entered" from="Princess" to="Princess" method="_on_body_entered"]
[connection signal="body_entered" from="Princess" to="." method="_on_princess_body_enter"]

View File

@@ -1,11 +0,0 @@
# 2D Lights as Mask
Example of how to use 2D lights to mask objects on screen.
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/mask.png)

View File

@@ -15,8 +15,7 @@ _global_script_class_icons={
[application]
config/name="2D Lights as Mask"
config/description="Example of how to use 2D lights to mask objects on screen."
config/name="Using Lights as Mask"
run/main_scene="res://lightmask.tscn"
config/icon="res://icon.png"
@@ -32,7 +31,3 @@ singletons=[ ]
[rasterizer]
shadow_filter=3
[rendering]
quality/driver/driver_name="GLES2"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

View File

@@ -1,13 +0,0 @@
# 2D Lights and Shadows
Simple demo of 2D lights and shadows, using
[`Light2D`](https://docs.godotengine.org/en/latest/classes/class_light2d.html)
and [`LightOccluder2D`](https://docs.godotengine.org/en/latest/classes/class_lightoccluder2d.html).
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/lights.png)

View File

@@ -186,7 +186,6 @@ occluder = SubResource( 1 )
position = Vector2( 159.289, 452.441 )
texture = ExtResource( 3 )
color = Color( 1, 0.446392, 0.0576646, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.3
shadow_filter = 3
@@ -205,7 +204,6 @@ anims/motion2 = SubResource( 4 )
position = Vector2( 753.756, 314.336 )
texture = ExtResource( 3 )
color = Color( 0.49247, 0.878537, 0.409146, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.2
shadow_filter = 3
@@ -224,7 +222,6 @@ anims/motion = SubResource( 3 )
position = Vector2( 692.078, 31.1773 )
texture = ExtResource( 3 )
color = Color( 0.396752, 0.446392, 0.929792, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.4
shadow_filter = 3

View File

@@ -15,9 +15,7 @@ _global_script_class_icons={
[application]
config/name="2D Lights and Shadows"
config/description="Simple demo of 2D lights and shadows,
using Light2D and LightOccluder2D."
config/name="2D Lighting"
run/main_scene="res://light_shadows.tscn"
config/icon="res://icon.png"
@@ -36,7 +34,3 @@ singletons=[ ]
[rasterizer]
shadow_filter=2
[rendering]
quality/driver/driver_name="GLES2"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

View File

@@ -1,15 +0,0 @@
# Navigation Polygon 2D
Example of using 2D navigation using a
[`NavigationPolygon`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygon.html)
in a [`NavigationPolygonInstance`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygoninstance.html) node.
It uses the 2D navigation API to request a path between two points,
and then traverses the resulting path.
Language: GDScript
Renderer: GLES 2
## Screenshots
![Screenshot](screenshots/navigation.png)

View File

@@ -26,5 +26,5 @@ texture = ExtResource( 3 )
offset = Vector2( 0, -26 )
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2( 420, 300 )
offset = Vector2( 400, 300 )
current = true

View File

@@ -15,10 +15,7 @@ _global_script_class_icons={
[application]
config/name="Navigation Polygon 2D"
config/description="Example of using 2D navigation using a NavigationPolygon in a
NavigationPolygonInstance node. It uses the 2D navigation API to request
a path between two points, and then traverses the resulting path."
config/name="Navigation Polygon (2D)"
run/main_scene="res://level.tscn"
config/icon="res://icon.png"
@@ -44,5 +41,4 @@ click={
[rendering]
quality/driver/driver_name="GLES2"
environment/default_clear_color=Color( 0.160784, 0.172549, 0.278431, 1 )

Some files were not shown because too many files have changed in this diff Show More