Commit Graph

46 Commits

Author SHA1 Message Date
Aaron Franke 001e51d2d3
Merge pull request #413 from Calinou/add-viewport-3d-scaling-demo
Add a viewport 3D scaling demo
2020-02-19 15:22:11 -05:00
Hugo Locurcio b927ea3c63
Add a viewport 3D scaling demo
This demo shows how to scale the 3D viewport rendering without
affecting 2D elements such as the HUD. It also demonstrates how to
toggle filtering on a viewport by using TextureRect to display the
ViewportTexture delivered by the Viewport node.
2020-02-19 21:13:20 +01:00
Hugo Locurcio da374bccda
Tweak 3D settings in various demos
- Use 4× MSAA for a better visual appearance.
- Use "3D Without Effects" framebuffer allocation when possible
  for better performance.
- Disable Glow in the 3D Kinematic Character demo for better
  performance. Increase the DirectionalLight strength to compensate.
- Use a non-linear attenuation for the OmniLight in the
  Window Management demo (and increase its range to compensate).
2020-02-15 23:32:00 +01:00
Aaron Franke 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 e3fd4c662c
Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -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
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
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 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
TwistedTwigleg ee3dac1635 Fixed issue with strange tool script included in the gui in 3D demo 2019-10-20 14:33:02 -04:00
TwistedTwigleg 61ea89e836 Made minor changes to GUI in 3D demo script 2019-08-29 13:26:51 -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
Hugo Locurcio 184b0fe5f8
Optimize all images using `oxipng -o6 --strip all --zopfli` 2019-06-11 16:40:50 +02:00
William Scalf cc0b002e6e Updated rotation of Quad to be right side up 2019-03-23 18:06:43 -04: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
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
Chris Bradfield 9d66e8f2ef Code cleanup 2018-03-13 22:35:55 -07:00
Bojidar Marinov 03ba4fc1df
Make some demos work again, reimport 2018-01-16 17:46:10 +02: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
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
Juan Linietsky d1dd62140a Clean up demo and fix it, closes #84 2017-12-04 17:35:46 -03:00
x1212 f4bbbe37d9 Update 3d in 2d demo for Godot 3.0 2017-11-19 14:41:50 +01:00
Rémi Verschelde f8ca6d0a4d Sync all demos with current master format 2017-10-30 12:38:39 +01: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
TwistedTwigleg 053d035574 Ported viewport demos to Godot 3.0 2017-08-19 13:10:25 -04:00
Juan Linietsky 6ef185c192 begun porting demos, platformer is working (mostly) 2017-06-23 07:44:27 -03:00
Rémi Verschelde eb167ebcaa Remove systematic "Init(i)alization here" from _ready() 2015-12-09 08:39:12 +01:00
Rémi Verschelde f76b29f30d Use upper-cased first letter at the start of comment sentences 2015-12-09 08:39:12 +01:00
Rémi Verschelde 708a0caf4a Improve code formatting and update to 2.0
The scripts were streamlined using more or less the following conventions:
 - space after a comma in lists of arguments
 - space around weak operators (+, -), no space around strong operators (*, /)
 - space after a comment start (#)
 - removed trailing spaces or tabs, apart from those that delimit the function indentation level (those could be removed too but since they are added automatically by the editor when typing code, keeping them for now)
 - function blocks separate by two newlines

The scene files were resaved with the (current) 2.0 format, and some scenes that were in XML format were converted to SCN, to be consistent across all demos.
2015-12-09 08:38:23 +01:00
Juan Linietsky 94521880de Merge pull request #2719 from SaracenOne/clipping_fix
Canvas Clipping fix
2015-12-08 17:18:19 -03:00
Saracen 53f96916b7 Modification to GUI in 3D demo to show resolved viewport clipping bug and small fix to bug causing viewport clipping to be inverted. 2015-11-19 23:47:25 +00:00
Rémi Verschelde 71341fc1c1 Add icons to all demos that can have a meaningful one 2015-11-19 23:45:37 +01:00
Juan Linietsky c08070af29 -Fixed screen capture for viewports, added a screen capture demo, fixes #1529 2015-04-12 18:58:05 -03:00
Juan Linietsky 2179681806 gui in 3D demo now uses area for input 2015-03-22 11:52:07 -03:00
Juan Linietsky 436b8e38b7 -Added google play services (needed for some stuff)
-Added new screen resizing options, stretch_2d is removed, new much more flexible ones.
-Fixed bug in viewport (can create more instances in 3d-in-2d demo now)
-Can set android permissions and screen sizes manually in the export settings
-Changed export templates extension to .tpz (too many people unzipped the manually..)
-File dialog now ensures that the proper extension is used (will not allow to save without it)
-Fixed bug that made collision exceptions not work in 2D
2014-04-14 22:16:13 -03:00
Juan Linietsky aa72126b6c -Fixed a few bugs in Viewport
-Made a few demos using Viewport to show it's true power!
-Fixed some start-up error messages.
2014-04-10 00:18:27 -03:00