Compare commits

..

327 Commits
3.1 ... 3.2

Author SHA1 Message Date
Aaron Franke
f43c0fb3a1 [3.2] Simplify list of branches in the README (#1255) 2025-10-02 16:55:39 -07:00
Rémi Verschelde
834c62fb88 Update README for new branches, matches Godot upstream
(cherry picked from commit c0180d20d1)
2023-02-28 18:36:43 +01:00
Aaron Franke
098e13cca2 [3.2] Update README for the new 3.3 branch 2021-11-05 10:16:59 -05:00
Aaron Franke
ee1252eafe Merge pull request #611 from aaronfranke/3.2-readme-license-3.2
[3.2] Update README for the new 3.2 branch
2021-04-21 03:52:20 -05:00
Aaron Franke
aa5aa936cb [3.2] Update README for the new 3.2 branch 2021-04-21 03:59:54 -04:00
Rémi Verschelde
94ec2ea5d9 Merge pull request #607 from aaronfranke/3.2-readme
Update README for the new 3.2 branch
2021-04-21 09:57:08 +02:00
Aaron Franke
40aec7c068 Update README for the new 3.2 branch 2021-04-14 13:46:19 -04:00
Aaron Franke
ead2777f48 Merge pull request #606 from nekomatata/physics-tests-contacts-update
Updated 2d/3d physics contact performance tests
2021-04-14 12:34:24 -05:00
PouleyKetchoupp
0a0d44d4f1 Updated 2d/3d physics contact performance tests 2021-04-14 08:19:10 -07:00
Aaron Franke
4911866f3d Merge pull request #604 from waimus/os_midi_scan_fix
Fix MIDI devices scanning
2021-04-05 16:51:00 -04:00
waimus
d7e1052205 Fix MIDI devices scanning 2021-04-06 03:10:33 +07:00
Aaron Franke
8e2dbf3f55 Merge pull request #602 from aaronfranke/etc
Use ETC instead of ETC2 for all GLES2 demos
2021-03-30 02:31:43 -04:00
Aaron Franke
2ee9b47f6c Use ETC instead of ETC2 for all GLES2 demos 2021-03-29 18:30:14 -04:00
Aaron Franke
d8dc94c1ff Merge pull request #601 from aaronfranke/ternary-volume
Use fewer ternary operators and decrease volume of Platformer 2D
2021-03-29 18:29:28 -04:00
Aaron Franke
d989bf6209 Use fewer ternary operators and decrease volume of Platformer 2D 2021-03-28 22:03:03 -04:00
Aaron Franke
021070215c Merge pull request #595 from dalexeev/bullet-shower-improve
Small improvement for Bullet Shower Demo
2021-03-26 20:20:31 -07:00
Aaron Franke
ac61cba05b Merge pull request #597 from aaronfranke/joy-24
Handle up to 24 joypad buttons in the Joypads demo
2021-03-15 04:34:12 -04:00
Aaron Franke
21e829416f Handle up to 24 joypad buttons in the Joypads demo 2021-03-13 23:28:22 -04:00
Danil Alexeev
cf7e4b31f4 Small improvement for Bullet Shower Demo 2021-03-13 21:04:13 +03:00
Aaron Franke
dc5c1016ce Merge pull request #594 from aaronfranke/assetlib-5c154da
Add links to the Asset Library after release 3.2-5c154da
2021-03-11 21:56:54 -08:00
Aaron Franke
8a0824a948 Add links to the Asset Library after release 3.2-5c154da
Also expand the CODEOWNERS file
2021-03-12 00:32:11 -05:00
Aaron Franke
5c154dac25 Merge pull request #593 from nekomatata/physics-tests-cancel-fix
Physics test cases, cancel previous running test properly
2021-03-09 18:49:38 -05:00
PouleyKetchoupp
7f095a6092 Physics test cases, cancel previous running test properly
Allows canceling running test cases (including all tests cases) properly and without error.
2021-03-08 12:27:13 -07:00
Aaron Franke
35687c3ead Merge pull request #592 from aaronfranke/kine-char-3d-pos
Set the reset position from the initial start position in KC3D
2021-03-03 14:55:35 -05:00
Aaron Franke
f91fe01f3e Set the reset position from the initial start position in KC3D 2021-03-03 14:41:44 -05:00
Aaron Franke
43d29bfbbb Merge pull request #591 from aaronfranke/misc
Misc improvements and tweaks for 3.2.3
2021-03-03 14:19:31 -05:00
Aaron Franke
7dff4e748d Merge pull request #590 from aaronfranke/kine-char-3d
Improve the Kinematic Character 3D demo
2021-03-03 14:18:33 -05:00
Aaron Franke
4913cd868a Misc fixes and tweaks 2021-03-03 02:59:17 -05:00
Aaron Franke
973c12264c Improve the Kinematic Character 3D demo 2021-03-03 02:55:05 -05:00
Aaron Franke
fecbed5fb2 Merge pull request #586 from Calinou/improve-demo-configuration
Improve several demos' configuration
2021-03-02 18:25:05 -05:00
Aaron Franke
82e68e378b Merge pull request #589 from Calinou/improve-3d-platformer-demo
Improve the 3D platformer demo
2021-03-02 18:22:31 -05:00
Aaron Franke
bbf4cff5f7 Merge pull request #588 from Calinou/readd-bullet-shower-demo
Port the Bullet Shower demo from Godot 2.1
2021-03-02 18:22:23 -05:00
Hugo Locurcio
3d6ba65cfc Improve the 3D platformer demo
- Increase gravity, player speed and air acceleration for a less floaty
  feeling.
- Clean up the code to use constants when relevant and remove unused enums.
2021-03-02 19:36:25 +01:00
Hugo Locurcio
ca0f74ee44 Port the Bullet Shower demo from Godot 2.1
This demo showcases how to use low-level Servers to achieve better
CPU performance when drawing large amounts of objects.

The code has been updated for Godot 3.2, cleaned up and has received
additional comments.
2021-03-02 18:32:01 +01:00
Hugo Locurcio
aa65867e43 Improve several demos' configuration
- Enable anisotropic filtering in 3D demos, and set the quality to
  16× on desktop and 4× on mobile.
- Enable 4× MSAA on some 3D demos that didn't use it beforehand.
- On GLES3 demos, disable MSAA on mobile as these demos are often
  more demanding.
- Use more conservative framebuffer allocation settings for better
  performance.
- Use PCF13 shadow filtering in GLES2 demos on desktop to benefit
  from soft shadows in Godot 3.2.4 and later.
  In Godot 3.2.3, this will make shadows smoother but still "blocky".
- Use Lossless compression instead of VRAM compression for
  small textures such as the voxel demo texture atlas.
2021-02-28 22:28:44 +01:00
Aaron Franke
c2e7a30e42 Merge pull request #587 from aaronfranke/web-readme
Link to the web export in the README and format names nicer
2021-02-28 16:18:29 -05:00
Aaron Franke
4dbfd92e6f Link to the web export in the README and format names nicer 2021-02-28 15:50:59 -05:00
Aaron Franke
c0d9e483c2 Merge pull request #582 from Calinou/deploy-html5-demos
Deploy exported HTML5 demos to GitHub Pages
2021-02-27 23:16:36 -05:00
Hugo Locurcio
36db05c3b9 Deploy exported HTML5 demos to GitHub Pages
This makes it possible for users to test Godot's features without
having to download anything.
2021-02-28 05:12:06 +01:00
ThomasFederau
fc032119ca Added interpolation functionality to ik_look_at node (#585) 2021-02-26 22:29:47 -05:00
Aaron Franke
98ed996780 Merge pull request #584 from nekomatata/physics-tests-2d-character-update
Updated 2D character controller physics tests
2021-02-26 09:25:58 -05:00
PouleyKetchoupp
fa83ee0277 Updated 2D character controller physics tests
Added new test for 2D character controller:
Character - Pixels
Functional test for pixel art related issues around KinematicBody and
RigidBody character controllers.

Adjusted existing tests and added more test cases to cover most use
cases from recent fixed issues and regressions for KinematicBody.

Added a more automated way to run all tests with checks to see which
ones failed in character controller tests.

Also fixed some minor issues with the log scrollbar.
2021-02-22 20:09:43 -07:00
Aaron Franke
7c137510e7 Merge pull request #583 from aaronfranke/trucktown-force-spedometer
Use a higher engine force when slow and add a spedometer in Truck Town
2021-02-22 21:46:03 -05:00
Aaron Franke
10a7e3d301 Use a higher engine force when slow and add a spedometer in Truck Town
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-02-22 13:56:17 -05:00
Aaron Franke
feaf406fee Merge pull request #581 from Calinou/truck-town-improve-controls-camera
Improve controls and camera handling in the Truck Town demo
2021-02-22 13:46:05 -05:00
Hugo Locurcio
d90e401d2a Improve controls and camera handling in the Truck Town demo
- Increase movement and steering speed significantly.
- Increase gravity slightly for a less floaty feeling.
- Simplify camera code (height is now constant).
- Tweaked camera distance and height to fit each vehicle.
- Fix script error when pressing Escape in the main menu
  (the demo will now quit).
2021-02-21 20:00:04 +01:00
Aaron Franke
99ad90bd0d Merge pull request #580 from Calinou/simplify-3d-scaling-setup
Simplify the 3D scaling demo setup, enable filtering by default
2021-02-12 23:57:49 -05:00
Hugo Locurcio
4adaaa2eb2 Simplify the 3D scaling demo setup, enable filtering by default
It turns out using a TextureRect node isn't necessary :)

The typical ViewportContainer + Viewport setup can be used just
fine to enable filtering on the ViewportTexture returned by the
Viewport.

The performance of the new method is equivalent to the old one.
2021-02-13 02:56:51 +01:00
Aaron Franke
b946d20762 Merge pull request #575 from Faless/joy/remap_wizard
[Joypads] Add SDL config re-mapping tool.
2021-02-07 16:24:18 -05:00
Fabio Alessandrelli
2a13307276 [Joypads] Add SDL config re-mapping tool.
Most of the code is in the remap folder, but it depends on the gamepad
diagram scene.
It allows remapping of pads to values that godot can understand.
It also comes with some default mapping for the HTML5 platform.
2021-02-07 13:19:18 +01:00
Aaron Franke
0b3e046953 Merge pull request #577 from nekomatata/physics-test-controllers
Add physics tests for 2D character controller
2021-01-22 20:01:39 -05:00
Aaron Franke
68e095c4d6 Merge pull request #578 from nekomatata/physics-tests-key-bindings
Changed key bindings in physics tests 2D/3D
2021-01-22 19:55:28 -05:00
PouleyKetchoupp
fe54ebbb3a Changed key bindings in physics tests 2D/3D
Changed debug collision shortcut from 'D' to 'C' to keep WASD available
for other functions in some tests.

Unbound arrows from UI shortcuts for the same reason.
2021-01-22 17:33:48 -07:00
PouleyKetchoupp
cdf0ed3be9 Add physics tests for 2D character controller
Two tests for character controller, with options to use RigidBody2D,
KinematicBody2D or KinematicBody2D with RayShape2D.

Tilemap: Tests for moving and jumping within tilemap blocks, with a
specific one-way collision test case scenario based on Block Climb Test
from https://github.com/madmiraal/godot-gym.

Slopes: Tests for moving and jumping in slopes, with different cases
based on snap and stop-on-slope parameters for kinematic bodies.
2021-01-22 17:24:28 -07:00
Aaron Franke
da9e24dfa7 Merge pull request #576 from nekomatata/physics-tests-broadphase-update
Update broadphase performance test in physics tests
2021-01-21 05:08:05 -05:00
PouleyKetchoupp
1c1ad17b43 Update broadphase performance test in physics tests
Start logging physics tick one frame earlier for each operation
Disable debug collision to avoid rendering bottleneck
Fixes in adding/removing bodies to avoid bottlenecks outside of physics
2D: Increase message queue size to allow adding more objects at once
3D: Remove camera to disable rendering altogether
3D: Fix error with create_rigidbody_box missing default value
2021-01-20 10:04:50 -07:00
Aaron Franke
5618c2b45a Merge pull request #574 from nekomatata/physics-tests-pause
Support for pause in 2D/3D physics tests
2021-01-06 23:56:36 -05:00
PouleyKetchoupp
3878948300 Support for pause in 2D/3D physics tests
New controls for all tests:
P to toggle pause on/off

Affects the running tests but not menus.
2021-01-06 21:25:34 -07:00
Aaron Franke
ca4cde1c26 Merge pull request #573 from nekomatata/physics-test-one-way-collision
Add One Way Collision for 2D Physics tests
2021-01-06 23:00:43 -05:00
PouleyKetchoupp
6a738c1ede Add One Way Collision for 2D Physics tests 2021-01-06 20:25:27 -07:00
Aaron Franke
04e9afb4cf Merge pull request #570 from aaronfranke/mr-k-inspired
Update the Drag and Drop demo and the Tween demo
2021-01-06 21:45:53 -05:00
Aaron Franke
e73af12f49 Script updates and simplification 2021-01-06 01:32:12 -05:00
Aaron Franke
6bdbeafca2 Update Tween demo to use Containers 2021-01-03 03:01:52 -06:00
Aaron Franke
21cbaafb2f Use a GridContainer in the Drag and Drop demo 2021-01-02 19:07:31 -06:00
Aaron Franke
35426410d5 Merge pull request #567 from aaronfranke/add-3d-waypoints-demo
Add a 3D waypoints demo
2021-01-02 14:47:30 -06:00
Hugo Locurcio
54a8d37e6c Add a 3D waypoints demo
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2021-01-02 14:45:05 -06:00
Aaron Franke
d5dae1cbb7 Merge pull request #569 from aaronfranke/add-control-gallery-demo
Add a control gallery demo
2021-01-02 14:38:05 -06:00
Hugo Locurcio
06dc40ba65 Add a control gallery demo
This project showcases what Godot's various Control nodes can do
(and what they look like, so that new users can figure them out).
2021-01-02 00:39:59 -06:00
Aaron Franke
7c604f336d Merge pull request #568 from aaronfranke/2021
Update copyright statements for 2021
2021-01-01 22:30:54 -06:00
Aaron Franke
e3a31afe40 Update copyright statements for 2021 2021-01-01 21:49:36 -06:00
Aaron Franke
289d658baa Merge pull request #566 from nekomatata/physics-test-joints
Add joints test to 2D/3D physics tests
2020-12-31 01:22:21 -06:00
PouleyKetchoupp
7a437d1d23 Add joints test to 2D/3D physics tests 2020-12-30 20:15:08 -07:00
Aaron Franke
08e3f1efd0 Merge pull request #565 from aaronfranke/save-load-loading
Move Saving and Loading demo to Loading category
2020-12-30 14:23:10 -06:00
Aaron Franke
0d9c0d15c6 Move Saving and Loading demo to Loading category 2020-12-28 14:00:04 -06:00
Aaron Franke
96baaa09e3 Merge pull request #563 from aaronfranke/mr-k-platformer
Add a coin counter and pause menu fading to Platformer 2D
2020-12-28 13:48:22 -06:00
Mr.K GameDev
e004d2564e 2D Platformer UI Update
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-12-26 23:35:45 -06:00
Aaron Franke
651ef54920 Merge pull request #562 from nekomatata/physics-tests-owner
Add PouleyKetchoupp to owners for physics tests
2020-12-19 11:59:55 -06:00
Aaron Franke
4a60286512 Merge pull request #561 from nekomatata/physics-test-collision-pairs
Add collision pairs test to 2D/3D physics tests
2020-12-19 11:59:26 -06:00
PouleyKetchoupp
1148a6bda0 Add PouleyKetchoupp to owners for physics tests 2020-12-19 10:46:18 -07:00
PouleyKetchoupp
9ad473c633 Add collision pairs test to 2D/3D physics tests
Functional test used for checking/debugging different collision cases for all possible pairs of shape types.
2020-12-18 20:51:54 -07:00
Aaron Franke
e38be6dec0 Merge pull request #560 from nekomatata/physics-tests-2d
Add 2D Physics Tests
2020-12-16 23:11:54 -05:00
PouleyKetchoupp
8241be5817 Add demo: Physics Tests 2D
Similar to its 3D counterpart, with tests using 2D physics.
2020-12-16 09:11:35 -07:00
Aaron Franke
1c836ecde9 Merge pull request #559 from nekomatata/physics-tests-3d-update
Fixes and adjustments in 3D physics tests
2020-12-14 20:36:01 -05:00
PouleyKetchoupp
6dd09308fa Fixes and adjustments in 3D physics tests
Add Functional Test / Stack & Pyramid
For testing stack stability.

Add Functional Test / Raycasts
Visually test raycast on different shapes.

Add Performance Test / Broadphase
Add/move/remove lots of non-colliding objects and measure time.

Fix leaks on exit
Some Nodes are copied and removed from the scene to be used as templates,
they need to be freed manually on exit.

Fix Performance Test / Contacts
Positions adjusted, some shape types were not created at the center.
2020-12-14 17:25:26 -07:00
Aaron Franke
555e43c896 Merge pull request #517 from Calinou/add-save-load-demo
Add a saving/loading demo with various serialization formats
2020-12-12 18:27:32 -05:00
Hugo Locurcio
2bd5b1c8ee Add a saving/loading demo with various serialization formats
This demo showcases how to save a simple game with ConfigFile and JSON.
2020-12-13 00:21:47 +01:00
Aaron Franke
14f2f1a713 Merge pull request #557 from aaronfranke/3din2d
Simplify 3D in 2D demo
2020-12-08 18:50:27 -05:00
Aaron Franke
3d9bcc6d97 Simplify 3D in 2D demo 2020-12-06 22:00:51 -05:00
Aaron Franke
3147c6c5bd Merge pull request #554 from aaronfranke/assetlib-5bd2bbf
Add links to the Asset Library after release 3.2-5bd2bbf
2020-11-28 23:31:51 -05:00
Aaron Franke
20a515153f Add links to the Asset Library after release 3.2-5bd2bbf 2020-11-28 23:21:06 -05:00
Aaron Franke
5bd2bbfda9 Merge pull request #553 from aaronfranke/iap-readme
Fix README files, especially in Android IAP demos
2020-11-28 22:19:31 -05:00
Aaron Franke
fc54dd9c23 Fix README files, especially in Android IAP demos 2020-11-28 22:05:39 -05:00
Aaron Franke
d38d18006b Merge pull request #551 from Calinou/networking-add-port-forward-help
Add instructions for port forwarding in the high-level multiplayer demos
2020-11-16 04:10:53 -05:00
Hugo Locurcio
6fd3e4d525 Add instructions for port forwarding in the high-level multiplayer demos
The instructions will only show when the player is hosting a server.
This also includes a button to get your public IP address.

This partially addresses #535.
2020-11-13 16:17:14 +01:00
Aaron Franke
2503599bed Merge pull request #543 from aaronfranke/mat-test-no-dae
Replace Collada .dae file with a Blend file in Material Testers demo
2020-10-30 15:40:04 -04:00
Aaron Franke
1aaa8e1fc6 Replace Collada .dae file with a Blend file
Also set material import mode to tres for test_bed.glb
2020-10-30 15:37:33 -04:00
Aaron Franke
2a98499935 Merge pull request #544 from aaronfranke/enums
Add trailing commas to enums
2020-10-30 15:35:51 -04:00
Aaron Franke
159adfd421 Add trailing commas to enums 2020-10-30 03:24:51 -04:00
Aaron Franke
4bba07257a Merge pull request #536 from aaronfranke/dtc-public
Change Dodge the Creeps to be more consistent with the docs
2020-10-21 01:50:46 -04:00
Aaron Franke
ae02236e50 Merge pull request #541 from Duroxxigar/mono-mp
Created C# networked Pong
2020-10-20 23:40:21 -04:00
Duroxxigar
3f8567f920 Created C# networked Pong 2020-10-20 23:18:57 -04:00
Aaron Franke
c7610e9334 Merge pull request #540 from jak-sdk/master
Re-write the navigation path-following code to be easier to read + add comments
2020-10-16 14:57:42 -04:00
Jak
78c7a48422 Re-write the 3d/navmesh demo to be easier to follow
The previous code had no comments and had some unintuitive steps.
I've re-written and re-structured it, and added comments. Hopefully it
will be easier to follow for newcomers to Godot.

 * Re-write main methods
 * Various bugfixes (variable conflicts, edge cases)
 * Comment improvements
 * Whitespace fixes

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-10-16 19:41:28 +01:00
Aaron Franke
31d54a3540 Merge pull request #539 from jlosito/dependabot-configs
Check for updates to GitHub Actions every weekday
2020-10-15 15:40:46 -04:00
John Losito
2259303ee7 Check for updates to GitHub Actions every weekday 2020-10-13 18:21:32 -04:00
Aaron Franke
76c1d850fb Merge pull request #537 from aaronfranke/csproj-323
Update C# project files in C# demos for Godot 3.2.3
2020-10-12 19:45:10 -04:00
Aaron Franke
ebc79dec04 Update C# project files in C# demos for Godot 3.2.3 2020-10-11 03:20:03 -04:00
Aaron Franke
4af7fd5562 Change Dodge the Creeps to be more consistent with the docs 2020-10-10 16:26:23 -04:00
Aaron Franke
1a19c5c4e1 Merge pull request #533 from van800/dodge
Improve Dodge the Creeps demo
2020-10-08 12:07:50 -04:00
Ivan Shakhov
f8317d20d5 restore RootNamespace, since default one contains spaces, restore net472 after discussion with @neikeq and more testing 2020-10-08 16:29:41 +02:00
Aaron Franke
766cc97855 Merge pull request #532 from akien-mga/dodge-unused
Dodge the Creeps: Remove unused asset
2020-10-06 16:10:30 -04:00
Rémi Verschelde
136db0b25b Dodge the Creeps: Remove unused asset 2020-10-06 21:48:11 +02:00
Aaron Franke
aba0372718 Merge pull request #531 from van800/master
Update dodge_the_creeps to Godot 3.2.3 format
2020-10-06 05:58:43 -04:00
Ivan Shakhov
dd11042d95 fix Dodge the Creeps 2020-10-06 11:36:37 +02:00
Aaron Franke
4d205325ad Merge pull request #528 from aaronfranke/panel
Remove Panel nodes that don't have panels
2020-10-02 03:28:18 -04:00
Aaron Franke
0d1f16d073 Remove panel nodes that don't have panels
Replace with Control nodes
2020-10-01 23:46:50 -04:00
Aaron Franke
2c0cbbaed0 Merge pull request #525 from aaronfranke/gitignore-attr
Update gitignore for 4.x, add gitattributes, and update file format
2020-10-01 15:15:06 -04:00
Aaron Franke
918a289ee2 Format files using updated file_format.sh 2020-10-01 14:23:54 -04:00
Aaron Franke
fe9fd7d7e4 Update gitignore for 4.x and add gitattributes 2020-10-01 14:22:45 -04:00
Aaron Franke
c8149a703f Merge pull request #526 from aaronfranke/csharp-3.2.3
Update C# demos for Godot 3.2.3
2020-10-01 14:19:13 -04:00
Aaron Franke
2979f85185 Update C# demos for Godot 3.2.3 2020-10-01 02:45:18 -04:00
Aaron Franke
bc10b69d65 Merge pull request #524 from Calinou/allow-hidpi
Allow hiDPI in all demos that support multiple resolutions
2020-10-01 02:44:54 -04:00
Aaron Franke
f5960b2a7f Merge pull request #522 from Calinou/particles-add-flipbook-animation
Add a flipbook animation example to the 2D particles demo
2020-10-01 02:43:51 -04:00
Hugo Locurcio
fe6103256a Allow hiDPI in all demos that support multiple resolutions
This is required to benefit from crisp display on hiDPI monitors.
This also fixes issues related to fullscreen and input handling
when using an hiDPI display on Windows.
2020-10-01 00:56:12 +02:00
Hugo Locurcio
768346a092 Add a flipbook animation example to the 2D particles demo 2020-09-17 22:43:04 +02:00
Aaron Franke
7a84acea76 Merge pull request #521 from dbrookman/spelling-fix
Fix small spelling error
2020-09-16 11:57:48 -04:00
Daniel Brookman
c343b2f4f5 Fix small spelling error 2020-09-16 11:22:44 -04:00
Aaron Franke
9184a36ec1 Merge pull request #519 from aaronfranke/assetlib-links
Link to the asset library from the README of each demo
2020-09-11 13:51:45 -04:00
Aaron Franke
d4bf89d364 Link to the asset library from the README of each demo 2020-09-10 15:37:10 -04:00
Aaron Franke
f74f7c52b6 Merge pull request #514 from Calinou/remove-community-health-files
Remove funding information to use the @godotengine default
2020-09-01 01:30:39 -04:00
Hugo Locurcio
76df39ab2e Remove funding information to use the @godotengine default
The community health files are now available in the godotengine/.github
repository, which makes them apply to all repositories in the
organization automatically.

See https://github.com/godotengine/godot/issues/40972.
2020-08-27 15:57:32 +02:00
Aaron Franke
e4f69c3de0 Merge pull request #513 from Faless/net/free_while_emitting
Avoid freeing network peer during signal emission.
2020-08-23 16:22:51 -04:00
Fabio Alessandrelli
4fe1930aab Avoid freeing network peer during signal emission.
Always keep a reference to the last used peer even when removing it
from tree.
2020-08-23 20:12:27 +02:00
Aaron Franke
a582304ee7 Merge pull request #511 from Calinou/lights-and-shadows-normal-maps
Add a normal map test in the 2D lights and shadows demo
2020-08-19 16:13:46 -05:00
Hugo Locurcio
97e00544a9 Add a normal map test in the 2D lights and shadows demo
This was requested by lawnjelly so we can test whether normal map
orientation behaves as expected.
2020-08-18 14:22:04 +02:00
Aaron Franke
bc40a8d61d Merge pull request #510 from aaronfranke/dtc-meta
Fix minor problems with Dodge the Creeps metadata
2020-08-17 00:28:48 -05:00
Aaron Franke
4aae4f657b Fix minor problems with Dodge the Creeps metadata 2020-08-16 23:49:00 -05:00
Aaron Franke
78fe523b3c Merge pull request #508 from Calinou/3d-demos-tweak-settings
Tweak settings in various 3D demos
2020-08-16 23:44:05 -05:00
Hugo Locurcio
c6163b3d20 Tweak settings in various 3D demos
- Enable 4× MSAA in all 3D demos.
- Enable filmic tonemapping with a whitepoint of 6 in GLES3 3D demos.
- Add subtle fog to the Truck Town demo.
- Use the `2d` stretch mode and `expand` stretch aspect to support
  multiple resolutions and aspect ratios.
2020-08-17 03:25:13 +02:00
Aaron Franke
e30571c1ad Merge pull request #509 from aaronfranke/icons-images
Improve icons and optimize PNG images using oxipng
2020-08-16 19:12:52 -05:00
Aaron Franke
fcc7d5c723 Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
Aaron Franke
50fb2071a0 Improve icon.png for projects using default icon 2020-08-15 17:25:12 -05:00
Aaron Franke
4b9a809912 Merge pull request #506 from Calinou/add-gui-theming-override-demo
Add a GUI theming override demo
2020-08-12 19:26:23 -05:00
Aaron Franke
68a2204c07 Merge pull request #507 from ricardoalcantara/mono_android_iap
Rewriting Mono Android IAP to match with GDScript
2020-08-12 19:25:21 -05:00
Ricardo Alcantara
6e98353ce3 Rewriting Mono Android IAP to match with GDScript
Version.
2020-08-12 21:08:51 -03:00
Aaron Franke
b5d4b277f4 Merge pull request #504 from ricardoalcantara/mono_android_iap
Android IAP Response Code can now return null.
2020-08-08 13:59:08 -05:00
Hugo Locurcio
6a325fb3a5 Add a GUI theming override demo
Overriding theme items is a common point of confusion. This demo
should hopefully make it easier to understand.

In the future, we could extend this demo to include things like theme
switching as it's a common need in non-game applications.
2020-08-04 13:14:53 +02:00
Aaron Franke
913de13ec9 Merge pull request #505 from pkruszynski/mobile-multitouch-view-fix
Mobile multitouch view fix
2020-08-03 21:20:30 -05:00
pkruszynski
f9c93b0d28 Fix for multitouch_view 2020-08-04 03:13:19 +01:00
Ricardo Alcantara
bc8dc740b5 Android IAP Response Code can now return null. 2020-07-28 19:26:19 -03:00
Aaron Franke
ddffbd7599 Merge pull request #498 from ricardoalcantara/mono_android_iap
Mono Android IAP Demo Project
2020-07-27 14:02:09 -04:00
Ricardo Alcantara
b718574112 Mono Android IAP Demo Project 2020-07-27 00:07:15 -03:00
Aaron Franke
ae2a97976a Merge pull request #500 from aaronfranke/ci-update
Tweak CI to more closely match the main repo
2020-07-25 00:01:18 -04:00
Aaron Franke
2c138bd75f Tweak CI to more closely match the main repo 2020-07-24 23:50:50 -04:00
Aaron Franke
b7b3a75389 Merge pull request #499 from smix8/master
3D NavMesh Demo - fix for navmesh (re)baking issue
2020-07-24 21:59:00 -04:00
smix8
28ec746545 fix for navmesh (re)baking issue
fix for navmesh (re)baking issues in demo
- changed level mesh size/scale (was way to small to be useable)
- changed navmesh agent settings (default radius to large, slope values to small)
2020-07-25 02:19:19 +02:00
Aaron Franke
8d9d58f112 Merge pull request #497 from aaronfranke/voxel-memory
Add memory usage to the Voxel demo
2020-07-09 16:57:19 -04:00
Aaron Franke
bd05e88ce0 Add memory usage to the Voxel demo 2020-07-08 13:26:28 -04:00
Aaron Franke
2434876738 Merge pull request #496 from aaronfranke/demo-categories
Categorize demos and add README files
2020-07-04 13:48:50 -04:00
Aaron Franke
8dff86d370 Add README files to categories 2020-07-03 20:45:51 -04:00
Aaron Franke
6b11ca7302 Move around 2D and GUI demos 2020-07-03 20:04:59 -04:00
Aaron Franke
cee39035e3 Move mobile demos to their own folder 2020-07-03 19:45:04 -04:00
Aaron Franke
c33ce26a93 Merge pull request #483 from fire/extended-physics-tests
Add extended physics tests.
2020-07-03 01:51:46 -04:00
K. S. Ernest (iFire) Lee
3fd13c1a82 Add extended physics tests. 2020-07-02 21:39:11 -07:00
Aaron Franke
f74217c1dc Merge pull request #492 from aaronfranke/multitouch
Remove useless "_find_free_pointer_id" method in Multitouch View
2020-07-02 14:32:35 -04:00
Aaron Franke
5215bc00f8 Remove useless "_find_free_pointer_id" method in Multitouch View 2020-07-02 13:58:34 -04:00
Aaron Franke
1ae23b63aa Merge pull request #493 from Calinou/2d-platformer-font-disable-aa
Disable antialiasing on the font in the 2D platformer demo
2020-07-02 13:58:02 -04:00
Aaron Franke
b99cd953d2 Merge pull request #494 from Calinou/2d-platformer-progressive-jump-interrupt
Progressively interrupt the jump in the 2D platformer demo
2020-07-02 13:57:14 -04:00
Aaron Franke
8823628b02 Merge pull request #495 from TwistedTwigleg/IK_Demo_Godot_3_2_2_Fix
Godot 3.2 IK demo SkeletonIK error fix
2020-07-02 13:56:29 -04:00
TwistedTwigleg
1ad95a443f Fixed bug in the IK demo where the SkeletonIK scene would print an error. The issue is that the target nodes are initialized after the SkeletonIK node. Moving the nodes fixed the issue and now no more errors are printed 2020-07-02 10:10:33 -04:00
Hugo Locurcio
79ad34dc0f Progressively interrupt the jump in the 2D platformer demo
This feels more smooth while still giving a sense of control to
the player.
2020-07-02 15:32:17 +02:00
Hugo Locurcio
aa390d1b30 Disable antialiasing on the font in the 2D platformer demo
Pixel fonts look best when antialiasing is disabled.
2020-07-02 15:21:39 +02:00
Aaron Franke
ba44700ebe Merge pull request #491 from aaronfranke/cthulhu
Many tweaks thanks to IAmActuallyCthulhu and some other misc tweaks
2020-06-28 13:37:38 -04:00
Aaron Franke
006309bd6f Many tweaks thanks to IAmActuallyCthulhu
Also change apostrophes to double quotes and update C# projects
2020-06-28 13:19:13 -04:00
Aaron Franke
866f826124 Merge pull request #489 from aaronfranke/3dplat
Tweak the 3D platformer demo
2020-06-28 02:31:00 -04:00
Aaron Franke
c5c5fedec8 Update 3D platformer 2020-06-28 02:23:30 -04:00
Aaron Franke
f34e61eaca Merge pull request #490 from aaronfranke/misc-tweaks-3.2.2
Misc fixes and tweaks to many demos for 3.2.2
2020-06-28 02:23:18 -04:00
Aaron Franke
189d6ac9b4 Misc fixes and tweaks to many demos 2020-06-27 21:07:49 -04:00
Aaron Franke
343669ca06 Merge pull request #488 from aaronfranke/no-default-env
Clean up unused and outdated environment files
2020-06-27 21:07:26 -04:00
Aaron Franke
c13e56662f Clean up unused and outdated environment files 2020-06-27 20:58:19 -04:00
Aaron Franke
dc6efcd429 Merge pull request #487 from aaronfranke/ik-again
Many style fixes and other tweaks for the IK demo
2020-06-27 20:58:01 -04:00
Aaron Franke
aaf3483618 Move Godot Battle Bot model and materials to a subfolder
Also minify textures by making them really low resolution
2020-06-27 15:40:51 -04:00
Aaron Franke
e30b9d4c7d Change environment to 3.1/3.2 environment 2020-06-27 15:14:16 -04:00
Aaron Franke
2ae60f3ac7 Many style fixes for the IK demo 2020-06-27 15:14:16 -04:00
Aaron Franke
87f6a4e3fd Merge pull request #486 from aaronfranke/os-test
Add Mono C# preprocessor defines, README, and screenshots to OS testing demo
2020-06-24 03:14:28 -04:00
Aaron Franke
eac96a9148 Add a README and screenshots to the OS test demo 2020-06-24 02:17:46 -04:00
Aaron Franke
f0a07c43a8 Add Mono C# preprocessor testing to OS test demo 2020-06-24 02:17:46 -04:00
Aaron Franke
7b465152dc Merge pull request #484 from Calinou/add-os-testing-demo
Add an operating system testing demo
2020-06-23 13:51:54 -04:00
Hugo Locurcio
4bafb96fcb Add an operating system testing demo
This demo showcases various OS-specific features in Godot.
It can be used to test Godot while porting it to a new platform
or to check for regressions.

This closes #8.
2020-06-23 09:39:22 +02:00
Rémi Verschelde
d4a2a57834 Merge pull request #482 from timoschwarzer/android-iap-3.2.2-godotgoogleplaybilling
Update Android IAP demo to reflect recent changes
2020-06-22 11:28:55 +02:00
Aaron Franke
d29fc74ae8 Merge pull request #481 from Calinou/switch-to-github-actions
Switch continuous integration from Travis CI to GitHub Actions
2020-06-22 04:29:39 -04:00
Aaron Franke
033a5338d5 Merge pull request #480 from aaronfranke/trail-space-format
Remove trailing space characters in the formatting script
2020-06-21 23:23:50 -04:00
Aaron Franke
35d44b5d85 Remove trailing space characters in the formatting script 2020-06-21 23:00:13 -04:00
Timo Schwarzer
9a3a831a34 Update Android IAP demo to reflect recent changes 2020-06-20 00:26:45 +02:00
Aaron Franke
d3317cc91d Merge pull request #473 from nekomatata/physics-tests
Add Physics Tests project
2020-06-19 15:25:26 -04:00
PouleyKetchoupp
afd99e5aed Add Physics Tests project 2020-06-19 10:27:53 +02:00
Hugo Locurcio
b6c0283c22 Switch continuous integration from Travis CI to GitHub Actions 2020-06-18 09:26:09 +02:00
Aaron Franke
3ea2246466 Merge pull request #479 from timoschwarzer/android-iap-3.2.2-fix
Fix small mistakes with new Android IAP API
2020-06-15 02:24:56 -04:00
Timo Schwarzer
ea01309d56 Fix small mistakes with new Android IAP API 2020-06-15 07:27:18 +02:00
Aaron Franke
9600d93a33 Merge pull request #478 from timoschwarzer/android-iap-3.2.2
Update Android IAP demo for 3.2.2
2020-06-14 14:59:08 -04:00
Timo Schwarzer
74924dd073 Update Android IAP demo for 3.2.2 2020-06-14 20:04:23 +02:00
Aaron Franke
5363f8a75a Merge pull request #477 from aaronfranke/unhandled-input
Replace _input with _unhandled_input in most places
2020-06-09 11:48:25 -04:00
Aaron Franke
5f1905e0d6 Replace _input with _unhandled_input 2020-06-08 22:43:19 -04:00
Aaron Franke
d1ed6dbd82 Merge pull request #476 from Jayman2000/dodge-the-creeps-cc0
Correct Dodge the Creeps' copyright info
2020-06-08 12:13:20 -04:00
Jason Yundt
20c10dcb06 Correct Dodge the Creeps' copyright info
It originally said that "Abstract Platformer" was copyright kenny.nl.
This is not true. "Abstract Platformer" was dedicated to the public
domain using CC0. "When CC0 is applied to a work, copyright no longer
applies to the work in most jurisdictions around the world." (Source:
https://creativecommons.org/faq/#how-do-cc-licenses-operate)

It also said that "Abstract Platformer" was created in the years
2010-2020. While the "Abstract Platformer" webpage
(https://www.kenney.nl/assets/abstract-platformer) does say "Copyright ©
2010 - 2020", I believe that that's a copyright notice for the website
itself, not the asset pack. I'm not sure when Kenney started working on
"Abstract Platformer", but I'm confident that it was published in 2016
because:

 * All of the files in the ZIP archive are dated 2016.
 * "Abstract Platformer" was published to OpenGameArt.org in 2016. See:
   https://opengameart.org/content/abstract-platformer

I didn't think that it made sense to call that section of the README
"Licenses" anymore because "[...]CC0 is not a license; it is a public
domain dedication." (Source:
https://creativecommons.org/faq/#how-do-cc-licenses-operate)
2020-06-08 11:13:09 -04:00
Aaron Franke
48eb973127 Merge pull request #469 from aaronfranke/voxel
Add a Voxel demo project
2020-05-26 10:07:21 -04:00
Aaron Franke
050fda3a4c Add a Voxel demo project 2020-05-26 06:46:02 -04:00
Aaron Franke
ac5013f9ec Merge pull request #468 from aaronfranke/2d-shader-gles3
Convert the Screen Space Shaders demo back to GLES 3
2020-05-12 14:12:01 -04:00
Aaron Franke
ed2348080c Convert the Screen Space Shaders demo back to GLES 3 2020-05-12 13:56:03 -04:00
Aaron Franke
a9c63035da Merge pull request #465 from aaronfranke/gitignore-translation
Add translation ignore
2020-05-08 01:34:12 -04:00
Aaron Franke
7a5c0872d5 Add translation ignore
Now synced with GitHub's Godot.gitignore plus some extra lines
2020-05-08 01:30:34 -04:00
Aaron Franke
0eeaf0ecd8 Add credits for the music used in the 2D platformer demos (#461)
* Add credits for the music used in the 2D platformer demos

* Update 2d/platformer/README.md

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>

* Update 2d/physics_platformer/README.md

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2020-04-07 13:59:36 -04:00
Aaron Franke
7939f8e348 Merge pull request #459 from EludeQ/updated-dodge-the-creeps
Updated the dodge_the_creeps demo to include the "Removing the creeps" part in the tutorial.
2020-04-04 07:16:21 -04:00
Amara M. Angel
ee388dd5df Updated the dodge_the_creeps demo to include the "removing the creeps" part 2020-04-04 13:11:10 +02:00
Aaron Franke
b548a848b1 Merge pull request #460 from EludeQ/viewports-frame_post_draw
Update Viewports tutorial to use "frame_post_draw"
2020-04-03 16:52:26 -04:00
Amara M. Angel
7a9b45f156 Update Viewports tutorial to use "frame_post_draw" 2020-04-03 19:42:51 +02:00
Aaron Franke
57baf0a1b5 Merge pull request #453 from aaronfranke/plugin-proj
Refactor the plugin demos to be inside of a project and add main screen plugin demo
2020-03-31 03:12:26 -04:00
Aaron Franke
a0a87c3bea Add a main screen plugin to the plugin demos 2020-03-25 23:29:55 -04:00
Aaron Franke
51c0f3abb8 Refactor the plugin demos to be inside of a project for convenience 2020-03-25 23:28:42 -04:00
LaBodilsen
8464543a23 simplifying steering to a single line with move_toward (#451)
* simplyfied the steering to a single line with lerp

Replaced:
	if steer_target < steer_angle:
		steer_angle -= STEER_SPEED * delta
		if steer_target > steer_angle:
			steer_angle = steer_target
	elif steer_target > steer_angle:
		steer_angle += STEER_SPEED * delta
		if steer_target < steer_angle:
			steer_angle = steer_target
	
	steering = steer_angle
with
	steering = lerp(steering, steer_target, STEER_SPEED)

and lowered STEER_SPEED to 0.2

* Update vehicle.gd

* added space around *
2020-03-25 13:46:42 -04:00
Rémi Verschelde
e95cbac634 Merge pull request #450 from aaronfranke/travis
Add a formatting script for local checking and for Travis CI
2020-03-25 09:12:38 +01:00
Aaron Franke
eab59a6d2e Merge pull request #452 from aaronfranke/issue-templates
Remove duplicate issue templates
2020-03-23 04:58:06 -04:00
Aaron Franke
474f246096 Remove duplicate issue templates 2020-03-23 04:57:24 -04:00
Aaron Franke
a12f54cfef Update issue templates 2020-03-23 04:51:27 -04:00
Aaron Franke
7e09d2fec7 Commit files changed by the formatting script 2020-03-19 20:30:40 -04:00
Aaron Franke
7ba8b9930d Add a formatting script for Travis CI 2020-03-19 20:30:33 -04:00
Aaron Franke
ec28f44e3c Merge pull request #449 from aaronfranke/description
Add descriptions to all projects with README files
2020-03-17 19:12:03 -04:00
Aaron Franke
f9e7456b70 Add descriptions to all projects with README files
These show up in the project manager when hovering over projects.
2020-03-16 20:50:53 -04:00
Aaron Franke
93b1f689f2 Merge pull request #447 from aaronfranke/multitouch
Multitouch View tweaks
2020-03-15 12:05:55 -04:00
Aaron Franke
c0880343bc Merge pull request #446 from aaronfranke/dodge-the-attributions
Move Dodge the Creeps license information into the README files
2020-03-15 12:05:18 -04:00
Aaron Franke
43dfa363c3 Merge pull request #445 from aaronfranke/kc2d
Organize and simplify the Kinematic Character 2D demo
2020-03-15 12:04:51 -04:00
Aaron Franke
699abade3a Merge pull request #448 from aaronfranke/mult-thread-load
Style tweaks and add import files to multiple threads loading demo
2020-03-15 12:04:26 -04:00
Aaron Franke
1ef6b121e3 Style tweaks and add import files to multiple threads loading demo 2020-03-15 04:37:34 -04:00
Vitaliy
5f7072a18d Multiple-threads loading (#425)
Add Multiple-threads loading demo
2020-03-15 04:25:18 -04:00
Aaron Franke
bc949bd47e Multitouch View tweaks 2020-03-14 03:07:16 -04:00
Aaron Franke
38d44dbb70 Move Dodge the Creeps license information into the README files 2020-03-14 01:58:57 -04:00
Aaron Franke
022ec69810 Organize and simplify the Kinematic Character 2D demo 2020-03-14 01:39:19 -04:00
Aaron Franke
f3c8885d8f Merge pull request #444 from aaronfranke/truck-town-tres
Convert materials to tres format in Truck Town
2020-03-13 15:12:15 -04:00
Aaron Franke
b103db5e50 Convert materials to tres format in Truck Town 2020-03-13 06:19:13 -04:00
Aaron Franke
671e1299e6 Merge pull request #443 from aaronfranke/2d-nav-poly-tweak
Tweak 2D navigation polygon demo camera and remove RPG unused files
2020-03-13 05:43:08 -04:00
Aaron Franke
bb61e49397 Tweak 2D navigation polygon demo camera and remove RPG unused files 2020-03-12 22:04:42 -04:00
Aaron Franke
69f21ce4c7 Merge pull request #442 from aaronfranke/dodge-the-csproj
Fix C# project files for Dodge the Creeps
2020-03-12 21:14:04 -04:00
Aaron Franke
d189a2b05a Fix C# project files for Dodge the Creeps 2020-03-12 20:44:42 -04:00
Aaron Franke
82fe29b90b Merge pull request #441 from aaronfranke/issue-template
Improve the issue template and add a PR template
2020-03-11 22:32:30 -04:00
Aaron Franke
ff483e2b71 Improve the issue template and add a PR template
Improve the comments in the issue template, and the PR template is entirely one comment.
2020-03-11 18:52:44 -04:00
Aaron Franke
758f38db67 Merge pull request #436 from aaronfranke/astar-kinematic
Some changes to Astar and Kinematic Character 3D
2020-03-10 16:16:15 -04:00
Aaron Franke
5caa78ef58 Some changes to kinematic character 3D 2020-03-10 07:23:55 -04:00
Aaron Franke
13f6e015bd Some changes to Astar code 2020-03-10 06:48:50 -04:00
Aaron Franke
db2941bed4 Merge pull request #435 from Calinou/fix-hfsm-comment
Fix incorrect comment in hierarchical FSM demo script
2020-03-09 10:22:16 -04:00
Aaron Franke
9553549a61 Merge pull request #432 from aaronfranke/readme
Add README files to many demos
2020-03-09 10:21:53 -04:00
Hugo Locurcio
222f94444a Fix incorrect comment in hierarchical FSM demo script
This closes #433.
2020-03-09 15:00:56 +01:00
Aaron Franke
9b4cac5782 Add README files to most of the misc demos
The Android ones can wait for later
2020-03-09 05:39:32 -04:00
Aaron Franke
fea5db8ed2 Add README files to loading and multiplayer demos 2020-03-09 05:06:17 -04:00
Aaron Franke
9e3ffe456b Add README files to GUI demos 2020-03-09 04:26:24 -04:00
Aaron Franke
8cdddc87ce Add README files to audio demos 2020-03-09 03:54:32 -04:00
Aaron Franke
da280ec220 Add README to and fix Circle Pop demo
Circle Pop gets its own commit since I found a bug that had to be fixed
2020-03-09 03:54:32 -04:00
Aaron Franke
f2a18910aa Add README files to Viewport demos 2020-03-09 03:54:32 -04:00
Aaron Franke
2eaedf8064 Add README files to demos with multiple versions 2020-03-09 03:54:32 -04:00
Aaron Franke
7e0032eb8e Add README files to 3D demos 2020-03-09 03:54:32 -04:00
Aaron Franke
a24ac796b6 Add README files to 2D demos 2020-03-09 03:54:32 -04:00
Aaron Franke
9809601e40 Merge pull request #431 from aaronfranke/no-grid
Remove the grid based movement demo
2020-03-09 03:54:12 -04:00
Aaron Franke
9b6109e44d Merge pull request #428 from aaronfranke/splitscreen
Add a splitscreen mode to the 2D platformer.
2020-03-07 19:56:52 -05:00
Aaron Franke
2ea2b02b68 Remove grid based movement demo
I don't think there's a point to this since we also have the JRPG demo.
2020-03-07 19:54:03 -05:00
Aaron Franke
ebc435074b [2D Platformer] Add a splitscreen mode 2020-03-06 23:00:11 -05:00
Aaron Franke
f5f72e6d3e [2D Platformer] Move Player out of Level, set limits in a script 2020-03-06 18:17:33 -05:00
Aaron Franke
e11fa006d6 Merge pull request #427 from aaronfranke/joypad
Refactor the Joypads demo
2020-03-06 18:17:01 -05:00
Aaron Franke
5322be1a54 Refactor the Joypads demo 2020-03-05 20:50:16 -05:00
Aaron Franke
18679efd75 Merge pull request #426 from aaronfranke/gles2
Convert most demos to GLES 2 and update to Godot 3.2
2020-03-05 20:49:11 -05:00
Aaron Franke
aea4010bc8 Convert most demos to GLES 2
Also fix Viewport error in 3D scaling demo, add an icon to Multiplayer Bomber, and rename BPM sync files.
2020-03-04 20:59:12 -05:00
Aaron Franke
db7c9f162f Open and save 3D IK demo in Godot 3.2 2020-03-04 20:59:12 -05:00
Aaron Franke
c72f65ed36 Update C# demos to Godot 3.2 2020-03-04 20:30:30 -05:00
Aaron Franke
424ad342ad Merge pull request #315 from aaronfranke/2point5d
Add 2.5D Demo Projects
2020-03-02 22:03:53 -05:00
Aaron Franke
841eb1fa37 Add icon for the 2.5D editor viewport 2020-03-01 22:29:44 -05:00
Aaron Franke
1671b4e30e Add music and set physics engine to Bullet 2020-03-01 17:14:11 -05:00
Aaron Franke
c7cc72b705 Add screenshots and tweak README files 2020-03-01 04:43:32 -05:00
Aaron Franke
d1ba41da5d 2.5D Editor Viewport for Mono C# 2020-03-01 04:37:41 -05:00
Aaron Franke
cc68af17af 2.5D Editor Viewport for GDScript 2020-03-01 04:36:44 -05:00
Aaron Franke
7e539cd182 2.5D Demo Project for GDScript
Co-authored-by: Stephen Agbete (Steph155) <bgsteph15@mail.com>
2020-02-29 22:39:32 -05:00
Aaron Franke
722ea9bc01 2.5D Demo Project for Mono C#
Co-authored-by: Stephen Agbete (Steph155) <bgsteph15@mail.com>
2020-02-29 22:39:20 -05:00
Aaron Franke
ca761cff87 Merge pull request #424 from Calinou/readme-add-scan-instructions
Add instructions on importing all projects at once in the README
2020-02-24 02:08:05 -05:00
Aaron Franke
5809089e9e Merge pull request #419 from aaronfranke/multiplayer
Update networking and multiplayer demos
2020-02-20 16:39:23 -05:00
Hugo Locurcio
abe1b0f367 Add instructions on importing all projects at once in the README
This may be helpful to newcomers; see #423.
2020-02-20 22:11:57 +01:00
Aaron Franke
b310877037 Update other networking demos, with style fixes 2020-02-20 15:13:21 -05:00
Aaron Franke
984a731502 Update multiplayer bomber demo 2020-02-20 15:13:21 -05:00
Aaron Franke
de8a79b35b Merge pull request #421 from aaronfranke/platform-3d-animtree
Update Platformer 3D to use AnimationTree and organize into subfolders
2020-02-20 15:12:24 -05:00
Aaron Franke
399de3e954 Organize 3D platformer demo files 2020-02-19 19:09:55 -05:00
Aaron Franke
486d582802 Update 3D platformer to use AnimationTree 2020-02-19 18:55:14 -05:00
Aaron Franke
001e51d2d3 Merge pull request #413 from Calinou/add-viewport-3d-scaling-demo
Add a viewport 3D scaling demo
2020-02-19 15:22:11 -05:00
Hugo Locurcio
b927ea3c63 Add a viewport 3D scaling demo
This demo shows how to scale the 3D viewport rendering without
affecting 2D elements such as the HUD. It also demonstrates how to
toggle filtering on a viewport by using TextureRect to display the
ViewportTexture delivered by the Viewport node.
2020-02-19 21:13:20 +01:00
Aaron Franke
f6c4a0000f Merge pull request #416 from aaronfranke/platformer-tweaks
Tweak the 2D platformer demos, particularly Physics Platformer
2020-02-19 15:08:35 -05:00
Aaron Franke
853565d1be Tweak the platformer demos, particularly physics platformer 2020-02-19 00:37:59 -05:00
Aaron Franke
073640ffcc Merge pull request #414 from aaronfranke/2d-3.2
Update 2D demos for 3.2 and convert many to GLES 2
2020-02-18 23:37:37 -05:00
Aaron Franke
545d63cd2d Merge pull request #412 from NetroScript/fixing-Sprites-at-2x-Resolution
Changing the art assets for the 2D platformers to "real" pixel art (instead of 2x upscaled)
2020-02-18 23:33:07 -05:00
Aaron Franke
c215c62df1 Convert many 2D projects to GLES 2 2020-02-17 21:29:54 -05:00
Aaron Franke
dda0bd7e20 Update other 2D demos for Godot 3.2 2020-02-17 21:29:54 -05:00
Aaron Franke
35bd408367 Update and improve isometric demo for 3.2
Also tweak hex map demo
2020-02-17 20:29:08 -05:00
Aaron Franke
ac179c6745 Merge pull request #382 from TwistedTwigleg/Godot_3_2_IK_Fix
Fixed GDScript IK demo so it works with Godot 3.2
2020-02-17 18:34:54 -05:00
TwistedTwigleg
2136c99672 Fixed up LookAt IK code so it better follows the style guide. Touched up a bunch of the comments 2020-02-17 14:45:02 -05:00
TwistedTwigleg
fdb0d77e88 Fixed style issues in IK Demo. Added a bit of static typing hints to the LookAt IK file to better fit the rest of the scripts 2020-02-17 12:14:36 -05:00
NetroScript
fbe6286656 for the 2d platformer demos changing the asset resolution from 2x upscaled to "true" pixel art, also adjusting values likes positions 2020-02-17 17:05:10 +01:00
Aaron Franke
ef98347469 Merge pull request #358 from pigdevstudio/input-remap-revamp
Revamp Input Remap demo simplifying it
2020-02-17 05:57:24 -05:00
Aaron Franke
07e696661c Merge pull request #392 from Calinou/tweak-3d-settings
Tweak 3D settings in various demos
2020-02-17 04:10:43 -05:00
TwistedTwigleg
1c9c754b79 Fixed SkeletonIK issue in Godot IK Demo. Now the joints should not act crazy 2020-02-16 11:43:21 -05:00
Hugo Locurcio
da374bccda Tweak 3D settings in various demos
- Use 4× MSAA for a better visual appearance.
- Use "3D Without Effects" framebuffer allocation when possible
  for better performance.
- Disable Glow in the 3D Kinematic Character demo for better
  performance. Increase the DirectionalLight strength to compensate.
- Use a non-linear attenuation for the OmniLight in the
  Window Management demo (and increase its range to compensate).
2020-02-15 23:32:00 +01:00
Aaron Franke
05801f9389 Merge pull request #411 from aaronfranke/vs-3.2
Update VisualScript demos for Godot 3.2
2020-02-12 19:59:29 -05:00
Aaron Franke
da157f6d0e Update VisualScript demos for Godot 3.2 2020-02-12 19:31:23 -05:00
Aaron Franke
13ca65800d Merge pull request #405 from NathanLovato/feature/2d-platformer-remake
Remake the 2d platformer demo
2020-02-12 19:30:46 -05:00
Henrique Campos
a76d9471f4 Add a simplified version of input remapping 2020-02-12 19:42:12 -03:00
Aaron Franke
d8546ece42 Add screenshots 2020-02-12 16:36:17 -05:00
Aaron Franke
8d48b7f994 Tweak background and organize clouds 2020-02-12 15:51:56 -05:00
Aaron Franke
c117eb1847 Minor style tweaks 2020-02-12 15:30:42 -05:00
Nathan Lovato
77800b3f15 Add more clouds to cover wide and thin window sizes 2020-02-12 07:53:43 -06:00
Nathan Lovato
332cd3bb38 Remove return type hint 2020-02-12 07:48:21 -06:00
Nathan Lovato
75df35b165 Improve background tiling, move parallax layers vertically 2020-02-12 07:47:56 -06:00
Nathan Lovato
bebf8e8249 Fix background disappearing when scaling the window
Use the keep_height aspect ratio option as in the original demo. This prevents
seeing the clear color when making the window tall
Change the ParallaxBackground scene so mirrored sections don't disappear on wide windows
2020-02-11 22:18:48 -06:00
Nathan Lovato
bd6da6a610 Limit the window size 2020-02-11 22:08:01 -06:00
Nathan Lovato
ab04b998fc Update the platformer demo's readme 2020-02-11 21:56:15 -06:00
Nathan Lovato
263bfd8bd3 Add README to the 2D platformer 2020-02-11 18:22:26 -06:00
Nathan Lovato
9ee778bd5d Address requested changes in the review
Remove unused spawn input action
Add support for the gamepad's left stick for movement
Use the project settings to store the gravity value project-wide
Remove type hints
2020-02-11 17:24:57 -06:00
Aaron Franke
2372fd155f Merge pull request #366 from aaronfranke/matrix-transform
Add Matrix Transform demo
2020-02-11 03:53:07 -05:00
Nathan Lovato
e323bead2e Remake the 2d/platformer demo from scratch
This Godot project is a complete rewrite of the official Platformer 2D demo. This is part of a proposal to improve and harmonize the official demo projects. We want to:

- Teach good programming practices with Godot.
- Bring demos to a higher quality standard.
- Unify the code in the demos.

See the [open issue](https://github.com/godotengine/godot-demo-projects/issues/390) for more information.

This new demo showcases features from the original, and works with Godot 3.2.

Co-authored-by: Johnny Goss <me@johnnygoss.dev>
2020-02-04 21:50:54 -06:00
TwistedTwigleg
2e681e132a IK demo: Fixed bug in FABRIK IK that would cause the right arm to freak out by changing the middle joint code. 2020-01-29 17:52:25 -05:00
TwistedTwigleg
40bcc0f55f Added SkeletonIK example to IK demo. Updated the anchors on all of the UI so it can scale to any sized window. Removed the project settings keeping the aspect ratio the same 2020-01-29 17:37:04 -05:00
TwistedTwigleg
59e85689ba IK Demo - Removed code that straightens the FABRIK chain when the target is out of reach because it was not working, and instead just run the FABRIK chain even if the target is out of reach. This straightens the arms like expected and simplifies the code. Moved the camera back in both the look_at_ik and fabrik_ik scenes 2020-01-29 14:13:50 -05:00
TwistedTwigleg
fd6e157596 Minor typo and style fixes for the IK demo 2020-01-29 13:43:54 -05:00
TwistedTwigleg
3dbd79217d Fixed GDScript IK demo so it works with Godot 3.2 2020-01-29 13:19:14 -05:00
Aaron Franke
21e6dc8576 Add Matrix Transform demo 2020-01-08 15:37:29 -05:00
1616 changed files with 34548 additions and 8473 deletions

View File

@@ -1,6 +1,16 @@
# Top-most EditorConfig file.
root = true
# Unix-style newlines with a newline ending every file.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
[*.cs]
csharp_space_after_cast = false
indent_size = 4
[*.csproj]
insert_final_newline = false
indent_size = 2

2
.gitattributes vendored
View File

@@ -1,2 +1,4 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
*.hdr binary

13
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,13 @@
# 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
/.github/dist/ @Calinou
/3d/voxel/ @aaronfranke
/misc/matrix_transform/ @aaronfranke
/misc/2.5d/ @aaronfranke
/mono/2.5d/ @aaronfranke
/2d/physics_tests/ @pouleyKetchoupp
/3d/physics_tests/ @pouleyKetchoupp

2
.github/FUNDING.yml vendored
View File

@@ -1,2 +0,0 @@
patreon: godotengine
custom: https://godotengine.org/donate

View File

@@ -1,18 +0,0 @@
<!-- 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. -->

34
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,34 @@
---
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

@@ -0,0 +1,19 @@
---
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:**

24
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,24 @@
<!--
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.
-->

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

0
.github/dist/.nojekyll vendored Normal file
View File

23
.github/dist/export_presets.cfg vendored Normal file
View File

@@ -0,0 +1,23 @@
[preset.0]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
script_export_mode=1
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
variant/export_type=0
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/custom_html_shell=""
html/head_include=""
html/full_window_size=true

19
.github/dist/footer.html vendored Normal file
View File

@@ -0,0 +1,19 @@
<!-- The list of demos will be inserted above by the CI process. -->
</ul>
<h2>Unavailable demos</h2>
<ul>
<li><code>2d/hdr/</code>: Not supported on HTML5 yet.
<li><code>3d/voxel/</code>: Not supported on HTML5 yet.
<li><code>audio/device_changer/</code>: Not supported on HTML5 due to browser limitations.
<li><code>loading/background_load/</code>: Not supported on HTML5 yet.
<li><code>loading/multiple_threads_loading/</code>: Not supported on HTML5 yet.
<li><code>loading/threads/</code>: Not supported on HTML5 yet.
<li><code>misc/matrix_transform/</code>: Results are only visible in the editor.
<li><code>mobile/android_iap/</code>: Only relevant on native Android.
<li><code>mobile/sensors/</code>: Not supported on HTML5 yet.
<li><code>mono/*/</code>: Not available yet (requires Mono-enabled HTML5 build).</li>
<li><code>networking/*/</code>: Doesn't make sense to be hosted on a static host, as the server must be hosted on the same origin due to the browser's same-origin policy.</li>
<li><code>plugins/*/</code>: Only effective within the editor.</li>
</ul>
</body>
</html>

118
.github/dist/header.html vendored Normal file
View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Godot demos exported to HTML5</title>
<style>
:root {
--background-color: #fff;
--text-color: #222;
--link-color: hsl(220, 100%, 45%);
--link-underline-color: hsla(220, 100%, 45%, 0.3);
}
@media (prefers-color-scheme: dark) {
:root {
--background-color: #222;
--text-color: #eee;
--link-color: hsl(200, 100%, 70%);
--link-underline-color: hsla(200, 100%, 70%, 0.3);
}
}
*:focus {
/* More visible outline for better keyboard navigation. */
outline: 0.125rem solid hsl(220, 100%, 62.5%);
/* Make the outline always appear above other elements. */
position: relative;
}
html {
background-color: var(--background-color);
color: var(--text-color);
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
max-width: 50rem;
margin: 0 auto;
padding: 0.75rem;
line-height: 1.618rem;
}
h2 {
margin-top: 2.5rem;
}
a {
color: var(--link-color);
text-decoration-color: var(--link-underline-color);
text-decoration-thickness: 0.125rem;
}
a:hover {
filter: brightness(117.5%);
}
a:active {
filter: brightness(82.5%);
}
ul {
padding-left: 0;
}
li {
display: block;
}
li a {
display: inline-block;
width: 100%;
height: 4rem;
margin-left: 0.5rem;
}
li a:hover {
background-color: hsla(0, 0%, 50%, 0.1);
}
li a * {
float: left;
}
li a p {
height: 24px;
margin: 20px 10px;
}
</style>
</head>
<body>
<h1>Godot demo projects</h1>
<p>
This page lists
<a href="https://github.com/godotengine/godot-demo-projects">official Godot demo projects</a>
exported to HTML5 for testing purposes. These projects are deployed automatically
on every commit on the <code>master</code> branch of the repository.
</p>
<p>
The HTML5 exports on this page are provided for demonstration purposes only.
Some of these demos may not function or render correctly on HTML5,
especially on mobile devices.
For best performance, it's recommended to
<a href="https://godotengine.org/download">download</a> a native editor
and run the demo project by importing its files in the project manager.
</p>
<p>
See the
<a href="https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html">Exporting for the Web</a>
documentation for information on exporting your own projects to HTML5.
</p>
<h2>List of demos</h2>
<ul>
<!-- The list of demos will be inserted below by the CI process. -->

8
2d/README.md Normal file
View File

@@ -0,0 +1,8 @@
# 2D Demos
These demos are all 2D, but otherwise do not have a common theme.
Languages: Most have GDScript, some have
[GDSL](https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/shading_language.html)
Renderers: 6 of them are GLES 3, but most are GLES 2

View File

@@ -0,0 +1,20 @@
# Bullet Shower
This demonstrates how to manage large amounts of objects efficiently using
low-level Servers.
See
[Optimization using Servers](https://docs.godotengine.org/en/latest/tutorials/performance/using_servers.html)
in the documentation for more information.
Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/887
## Screenshots
![No collision](screenshots/no_collision.png)
![Collision](screenshots/collision.png)

BIN
2d/bullet_shower/bullet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

View File

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

View File

@@ -0,0 +1,89 @@
extends Node2D
# This demo is an example of controling a high number of 2D objects with logic
# and collision without using nodes in the scene. This technique is a lot more
# efficient than using instancing and nodes, but requires more programming and
# is less visual. Bullets are managed together in the `bullets.gd` script.
const BULLET_COUNT = 500
const SPEED_MIN = 20
const SPEED_MAX = 80
const bullet_image = preload("res://bullet.png")
var bullets = []
var shape
class Bullet:
var position = Vector2()
var speed = 1.0
# The body is stored as a RID, which is an "opaque" way to access resources.
# With large amounts of objects (thousands or more), it can be significantly
# faster to use RIDs compared to a high-level approach.
var body = RID()
func _ready():
randomize()
shape = Physics2DServer.circle_shape_create()
# Set the collision shape's radius for each bullet in pixels.
Physics2DServer.shape_set_data(shape, 8)
for _i in BULLET_COUNT:
var bullet = Bullet.new()
# Give each bullet its own speed.
bullet.speed = rand_range(SPEED_MIN, SPEED_MAX)
bullet.body = Physics2DServer.body_create()
Physics2DServer.body_set_space(bullet.body, get_world_2d().get_space())
Physics2DServer.body_add_shape(bullet.body, shape)
# Place bullets randomly on the viewport and move bullets outside the
# play area so that they fade in nicely.
bullet.position = Vector2(
rand_range(0, get_viewport_rect().size.x) + get_viewport_rect().size.x,
rand_range(0, get_viewport_rect().size.y)
)
var transform2d = Transform2D()
transform2d.origin = bullet.position
Physics2DServer.body_set_state(bullet.body, Physics2DServer.BODY_STATE_TRANSFORM, transform2d)
bullets.push_back(bullet)
func _process(_delta):
# Order the CanvasItem to update every frame.
update()
func _physics_process(delta):
var transform2d = Transform2D()
var offset = get_viewport_rect().size.x + 16
for bullet in bullets:
bullet.position.x -= bullet.speed * delta
if bullet.position.x < -16:
# The bullet has left the screen; move it back to the right.
bullet.position.x = offset
transform2d.origin = bullet.position
Physics2DServer.body_set_state(bullet.body, Physics2DServer.BODY_STATE_TRANSFORM, transform2d)
# Instead of drawing each bullet individually in a script attached to each bullet,
# we are drawing *all* the bullets at once here.
func _draw():
var offset = -bullet_image.get_size() * 0.5
for bullet in bullets:
draw_texture(bullet_image, bullet.position + offset)
# Perform cleanup operations (required to exit without error messages in the console).
func _exit_tree():
for bullet in bullets:
Physics2DServer.free_rid(bullet.body)
Physics2DServer.free_rid(shape)
bullets.clear()

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex"
path="res://.import/face_happy.png-38d387d31ec13459f749c93ce3d75d80.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PaintTools.png"
dest_files=[ "res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex" ]
source_file="res://face_happy.png"
dest_files=[ "res://.import/face_happy.png-38d387d31ec13459f749c93ce3d75d80.stex" ]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

View File

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

BIN
2d/bullet_shower/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,33 @@
extends Node2D
# This demo is an example of controling a high number of 2D objects with logic
# and collision without using nodes in the scene. This technique is a lot more
# efficient than using instancing and nodes, but requires more programming and
# is less visual. Bullets are managed together in the `bullets.gd` script.
# The number of bullets currently touched by the player.
var touching = 0
onready var sprite = $AnimatedSprite
func _ready():
# The player follows the mouse cursor automatically, so there's no point
# in displaying the mouse cursor.
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
func _input(event):
if event is InputEventMouseMotion:
position = event.position - Vector2(0, 16)
func _on_body_shape_entered(_body_id, _body, _body_shape, _local_shape):
touching += 1
if touching >= 1:
sprite.frame = 1
func _on_body_shape_exited(_body_id, _body, _body_shape, _local_shape):
touching -= 1
if touching == 0:
sprite.frame = 0

View File

@@ -0,0 +1,41 @@
; 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="Bullet Shower"
config/description="Demonstrates how to manage large amounts of objects efficiently using low-level Servers."
run/main_scene="res://shower.tscn"
config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"
[physics]
2d/cell_size=64
common/enable_pause_aware_picking=true
[rendering]
quality/driver/driver_name="GLES2"
quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=0
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_clear_color=Color( 0.133333, 0.133333, 0.2, 1 )

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -0,0 +1,33 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://bullets.gd" type="Script" id=2]
[ext_resource path="res://face_happy.png" type="Texture" id=3]
[ext_resource path="res://face_sad.png" type="Texture" id=4]
[ext_resource path="res://player.gd" type="Script" id=5]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 3 ), ExtResource( 4 ) ],
"loop": true,
"name": "default",
"speed": 5.0
} ]
[sub_resource type="CircleShape2D" id=2]
radius = 27.0
[node name="Shower" type="Node2D"]
[node name="Bullets" type="Node2D" parent="."]
script = ExtResource( 2 )
[node name="Player" type="Area2D" parent="."]
script = ExtResource( 5 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="Player"]
frames = SubResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
shape = SubResource( 2 )
[connection signal="body_shape_entered" from="Player" to="Player" method="_on_body_shape_entered"]
[connection signal="body_shape_exited" from="Player" to="Player" method="_on_body_shape_exited"]

View File

@@ -13,7 +13,7 @@ func show_game_over():
yield($MessageTimer, "timeout")
$MessageLabel.text = "Dodge the\nCreeps"
$MessageLabel.show()
yield(get_tree().create_timer(1), 'timeout')
yield(get_tree().create_timer(1), "timeout")
$StartButton.show()

View File

@@ -1,6 +1,6 @@
extends Node
export (PackedScene) var Mob
export(PackedScene) var mob_scene
var score
func _ready():
@@ -16,6 +16,7 @@ func game_over():
func new_game():
get_tree().call_group("mobs", "queue_free")
score = 0
$Player.start($StartPosition.position)
$StartTimer.start()
@@ -25,14 +26,27 @@ func new_game():
func _on_MobTimer_timeout():
$MobPath/MobSpawnLocation.offset = randi()
var mob = Mob.instance()
# Choose a random location on Path2D.
var mob_spawn_location = get_node("MobPath/MobSpawnLocation")
mob_spawn_location.offset = randi()
# Create a Mob instance and add it to the scene.
var mob = mob_scene.instance()
add_child(mob)
var direction = $MobPath/MobSpawnLocation.rotation + PI / 2
mob.position = $MobPath/MobSpawnLocation.position
# Set the mob's direction perpendicular to the path direction.
var direction = mob_spawn_location.rotation + PI / 2
# Set the mob's position to a random location.
mob.position = mob_spawn_location.position
# Add some randomness to the direction.
direction += rand_range(-PI / 4, PI / 4)
mob.rotation = direction
mob.linear_velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0).rotated(direction)
# Choose the velocity.
var velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
mob.linear_velocity = velocity.rotated(direction)
func _on_ScoreTimer_timeout():

View File

@@ -14,7 +14,7 @@ _data = {
[node name="Main" type="Node"]
script = ExtResource( 1 )
Mob = ExtResource( 2 )
mob_scene = ExtResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0

View File

@@ -3,11 +3,16 @@ extends RigidBody2D
#warning-ignore-all:unused_class_variable
export var min_speed = 150
export var max_speed = 250
var mob_types = ["walk", "swim", "fly"]
func _ready():
$AnimatedSprite.playing = true
var mob_types = $AnimatedSprite.frames.get_animation_names()
$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
func _on_VisibilityNotifier2D_screen_exited():
queue_free()
func _on_start_game():
queue_free()

View File

@@ -15,22 +15,24 @@ animations = [ {
"name": "fly",
"speed": 3.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "walk",
"speed": 4.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
"loop": true,
"name": "swim",
"speed": 4.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "walk",
"speed": 4.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 35.2706
height = 23.3281
[node name="Mob" type="RigidBody2D"]
[node name="Mob" type="RigidBody2D" groups=[
"mobs",
]]
collision_mask = 0
gravity_scale = 0.0
script = ExtResource( 1 )
@@ -42,8 +44,6 @@ __meta__ = {
scale = Vector2( 0.75, 0.75 )
frames = SubResource( 1 )
animation = "walk"
frame = 1
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708

View File

@@ -2,8 +2,8 @@ extends Area2D
signal hit
export var speed = 400
var screen_size
export var speed = 400 # How fast the player will move (pixels/sec).
var screen_size # Size of the game window.
func _ready():
screen_size = get_viewport_rect().size
@@ -11,15 +11,22 @@ func _ready():
func _process(delta):
var velocity = Vector2()
velocity.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
velocity.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
var velocity = Vector2.ZERO # The player's movement vector.
if Input.is_action_pressed("move_right"):
velocity.x += 1
if Input.is_action_pressed("move_left"):
velocity.x -= 1
if Input.is_action_pressed("move_down"):
velocity.y += 1
if Input.is_action_pressed("move_up"):
velocity.y -= 1
if velocity.length() > 0:
velocity = velocity.normalized() * speed
$AnimatedSprite.play()
else:
$AnimatedSprite.stop()
position += velocity * delta
position.x = clamp(position.x, 0, screen_size.x)
position.y = clamp(position.y, 0, screen_size.y)
@@ -40,6 +47,7 @@ func start(pos):
func _on_Player_body_entered(_body):
hide()
hide() # Player disappears after being hit.
emit_signal("hit")
# Must be deferred as we can't change physics properties on a physics callback.
$CollisionShape2D.set_deferred("disabled", true)

View File

@@ -0,0 +1,29 @@
# 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).
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/515
## Screenshots
![GIF from the documentation](https://docs.godotengine.org/en/latest/_images/dodge_preview.gif)
## Copying
`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". Created in 2016 by 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`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -1,2 +0,0 @@
"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/

0
2d/dodge_the_creeps/fonts/FONTLOG.txt Executable file → Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -10,11 +10,18 @@ config_version=4
_global_script_classes=[ ]
_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. For more details, consider
following the tutorial in the documentation."
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"
@@ -57,7 +64,3 @@ move_down={
, 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,32 @@
# 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
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/516
## 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

@@ -7,8 +7,8 @@ func _process(_delta):
var numbers = ""
var index = 0
for state in fsm_node.states_stack:
states_names += state.get_name() + '\n'
numbers += str(index) + '\n'
states_names += state.get_name() + "\n"
numbers += str(index) + "\n"
index += 1
$States.text = states_names
$Numbers.text = numbers

View File

@@ -1,13 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
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
[resource]
background_mode = 2
background_sky = SubResource( 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -3,12 +3,14 @@ extends KinematicBody2D
var direction = Vector2()
export(float) var speed = 1000.0
onready var root = get_tree().root
func _ready():
set_as_toplevel(true)
func _physics_process(delta):
if is_outside_view_bounds():
if not root.get_visible_rect().has_point(position):
queue_free()
var motion = direction * speed * delta
@@ -17,10 +19,5 @@ func _physics_process(delta):
queue_free()
func is_outside_view_bounds():
return position.x > OS.get_screen_size().x or position.x < 0.0 \
or position.y > OS.get_screen_size().y or position.y < 0.0
func _draw():
draw_circle(Vector2(), $CollisionShape2D.shape.radius, Color.white)

View File

@@ -2,7 +2,7 @@ extends Node2D
var bullet = preload("Bullet.tscn")
func _input(event):
func _unhandled_input(event):
if event.is_action_pressed("fire"):
fire(owner.look_direction)

View File

@@ -1,12 +1,18 @@
extends "res://state_machine/state_machine.gd"
onready var idle = $Idle
onready var move = $Move
onready var jump = $Jump
onready var stagger = $Stagger
onready var attack = $Attack
func _ready():
states_map = {
"idle": $Idle,
"move": $Move,
"jump": $Jump,
"stagger": $Stagger,
"attack": $Attack,
"idle": idle,
"move": move,
"jump": jump,
"stagger": stagger,
"attack": attack,
}
@@ -16,16 +22,16 @@ func _change_state(state_name):
return
if state_name in ["stagger", "jump", "attack"]:
states_stack.push_front(states_map[state_name])
if state_name == "jump" and current_state == $Move:
$Jump.initialize($Move.speed, $Move.velocity)
if state_name == "jump" and current_state == move:
jump.initialize(move.speed, move.velocity)
._change_state(state_name)
func _input(event):
func _unhandled_input(event):
# Here we only handle input that can interrupt states, attacking in this case,
# otherwise we let the state node handle it.
if event.is_action_pressed("attack"):
if current_state in [$Attack, $Stagger]:
if current_state in [attack, stagger]:
return
_change_state("attack")
return

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 427 B

View File

@@ -19,18 +19,26 @@ var height = 0.0
func initialize(speed, velocity):
horizontal_speed = speed
max_horizontal_speed = speed if speed > 0.0 else base_max_horizontal_speed
if speed > 0.0:
max_horizontal_speed = speed
else:
max_horizontal_speed = base_max_horizontal_speed
enter_velocity = velocity
func enter():
var input_direction = get_input_direction()
update_look_direction(input_direction)
horizontal_velocity = enter_velocity if input_direction else Vector2()
if input_direction:
horizontal_velocity = enter_velocity
else:
horizontal_velocity = Vector2()
vertical_speed = 600.0
owner.get_node("AnimationPlayer").play("idle")
func update(delta):
var input_direction = get_input_direction()
update_look_direction(input_direction)
@@ -40,6 +48,7 @@ func update(delta):
if height <= 0.0:
emit_signal("finished", "previous")
func move_horizontally(delta, direction):
if direction:
horizontal_speed += air_acceleration * delta
@@ -53,6 +62,7 @@ func move_horizontally(delta, direction):
owner.move_and_slide(horizontal_velocity)
func animate_jump_height(delta):
vertical_speed -= gravity * delta
height += vertical_speed * delta

View File

@@ -7,9 +7,10 @@ func handle_input(event):
func get_input_direction():
var input_direction = Vector2()
input_direction.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
input_direction.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
var input_direction = 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")
)
return input_direction

View File

@@ -22,7 +22,11 @@ func update(_delta):
emit_signal("finished", "idle")
update_look_direction(input_direction)
speed = max_run_speed if Input.is_action_pressed("run") else max_walk_speed
if Input.is_action_pressed("run"):
speed = max_run_speed
else:
speed = max_walk_speed
var collision_info = move(speed, input_direction)
if not collision_info:
return

View File

@@ -59,7 +59,7 @@ func _change_state(new_state):
state = new_state
func _input(event):
func _unhandled_input(event):
if not state == States.ATTACK:
return
if attack_input_state != AttackInputStates.LISTENING:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -10,11 +10,15 @@ config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]
config/name="Hierarchical Finite State Machine example"
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."
run/main_scene="res://Demo.tscn"
config/icon="res://icon.png"
@@ -22,6 +26,7 @@ config/icon="res://icon.png"
window/size/width=1280
window/size/height=720
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"
@@ -96,4 +101,6 @@ attack={
[rendering]
environment/default_environment="res://default_env.tres"
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -7,10 +7,9 @@ extends Node
signal state_changed(current_state)
# 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).
# 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.
export(NodePath) var start_state
var states_map = {}
@@ -22,7 +21,9 @@ func _ready():
if not start_state:
start_state = get_child(0).get_path()
for child in get_children():
child.connect("finished", self, "_change_state")
var err = child.connect("finished", self, "_change_state")
if err:
printerr(err)
initialize(start_state)
@@ -42,7 +43,7 @@ func set_active(value):
current_state = null
func _input(event):
func _unhandled_input(event):
current_state.handle_input(event)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

15
2d/gd_paint/README.md Normal file
View File

@@ -0,0 +1,15 @@
# 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
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/517
## Screenshots
![Screenshot](screenshots/gdpaint.png)

View File

@@ -1,14 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
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 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 474 B

View File

@@ -9,10 +9,15 @@ const IMAGE_SIZE = Vector2(930, 720)
# Enums for the various modes and brush shapes that can be applied.
enum BrushModes {
PENCIL, ERASER, CIRCLE_SHAPE, RECTANGLE_SHAPE
PENCIL,
ERASER,
CIRCLE_SHAPE,
RECTANGLE_SHAPE,
}
enum BrushShapes {
RECTANGLE, CIRCLE
RECTANGLE,
CIRCLE,
}
# The top-left position of the canvas.
@@ -232,11 +237,9 @@ func _draw():
draw_circle(brush.brush_pos, brush.brush_shape_circle_radius, brush.brush_color)
func save_picture(path):
# Wait a couple frames so the save dialog isn't in the way.
yield (get_tree(), "idle_frame")
yield (get_tree(), "idle_frame")
# Wait until the frame has finished before getting the texture.
yield(VisualServer, "frame_post_draw")
# Get the viewport image.
var img = get_viewport().get_texture().get_data()

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://PaintControl.gd" type="Script" id=1]
[ext_resource path="res://ToolsPanel.gd" type="Script" id=2]
[ext_resource path="res://PaintTools.png" type="Texture" id=3]
[ext_resource path="res://paint_control.gd" type="Script" id=1]
[ext_resource path="res://tools_panel.gd" type="Script" id=2]
[ext_resource path="res://paint_tools.png" type="Texture" id=3]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 1, 1, 1, 1 )
@@ -10,19 +10,23 @@ 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 )
@@ -137,7 +141,6 @@ 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
@@ -151,7 +154,6 @@ 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

BIN
2d/gd_paint/paint_tools.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/paint_tools.png-224b64b7ddb26189a369199f6d686b79.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://paint_tools.png"
dest_files=[ "res://.import/paint_tools.png-224b64b7ddb26189a369199f6d686b79.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

@@ -10,18 +10,23 @@ config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]
config/name="GD Paint"
run/main_scene="res://Paint_root.tscn"
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"
[display]
window/size/width=1280
window/size/height=720
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="keep"
@@ -31,4 +36,6 @@ singletons=[ ]
[rendering]
environment/default_environment="res://default_env.tres"
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -1,20 +1,16 @@
extends Panel
var paint_control
onready var brush_settings = $BrushSettings
onready var label_tools = $LabelTools
onready var label_brush_size = $BrushSettings/LabelBrushSize
onready var label_brush_shape = $BrushSettings/LabelBrushShape
onready var label_brush_size = brush_settings.get_node(@"LabelBrushSize")
onready var label_brush_shape = brush_settings.get_node(@"LabelBrushShape")
onready var label_stats = $LabelStats
onready var label_tools = $LabelTools
var save_dialog
onready var _parent = get_parent()
onready var save_dialog = _parent.get_node(@"SaveFileDialog")
onready var paint_control = _parent.get_node(@"PaintControl")
func _ready():
# Get PaintControl and SaveFileDialog.
paint_control = get_parent().get_node("PaintControl")
save_dialog = get_parent().get_node("SaveFileDialog")
# warning-ignore-all:return_value_discarded
# Assign all of the needed signals for the oppersation buttons.
$ButtonUndo.connect("pressed", self, "button_pressed", ["undo_stroke"])
@@ -34,7 +30,7 @@ func _ready():
$ColorPickerBackground.connect("color_changed", self, "background_color_changed")
$BrushSettings/HScrollBarBrushSize.connect("value_changed", self, "brush_size_changed")
# Assign the 'file_selected' signal in SaveFileDialog.
# Assign the "file_selected" signal in SaveFileDialog.
save_dialog.connect("file_selected", self, "save_file_selected")
# Set physics process so we can update the status label.

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
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
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View File

@@ -1,36 +0,0 @@
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.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,84 +0,0 @@
[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

@@ -1,55 +0,0 @@
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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,19 +0,0 @@
[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.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,37 +0,0 @@
[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.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/obstacle.png-9f01dd1d06d7b99515918b65b46bd6c1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tilesets/grid/obstacle.png"
dest_files=[ "res://.import/obstacle.png-9f01dd1d06d7b99515918b65b46bd6c1.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

@@ -1,9 +0,0 @@
[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.

Before

Width:  |  Height:  |  Size: 530 B

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/grid_lines.png-beef853b47aa830c8383e5f6cc4d03ce.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tilesets/grid_lines/grid_lines.png"
dest_files=[ "res://.import/grid_lines.png-beef853b47aa830c8383e5f6cc4d03ce.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

@@ -1,16 +0,0 @@
[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 = [ ]

18
2d/hdr/README.md Normal file
View File

@@ -0,0 +1,18 @@
# 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)
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/110
## Screenshots
![Screenshot](screenshots/left.png)
![Screenshot](screenshots/right.png)

View File

@@ -4,7 +4,7 @@ const CAVE_LIMIT = 1000
onready var cave = $Cave
func _input(event):
func _unhandled_input(event):
if event is InputEventMouseMotion and event.button_mask > 0:
var rel_x = event.relative.x
var cavepos = cave.position

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 597 KiB

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