Compare commits

...

390 Commits

Author SHA1 Message Date
Aaron Franke
ea5b868fc7 [3.1] Simplify list of branches in the README (#1255) 2025-10-02 16:51:20 -07:00
Rémi Verschelde
a6ae6f64be Update README for new branches, matches Godot upstream
(cherry picked from commit c0180d20d1)
2023-02-28 18:37:03 +01:00
Aaron Franke
507b8c6cf6 [3.1] Update README for the new 3.3 branch 2021-11-05 10:16:20 -05:00
Aaron Franke
e59d96ef7a Merge pull request #610 from aaronfranke/3.1-readme-license-3.2
[3.1] Update README for the new 3.2 branch
2021-04-21 03:51:30 -05:00
Aaron Franke
19584aae6a [3.1] Update README for the new 3.2 branch 2021-04-04 01:16:45 -04:00
Aaron Franke
342f27e327 Merge pull request #407 from aaronfranke/3.1
Remove BPM Sync demo from the 3.1 branch
2020-02-10 19:21:38 -05:00
Aaron Franke
4d10544dd9 Remove BPM Sync demo from the 3.1 branch 2020-02-10 19:13:49 -05:00
Aaron Franke
86944d5236 Merge pull request #404 from aaronfranke/readme-license
Update README and LICENSE for Godot 3.2
2020-02-10 19:06:53 -05:00
Aaron Franke
827d67b2ab Update README and LICENSE 2020-02-09 01:36:43 -05:00
Aaron Franke
177884ff19 Merge pull request #401 from aaronfranke/2d
Update the rest of the 2D demos for Godot 3.1.2
2020-02-03 16:56:50 -05:00
Aaron Franke
87f42b77e0 Update 2D shader and SDF demos 2020-02-03 16:37:54 -05:00
Aaron Franke
b0e1cc0227 Update 2D navigation demos 2020-02-03 16:37:54 -05:00
Aaron Franke
7af4d281b9 Update 2D lighting demos
Just renaming things, these contain no script.
2020-02-03 16:37:54 -05:00
Aaron Franke
c270db0635 Remove the kinematic collision demo
Lots of demos already feature collisions with KinematicBodies
2020-02-03 16:37:54 -05:00
Aaron Franke
746928b623 Update kinematic character 2020-02-03 16:37:54 -05:00
Aaron Franke
b0b63e80f5 Update isometric demo 2020-02-03 16:37:54 -05:00
Aaron Franke
7421736568 Update hex map demo 2020-02-03 16:37:54 -05:00
Aaron Franke
db6967868f Update HDR demo 2020-02-03 16:37:54 -05:00
Aaron Franke
49a01d6f87 Update grid based movement demo 2020-02-03 16:37:54 -05:00
Aaron Franke
ff10a807d0 Update GD Paint demo 2020-02-03 16:37:54 -05:00
Aaron Franke
704ebeec81 Merge pull request #400 from aaronfranke/2d-physics-pl
Update 2D physics platformer
2020-02-03 16:33:06 -05:00
Aaron Franke
60f515eaf9 Merge pull request #399 from aaronfranke/rpg
Update 2D role playing game
2020-02-03 16:30:36 -05:00
Aaron Franke
3eeba859b1 Update 2D physics platformer 2020-02-03 04:00:44 -05:00
Aaron Franke
9218f88723 Update 2D role playing game 2020-02-03 03:57:46 -05:00
Aaron Franke
375d5d13d2 Merge pull request #397 from aaronfranke/misc
Update and improve misc demos for Godot 3.1.2
2020-02-03 03:55:36 -05:00
Aaron Franke
c9d3646d45 Merge pull request #398 from aaronfranke/fsm
Update Finite State Machine demo to Godot 3.1.2
2020-02-03 03:55:25 -05:00
Aaron Franke
9975c95065 Update Finite State Machine demo 2020-02-02 20:28:25 -05:00
Aaron Franke
c90a251445 Update the rest of the misc demos to Godot 3.1.2
I have not tested if these work, but I made minimal changes to them (only things like comments and newlines).
2020-02-02 04:53:12 -05:00
Aaron Franke
cd7c652975 Improve scene instancing demo 2020-02-02 04:53:12 -05:00
Aaron Franke
e5ee4a5971 Improve the tween demo
Significant style changes.
2020-02-02 04:53:12 -05:00
Aaron Franke
729be3461d Style fixes for open simplex noise demo 2020-02-02 04:53:12 -05:00
Aaron Franke
abf9d68bf4 Improve regex demo 2020-02-02 04:53:12 -05:00
Aaron Franke
67a490ab50 Improve pause demo 2020-02-02 04:53:12 -05:00
Aaron Franke
f07c7091fc Improve window management demo 2020-02-02 04:53:12 -05:00
Aaron Franke
ac882369bc Merge pull request #395 from aaronfranke/gui
Improve GUI demos
2020-02-02 03:13:34 -05:00
Aaron Franke
6899d44615 Merge pull request #394 from aaronfranke/pong
Update and improve all Pong demos
2020-02-01 15:55:57 -05:00
Aaron Franke
84c8d6ef69 Update and improve GUI demos 2020-02-01 15:47:44 -05:00
Aaron Franke
691f1d94d6 Merge pull request #393 from aaronfranke/viewport
Update remaining Viewport demos to Godot 3.1.2
2020-02-01 15:34:02 -05:00
Aaron Franke
cb5906aea3 Slightly improve the GUI in 3D demo 2020-02-01 03:18:53 -05:00
Aaron Franke
237a8654b0 Improve the screen capture demo 2020-02-01 03:18:53 -05:00
Aaron Franke
4f5f0ec1a9 Update all Pong demos to Godot 3.1.2 and conform to style guides 2020-02-01 03:15:27 -05:00
Aaron Franke
e3fd4c662c Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -05:00
Aaron Franke
ff93de81bb Merge pull request #391 from aaronfranke/mono
Update and improve Mono demos and Dodge the Creeps GDScript
2020-01-31 13:01:25 -05:00
Aaron Franke
28c3103132 Merge pull request #388 from aaronfranke/material-tester
Significantly improve the material tester demo
2020-01-31 12:32:41 -05:00
Aaron Franke
958f686e12 Update Dodge the Creeps GDScript to Godot 3.1.2 2020-01-31 02:47:36 -05:00
Aaron Franke
edb8372db8 Update Dodge the Creeps C# to Godot 3.1.2 2020-01-31 02:47:36 -05:00
Aaron Franke
de57f45049 Update Pong with C# demo to Godot 3.1.2 2020-01-31 01:43:40 -05:00
Aaron Franke
4ec9d7921b Significantly improve the material tester demo 2020-01-30 21:48:59 -05:00
Aaron Franke
a5b8cd11d9 Merge pull request #385 from aaronfranke/truck-town
Update and improve Truck Town for Godot 3.1.2
2020-01-29 21:10:21 -05:00
Aaron Franke
0746c063b4 Merge pull request #384 from aaronfranke/navmesh
Update 3D navmesh demo to Godot 3.1.2
2020-01-29 21:10:04 -05:00
Aaron Franke
9e197b8c20 Merge pull request #383 from aaronfranke/platformer-3d
Update Platformer 3D demo to Godot 3.1.2
2020-01-29 21:09:54 -05:00
Aaron Franke
2afbeef96f Allow using WASD and controllers in Truck Town 2020-01-29 17:43:46 -05:00
Aaron Franke
9c17c25343 Update and improve Truck Town for Godot 3.1.2
Conform to style guide
2020-01-29 17:36:50 -05:00
Aaron Franke
357620b336 Update 3D navmesh demo to Godot 3.1.2 2020-01-29 17:07:18 -05:00
Aaron Franke
33494c4592 [3DP] Update to Godot 3.1.2
Conform to style guide, add WASD movement, add controller support
2020-01-29 17:00:07 -05:00
Aaron Franke
76d43cf23a [3DP] Convert SCN to TSCN 2020-01-29 15:58:17 -05:00
Aaron Franke
97f9632be4 Merge pull request #381 from aaronfranke/loading
Move loading demos to their own folder
2020-01-28 20:11:54 -05:00
Aaron Franke
463da9948f Update and improve background load demo 2020-01-28 14:23:24 -05:00
Aaron Franke
04d86775da Move loading demos to their own folder 2020-01-28 14:19:42 -05:00
Aaron Franke
c6922db2a1 Merge pull request #380 from aaronfranke/display-folded
Clean up editor/display_folded
2020-01-28 13:49:32 -05:00
Aaron Franke
43dcf5c1e7 Clean up editor/display_folded 2020-01-28 13:47:21 -05:00
Aaron Franke
d19c746231 Merge pull request #371 from BenjaminNavarro/master
Add dynamic split screen demo
2020-01-28 13:38:26 -05:00
Aaron Franke
aca3ea4749 Merge pull request #341 from Calinou/handle-multiple-resolutions
Handle multiple resolutions in most demos
2020-01-28 13:29:37 -05:00
Hugo Locurcio
a45b84a5ad Handle multiple resolutions in most demos
This makes demos render correctly on hiDPI displays,
while also demonstrating how to handle multiple resolutions.

The 3D in 2D demo now uses "3D No-Effects" for the 3D viewport,
which is faster to render. Thanks to this, 4× MSAA is now enabled
for a better result.

The background loading demo now uses mipmaps for better-looking images.

The material testers demo now samples mouse input in a
resolution-independent manner when panning.

Default clear colors were also changed in some projects for visual
consistency with the project's theme.
2020-01-28 19:08:03 +01:00
Benjamin Navarro
5bdd178d85 Embed WorldEnvironement scene into the main one 2020-01-28 13:32:45 +01:00
Benjamin Navarro
b93d9028a9 Coding style 2020-01-28 13:32:18 +01:00
Benjamin Navarro
566c7e15f8 Use second controller's left stick for player2 2020-01-28 13:27:55 +01:00
Aaron Franke
eb814782c6 Merge pull request #357 from pigdevstudio/pause-demo
Improve Pause demo
2020-01-27 05:33:06 -05:00
Aaron Franke
029706d4fb Merge pull request #356 from pigdevstudio/add-script-instancing
Add Ball Factory
2020-01-27 05:29:40 -05:00
Benjamin Navarro
f922bcb8c7 Add dynamic split screen demo
Answering PR reviews

Removeing class_name

_get_split_state documentation

Mentioning Voronoi split screen in README

Fixing comments

Use the same script for both players

The input map is configured to work with AZERTY and QWERTY keyboards

Use spaces for comments alignment + code style

Fix empty line and incorrect comment

Add arrow keys to control player 2

Removing most static typing as suggested for demo projects

Removing broken split origin feature

Removing the floor texture to avoid copyright issues

Changing game icon

Make Walls.gd a tool script + randomize

Fixing style

 Handle joysticks for player movement
2020-01-27 08:58:50 +01:00
Aaron Franke
2490d9ae45 Merge pull request #379 from aaronfranke/2d-in-3d
Update 2D in 3D demo to Godot 3.1.2
2020-01-26 16:55:59 -05:00
Aaron Franke
f9b9b86949 Update 2D in 3D demo to Godot 3.1.2
Conform to style guide, make positions exact, fix viewport quad
2020-01-26 16:53:20 -05:00
Aaron Franke
79f7554bc3 Merge pull request #376 from aaronfranke/plugin-demos
Update and improve plugin demos
2020-01-26 16:52:30 -05:00
Aaron Franke
7e96ba1a6a Update plugin demos 2020-01-26 02:21:24 -05:00
Aaron Franke
861f0418f0 Merge pull request #324 from talklittle/role-playing-game-3.1
Port 2d/role_playing_game to Godot 3.1
2020-01-23 00:23:47 -05:00
Aaron Franke
8a6b1f87ba Merge pull request #89 from TwistedTwigleg/gd_paint
Added a simple drawing demo (GD paint)
2020-01-22 18:51:52 -05:00
Aaron Franke
c5a37ea618 Merge pull request #323 from Calinou/2d-platformer-ultrawide
Make the Platformer 2D demo work with ultrawide displays
2020-01-22 18:50:30 -05:00
Aaron Franke
c0f4bad011 Merge pull request #337 from robspsj/extract_shaders
Extract shader code from 2D shader demos
2020-01-22 17:53:10 -05:00
Aaron Franke
7658e62636 Merge pull request #374 from aaronfranke/device-changer
Update Audio Device Changer demo to Godot 3.1.2
2020-01-22 17:37:38 -05:00
Aaron Franke
b1953be73f Update Audio Device Changer demo to Godot 3.1.2 2020-01-22 17:32:12 -05:00
Aaron Franke
5bc48e2080 Merge pull request #287 from marcelofg55/audio_device_changer
Add new Audio Device Changer demo
2020-01-22 16:32:11 -05:00
Aaron Franke
2c6df4ed79 Merge pull request #364 from Jummit/tidy
Tidy up Main.vs in the CirclePop demo
2020-01-21 21:48:16 -05:00
Aaron Franke
015cb6e64c Merge pull request #350 from aaronfranke/audio
Update Audio demos for Godot 3.1.1
2020-01-21 21:36:58 -05:00
Aaron Franke
617896737e Update Audio demos for Godot 3.1.1 2020-01-21 21:33:36 -05:00
Aaron Franke
50d5a118c9 Merge pull request #330 from aaronfranke/update-ik
Update and optimize 3D IK Demo
2020-01-21 21:24:20 -05:00
Aaron Franke
e5e20a57a1 [IK] Conform to the new GDScript style guide 2020-01-21 21:20:27 -05:00
Aaron Franke
72ff4543c8 [IK] Organize FPS into subfolder
Also, removed Wall8 so that you can't get stuck
2020-01-21 21:18:09 -05:00
Aaron Franke
f863ebe52c [IK] Refactor ik_fabrik.gd
Add static typing in many places, cache values to improve performance, use printerr, use Vector3.UP, and use linear_interpolate method
2020-01-21 21:17:09 -05:00
Aaron Franke
4ce086a745 [IK] FPS example fixes
Fix being able to lean through walls, fix walls floating slightly above the ground, aligned walls to integer grid when applicable
2020-01-21 21:16:25 -05:00
Aaron Franke
6a1fe3b48a [IK] Script fixes
Fix warnings, ensure functions are spaced
2020-01-21 21:15:42 -05:00
Aaron Franke
990042e3c5 [IK] Update to Godot 3.1
Open and save all resources
2020-01-21 21:15:31 -05:00
Aaron Franke
53fc37e64e Merge pull request #331 from aaronfranke/update-kc3d
Update and optimize 3D KC demo
2020-01-21 20:28:32 -05:00
Aaron Franke
de309f0544 Merge pull request #299 from TwistedTwigleg/gui_in_3d_fix
Rewrote most of the code in the gui_in_3d demo.
2020-01-21 20:22:37 -05:00
Aaron Franke
c101b13b27 Merge pull request #340 from aaronfranke/misc-files-templates
Funding and issue template files, and update gitignore
2020-01-21 20:18:50 -05:00
Hugo Locurcio
54ae746654 Merge pull request #370 from Calinou/material-testers-disable-etc2-import
Disable ETC2 texture compression in the Material Testers demo
2020-01-09 22:53:13 +01:00
Rémi Verschelde
1ca3204e0a hexmap: Enable Centered Texture option
See godotengine/godot#21213.
2020-01-08 09:43:10 +01:00
Hugo Locurcio
d191bf5558 Disable ETC2 texture compression in the Material Testers demo
Importing ETC2 textures is slow and requires a lot of RAM, so it
makes sense to disable it. Those who would like to run the demo
on mobile platforms can re-enable it in the Project Settings.
2020-01-04 00:19:55 +01:00
Rémi Verschelde
61ea666d69 Remove bogus draw_order values due to a pre-3.0 initialization bug
Fixes godotengine/godot#25642.
2020-01-02 11:25:16 +01:00
Jummit
ebdb732fc8 tidy up Main.vs 2019-12-07 16:58:48 +01:00
TwistedTwigleg
ee3dac1635 Fixed issue with strange tool script included in the gui in 3D demo 2019-10-20 14:33:02 -04:00
Bojidar Marinov
c34a2b423b Merge pull request #348 from texaco/master
Fix seesaw falling plank from 2d demo
2019-10-16 10:26:48 +03:00
Manolo Texaco
98e60d4ff6 Fix seesaw falling plank from 2d demo
Seesaw did stand up in 2d Demo - Physics Platformer.

Add a pillar as static body and reasign PinJoin2D nodes
2019-10-16 10:23:30 +03:00
Henrique Campos
85afe1bc9a Improved Pause demo 2019-10-07 21:19:13 -03:00
Henrique Campos
1ae9f1b549 Added Ball Factory and Removed container.png using a Polygond2D instead 2019-10-07 21:04:40 -03:00
Rémi Verschelde
d29b987235 Merge pull request #353 from hbina/fix_quat_error
Fixed casting from Basis to Quat
2019-09-26 12:36:20 +02:00
Hanif Bin Ariffin
1e44578b1e Fixed basis -> quat casting
Noticed a lot of error spat out because of unnormalized basis.
I simply followed the suggestion to use get_rotation_quat() instead of using constructor of Quat(x).
2019-09-23 19:09:40 -04:00
TwistedTwigleg
61ea89e836 Made minor changes to GUI in 3D demo script 2019-08-29 13:26:51 -04:00
TwistedTwigleg
0d40b69c19 Minor changes to GD_Paint demo 2019-08-29 13:17:15 -04:00
Rémi Verschelde
9b2da1fa2f Merge pull request #343 from Faless/websocket/initial
Add 3 WebSocket demos
2019-08-22 14:34:03 +02:00
Roberto Proença
36c9ecdfa8 Extract shader code from 2D shader demos 2019-07-31 13:15:42 -03:00
Fabio Alessandrelli
359ef78ee0 Add WebSocket high level multiplayer demo. 2019-07-28 15:25:36 +02:00
Fabio Alessandrelli
e9f02ff05f Add Websocket chat demo 2019-07-28 14:20:57 +02:00
Fabio Alessandrelli
949a9428eb Add websocket minimal demo 2019-07-28 14:13:19 +02:00
Hugo Locurcio
974e506371 Make the Platformer 2D demo work with ultrawide displays
This makes it possible to fill the whole viewport when playing on
a 21:9 monitor or a 19:9 smartphone.
2019-07-20 11:33:05 +02:00
Aaron Franke
3bf7046184 FUNDING, issue template files, and update gitignore
The mono_crash ignore is because they generated anytime there was a crash. The rest of the files mirror the main Godot repo.
2019-07-19 18:07:46 -04:00
Aaron Franke
a2e7bf2b36 [KC3D] Improvements and fixes
WASD movement, script improvements, move Cubio to its own scene, capitalize nodes, better win text, fix GDScript warnings
2019-07-11 13:31:06 -04:00
Aaron Franke
fa09138422 [KC3D] Convert scn to tscn and res to tres 2019-07-11 13:31:06 -04:00
Rémi Verschelde
c2d2718cca Merge pull request #339 from Faless/mp/bomber_fix_pr
Use p2p in multiplayer bomber player exchange.
2019-07-11 08:33:15 +02:00
Fabio Alessandrelli
38bfaba92d Use p2p in multiplayer bomber player exchange.
We used to broadcast player info on connect and have the server relay it
to other clients.
With this approach, each peer (including server) sends its own info once
to other peers as soon as they connects.
When a new player connects, it is notified of all the already connected
peers by the `network_peer_connected` signal.
Any already connected peer is also notified of the newly connected peer
by the same signal.
2019-07-10 18:29:44 +02:00
Rémi Verschelde
85f36d6b3b Merge pull request #338 from kjav/master
Fixed typo in overlay instructions
2019-07-08 07:10:05 +02:00
Sam
bee90f6bd7 Fixed typo in overlay instructions 2019-07-06 00:59:21 +01:00
Rémi Verschelde
e691f98c18 Merge pull request #302 from kkmzero/patch-1
Automatic brake/reverse
2019-07-04 12:03:05 +02:00
Rémi Verschelde
99f6e67d40 Merge pull request #335 from Faless/webrtc/initial
Add two WebRTC demo
2019-06-19 14:27:39 +02:00
TwistedTwigleg
2c5b4a48d0 Made changes to gd_paint demo based on feedback by aaronfranke 2019-06-15 11:52:41 -04:00
TwistedTwigleg
82d9684caf Made changes to the gui in 3D demo based on suggestions by aaronfranke 2019-06-15 11:38:09 -04:00
TwistedTwigleg
a527318768 Updated demo to work with Godot 3.1 with changes in the demo rewrite PR. Changed comments according to discussion in merged PR 2019-06-15 11:38:09 -04:00
Wagner Ferreira
7e37b4162f Renamed to lowercase to follow conventions 2019-06-15 11:38:09 -04:00
Wagner Ferreira
9adc81ce7f Added extra rewriting in the code to improve mouse drag
* Made the whole block a separated scene to demonstrate it can work across multiple instances.
* Dropped the Area.input_event and did everything manually with raycasting.
* Made quad_mesh_size automatically pick the quad size, avoiding the extra setup.
* Changed from PlaneMesh to QuadMesh. Now everyting can start with 0 rotation.
* The function will keep handling input when the mouse is outside of the area to avoid orphan clicks, but stop when the click is released.
* Changed some variable and function names to make sense with the code changes.
* Added an extra function to deal with billboard mode. But is not perfect, specially with scaling and Y-billboard + camera tilting.
2019-06-15 11:38:09 -04:00
TwistedTwigleg
092cf6fc03 Rewrote most of the code in the gui_in_3d demo. Now the demo supports viewports of different sizes, different sized quads, and has comments explaining what the code is doing 2019-06-15 11:38:09 -04:00
Fabio Alessandrelli
2a57c64c30 Add webrtc signaling example 2019-06-14 06:15:22 +02:00
Fabio Alessandrelli
0bbe5ef586 Add minimal connection demos 2019-06-14 04:14:53 +02:00
Rémi Verschelde
0db440bb55 Merge pull request #274 from Calinou/optimize-images
Optimize all images using `oxipng -o6 --strip all --zopfli`
2019-06-14 00:16:48 +02:00
Hugo Locurcio
184b0fe5f8 Optimize all images using oxipng -o6 --strip all --zopfli 2019-06-11 16:40:50 +02:00
Rémi Verschelde
6a9bb96ebd Merge pull request #332 from t-karcher/visual-script-patch
Visual Script demos converted to and tested with V3.1
2019-06-11 12:25:06 +02:00
Rémi Verschelde
4bb717c59f Merge pull request #220 from Calinou/increase-sky-radiance-size
Increase sky radiance size to 128 (from 64) in the Material Tester demo
2019-06-10 15:31:21 +02:00
Rémi Verschelde
f83706d306 Merge pull request #286 from williamd1k0/improve-godette-sprite
Improve Godette sprite in sprite_shaders demo
2019-06-10 10:49:21 +02:00
TwistedTwigleg
7ad43829ef Updated project to work with the latest version of Godot. Reworked the code so it is cleaner and easier to understand. Updated comments within code according to changes 2019-06-09 18:44:01 -04:00
Hugo Locurcio
7f41a74a98 Increase sky radiance size to 128 (from 64) in the Material Tester demo
This makes reflections look nicer, especially on materials with low
roughness values.
2019-06-05 13:38:52 +02:00
Andrew Shu
11425f2a6a Port 2d/role_playing_game to Godot 3.1
1. Renamed `CELL_TYPES` enums to `CellType`
2. Fixed references, old: `turn_combat_system/actors/Actor.gd`, new: `turn_combat/combatants/Combatant.gd`
3. Fixed references, old: `turn_combat_system/actors/health/Health.tscn`, new: `turn_combat/combatants/health/Health.tscn`
4. Fixed bug in `grid_movement/pawns/Actor.gd` extending lowercase `pawn.gd`; changed to `Pawn.gd`
5. Renamed lowercase `grid_movement/pawns/actor.gd` to capital `Actor.gd` for consistency
6. Fixed some unused local variables warnings

Other changes are from engine, after opening and saving all scenes.
2019-06-04 16:45:41 -07:00
Thomas Karcher
626b9178bb Converted to and tested with V3.1 2019-06-04 21:25:25 +02:00
Rémi Verschelde
47be86af93 Merge pull request #319 from wscalf/master
Updated rotation of Quad to be right side up
2019-06-03 21:31:54 +02:00
Rémi Verschelde
61c03933e4 Merge pull request #328 from t-karcher/patch-1
More projects converted to and tested with Godot 3.1
2019-06-03 21:17:03 +02:00
Thomas Karcher
1cfb3ee621 Small bugfix in 3D platformer
Gravity vector is zero in the first few frames, leading to errors in follow-up calculations expecting a normalized  vector. Fixed by assigning a default gravity in case those cases.
2019-05-15 21:57:35 +02:00
Thomas Karcher
39590fadd3 2D RPG converted to and tested with V3.1 2019-05-15 21:34:26 +02:00
Thomas Karcher
d21936b32d 3D projects converted to and tested with Godot 3.1 2019-05-15 19:26:16 +02:00
Thomas Karcher
d9a4d21e16 Updated latest Godot version (3.1) in README.md 2019-05-14 15:33:44 +02:00
Rémi Verschelde
b9bca13221 Merge pull request #326 from DevinPentecost/opensimplexnoise
Adding OpenSimplexNoise Viewer demo
2019-05-10 11:15:47 +02:00
Devin Pentecost
19c4d7311f Adding example NoiseTexture usage, as an example
Set the use_noise_texture flag to true to use it instead.
2019-05-08 21:58:10 -07:00
Devin Pentecost
27727fdde5 Adding OpenSimplexNoise Viewer demo 2019-05-04 23:50:24 -07:00
Juan Linietsky
ceefc33fe4 Improved tutorial for sync audio with music, use two approaches. 2019-04-27 15:26:48 -03:00
Juan Linietsky
e22a46f301 Add a BPM sync tutorial. 2019-04-27 14:14:17 -03:00
Juan Linietsky
c819e3b276 Demos for sound generation and audio spectrum analysis. 2019-04-10 12:26:55 -03:00
Rémi Verschelde
56a2b28c53 Merge pull request #322 from bojidar-bg/321-navigation-reach-end
Fix navigation demo not reaching the final point
2019-04-08 16:43:38 +02:00
Bojidar Marinov
55d1deeeac Fix navigation demo not reaching the final point
Fixes #321
2019-04-08 16:46:00 +03:00
William Scalf
cc0b002e6e Updated rotation of Quad to be right side up 2019-03-23 18:06:43 -04:00
Rémi Verschelde
17e80079e3 Merge pull request #318 from cbscribe/dodge_31_updates
Update Dodge demo to match 3.1 docs
2019-03-16 17:45:24 -07:00
Chris Bradfield
961c71d003 Update Dodge demo to match 3.1 docs 2019-03-16 17:26:56 -07:00
Rémi Verschelde
1a5517ae1a MicRecord: Improve UI for mobile, add status label 2019-03-08 15:39:49 +01:00
Rémi Verschelde
63392a3574 Port 3D kinematic char and materials tester to Godot 3.1 2019-03-07 23:36:30 +01:00
TestDotCom
2fb80980b9 2d/physics_platformer works flawlessly on Godot 3.1 beta 8 (#312)
* 2d/physics_platformer works flawlessly on Godot 3.1 beta 8
* fix warnings for inferred node type
* every script has a class_name
* formatted code for better clarity
* each files has its own subfolder
* bullet collisions and shooting have to be executed from call_deferred

* PascalCase naming for nodes
2019-03-04 12:12:33 +01:00
TestDotCom
81441c42b7 2d/platformer works flawlessly on Godot 3.1 beta 8 (#310)
* 2d/platformer works flawlessly on Godot 3.1 beta 8
* fix warnings for inferred node type
* every script has a class_name
* formatted code for better clarity
* each files has its own subfolder

* As suggested by @akien-mga
* states are back to const instead of enum
* class_name comes after extends
* better code style

* PascalCase for nodes
2019-03-04 12:12:08 +01:00
Rémi Verschelde
cfcc0f3964 Port misc and plugin demos to Godot 3.1 2019-02-26 15:13:08 +01:00
Rémi Verschelde
a38b315064 Port audio, gui, mono, networking and viewport demos to Godot 3.1 2019-02-26 14:50:18 +01:00
Rémi Verschelde
faae60ac2f Port 2D demos to Godot 3.1
Opened them, saved all scenes, ran the project. Did necessary fixes here and there,
fixed some warnings (but some remain in bigger demos).

Did not port JRPG demo yet (#306) nor the two platformer demos.
2019-02-26 14:22:02 +01:00
Ivan Kmeťo
bded14a506 Automatic brake/reverse
Value fwd_mps converts global velocity into a velocity vector which is rotated to cars local coordinate system (in this example x-axis).
Then if key "ui_down" is pressed and the fwd_mps value is greater or equal to -1 (which seems to be very good spot and represents car still moving forward but nearly standing still) the car reverses (negative engine_force_value). If this condition isn't met (which means the car is moving forward) then the car brakes.

Tested and working on Godot 3.1 Beta 3.

Suggestions:
In this case, if you want something more realistic, the -engine_force_value can be much lower because no car reverses in same speed as it goes forward but for the sake of demo project I left it as it is.

Created for my own project with help of user wombatstampede from godotdevelopers.org/forum
2019-02-06 05:59:45 +01:00
Toshio Araki
a6ce6dbf4c Updated 2D pathfinding for version 3.1 (#301) 2019-01-29 09:00:43 +01:00
Nathan Lovato
916c9c933c Merge pull request #298 from Rubonnek/fix-fsm-demo
Fixed Finite State Machine error with enums
2019-01-06 09:42:04 +09:00
Wilson E. Alvarez
974dbd6b88 Fixed Finite State Machine demo issues 2019-01-05 17:49:32 -05:00
Rémi Verschelde
eb27a35a2d Merge pull request #296 from marcelofg55/mic_record
Added MicRecord demo
2018-12-16 14:23:43 +01:00
Marcelo Fernandez
453405031c Added MicRecord demo 2018-12-15 14:45:28 -03:00
Rémi Verschelde
77f7afaba4 Fix window management demo for 3.0+ 2018-12-14 23:59:16 +01:00
Rémi Verschelde
da618f4f95 Merge pull request #288 from KellyThomas/dodge-the-creeps-cs
mono demo for dodge the creeps tutorial
2018-10-16 18:57:09 +02:00
Rémi Verschelde
bcc8f64d7a Platformer 2D: Simplify controller with proper is_on_floor usage 2018-10-16 11:02:47 +02:00
Nathan Lovato
3541aabc8e Merge pull request #289 from yleduc/patch-1
Fix a typo in GodotPayment(s)
2018-10-11 05:20:12 +09:00
Yannick LE DUC
eac8dfd6ed Fix a typo in GodotPayment(s)
Fix https://github.com/godotengine/godot/issues/22909
2018-10-10 16:21:23 +02:00
Kelly Thomas
7206f2d1f4 mono demo for dodge the creeps tutorial 2018-10-09 22:58:51 +08:00
Marcelo Fernandez
db411004b5 Add new Audio Device Changer demo 2018-10-08 22:23:23 -03:00
Rémi Verschelde
01d2f78c13 Merge pull request #261 from GDquest/grid-based-movement-2d
Add 2d grid-based movement demo
2018-10-07 10:13:44 +02:00
William Tumeo
765ca64680 Improve Godette sprite in sprite_shaders demo 2018-10-02 00:58:08 -03:00
Nathan Lovato
8cb1dcdb91 Merge pull request #284 from LikeLakers2/file-thing
Fix the git tracking issue with Grid.gd and Pawn.gd on Windows
2018-09-27 08:41:11 +09:00
LikeLakers2
c972af3aab Re-add the proper Grid.gd and Pawn.gd files 2018-09-24 19:16:19 -04:00
LikeLakers2
a318ea10a2 Remove the Grid.gd and Pawn.gd files 2018-09-24 18:53:46 -04:00
Nathan Lovato
bbaca235b8 Fix weapon offset, stagger assert fail
Reparented the weapons (sword and bullet) to the body, tweaked related code
Fix #277
Prevented attack state from stacking on top of stagger
Fix 279
2018-09-23 11:17:52 +09:00
Henrique Campos
2c260e0103 Refactor RPG Demo
closes #263 

- Rename dialog to dialogue
- Give meaningful name to generic actors
- Move combat screen content to turn_combat folder
- Add new icon.png and .svg
- Change combat UI to not emit a signal from its parent, instead pass parameters to a function and let the combat work on them there
- Remove UI accessing deep layers on the hierarchy (get_parent().get_node("../etc/etc../etc...")
- Fix defend() stacking, making the player invulnerable, now evey turn the Health.armor resets to a base_armor value
- Remove useless Inventory button (maybe added again in the future when an inventory is added to the demo)
2018-09-23 11:07:46 +09:00
Rémi Verschelde
5b01dccc82 Android IAP: Check for singleton before getting
Fixes #273, fixes #212, fixes #godotengine/godot#22082.
2018-09-14 22:57:19 +02:00
Nathan Lovato
471b813911 Fix typos and add missing end lines JRPG demo 2018-09-12 10:33:50 +09:00
Henrique Campos
2709ddeb28 Add JRPGish demo (#267)
* Add JRPGish game

* Fix typo and signals connection

* Add missing last lines

* Remove unused files
2018-09-12 09:59:22 +09:00
Juan Linietsky
c6b481aaf0 Background Loading Demo 2018-07-22 19:29:02 -03:00
Rémi Verschelde
35f628e0a4 Merge pull request #265 from volzhs/android-iap-desc
Update description for setting up android iap
2018-07-19 08:20:06 +02:00
volzhs
ab07f94911 Update description for setting up android iap 2018-07-19 14:56:51 +09:00
Nathan Lovato
cfe4b0ec4e Merge pull request #262 from goodyttoor/finite_state_machine
Fix finite state demo warning
2018-06-22 22:32:38 +09:00
Unknown
ed08f6aeca Fix finite state demo warning
- Remove non existence autoload
- Not running state stack display in editor
2018-06-22 16:37:30 +07:00
Rémi Verschelde
1970ba4b68 Merge pull request #252 from GDquest/hfsm-demo
Add State pattern, HFSM and pushdown automaton demo
2018-06-22 09:40:19 +02:00
Nathan Lovato
1ef5373c4f Rewrite FSM demo to respect the single responsibility principle
Now there's a base state_machine script, the StateMachine is separate from the physics body.
I reworked the code to follow the GDscript guidelines in the official manual.
2018-06-22 15:16:20 +09:00
Nathan Lovato
b355e3937a Fix condition always true in navigation demo 2018-06-19 10:42:30 +09:00
Nathan
954b6f4990 Fix pawn direction code, add EMPTY constant to grid 2018-06-12 10:09:29 +09:00
Nathan
11af6c77c7 Add 2d grid-based movement demo 2018-06-12 08:34:00 +09:00
Nathan
5b744fa1e6 Add HFSM + pushdown automaton demo 2018-06-10 16:45:02 +09:00
Rémi Verschelde
4f40b0940c IAP: Use PoolStringArray for 3.0+ 2018-05-26 08:15:07 +02:00
Nathan Lovato
c81540aa23 Merge pull request #260 from Calinou/increase-fov-in-3d-demos
Use an higher FOV value in demos
2018-05-19 07:36:44 +09:00
Hugo Locurcio
86bf5060b3 Use an higher FOV value in demos
A vertical FOV of 74 degrees is roughly equivalent to a 90 degree
horizontal FOV on a 4:3 display (~106.26 degrees on 16:9), which
is the typical default FOV used in PC games.
2018-05-18 23:16:27 +02:00
Nathan Lovato
65ea563d57 Merge pull request #257 from TwistedTwigleg/IK_Linux_Fix
Fixed the materials using upper case names in the IK demo.
2018-05-02 08:43:49 +09:00
Nathan Lovato
334426403c Merge pull request #258 from 0ttoman/my-branch
checking array length beforehand
2018-05-02 08:41:51 +09:00
0ttoman
d09cc6af8b checking array length beforehand 2018-05-01 23:52:05 +02:00
TwistedTwigleg
532fbb4858 Fixed the materials using upper case names in the IK demo 2018-05-01 17:21:45 -04:00
Rémi Verschelde
840777aee3 Merge pull request #236 from GDquest/astar-demo
Add 2d/navigation_astar demo for grid-based pathfinding
2018-05-01 11:46:30 +02:00
Nathan Lovato
8d93b177e6 Merge pull request #254 from Calinou/remove-dead-code-in-kinematic-character-3d
Remove an unused variable declaration in Kinematic Character 3D
2018-04-29 08:33:38 +09:00
Hugo Locurcio
3e47fcd6c4 Remove an unused variable declaration in Kinematic Character 3D 2018-04-28 17:37:44 +02:00
Nathan
2c2c8e7e73 Add path-following character
Fix performance bug with 2-way connections in the Astar node
2018-04-26 10:03:41 +09:00
Nathan Lovato
de24bae61d Merge pull request #246 from TwistedTwigleg/IK_Linux_Fix
Linux IK demo fixes
2018-04-24 09:52:44 +09:00
TwistedTwigleg
01abbff26d Changed a few things in the IK demo to make it work on Linux.
Renamed the exported variables in the Look At IK to better follow Godot's API.
Removed all of the commented out constraint code for the FABRIK IK.
2018-04-23 11:09:06 -04:00
Rémi Verschelde
85c72987fc Merge pull request #238 from Vega-KH/master
Fix vehicle vibration and rolling issues.
2018-04-12 08:31:16 +02:00
Kyle Howard
38bb189b9f Fix vehicle vibration and rolling issues.
I think these issues are due to different calculations in the Bullet
Physics system.  This fixes the vibration and roll, but additional
settings on the suspension also should be looked into.
2018-04-06 10:11:55 -05:00
Nathan Lovato
c61351cad9 Merge pull request #210 from TwistedTwigleg/Platformer3D_TextureFix
Removed grey line in Platformer3D's tile texture
2018-04-02 11:30:32 +09:00
Nathan Lovato
fc08eda45b Merge pull request #226 from TwistedTwigleg/3D_IK_Demo
3D IK demo (fixed)
2018-03-31 12:05:26 +09:00
Nathan Lovato
d5d7382a27 Merge pull request #237 from jaggygames/sprite-shaders
Ported 2D Sprite Shaders from 2.1
2018-03-31 11:52:33 +09:00
jaggygames
b24ee4a44a ported over 2d sprite shaders to 3.0 2018-03-31 09:12:23 +07:00
Nathan Lovato
ff4da36c17 Merge pull request #223 from cbscribe/code_cleanup
Code cleanup
2018-03-31 06:52:23 +09:00
Nathan
b8fc28b0cd Add 2d/navigation_astar demo for grid-based pathfinding
This includes a commented version of the code for learning purposes
There's a bug in the console every time you call AStar.get_point_path(): Condition p_elem->_root is true
The demo still runs no problem but some help and feedback would be much appreciated.

closes #235
2018-03-29 10:06:39 +09:00
Rémi Verschelde
7f969fca7a Merge pull request #234 from GDquest/2d-navigation-demo
Rewrite the 2d/navigation demo so it's easier to understand
2018-03-27 10:41:09 +02:00
Nathan
7cc8afbd1f rewrite the 2d/navigation demo so it's easier to understand 2018-03-27 17:04:28 +09:00
Rémi Verschelde
03afee161a Merge pull request #231 from Calinou/improve-readme
Reorganize README and add a notice about engine version compatibility
2018-03-26 20:58:11 +02:00
Hugo Locurcio
245d72ca1f Reorganize README and add a notice about engine version compatibility 2018-03-26 18:40:50 +02:00
Poommetee Ketson
2b68f9bdb0 Merge pull request #228 from Noshyaar/Noshyaar-patch-1
Fix moved msaa config in Material Demo
2018-03-19 23:13:03 +07:00
Poommetee Ketson
0db64f6ea2 Fix moved msaa config in Material Demo 2018-03-19 23:01:38 +07:00
Noah Beard
14b6f3587b Added a 3D IK demo with the following IK solvers: Look at and FABRIK
Three scenes are included, one of which shows a example use case.
2018-03-17 11:44:06 -04:00
Chris Bradfield
9d66e8f2ef Code cleanup 2018-03-13 22:35:55 -07:00
Rémi Verschelde
1c2ec4c2e8 Merge pull request #222 from cbscribe/dodge_game
Add "Dodge the Creeps" tutorial game
2018-03-13 10:17:44 +01:00
Chris Bradfield
b6b75c67f3 Add "Dodge the Creeps" tutorial game 2018-03-12 08:52:33 -07:00
Rémi Verschelde
40e1ee39f3 Merge pull request #206 from BastiaanOlij/truck_town
Ported truck town to Godot 3.0
2018-02-15 10:48:11 +01:00
Bastiaan Olij
d9a6635c11 Ported truck town to Godot 3.0 2018-02-15 20:31:49 +11:00
Rémi Verschelde
0252492b78 Merge pull request #213 from gamergamesz/patch-1
Update iap.gd from projectsettings to engine for 3.0 users
2018-02-01 21:16:03 +01:00
Himanshu singh
d53dd01897 Update iap.gd 2018-02-02 01:42:10 +05:30
TwistedTwigleg
2da82c7a90 Fixed the the texture in Platformer3D to not include grey lines between tiles 2018-02-01 12:12:38 -05:00
Rémi Verschelde
d69cc10a0b Merge pull request #205 from vnen/fix-reverb-platformer
Fix reverb predelay feedback for platformer 3d
2018-01-26 15:00:10 +01:00
George Marques
c307520d41 Fix reverb predelay feedback for platformer 3d 2018-01-26 11:45:21 -02:00
Rémi Verschelde
3606b2621e Merge pull request #201 from MarianoGnu/master
Update TileSet's tile offset, Fixes #200
2018-01-18 09:36:08 +01:00
Mariano Suligoy
f8cb21c366 Update TileSet's tile offset, Fixes #200 2018-01-17 20:12:48 -03:00
Rémi Verschelde
c76125babf Merge pull request #199 from TwistedTwigleg/Platformer3D_AnimationTreeFix
Moved Platformer3D animation tree nodes
2018-01-16 18:23:17 +01:00
TwistedTwigleg
bdd014c021 Moved the animation tree nodes in Platformer3D so they are no longer on top of each other. Other files changed when the project opened 2018-01-16 12:07:39 -05:00
Rémi Verschelde
219783e24d Merge pull request #198 from bojidar-bg/x-fixes
Make some demos work again, reimport
2018-01-16 16:55:43 +01:00
Bojidar Marinov
03ba4fc1df Make some demos work again, reimport 2018-01-16 17:46:10 +02:00
Rémi Verschelde
59751d35d3 Merge pull request #108 from TwistedTwigleg/Particles_2D_redux
Redid the particles 2D demo
2018-01-15 16:47:20 +01:00
TwistedTwigleg
ec5324af99 Redid the particles 2D demo, staying as close as possible to the Godot 2 version 2018-01-14 18:52:38 -05:00
Rémi Verschelde
dabd28cc92 Merge pull request #192 from vnen/import-plugin
Add a proper import plugin demo
2018-01-14 21:44:46 +01:00
George Marques
0bf5a9935d Add a custom import plugin demo
This is a direct port from the Godot 2.1 version of the demo.
2018-01-14 18:29:49 -02:00
George Marques
621abe5984 Rename the custom import plugin to custom material creator 2018-01-14 18:26:43 -02:00
Rémi Verschelde
e182dd799a Fix shadowing of "name" property + hidden rocks
Fixes #189.
2018-01-13 20:29:00 +01:00
Rémi Verschelde
5116684dcf Fix ball direction in visual pong
It was using randi() for y instead of 2*randf()-1.
2018-01-13 19:45:54 +01:00
Rémi Verschelde
6aa4e7a3fd Merge pull request #109 from RaXaR/master
Fix animation property in pause demo.
2018-01-13 19:38:31 +01:00
Paul Von Zimmerman
893348428e Fix observer yaw and pitch 2018-01-13 19:28:19 +01:00
Rémi Verschelde
f61c760e62 Merge pull request #172 from RandomShaper/adpod-mt
Examples about (multi)touch events
2018-01-09 22:31:34 +01:00
TwistedTwigleg
36923a28b9 Fixed the following in platformer 3D demo: Renamed rotation_deg to rotation_degress in the coin animation. Changed the dependency in tiles.scn from texture.tex to texture.png 2018-01-09 20:19:35 +01:00
Rémi Verschelde
93427c5936 Merge pull request #184 from TwistedTwigleg/Demo_cleanup_for_Godot_3
Demo cleanup for godot 3
2018-01-09 20:16:34 +01:00
Rémi Verschelde
b37c8be2b2 Merge pull request #186 from Calinou/fix-project-names
Fix project names to use consistent casing
2018-01-07 15:09:01 +01:00
Hugo Locurcio
20d2a5861a Fix project names to use consistent casing
This also makes the name of the 2D platformer demo more descriptive.
2018-01-07 14:59:09 +01:00
TwistedTwigleg
b09fd3382f Fix for sdf_font:
Added a default enviroment
2018-01-06 18:05:28 -05:00
TwistedTwigleg
1d9305fbe9 Fixes for Platformer:
- Added the Z key to shoot so that it follows the same input as Platformer3D
- Fixed the particles in the bullet scene so that it follows the same looks as Platformer3D
- Changed the scaling for the window from none to 2D
2018-01-06 18:03:21 -05:00
TwistedTwigleg
0afda1163a Fixes for Physics_platformer:
- Added the Z key to shoot so that the input follows the same input as Platformer3D
- Fixed the particles in the bullet scene so that it follows the same look as Platformer3D
- Changed the scaling for the window from none to 2D
2018-01-06 18:00:50 -05:00
TwistedTwigleg
a9c8fca242 Fix for Isometric:
moved the troll out of the wall
2018-01-06 17:58:39 -05:00
TwistedTwigleg
2e368a87c4 Fix for tween:
Fixed the rotation property (was set_rotation_in_degress, now it's set_rotation_degress)
2018-01-06 17:57:22 -05:00
TwistedTwigleg
b202ad6f1b Fix for hexagonal_map:
Removed out of place tiles in the map, had to redo most of it (so it does look a little different)
2018-01-06 17:55:55 -05:00
TwistedTwigleg
ed3461f7ab Fix for input_mapping:
Fixed bug when you push a key before you press a button.
2018-01-06 17:53:35 -05:00
TwistedTwigleg
2181660344 Fix for rich_text_bbcode:
Fixed/Changed the link from the github wiki to the BBCode page in the documentation.
2018-01-06 17:51:00 -05:00
sambler
abb08c9d1a Automatic .import updates made by opening projects in the godot editor
These import changes allow the projects to be opened with the runtime.
2018-01-06 22:16:13 +01:00
Rémi Verschelde
8b9ae0f444 Fix invalid .gitignore on *.import files
Those define how the resources must be imported, and can
therefore contain important information (e.g. whether filters
should be used).
2018-01-05 19:03:00 +01:00
Rémi Verschelde
a74210b9d1 Remove obsolete .tex binary files from Kinematic Character demo
Fixes https://github.com/godotengine/godot/issues/14747
2018-01-05 19:00:40 +01:00
Rémi Verschelde
296da279ea Monkey Pong: fix case of Normalized
This was changed between 3.0-alpha2 and 3.0-beta1.
2017-12-09 18:36:36 +01:00
Pedro J. Estébanez
abf561255c Examples about (multi)touch events 2017-12-07 03:34:10 +01:00
Rémi Verschelde
faf9f49024 Merge pull request #170 from Vega-KH/master
Fixed remaining occurances of rotation_deg
2017-12-06 19:12:13 +01:00
Kyle Howard
cec3be23e9 Fixed remaining occurances of rotation_deg
Fixed remaining files to change rotation_deg to rotation_degrees.
2017-12-06 12:04:55 -06:00
Rémi Verschelde
edbcdd6e76 Merge pull request #169 from Vega-KH/master
Update animation to 3.0 API
2017-12-06 18:56:04 +01:00
Kyle Howard
aa097bd97d Update animation to 3.0 API
Changed the property in the animation from "rotation_deg" to
"rotation_degrees."
2017-12-06 11:46:19 -06:00
Juan Linietsky
d1dd62140a Clean up demo and fix it, closes #84 2017-12-04 17:35:46 -03:00
RaXaR
f95e16aabe Fix animation property in pause demo. 2017-12-03 04:58:52 +02:00
Rémi Verschelde
677eab4e12 Merge pull request #103 from TwistedTwigleg/Joypad_Demo_Fix
Fixed the joypad demo to work with Godot 3 Beta 1
2017-12-02 10:38:05 +01:00
TwistedTwigleg
4e41829e3d Fixed the joypad demo to work with Godot 3 Beta 1 2017-12-01 17:11:48 -05:00
Rémi Verschelde
e22000bcee Merge pull request #97 from mrcdk/hdr_2d_fix
Fixes HDR for 2D demo
2017-11-20 20:01:05 +01:00
MrCdK
33dad2474d Fixes HDR for 2D demo 2017-11-20 19:45:57 +01:00
Rémi Verschelde
936ccf38ba Merge pull request #96 from x1212/fix_3din2d
Update 3d in 2d demo for Godot 3.0
2017-11-19 19:55:48 +01:00
x1212
f4bbbe37d9 Update 3d in 2d demo for Godot 3.0 2017-11-19 14:41:50 +01:00
Rémi Verschelde
d11b2b5702 Merge pull request #94 from RoyBerube/master
Move SDF demo to proper folder
2017-11-13 21:12:00 +01:00
RoyBerube
14abcf13ab Move SDF demo to proper folder
Signed distance field font demo was not created in its own folder. Moved files to their own folder.
2017-11-13 12:20:12 -07:00
Rémi Verschelde
38dc7b0d44 Merge pull request #93 from RoyBerube/master
Updated SDF demo to 3.0
2017-11-13 08:17:36 +01:00
RoyBerube
cb80b00a55 Updated SDF demo to 3.0 2017-11-12 19:46:51 -07:00
Rémi Verschelde
f2e2d60dba Merge pull request #92 from cbscribe/kcc_fixes
GDScript style fixes and other minor corrections
2017-11-12 21:02:10 +01:00
Chris Bradfield
4f6c514f17 GDScript style fixes and other minor corrections 2017-11-11 19:53:14 -08:00
Rémi Verschelde
49b0f87eb9 Merge pull request #90 from BastiaanOlij/sensors
Sensor example
2017-11-09 12:36:40 +01:00
BastiaanOlij
262faa2e2f Sensor example 2017-11-09 22:20:33 +11:00
TwistedTwigleg
a159361a2f Added a simple drawing example to help show how to use the drawing functions
in CanvasItem to make a simple MS paint like program.
2017-11-03 14:23:07 -04:00
Rémi Verschelde
3616322c70 Mono Pong: C# style fixes 2017-10-31 16:22:07 +01:00
Rémi Verschelde
faf120e257 Merge pull request #86 from Hinsbart/mono-pong
Code enhancements for the mono pong demo.
2017-10-31 14:33:57 +01:00
Andreas Haas
111c0d4eee Code enhancements for mono pong demo.
- Use pattern matching instead of check-and-cast.
- Rename constants to fit the usual c# code-style.
2017-10-31 14:21:54 +01:00
Rémi Verschelde
5df74f5693 Merge pull request #85 from StraToN/fix-issue-83
Fix regex demo after godot commit e3e2f06
2017-10-30 19:44:25 +01:00
Rémi Verschelde
b2d228e80d Mono: Version csproj, sln and Properties are recommended by neikeq 2017-10-30 19:42:27 +01:00
Julian Murgia
bc672d8959 Fix regex demo after godot commit e3e2f06 2017-10-30 19:30:23 +01:00
Rémi Verschelde
0af6d01f94 Add Mono conversion of the Pong demo
Quick and dirty port by a complete C# newbie,
could probably be optimized a bit.
2017-10-30 19:11:51 +01:00
Rémi Verschelde
f8ca6d0a4d Sync all demos with current master format 2017-10-30 12:38:39 +01:00
Rémi Verschelde
dd37c3aa51 Merge pull request #80 from ISylvox/material-tester-icon
Add Icon for Material Tester Demo
2017-10-29 20:58:43 +01:00
Indah Sylvia
af318e4e9a Added icon for material tester demo 2017-10-30 02:31:56 +07:00
Rémi Verschelde
4919716518 Merge pull request #79 from Noshyaar/mdm
Fix material demo lighting & wool material rim
2017-10-29 17:21:58 +01:00
Poommetee Ketson
a83b0b2df2 Fix material demo lighting & wool material rim
also project.godot trailing spaces
2017-10-29 23:09:09 +07:00
Rémi Verschelde
d821fe9ef5 Merge pull request #65 from ISylvox/2DPlatformer-PR
2D/Platformer: Several Enhancement added
2017-10-29 16:54:02 +01:00
Rémi Verschelde
0363d89cfa Merge pull request #75 from TwistedTwigleg/Ported_plugin_demos
Ported over the plugin demos to Godot 3
2017-10-29 16:46:17 +01:00
Rémi Verschelde
b4e0537816 Merge pull request #68 from sbeca/pr-project-files
Update project.godot files to latest format
2017-10-29 16:45:55 +01:00
Rémi Verschelde
5c103fc7c6 Merge pull request #77 from santouits/lalala
fixed anchors and renamed move function for window management demo
2017-10-26 09:41:11 +02:00
santouits
9038725eb8 fixed anchors and renamed move function 2017-10-26 10:35:11 +03:00
TwistedTwigleg
2a9dbe8d51 Ported over the custom node and custom dock plugins to Godot 3.
Made a new material IO plugin because the old one wasn't working. The new material IO plugin uses JSON instead of a custom
resource because you currently cannot save custom resources from GDScript.
2017-10-15 21:41:14 -04:00
Rémi Verschelde
da4b221c63 Merge pull request #70 from Valentactive/2D_in_3D_updated_viewport
updated viewport clearing
2017-10-14 10:47:17 +02:00
Rémi Verschelde
0ea354699e Merge pull request #69 from BastiaanOlij/navmesh_3.0
Made navmesh demo work in Godot 3.0
2017-10-12 11:59:08 +02:00
Michele Valente
bba9227d33 Updated indentations and whitespace usage as well as .import & .tscn files
the changes are made according to the official GDScript style guide
(http://docs.godotengine.org/en/latest/learning/scripting/gdscript/gdscript_styleguide.html).
The changes in the .tscn and .import files were done automatically by
Godot after opening the project with the latest master version.
2017-10-07 17:24:52 +02:00
Michele Valente
5326331666 updated viewport clearing
This change is needed in order to make use of the new introduced
set_clear_mode() function (I think the choosen enum value is ok since
its needed only once).
Updated in the following demos:
- 2D_in_3D
- 3D_in_2D
- screen_capture
2017-10-07 17:24:52 +02:00
Juan Linietsky
cdbb53c1c2 Fix division by zero error in platformer 2017-10-05 16:15:20 -03:00
Juan Linietsky
ad8b0fbeb4 Merge pull request #71 from sbeca/pr-fixed-rename
Fixes for rename from fixed to physics
2017-10-05 16:10:59 -03:00
Rémi Verschelde
17780c700a Merge pull request #67 from sbeca/pr-pos-rename
Fix compiler errors after pos to position renames
2017-10-05 11:54:51 +02:00
Scott Beca
96ae223e21 Fixes for rename from fixed to physics 2017-10-04 22:12:41 +11:00
BastiaanOlij
fad65b6200 Made navmesh demo work in Godot 3.0 2017-10-01 09:21:18 +11:00
Scott Beca
3f37e754c3 Update project.godot files to latest format 2017-09-30 21:22:16 +10:00
Scott Beca
dca08534bc Fix compiler errors after pos to position renames 2017-09-29 23:06:14 +10:00
Rémi Verschelde
9849c9edb9 Input mapping: Add code to load/save config 2017-09-23 20:36:10 +02:00
Rémi Verschelde
f6d8ed6136 Merge pull request #66 from adolson/patch-1
fix a nil error at line 22
2017-09-20 09:37:00 +02:00
Dana Olson
46291aebf6 fix a nil error at line 22 2017-09-20 02:13:01 -04:00
Indah Sylvia
b2ba9dd291 2D/platformer: Adjust Particles2D, Sprite, and AnimationPlayer for bullet and enemy scene 2017-09-04 15:30:41 +07:00
Rémi Verschelde
a48b748453 Merge pull request #55 from TwistedTwigleg/Viewport_demos
Ported viewport demos to Godot 3.0
2017-09-04 09:49:04 +02:00
Indah Sylvia
08cb6885d5 2D/platformer: Added background music 2017-09-04 04:45:58 +07:00
Rémi Verschelde
0addda6d15 Merge pull request #56 from groud/fix_material
Fix the material tester buttons being hidden
2017-08-23 11:43:35 +02:00
Gilles Roudiere
d6a8bf2138 Fix the material tester buttons being too low 2017-08-22 17:07:13 +02:00
TwistedTwigleg
053d035574 Ported viewport demos to Godot 3.0 2017-08-19 13:10:25 -04:00
Rémi Verschelde
7e8ba5149d Merge pull request #49 from vnen/patch-1
Update Godot project file name
2017-07-29 19:43:58 +02:00
George Marques
1623ef717e Update Godot project file name 2017-07-28 21:23:34 -07:00
Rémi Verschelde
9365e97c0f Some more ProjectSettings fixes 2017-07-26 20:25:57 +02:00
Rémi Verschelde
d62be914fd Merge pull request #47 from kubecz3k/demo-projects-name-fix
basic fixes for project.godot files
2017-07-26 20:19:25 +02:00
Jakub Grzesik
2c012b4e59 basic fixes for project.godot files 2017-07-26 20:06:21 +02:00
Rémi Verschelde
27054fcfd4 Merge pull request #46 from kubecz3k/demo-array-fix
change PoolFloatArray to PoolRealArray in tscn files
2017-07-26 19:08:37 +02:00
Jakub Grzesik
a282a85cb3 change PoolFloatArray to PoolRealArray in tscn files 2017-07-26 18:32:08 +02:00
Juan Linietsky
194655c805 Ported platformer demo 2017-07-15 18:34:10 -03:00
Rémi Verschelde
e345d480cd WM demo: Add missing CubeMesh (prev. TestInstance) 2017-07-15 13:25:23 +02:00
Rémi Verschelde
058f050b80 Tween Demo: Some more fixes to property accessors 2017-07-15 12:59:33 +02:00
Juan Linietsky
96f6f2967f Kinematic character demo 2017-07-09 16:53:09 -03:00
Juan Linietsky
fb8ef8efdb Added a toon tester 2017-07-08 14:04:04 -03:00
Rémi Verschelde
cc53f055ed Merge pull request #45 from capnm/fix-tile-offsets
2d/hexagonal_map: Fix tile positions and offsets.
2017-07-07 12:43:07 +02:00
Martin Capitanio
f2e83c23af 2d/hexagonal_map: Fix tile positions and offsets. 2017-07-07 10:04:48 +02:00
Juan Linietsky
528f4eb53f clean up material demo 2017-07-05 22:37:05 -03:00
Rémi Verschelde
83705eac78 Merge pull request #43 from kubecz3k/gui-win-resize
gui acts properly for window size change
2017-07-05 23:02:54 +02:00
Unknown
3f09780a9f gui acts properly for window size change 2017-07-05 18:22:57 +02:00
Juan Linietsky
85b8aeebc1 Relevant stuff is ported, so erasing old demos for now. 2017-07-05 09:12:01 -03:00
Juan Linietsky
435e4a33c1 Material tester demo 2017-07-03 12:54:09 -03:00
Rémi Verschelde
00f2097972 platformer2d: disable filter and fix stage tilemap 2017-07-01 21:45:02 +02:00
Juan Linietsky
da56d77d42 networking demos were notworking, not areworking, 2017-07-01 14:59:37 -03:00
Juan Linietsky
13eab7d1aa Added visual script pong 2017-07-01 07:29:39 -03:00
Rémi Verschelde
8919981a59 Port remaining misc demos to 3.0
android_iap, threads, tween, window_management
2017-06-30 22:29:13 +02:00
Rémi Verschelde
634d45a280 Port some misc demos to 3.0
autoload, instancing, joypads, pause, regex, scene_changer
2017-06-30 08:39:26 +02:00
Rémi Verschelde
a874fdb94a Remove .import stuff again... 2017-06-29 17:18:00 +02:00
Juan Linietsky
4593bdcc64 GUI demos converted to 3.0 2017-06-28 15:11:35 -03:00
Rémi Verschelde
274c38799a Add .gitignore rules 2017-06-27 19:18:30 +02:00
Rémi Verschelde
c6a2f0ea7a Delete .import folders that should not have been versioned 2017-06-27 19:17:38 +02:00
Juan Linietsky
b9c4670f44 Ported screen space shaders demo, meaning SCREEN_TEXTURE works finally! 2017-06-26 22:42:53 -03:00
Juan Linietsky
8f6370f13d New pong demo that uses Godot as intended, erased old one. 2017-06-25 20:40:04 -03:00
Juan Linietsky
023521c1c9 This will make Akien angry (was left there as i was testing the feature..) 2017-06-25 19:15:26 -03:00
Juan Linietsky
c3899b9e7d WIP porting demos 2017-06-25 08:00:20 -03:00
Juan Linietsky
6ef185c192 begun porting demos, platformer is working (mostly) 2017-06-23 07:44:27 -03:00
Rémi Verschelde
dfabaa7ba7 Merge pull request #35 from stormi/aircontrol
Allow changing player facing side while in the air
2017-02-06 14:14:50 +01:00
Samuel Verschelde
8ff2aec4f1 Allow changing player facing side while in the air
* As soon as the user wants to change direction while in the air, change
  the character's facing side.
* This allows for example shooting left then right while in the air and
  gives a better feeling.
2017-02-06 14:08:01 +01:00
Mario Schlack
ee75abef10 Added Input.set_mouse_mode(...) test cases. 2017-01-21 14:38:04 +01:00
Rémi Verschelde
e03275cc07 Merge pull request #28 from williamd1k0/split-screen-modes
Add split-screen modes (horizontal/vertical)
2017-01-19 11:21:52 +01:00
Rémi Verschelde
50895875ed Remove empty inverse kinematics demo
Fixes #27.
2016-12-04 11:29:17 +01:00
William Tumeo
c6a09b1a7e Add setget method and tool mode 2016-12-03 16:03:32 -02:00
Rémi Verschelde
f1f3f187d2 Merge pull request #31 from williamd1k0/3d-platformer-coin-free
Free coin in 3D platformer
2016-11-02 22:03:44 +01:00
William Tumeo
76bfb10deb free coin in 3D platformer 2016-11-02 17:08:20 -02:00
Rémi Verschelde
210bd8d8c4 Merge pull request #29 from Faless/fix_3_player_sm
Fix simple multiplayer demo for 3+ players
2016-10-07 16:29:22 +02:00
Fabio Alessandrelli
d22dd38557 Fix simple multiplayer demo for 3+ players
Properly send newly connected dudes to old players
2016-10-07 16:21:33 +02:00
William Tumeo
2ea9e52dd7 Add split-screen modes (horizontal/vertical) 2016-10-03 20:56:45 -03:00
Rémi Verschelde
95fff761ff Merge pull request #26 from williamd1k0/player-index
Export player index
2016-10-01 10:57:13 +02:00
William Tumeo
8f46b78b5c Export player index 2016-10-01 01:56:30 -03:00
Rémi Verschelde
80aea98747 split screen platformer: fix duplicate key binding 2016-09-18 09:18:59 +02:00
Rémi Verschelde
3e16c84a2b simple multiplayer: Simplify some redundant calls 2016-09-18 09:16:55 +02:00
Rémi Verschelde
c0e3b4161f simple multiplayer: Code style enhancements 2016-09-18 09:16:55 +02:00
Rémi Verschelde
e435b79e2a Merge pull request #20 from kubecz3k/master
VsPlatformer bugfix: bullets were unable to deal damage
2016-09-16 12:16:26 +02:00
Jakub Grzesik
a1ea97bb1e VsPlatformer bugfix: bullets were unable to deal damage 2016-09-16 11:29:12 +02:00
Juan Linietsky
10fcf1629b Added split screen platformer. 2016-09-14 15:54:59 -03:00
Juan Linietsky
cf98fed099 forgot to check on floor before jumping 2016-09-04 23:35:34 -03:00
Juan Linietsky
1a7e9e0dc4 Platformer demo now uses Kinematic Controller 2016-09-04 23:14:23 -03:00
Juan Linietsky
5ee9e3cf6a Add pong3 demo using expression nodes 2016-09-04 14:17:52 -03:00
Juan Linietsky
109b704ae3 Added two versions of pong using visual script:
-One regular one and one (direct port of the tutorial demo)
-One using more advanced godot concepts
2016-09-03 00:23:42 -03:00
Juan Linietsky
675f7934b0 fix switch 2016-09-01 20:03:56 -03:00
Juan Linietsky
21cd93a801 Changed script to use just pressed actions 2016-09-01 18:58:33 -03:00
Juan Linietsky
bccc1cd127 Added a new platformer demo entirely made with visual script. 2016-08-31 17:57:08 -03:00
Juan Linietsky
00f5f054ad Added a pong multiplayer example 2016-08-21 10:05:52 -03:00
Juan Linietsky
4edf90374f Some fixed to networking demo 2016-08-19 18:42:14 -03:00
Juan Linietsky
d9c91b93d9 Added a simple multiplayer test 2016-08-19 16:47:48 -03:00
1878 changed files with 55220 additions and 15368 deletions

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
# Top-most EditorConfig file.
root = true
[*]
charset = utf-8
end_of_line = lf

2
.gitattributes vendored Normal file
View File

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

2
.github/FUNDING.yml vendored Normal file
View File

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

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

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

19
.github/workflows/static_checks.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Static Checks
on: [push, pull_request]
jobs:
format:
name: File formatting (file_format.sh)
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq dos2unix recode
- name: File formatting checks (file_format.sh)
run: |
bash ./file_format.sh

22
.gitignore vendored Normal file
View File

@@ -0,0 +1,22 @@
# Godot 4+ specific ignores
.godot/
# Godot-specific ignores
.import/
export.cfg
export_presets.cfg
# Dummy HTML5 export presets file for continuous integration
!.github/dist/export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
# System/tool-specific ignores
.directory
.DS_Store
*~

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,5 +0,0 @@
[application]
name="Area 2D Input Events"
main_scene="res://input.tscn"
icon="res://icon.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1,15 +0,0 @@
extends Area2D
# Virtual from CollisionObject2D (also available as signal)
func _input_event(viewport, event, shape_idx):
# Convert event to local coordinates
if (event.type == InputEvent.MOUSE_MOTION):
event = make_input_local(event)
get_node("label").set_text(str(event.pos))
# Virtual from CollisionObject2D (also available as signal)
func _mouse_exit():
get_node("label").set_text("")

View File

@@ -1,109 +0,0 @@
[gd_scene load_steps=6 format=1]
[ext_resource path="res://input.gd" type="Script" id=1]
[ext_resource path="res://box_area.png" type="Texture" id=2]
[ext_resource path="res://circle_area.png" type="Texture" id=3]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
extents = Vector2( 64, 64 )
[sub_resource type="CircleShape2D" id=2]
custom_solver_bias = 0.0
radius = 64.0
[node name="base" type="Node2D"]
[node name="box" type="Area2D" parent="."]
transform/pos = Vector2( 212, 281 )
transform/rot = 35.4081
input/pickable = true
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="box"]
texture = ExtResource( 2 )
[node name="label" type="Label" parent="box"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = -43.0
margin/top = 71.0
margin/right = 43.0
margin/bottom = 84.0
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="shape" type="CollisionShape2D" parent="box"]
shape = SubResource( 1 )
trigger = false
_update_shape_index = -1
[node name="circle" type="Area2D" parent="."]
transform/pos = Vector2( 547.877, 286.808 )
transform/rot = -40.5985
input/pickable = true
shapes/0/shape = SubResource( 2 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="circle"]
texture = ExtResource( 3 )
[node name="label" type="Label" parent="circle"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = -43.0
margin/top = 71.0
margin/right = 43.0
margin/bottom = 84.0
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="shape" type="CollisionShape2D" parent="circle"]
shape = SubResource( 2 )
trigger = false
_update_shape_index = -1
[node name="Label" type="Label" parent="."]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = 0.0
margin/top = 0.0
margin/right = 40.0
margin/bottom = 13.0
text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

2
2d/dodge_the_creeps/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.import
logs/

View File

@@ -0,0 +1,30 @@
extends CanvasLayer
signal start_game
func show_message(text):
$MessageLabel.text = text
$MessageLabel.show()
$MessageTimer.start()
func show_game_over():
show_message("Game Over")
yield($MessageTimer, "timeout")
$MessageLabel.text = "Dodge the\nCreeps"
$MessageLabel.show()
yield(get_tree().create_timer(1), 'timeout')
$StartButton.show()
func update_score(score):
$ScoreLabel.text = str(score)
func _on_StartButton_pressed():
$StartButton.hide()
emit_signal("start_game")
func _on_MessageTimer_timeout():
$MessageLabel.hide()

View File

@@ -0,0 +1,57 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://HUD.gd" type="Script" id=1]
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="DynamicFontData" id=2]
[sub_resource type="DynamicFont" id=1]
size = 64
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=2]
size = 64
font_data = ExtResource( 2 )
[sub_resource type="InputEventAction" id=3]
action = "ui_select"
[sub_resource type="ShortCut" id=4]
shortcut = SubResource( 3 )
[node name="HUD" type="CanvasLayer"]
script = ExtResource( 1 )
[node name="ScoreLabel" type="Label" parent="."]
anchor_right = 1.0
margin_bottom = 78.0
custom_fonts/font = SubResource( 1 )
text = "0"
align = 1
[node name="MessageLabel" type="Label" parent="."]
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_top = -79.5
margin_bottom = 79.5
custom_fonts/font = SubResource( 1 )
text = "Dodge the
Creeps"
align = 1
[node name="StartButton" type="Button" parent="."]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -90.0
margin_top = -200.0
margin_right = 90.0
margin_bottom = -100.0
custom_fonts/font = SubResource( 2 )
shortcut = SubResource( 4 )
text = "Start"
[node name="MessageTimer" type="Timer" parent="."]
one_shot = true
[connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]
[connection signal="timeout" from="MessageTimer" to="." method="_on_MessageTimer_timeout"]

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 KidsCanCode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,45 @@
extends Node
export (PackedScene) var Mob
var score
func _ready():
randomize()
func game_over():
$ScoreTimer.stop()
$MobTimer.stop()
$HUD.show_game_over()
$Music.stop()
$DeathSound.play()
func new_game():
score = 0
$Player.start($StartPosition.position)
$StartTimer.start()
$HUD.update_score(score)
$HUD.show_message("Get Ready")
$Music.play()
func _on_MobTimer_timeout():
$MobPath/MobSpawnLocation.offset = randi()
var mob = Mob.instance()
add_child(mob)
var direction = $MobPath/MobSpawnLocation.rotation + PI / 2
mob.position = $MobPath/MobSpawnLocation.position
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)
func _on_ScoreTimer_timeout():
score += 1
$HUD.update_score(score)
func _on_StartTimer_timeout():
$MobTimer.start()
$ScoreTimer.start()

View File

@@ -0,0 +1,54 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://Mob.tscn" type="PackedScene" id=2]
[ext_resource path="res://Player.tscn" type="PackedScene" id=3]
[ext_resource path="res://HUD.tscn" type="PackedScene" id=4]
[ext_resource path="res://art/House In a Forest Loop.ogg" type="AudioStream" id=5]
[ext_resource path="res://art/gameover.wav" type="AudioStream" id=6]
[sub_resource type="Curve2D" id=1]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0 )
}
[node name="Main" type="Node"]
script = ExtResource( 1 )
Mob = ExtResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0.219608, 0.372549, 0.380392, 1 )
[node name="Player" parent="." instance=ExtResource( 3 )]
[node name="MobTimer" type="Timer" parent="."]
wait_time = 0.5
[node name="ScoreTimer" type="Timer" parent="."]
[node name="StartTimer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[node name="StartPosition" type="Position2D" parent="."]
position = Vector2( 240, 450 )
[node name="MobPath" type="Path2D" parent="."]
curve = SubResource( 1 )
[node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath"]
[node name="HUD" parent="." instance=ExtResource( 4 )]
[node name="Music" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
[node name="DeathSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
[connection signal="hit" from="Player" to="." method="game_over"]
[connection signal="timeout" from="MobTimer" to="." method="_on_MobTimer_timeout"]
[connection signal="timeout" from="ScoreTimer" to="." method="_on_ScoreTimer_timeout"]
[connection signal="timeout" from="StartTimer" to="." method="_on_StartTimer_timeout"]
[connection signal="start_game" from="HUD" to="." method="new_game"]

View File

@@ -0,0 +1,13 @@
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.animation = mob_types[randi() % mob_types.size()]
func _on_VisibilityNotifier2D_screen_exited():
queue_free()

View File

@@ -0,0 +1,53 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Mob.gd" type="Script" id=1]
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture" id=2]
[ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture" id=3]
[ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=4]
[ext_resource path="res://art/enemyWalking_2.png" type="Texture" id=5]
[ext_resource path="res://art/enemySwimming_1.png" type="Texture" id=6]
[ext_resource path="res://art/enemySwimming_2.png" type="Texture" id=7]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"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
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 35.2706
height = 23.3281
[node name="Mob" type="RigidBody2D"]
collision_mask = 0
gravity_scale = 0.0
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.75, 0.75 )
frames = SubResource( 1 )
animation = "walk"
frame = 1
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource( 2 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]

View File

@@ -0,0 +1,45 @@
extends Area2D
signal hit
export var speed = 400
var screen_size
func _ready():
screen_size = get_viewport_rect().size
hide()
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")
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)
if velocity.x != 0:
$AnimatedSprite.animation = "right"
$AnimatedSprite.flip_v = false
$AnimatedSprite.flip_h = velocity.x < 0
elif velocity.y != 0:
$AnimatedSprite.animation = "up"
$AnimatedSprite.flip_v = velocity.y > 0
func start(pos):
position = pos
show()
$CollisionShape2D.disabled = false
func _on_Player_body_entered(_body):
hide()
emit_signal("hit")
$CollisionShape2D.set_deferred("disabled", true)

View File

@@ -0,0 +1,70 @@
[gd_scene load_steps=13 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://art/playerGrey_walk1.png" type="Texture" id=2]
[ext_resource path="res://art/playerGrey_walk2.png" type="Texture" id=3]
[ext_resource path="res://art/playerGrey_up1.png" type="Texture" id=4]
[ext_resource path="res://art/playerGrey_up2.png" type="Texture" id=5]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "right",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "up",
"speed": 5.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 26.1701
height = 14.822
[sub_resource type="Gradient" id=3]
colors = PoolColorArray( 1, 1, 1, 0.501961, 1, 1, 1, 0 )
[sub_resource type="GradientTexture" id=4]
gradient = SubResource( 3 )
[sub_resource type="Curve" id=5]
_data = [ Vector2( 0.00501098, 0.5 ), 0.0, 0.0, 0, 0, Vector2( 0.994989, 0.324 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=6]
curve = SubResource( 5 )
[sub_resource type="ParticlesMaterial" id=7]
flag_disable_z = true
gravity = Vector3( 0, 0, 0 )
initial_velocity = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
scale = 0.75
scale_curve = SubResource( 6 )
color_ramp = SubResource( 4 )
[node name="Player" type="Area2D"]
z_index = 10
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.5, 0.5 )
frames = SubResource( 1 )
animation = "right"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="Trail" type="Particles2D" parent="."]
z_index = -1
amount = 10
speed_scale = 2.0
local_coords = false
process_material = SubResource( 7 )
texture = ExtResource( 2 )
[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]

Binary file not shown.

View File

@@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
[deps]
source_file="res://art/House In a Forest Loop.ogg"
dest_files=[ "res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr" ]
[params]
loop=true
loop_offset=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemyFlyingAlt_1.png"
dest_files=[ "res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemyFlyingAlt_2.png"
dest_files=[ "res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemySwimming_1.png"
dest_files=[ "res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemySwimming_2.png"
dest_files=[ "res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemyWalking_1.png"
dest_files=[ "res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/enemyWalking_2.png"
dest_files=[ "res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

View File

@@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"
[deps]
source_file="res://art/gameover.wav"
dest_files=[ "res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/playerGrey_up1.png"
dest_files=[ "res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/playerGrey_up2.png"
dest_files=[ "res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/playerGrey_walk1.png"
dest_files=[ "res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/playerGrey_walk2.png"
dest_files=[ "res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.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=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

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

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

View File

@@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View File

@@ -0,0 +1,253 @@
Please distribute this file along with the Xolonium fonts when possible.
Source
Find the sourcefiles of Xolonium at
<gitlab.com/sev/xolonium>
Credits
Xolonium is created with FontForge <fontforge.org>,
Inkscape <inkscape.org>, Python <python.org>, and
FontTools <github.com/fonttools>.
It originated as a custom font for the open-source
game Xonotic <xonotic.org>. With many thanks to the
Xonotic community for your support.
Supported OpenType features
case Provides case sensitive placement of punctuation,
brackets, and math symbols for uppercase text.
frac Replaces number/number sequences with diagonal fractions.
Numbers that touch a slash should not exceed 10 digits.
kern Provides kerning for Latin, Greek, and Cyrillic scripts.
locl Dutch: Replaces j with a stressed version if it follows í.
Sami: Replaces n-form Eng with the preferred N-form version.
Romanian and Moldovan: Replaces ŞşŢţ with the preferred ȘșȚț.
pnum Replaces monospaced digits with proportional versions.
sinf Replaces digits with scientific inferiors below the baseline.
subs Replaces digits with subscript versions on the baseline.
sups Replaces digits with superscript versions.
zero Replaces zero with a slashed version.
Supported glyph sets
Adobe Latin 3
OpenType W1G
ISO 8859-1 Western European
ISO 8859-2 Central European
ISO 8859-3 South European
ISO 8859-4 North European
ISO 8859-5 Cyrillic
ISO 8859-7 Greek
ISO 8859-9 Turkish
ISO 8859-10 Nordic
ISO 8859-13 Baltic Rim
ISO 8859-14 Celtic
ISO 8859-15 Western European
ISO 8859-16 South-Eastern European
Available glyphs
!"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
`abcdefghijklmnopqrstuvwxyz{|}~
 ¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß
àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğ
ĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľ
ĿŀŁłŃńŅņŇňŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞş
ŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž
ƒǺǻǼǽǾǿȘșȚțȷ
ˆˇˉ˘˙˚˛˜˝
ͺ;΄΅Ά·ΈΉΊΌΎΏΐ
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰ
αβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ
ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОП
РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп
рстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ
ѢѣѲѳѴѵҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩ
ҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽӀӁӂӇӈӋӌӏӐӑӒӓ
ӔӕӖӗӘәӜӝӞӟӠӡӢӣӤӥӦӧӨөӮӯӰӱӲӳӴӵӶӷӸӹ
Ԥԥ
ḂḃḊḋḞḟṀṁṖṗṠṡṪṫẀẁẂẃẄẅẞỲỳ
     ‒–—―‘’‚‛“”„‟†‡•…‰′″‹›‽‾⁄
⁰⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎
₤₦₩₫€₯₱₹₺₽₿
℅ℓ№℗™Ω℮
⅛⅜⅝⅞
←↑→↓
∂∆∏∑−∕∙√∞∟∫≈≠≤≥
■▬▮▰▲▶▼◀◆◊●◢◣◤◥
☄★☠☢☣⚙⚛⚠⚡⛔
❇❈❌❤❰❱❲❳
fffiflffiffl
🌌🌍🌎🌏👽💣🔥🔫
😁😃😄😆😇😈😉😊😎😐😒😕😘
😛😝😞😟😠😣😭😮😲😴😵
🚀
Debugging glyphs
 U+EFFD Font version
 U+F000 Font hinting indicator
Changelog
Xolonium 4.1 2016-11-22 Severin Meyer <sev.ch@web.de>
Reverted frac OpenType feature to a more stable implementation
Xolonium 4.0 2016-10-08 Severin Meyer <sev.ch@web.de>
Decreased width of most glyphs
Thinner vertical stems in Xolonium-Regular
Thicker horizontal stems in Xolonium-Bold
Revised diagonal stems
Lowered middle bars
Revised diacritical bars
Added glyphs:
ӏẞ₿
U+2007 U+2008 U+2009 U+200A U+202F
U+EFFD U+F000
Revised glyphs:
$&,JKQRXkwxy~¢¤ßǻ˜ζκλμξφЖУжћѴѵ∕₱₺₦₩€ℓ№≈ffffiffl
❤🌍🌎🌏😁😄😇😈😉😊😘😭😮😴🚀
Removed uncommon glyphs:
ʼnſʼҌҍҎҏҾҿӃӄӇӈӚӛӪӫӬӭ
U+0312 U+0313 U+0326
Simplified OpenType features pnum, zero, and case
Removed OpenType feature dlig
Revised vertical metrics
Merged outlines of composite glyphs in otf version
Added ttf version with custom outlines and instructions
Added woff and woff2 version
Xolonium 3.1 2015-06-10 Severin Meyer <sev.ch@web.de>
Added currency glyphs:
₦₩₫₱₹₺₽
Revised glyph:
Relicensed public release under the SIL Open Font License 1.1
Xolonium 3.0 2015-05-04 Severin Meyer <sev.ch@web.de>
Decreased width of glyphs
Decreased descender height
Increased height of super/subscript glyphs
Revised width of dashes, underscore, and overscore
Sharper bends with more circular proportions
Decreased stroke thickness of mathematical glyphs
Revised diacritical marks
Revised diacritical bars
Revised Cyrillic hooks
Revised glyphs:
GQRYjmuwßŊŒſƒǻfffiffiffl
ΞΨΩδζιξπςστυφω
ЉЄДЛУЭЯбдлэяєљђєћѢѣҨҩҼҽӃӄӘә
#$&'()*,/69?@[]{}~¡£¤¥§©®¿
‹›₤€₯ℓ№℗℮←↑→↓∂∏∑∞≈▰☄❈❰❱❲❳😝
Raised vertical position of mathematical glyphs
Unified advance width of numeral and monetary glyphs
Unified advance width of mathematical glyphs
Revised bearings
Rewrote kern feature
Bolder Xolonium-Bold with improved proportions
Updated glyph names to conform to the AGLFN 1.7
Revised hints and PS Private Dictionary
Added glyphs:
ӶӷԤԥ
Added OpenType features:
case frac liga locl pnum sinf subs sups zero
Xolonium 2.4 2014-12-23 Severin Meyer <sev.ch@web.de>
Added dingbats:
⛔💣🔥
Revised size and design of emoticons
Revised dingbats:
⌖☄☠☣⚙⚛⚠⚡❇❈🌌🌍🌎🌏🔫
Removed dingbat:
💥
Xolonium 2.3 2014-08-14 Severin Meyer <sev.ch@web.de>
Bugfixed ε and έ, thanks to bowzee for the feedback
Xolonium 2.2 2014-03-01 Severin Meyer <sev.ch@web.de>
Added dingbats:
⌖◆●❌💥
Revised dingbats:
•←↑→↓◊☄★☠☣⚙⚛⚠⚡❇❈❤🌌🌍🌎🌏👽🔫🚀
Removed dingbats:
♻✪💡📡🔋🔧🔭
Xolonium 2.1 2013-10-20 Severin Meyer <sev.ch@web.de>
Added dingbats:
←↑→↓❰❱❲❳■▬▮▰▲▶▼◀◢◣◤◥
☄★☠☢☣♻⚙⚛⚠⚡✪❇❈❤
🌌🌍🌎🌏👽💡📡🔋🔧🔫🔭🚀
😁😃😄😆😇😈😉😊😎😐😒😕
😘😛😝😞😟😠😣😭😮😲😴😵
Xolonium 2.0.1 2013-07-12 Severin Meyer <sev.ch@web.de>
Reorganised and simplified files
Xolonium 2.0 2012-08-11 Severin Meyer <sev.ch@web.de>
Revised bends
Revised thickness of uppercase diagonal stems
Revised diacritical marks
Revised hints and PS Private Dictionary
Revised glyphs:
*1469@DPRly{}§©®¶ÐÞƒΘΞαεζνξνυЄЉЊ
ЏБЗЛУЧЪЫЬЭЯбзлчъыьэяєљњџ•€∂∙√∞∫≠
Completed glyph sets:
Adobe Latin 3
OpenType World Glyph Set 1 (W1G)
Ghostscript Standard (ghostscript-fonts-std-8.11)
Added OpenType kern feature
Added Xolonium-Bold
Xolonium 1.2 2011-02-12 Severin Meyer <sev.ch@web.de>
Revised glyphs:
D·Ðı
Completed glyph sets:
ISO 8859-7 (Greek)
Unicode Latin Extended-A block
Added glyphs:
†‡•…‰⁄™∂∑−√∞≠≤≥
Xolonium 1.1 2011-01-17 Severin Meyer <sev.ch@web.de>
Revised placement of cedilla and ogonek in accented glyphs
Revised glyphs:
,;DKTjkvwxy¥§Ð˛
Completed glyph sets:
ISO 8859-2 (Central European)
ISO 8859-3 (South European, Esperanto)
ISO 8859-4 (North European)
ISO 8859-5 (Cyrillic)
ISO 8859-9 (Turkish)
ISO 8859-10 (Nordic)
ISO 8859-13 (Baltic Rim)
ISO 8859-14 (Celtic)
ISO 8859-16 (South-Eastern European)
Added glyphs:
ȷʼ̒ ЀЍѐѝ‒–—‘’‚‛“”„‟‹›
Xolonium 1.0 2011-01-04 Severin Meyer <sev.ch@web.de>
Completed glyph sets:
ISO 8859-1 (Western European)
ISO 8859-15 (Western European)
Added glyphs:
ĄĆĘŁŃŚŹŻąćęłńśźżıˆˇ˙˚˛˜

View File

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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

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

@@ -0,0 +1,63 @@
; 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="Dodge the Creeps"
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"
[display]
window/size/width=480
window/size/height=720
[input]
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
}
move_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
}
[rendering]
environment/default_environment="res://default_env.tres"

View File

@@ -1,17 +0,0 @@
extends RigidBody2D
# Member variables
var timeout = 5
func _process(delta):
timeout -= delta
if (timeout < 1):
set_opacity(timeout)
if (timeout < 0):
queue_free()
func _ready():
set_process(true)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

View File

@@ -1,47 +0,0 @@
[gd_scene load_steps=4 format=1]
[ext_resource path="res://ball.gd" type="Script" id=1]
[ext_resource path="res://ball.png" type="Texture" id=2]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 7.45713
[node name="bal" type="RigidBody2D"]
input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
collision/layers = 1
collision/mask = 1
mode = 0
mass = 1.0
friction = 1.0
bounce = 0.0
gravity_scale = 1.0
custom_integrator = false
continuous_cd = 0
contacts_reported = 0
contact_monitor = false
sleeping = false
can_sleep = true
velocity/linear = Vector2( 0, 0 )
velocity/angular = 0.0
damp_override/linear = -1.0
damp_override/angular = -1.0
script/script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="."]
transform/pos = Vector2( 0, 1 )
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 889 B

View File

@@ -1,19 +0,0 @@
extends Node2D
# Member variables
const EMIT_INTERVAL = 0.1
var timeout = EMIT_INTERVAL
func _process(delta):
timeout -= delta
if (timeout < 0):
timeout = EMIT_INTERVAL
var ball = preload("res://ball.tscn").instance()
ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
add_child(ball)
func _ready():
set_process(true)

View File

@@ -1,178 +0,0 @@
[gd_scene load_steps=13 format=1]
[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
[ext_resource path="res://circle.png" type="Texture" id=2]
[ext_resource path="res://box.png" type="Texture" id=3]
[ext_resource path="res://poly.png" type="Texture" id=4]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 28.8504
[sub_resource type="RectangleShape2D" id=2]
custom_solver_bias = 0.0
extents = Vector2( 32.1805, 30.0328 )
[sub_resource type="ConvexPolygonShape2D" id=3]
custom_solver_bias = 0.0
points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
[sub_resource type="ConvexPolygonShape2D" id=4]
custom_solver_bias = 0.0
points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
[sub_resource type="ConvexPolygonShape2D" id=5]
custom_solver_bias = 0.0
points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
[sub_resource type="ConvexPolygonShape2D" id=6]
custom_solver_bias = 0.0
points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
[sub_resource type="Animation" id=7]
resource/name = "movethem"
length = 4.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("base/circle:transform/pos")
tracks/0/interp = 1
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
tracks/1/type = "value"
tracks/1/path = NodePath("base/box:transform/pos")
tracks/1/interp = 1
tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
tracks/2/type = "value"
tracks/2/path = NodePath("base/box:transform/rot")
tracks/2/interp = 1
tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
tracks/3/type = "value"
tracks/3/path = NodePath("base/polygon:transform/pos")
tracks/3/interp = 1
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
[sub_resource type="Animation" id=8]
resource/name = "toggletrigger"
length = 6.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("base/box:trigger")
tracks/0/interp = 1
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
tracks/1/type = "value"
tracks/1/path = NodePath("base/box:visibility/opacity")
tracks/1/interp = 1
tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
[node name="base" type="Node2D"]
script/script = ExtResource( 1 )
[node name="base" type="KinematicBody2D" parent="."]
transform/pos = Vector2( 137, 470 )
input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
shapes/0/trigger = false
shapes/1/shape = SubResource( 2 )
shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
shapes/1/trigger = false
shapes/2/shape = SubResource( 3 )
shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
shapes/2/trigger = false
shapes/3/shape = SubResource( 4 )
shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
shapes/3/trigger = false
shapes/4/shape = SubResource( 5 )
shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
shapes/4/trigger = false
shapes/5/shape = SubResource( 6 )
shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
shapes/5/trigger = false
collision/layers = 1
collision/mask = 1
collision/margin = 0.08
[node name="circle" type="CollisionShape2D" parent="base"]
transform/pos = Vector2( 7.91353, -10.6267 )
shape = SubResource( 1 )
trigger = false
_update_shape_index = 0
[node name="sprite" type="Sprite" parent="base/circle"]
texture = ExtResource( 2 )
[node name="box" type="CollisionShape2D" parent="base"]
transform/pos = Vector2( 193.581, -13.1276 )
transform/rot = 13.9217
shape = SubResource( 2 )
trigger = false
_update_shape_index = 1
[node name="Sprite" type="Sprite" parent="base/box"]
texture = ExtResource( 3 )
[node name="polygon" type="CollisionPolygon2D" parent="base"]
transform/pos = Vector2( 399.202, -3.9451 )
build_mode = 0
polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
shape_range = Vector2( 2, 5 )
trigger = false
[node name="Sprite" type="Sprite" parent="base/polygon"]
texture = ExtResource( 4 )
[node name="shapemove" type="AnimationPlayer" parent="."]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/movethem = SubResource( 7 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = "movethem"
[node name="triggertoggle" type="AnimationPlayer" parent="."]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/movethem = SubResource( 7 )
anims/toggletrigger = SubResource( 8 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = "toggletrigger"
[node name="Label" type="Label" parent="."]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = 21.0
margin/top = 21.0
margin/right = 719.0
margin/bottom = 73.0
text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

View File

@@ -1,5 +0,0 @@
[application]
name="Run-Time CollisionShape"
main_scene="res://dynamic_colobjs.tscn"
icon="res://icon.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,25 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://debug/Explanations.tscn" type="PackedScene" id=2]
[ext_resource path="res://debug/StatesStackDiplayer.tscn" type="PackedScene" id=3]
[ext_resource path="res://debug/ControlsPanel.tscn" type="PackedScene" id=4]
[node name="Demo" type="Node"]
[node name="Player" parent="." instance=ExtResource( 1 )]
[node name="Explanations" parent="." instance=ExtResource( 2 )]
[node name="Control" type="Control" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StatesStackDiplayer" parent="Control" instance=ExtResource( 3 )]
[node name="ControlsPanel" parent="Control" instance=ExtResource( 4 )]
[editable path="Player"]

View File

@@ -0,0 +1,41 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=1]
[node name="ControlsPanel" type="Panel"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -220.0
margin_bottom = 170.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Keys" type="Label" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
custom_fonts/font = ExtResource( 1 )
text = "Shoot:
Attack:
Stagger:
Jump:
Sprint:"
[node name="Keys2" type="Label" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
custom_fonts/font = ExtResource( 1 )
text = "R
F
X
Space
Shift"
align = 2

View File

@@ -0,0 +1,39 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://fonts/source_code_pro_explanations_bold.tres" type="DynamicFont" id=1]
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=2]
[node name="Explanations" type="RichTextLabel"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = -370.0
margin_right = -10.0
margin_bottom = -730.0
rect_clip_content = false
mouse_filter = 2
size_flags_vertical = 4
custom_fonts/bold_font = ExtResource( 1 )
custom_fonts/normal_font = ExtResource( 2 )
bbcode_enabled = true
bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
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 [b]one[/b] 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 [url=http://gameprogrammingpatterns.com/state.html]Game Programming Patterns ebook[/url]."
text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
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."
__meta__ = {
"_edit_lock_": true
}

View File

@@ -0,0 +1,48 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://debug/states_stack_displayer.gd" type="Script" id=1]
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=2]
[sub_resource type="DynamicFont" id=1]
size = 20
use_filter = true
font_data = ExtResource( 2 )
[node name="StatesStackDiplayer" type="Panel"]
margin_right = 210.0
margin_bottom = 170.0
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="Title" type="Label" parent="."]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -105.0
margin_right = 105.0
margin_bottom = 40.0
custom_fonts/font = SubResource( 1 )
text = "Pushown"
align = 1
valign = 1
uppercase = true
[node name="States" type="Label" parent="."]
margin_left = 20.0
margin_top = 50.0
margin_right = 190.0
margin_bottom = 170.0
custom_fonts/font = SubResource( 1 )
text = "Jump
Test"
align = 1
[node name="Numbers" type="Label" parent="."]
margin_left = 20.0
margin_top = 50.0
margin_right = 190.0
margin_bottom = 170.0
custom_fonts/font = SubResource( 1 )
text = "1.
2."

View File

@@ -0,0 +1,14 @@
extends Panel
onready var fsm_node = get_node("../../Player/StateMachine")
func _process(_delta):
var states_names = ""
var numbers = ""
var index = 0
for state in fsm_node.states_stack:
states_names += state.get_name() + '\n'
numbers += str(index) + '\n'
index += 1
$States.text = states_names
$Numbers.text = numbers

View File

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

Binary file not shown.

View File

@@ -0,0 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=1]
[resource]
size = 20
use_mipmaps = false
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Font", "Settings" ]

View File

@@ -0,0 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://fonts/SourceCodePro-Black.ttf" type="DynamicFontData" id=1]
[resource]
size = 24
use_mipmaps = false
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Font", "Settings" ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

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

@@ -0,0 +1,121 @@
[gd_scene load_steps=20 format=2]
[ext_resource path="res://player/player_controller.gd" type="Script" id=1]
[ext_resource path="res://player/player_state_machine.gd" type="Script" id=2]
[ext_resource path="res://player/states/motion/on_ground/idle.gd" type="Script" id=3]
[ext_resource path="res://player/states/motion/on_ground/move.gd" type="Script" id=4]
[ext_resource path="res://player/states/motion/in_air/jump.gd" type="Script" id=5]
[ext_resource path="res://player/states/combat/stagger.gd" type="Script" id=6]
[ext_resource path="res://player/states/combat/attack.gd" type="Script" id=7]
[ext_resource path="res://player/states/die.gd" type="Script" id=8]
[ext_resource path="res://player/shadow.png" type="Texture" id=9]
[ext_resource path="res://player/body.png" type="Texture" id=10]
[ext_resource path="res://player/bullet/bullet_spawner.gd" type="Script" id=11]
[ext_resource path="res://player/weapon/weapon_pivot.gd" type="Script" id=12]
[ext_resource path="res://player/weapon/Sword.tscn" type="PackedScene" id=13]
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=14]
[ext_resource path="res://player/states/debug/state_name_displayer.gd" type="Script" id=15]
[sub_resource type="Animation" id=1]
[sub_resource type="Animation" id=2]
length = 0.6
tracks/0/type = "value"
tracks/0/path = NodePath("BodyPivot/Body:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=3]
[sub_resource type="DynamicFont" id=4]
size = 20
use_filter = true
font_data = ExtResource( 14 )
[node name="Player" type="KinematicBody2D"]
position = Vector2( 628.826, 391.266 )
script = ExtResource( 1 )
__meta__ = {
"_edit_horizontal_guides_": [ ]
}
[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 2 )
[node name="Idle" type="Node" parent="StateMachine"]
script = ExtResource( 3 )
[node name="Move" type="Node" parent="StateMachine"]
script = ExtResource( 4 )
[node name="Jump" type="Node" parent="StateMachine"]
script = ExtResource( 5 )
[node name="Stagger" type="Node" parent="StateMachine"]
script = ExtResource( 6 )
[node name="Attack" type="Node" parent="StateMachine"]
script = ExtResource( 7 )
[node name="Die" type="Node" parent="StateMachine"]
script = ExtResource( 8 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/idle = SubResource( 1 )
anims/stagger = SubResource( 2 )
anims/walk = SubResource( 3 )
[node name="Shadow" type="Sprite" parent="."]
self_modulate = Color( 1, 1, 1, 0.361098 )
position = Vector2( 0, -4 )
texture = ExtResource( 9 )
[node name="BodyPivot" type="Position2D" parent="."]
[node name="Body" type="Sprite" parent="BodyPivot"]
position = Vector2( 0, -58.8242 )
texture = ExtResource( 10 )
[node name="BulletSpawn" type="Node2D" parent="BodyPivot"]
position = Vector2( 1.17401, -61.266 )
script = ExtResource( 11 )
[node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn"]
wait_time = 0.2
one_shot = true
[node name="WeaponPivot" type="Position2D" parent="BodyPivot"]
position = Vector2( 1.17401, -61.266 )
script = ExtResource( 12 )
[node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot"]
position = Vector2( 110, 0 )
[node name="Sword" parent="BodyPivot/WeaponPivot/Offset" instance=ExtResource( 13 )]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 )
[node name="StateNameDisplayer" type="Label" parent="."]
margin_left = -109.0
margin_top = -172.0
margin_right = 110.0
margin_bottom = -138.0
custom_fonts/font = SubResource( 4 )
text = "Test"
align = 1
valign = 1
uppercase = true
script = ExtResource( 15 )
[connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"]
[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
[connection signal="animation_finished" from="AnimationPlayer" to="StateMachine" method="_on_animation_finished"]
[connection signal="attack_finished" from="BodyPivot/WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

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

@@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://player/bullet/bullet.gd" type="Script" id=1]
[sub_resource type="CircleShape2D" id=1]
radius = 12.0
[node name="Bullet" type="KinematicBody2D"]
collision_layer = 2
collision_mask = 2
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )

View File

@@ -0,0 +1,26 @@
extends KinematicBody2D
var direction = Vector2()
export(float) var speed = 1000.0
func _ready():
set_as_toplevel(true)
func _physics_process(delta):
if is_outside_view_bounds():
queue_free()
var motion = direction * speed * delta
var collision_info = move_and_collide(motion)
if collision_info:
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

@@ -0,0 +1,17 @@
extends Node2D
var bullet = preload("Bullet.tscn")
func _input(event):
if event.is_action_pressed("fire"):
fire(owner.look_direction)
func fire(direction):
if not $CooldownTimer.is_stopped():
return
$CooldownTimer.start()
var new_bullet = bullet.instance()
new_bullet.direction = direction
add_child(new_bullet)

View File

@@ -0,0 +1,25 @@
extends KinematicBody2D
# The Player is a KinematicBody2D, in other words a physics-driven object.
# It can move, collide with the world, etc...
# The player has a state machine, but the body and the state machine are separate.
signal direction_changed(new_direction)
var look_direction = Vector2.RIGHT setget set_look_direction
func take_damage(attacker, amount, effect = null):
if is_a_parent_of(attacker):
return
$States/Stagger.knockback_direction = (attacker.global_position - global_position).normalized()
$Health.take_damage(amount, effect)
func set_dead(value):
set_process_input(not value)
set_physics_process(not value)
$CollisionPolygon2D.disabled = value
func set_look_direction(value):
look_direction = value
emit_signal("direction_changed", value)

View File

@@ -0,0 +1,32 @@
extends "res://state_machine/state_machine.gd"
func _ready():
states_map = {
"idle": $Idle,
"move": $Move,
"jump": $Jump,
"stagger": $Stagger,
"attack": $Attack,
}
func _change_state(state_name):
# The base state_machine interface this node extends does most of the work.
if not _active:
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)
._change_state(state_name)
func _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]:
return
_change_state("attack")
return
current_state.handle_input(event)

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

View File

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

@@ -0,0 +1,8 @@
extends "res://state_machine/state.gd"
func enter():
owner.get_node("AnimationPlayer").play("idle")
func _on_Sword_attack_finished():
emit_signal("finished", "previous")

View File

@@ -0,0 +1,12 @@
extends "res://state_machine/state.gd"
# The stagger state end with the stagger animation from the AnimationPlayer.
# The animation only affects the Body Sprite's modulate property so it
# could stack with other animations if we had two AnimationPlayer nodes.
func enter():
owner.get_node("AnimationPlayer").play("stagger")
func _on_animation_finished(anim_name):
assert(anim_name == "stagger")
emit_signal("finished", "previous")

View File

@@ -0,0 +1,14 @@
extends Label
var start_position = Vector2()
func _ready():
start_position = rect_position
func _physics_process(_delta):
rect_position = $"../BodyPivot".position + start_position
func _on_StateMachine_state_changed(current_state):
text = current_state.get_name()

View File

@@ -0,0 +1,10 @@
extends "res://state_machine/state.gd"
# Initialize the state. E.g. change the animation.
func enter():
owner.set_dead(true)
owner.get_node("AnimationPlayer").play("die")
func _on_animation_finished(_anim_name):
emit_signal("finished", "dead")

View File

@@ -0,0 +1,61 @@
extends "../motion.gd"
export(float) var base_max_horizontal_speed = 400.0
export(float) var air_acceleration = 1000.0
export(float) var air_deceleration = 2000.0
export(float) var air_steering_power = 50.0
export(float) var gravity = 1600.0
var enter_velocity = Vector2()
var max_horizontal_speed = 0.0
var horizontal_speed = 0.0
var horizontal_velocity = Vector2()
var vertical_speed = 0.0
var height = 0.0
func initialize(speed, velocity):
horizontal_speed = speed
max_horizontal_speed = speed if speed > 0.0 else 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()
vertical_speed = 600.0
owner.get_node("AnimationPlayer").play("idle")
func update(delta):
var input_direction = get_input_direction()
update_look_direction(input_direction)
move_horizontally(delta, input_direction)
animate_jump_height(delta)
if height <= 0.0:
emit_signal("finished", "previous")
func move_horizontally(delta, direction):
if direction:
horizontal_speed += air_acceleration * delta
else:
horizontal_speed -= air_deceleration * delta
horizontal_speed = clamp(horizontal_speed, 0, max_horizontal_speed)
var target_velocity = horizontal_speed * direction.normalized()
var steering_velocity = (target_velocity - horizontal_velocity).normalized() * air_steering_power
horizontal_velocity += steering_velocity
owner.move_and_slide(horizontal_velocity)
func animate_jump_height(delta):
vertical_speed -= gravity * delta
height += vertical_speed * delta
height = max(0.0, height)
owner.get_node("BodyPivot").position.y = -height

View File

@@ -0,0 +1,18 @@
extends "res://state_machine/state.gd"
# Collection of important methods to handle direction and animation.
func handle_input(event):
if event.is_action_pressed("simulate_damage"):
emit_signal("finished", "stagger")
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")
return input_direction
func update_look_direction(direction):
if direction and owner.look_direction != direction:
owner.look_direction = direction

View File

@@ -0,0 +1,14 @@
extends "on_ground.gd"
func enter():
owner.get_node("AnimationPlayer").play("idle")
func handle_input(event):
return .handle_input(event)
func update(_delta):
var input_direction = get_input_direction()
if input_direction:
emit_signal("finished", "move")

View File

@@ -0,0 +1,38 @@
extends "on_ground.gd"
export(float) var max_walk_speed = 450
export(float) var max_run_speed = 700
func enter():
speed = 0.0
velocity = Vector2()
var input_direction = get_input_direction()
update_look_direction(input_direction)
owner.get_node("AnimationPlayer").play("walk")
func handle_input(event):
return .handle_input(event)
func update(_delta):
var input_direction = get_input_direction()
if not input_direction:
emit_signal("finished", "idle")
update_look_direction(input_direction)
speed = max_run_speed if Input.is_action_pressed("run") else max_walk_speed
var collision_info = move(speed, input_direction)
if not collision_info:
return
if speed == max_run_speed and collision_info.collider.is_in_group("environment"):
return null
func move(speed, direction):
velocity = direction.normalized() * speed
owner.move_and_slide(velocity, Vector2(), 5, 2)
if owner.get_slide_count() == 0:
return
return owner.get_slide_collision(0)

View File

@@ -0,0 +1,10 @@
extends "../motion.gd"
# warning-ignore-all:unused_class_variable
var speed = 0.0
var velocity = Vector2()
func handle_input(event):
if event.is_action_pressed("jump"):
emit_signal("finished", "jump")
return .handle_input(event)

View File

@@ -0,0 +1,243 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://player/weapon/sword.gd" type="Script" id=1]
[ext_resource path="res://player/weapon/sword.png" type="Texture" id=2]
[sub_resource type="Animation" id=1]
resource_name = "SETUP"
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:monitoring")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/4/type = "value"
tracks/4/path = NodePath(".:monitorable")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=2]
resource_name = "attack_circular"
length = 0.3
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.15, 0.2 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ -100.0, 100.0, 90.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=3]
length = 0.45
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.15, 0.2 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ -80.0, 85.0, 75.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "method"
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.1, 0.25 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "set_attack_input_listening"
}, {
"args": [ ],
"method": "set_ready_for_next_attack"
} ]
}
[sub_resource type="Animation" id=4]
resource_name = "attack_medium"
length = 0.5
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.05, 0.25, 0.35 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ 95.0, -95.0, -90.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
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.2, 0.25 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=5]
length = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="Sword" type="Area2D"]
input_pickable = false
monitorable = false
collision_layer = 16
collision_mask = 3
script = ExtResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/SETUP = SubResource( 1 )
anims/attack_circular = SubResource( 2 )
anims/attack_fast = SubResource( 3 )
anims/attack_medium = SubResource( 4 )
anims/idle = SubResource( 5 )
[node name="Sword" type="Sprite" parent="."]
position = Vector2( 4, 0 )
texture = ExtResource( 2 )
offset = Vector2( 67, 0 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 28.0001, -15.9999, 136, -15.9995, 160, 0, 136, 16.0005, 27.9999, 16.0001 )

View File

@@ -0,0 +1,113 @@
extends Area2D
signal attack_finished
enum States { IDLE, ATTACK }
var state = null
enum AttackInputStates { IDLE, LISTENING, REGISTERED }
var attack_input_state = AttackInputStates.IDLE
var ready_for_next_attack = false
const MAX_COMBO_COUNT = 3
var combo_count = 0
var attack_current = {}
var combo = [{
"damage": 1,
"animation": "attack_fast",
"effect": null
},
{
"damage": 1,
"animation": "attack_fast",
"effect": null
},
{
"damage": 3,
"animation": "attack_medium",
"effect": null
}]
var hit_objects = []
func _ready():
# warning-ignore:return_value_discarded
$AnimationPlayer.connect("animation_finished", self, "_on_animation_finished")
# warning-ignore:return_value_discarded
self.connect("body_entered", self, "_on_body_entered")
_change_state(States.IDLE)
func _change_state(new_state):
match state:
States.ATTACK:
hit_objects = []
attack_input_state = AttackInputStates.LISTENING
ready_for_next_attack = false
match new_state:
States.IDLE:
combo_count = 0
$AnimationPlayer.stop()
visible = false
monitoring = false
States.ATTACK:
attack_current = combo[combo_count -1]
$AnimationPlayer.play(attack_current["animation"])
visible = true
monitoring = true
state = new_state
func _input(event):
if not state == States.ATTACK:
return
if attack_input_state != AttackInputStates.LISTENING:
return
if event.is_action_pressed("attack"):
attack_input_state = AttackInputStates.REGISTERED
func _physics_process(_delta):
if attack_input_state == AttackInputStates.REGISTERED and ready_for_next_attack:
attack()
func attack():
combo_count += 1
_change_state(States.ATTACK)
# Use with AnimationPlayer func track.
func set_attack_input_listening():
attack_input_state = AttackInputStates.LISTENING
# Use with AnimationPlayer func track.
func set_ready_for_next_attack():
ready_for_next_attack = true
func _on_body_entered(body):
if not body.has_node("Health"):
return
if body.get_rid().get_id() in hit_objects:
return
hit_objects.append(body.get_rid().get_id())
body.take_damage(self, attack_current["damage"], attack_current["effect"])
func _on_animation_finished(_name):
if not attack_current:
return
if attack_input_state == AttackInputStates.REGISTERED and combo_count < MAX_COMBO_COUNT:
attack()
else:
_change_state(States.IDLE)
emit_signal("attack_finished")
func _on_StateMachine_state_changed(current_state):
if current_state.name == "Attack":
attack()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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