Commit graph

201 commits

Author SHA1 Message Date
Biliogadafr
2ffc90d8b4 Expose softness parameter of pin joint to the editor. 2015-10-10 23:28:05 +03:00
eska
793c53122a Add type mask property to RayCast2D 2015-10-10 05:46:47 +02:00
Juan Linietsky
8154dff3d0 Merge pull request #2528 from MarianoGnu/sprite-edit
SpriteRegionEditor
2015-09-28 09:32:42 -03:00
MarianoGNU
3e6aaec193 Add SpriteRegionEditor and update Polygon2DUVEditor
Both with snap and grid support
2015-09-28 00:06:06 -03:00
Rémi Verschelde
3bf24eeb6b Rename _voice_count to _polyphony in SamplePlayer to be consistent with SamplePlayer2D 2015-09-26 21:06:12 +02:00
Juan Linietsky
c858515785 Fixed theora playback. Removed theoraplayer.
Still need to get proper audio output latency in some platforms.
2015-09-26 14:50:42 -03:00
eska
b9bb2ab9c0 Fix propagation of NOTIFICATION_VISIBILITY_CHANGED 2015-09-26 02:23:19 +02:00
George Marques
5ff0b69dae
Move the shape test to a little sooner 2015-09-22 21:30:37 -03:00
George Marques
e68f04b9d0 Check if shape is valid before referencing it
See the comment from @MartiniMoe at #2366.
2015-09-22 20:27:48 -03:00
Juan Linietsky
83d9a692be Ability to visually debug geometry visually:
-Visible 2D and 3D Shapes, Polygons, Tile collisions, etc.
-Visible Navmesh and Navpoly
-Visible collision contacts for 2D and 3D as a red point
-Customizable colors in project settings
2015-09-20 13:03:46 -03:00
Juan Linietsky
3f9e5afe68 begin work on debugging collisions.... 2015-09-18 23:10:58 -03:00
reduz
2580ca01e6 Ability to keep collisionshapes and collisionpolygons when running the game.
Works for 2D and 3D
These are still just helpers in case you want to animate them or access them
directly.
Modifying the real shapes is still done via CollisionObject and CollisionObject2D APIs
But an API was added so you can query which shapes from CollisionObject correspond to which CollisionShape.

Have Fun!
2015-09-15 22:07:03 -03:00
Guilherme Felipe
da895e8542 Fix for smoothing camera2D when you change zoom, fix #2074. 2015-09-03 19:23:39 -03:00
Juan Linietsky
1fecba6b5b -added hints to sprite v/hframes, fixes truncation problem
-removed an error being printed often unnecesarly about missing child
2015-08-29 13:02:56 -03:00
Juan Linietsky
c2e2f2e0ae Merge pull request #2282 from Ovnuniarchos/master
Bitmask editor and some CanvasItem documentation.
2015-08-08 11:18:08 -03:00
Federico Pacheco
7a516d13e2 ParallaxBackground: added option to ignore camera zoom 2015-08-04 01:44:38 -03:00
Juan Linietsky
59961c9914 Live edit WORK IN PROGRESS
1) press the heart while the game is running
2) select a scene to live edit from the opened scenes
3) edit/add/remove nodes or resources, change their properties, etc.
4) watch changes reflected in running game, in all places this scene is
edited
5) It's not perfect obviously, but the aim of it is to try to reflect
your changes as best as possible in the running game.
2015-08-02 12:30:01 -03:00
Gen
88bf7f35e1 Fixed the mouse position for control when it is in a canvas_layer. 2015-07-27 08:36:21 +08:00
Ovnuniarchos
43053e3a71 Added a proper name and an explanation to arg4 on CanvasItem.draw_texture_rect*. 2015-07-20 20:07:25 +02:00
Juan Linietsky
95047562d7 Several performance improvements, mainly in loading and instancing scenes and resources.
A general speedup should be apparent, with even more peformance increase when compiling optimized.

WARNING: Tested and it seems to work, but if something breaks, please report.
2015-06-29 00:29:49 -03:00
Juan Linietsky
b4190ed2b9 compile fix 2015-06-24 18:34:31 -03:00
Kermer
32d4b4128c Tiny typo
COPY_MODE_DISALED -> COPY_MODE_DISABLED
2015-06-24 23:24:44 +02:00
Juan Linietsky
52308aba68 ability to change shadow color in light2d 2015-06-24 18:15:43 -03:00
Juan Linietsky
ae28305d7c ability to set process on parent nodes on visibility notifier 2015-06-22 15:43:13 -03:00
Juan Linietsky
8945670bc0 made changing pivot simpler in 2D nodes (just press v with mouse over position) 2015-06-12 13:53:18 -03:00
Juan Linietsky
9e479065f5 new space shooter demo
ortho camera sort fix, closes #2063
2015-06-11 10:00:48 -03:00
Juan Linietsky
143265d4cb Merge pull request #1973 from Biliogadafr/ColorRamp
Replace color phases with color ramp for Particles2D. (need some review/guidance)
2015-06-07 00:26:35 -03:00
Juan Linietsky
5064cc5006 Merge pull request #1932 from Faless/gravity_distance_full
Calculate gravity based on distance from body to gravity point
2015-06-07 00:25:37 -03:00
Juan Linietsky
6974823288 Merge remote-tracking branch 'origin/master'
Conflicts:
	tools/editor/io_plugins/editor_texture_import_plugin.cpp
2015-06-06 10:12:09 -03:00
Juan Linietsky
9acab32daa new file dialog!
-ItemList control for easier lists/thumbnails
-New file dialog, with support for thumbnails, favorites, recent places,
etc
-Moved .fscache out of the project, no more bugs due to committed/pulled
.fscache!
-Dir dialog now sorts directories
2015-06-06 09:44:38 -03:00
Juan Linietsky
ab99671bb8 -fixes to navigation, so edge-merging is more flexible on conflict
-add tab support to richtextlabel
-some click fixes to audio stream resampled
-ability to import largetextures (dialog)
2015-06-01 19:42:34 -03:00
Biliogadafr
3f975965e9 Add get_color_at_offset(). Ensure correct points order. 2015-05-26 22:17:54 +03:00
Juan Linietsky
f36e7dcb40 improved animation editor
-same-value link keys
-new layout
-forward, backwards playback
-integrated curve/property editor
-auto increment sprite frame after insert
-copy & paste animation resoucres
2015-05-25 01:47:02 -03:00
Biliogadafr
df9d48d9b5 Replace color phases with color ramp for Particles2D. 2015-05-24 21:18:52 +03:00
Juan Linietsky
fec6aaffd8 more fixes
fix ctrl-a for some cases, mentioned in #1704
fix toggling visibility not updating, fixes #1923
2015-05-19 23:07:11 -03:00
Fabio Alessandrelli
590afbcac4 Calculate gravity based on distance from body to gravity point (2D) 2015-05-18 01:32:26 +00:00
Juan Linietsky
3936ed882c -Added lookat/get_angle_to functions in 2D, and a demo, closes #1843
-Added get_viewport().get_mouse_pos() to replace Input.get_mouse_pos(), closes #1838
2015-05-12 08:17:09 -03:00
Juan Linietsky
421b4fec3e -compatibility option for physicsbody layers, fixes #1842 2015-05-10 15:58:08 -03:00
ehriche
897a1aade5 optional formal changes 2015-05-06 01:22:31 +02:00
Juan Linietsky
e7aa37fe75 improved kinematic motion, improved demos for kinematic motion 2015-05-03 22:37:10 -03:00
Juan Linietsky
af06843982 -new collision layer & mask system for 2D, for more flexible collision masking 2015-05-03 16:47:21 -03:00
Juan Linietsky
2296b0508e 2D pathfinder fixes, should now always find the best path. 2015-05-02 16:35:43 -03:00
Juan Linietsky
1e422941c8 -Fixed android export options (screen sizes, orientation should work)
-added functions to get mouse position in CanvasItem
2015-05-01 21:13:20 -03:00
Juan Linietsky
21939ce08b -some cleanups
-added tesselation function to curve and curve2d
2015-04-30 10:06:18 -03:00
Juan Linietsky
98c086edaf -fix forced texture repeat in Polygon2D, now depends on texture.
-added a new function, Camera::is_position_behind to aid to unproject(), fixes #1725
2015-04-28 22:05:01 -03:00
Juan Linietsky
79d5b7f258 -fixed bodyenter/bodyexit callback of physics bodies, fixes #1739 2015-04-26 17:46:20 -03:00
Juan Linietsky
330351c613 properly update emitting property when emit timeot is used, fixes #1716 2015-04-25 10:36:37 -03:00
Juan Linietsky
7648088fca ability to get closest owner to point, for navigation and navigation2d 2015-04-21 16:47:49 -03:00
Juan Linietsky
59154cccf9 -Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v)
-Fixed several memory leaks, fixes #1731, fixes #755
2015-04-20 19:38:02 -03:00
Juan Linietsky
28c4afeb57 -Rewritten KinematicBody2D::move to MUCH more efficient code.
-KinematicBody2D::move now properly recognizes collision exceptions and masks, fixes #1649
-Removed object type masking for KinematicBody2D
-Added a test_motion() function to RigidBody2D, allowing simlar behavior to KinematicBody2D::move there.
2015-04-19 20:50:55 -03:00
Juan Linietsky
4661a6e126 -try to avoid errors when path using ".." is present in script include, fixes #1703 2015-04-18 16:17:33 -03:00
Juan Linietsky
fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Juan Linietsky
be46be7801 -renamed function to get object from instance id
-added function to get list of tiles used
2015-04-18 14:00:15 -03:00
Juan Linietsky
3fddc9e55a fixed navigation tile issue, fixes #1581 2015-04-09 01:18:01 -03:00
Juan Linietsky
9fa1698c74 Changes to Light
-=-=-=-=-=-=-=-=

-Changed material unshaded property for an enum, which supports light-only shading
-Added a "Mix" shading mode, useful for using lights as masks
-Added energy parameter to Light2D
2015-04-03 01:43:37 -03:00
Juan Linietsky
1572238adb merging okam changes 2015-04-02 07:22:17 -03:00
Juan Linietsky
7ad7f2f6a9 android fixes, please test
(can' t build android atm)
2015-03-23 11:31:23 -03:00
Juan Linietsky
92ab362afa avoid function naming conflict on light scale 2015-03-22 10:39:32 -03:00
Juan Linietsky
a93e33f5c8 added spatial and node2d helper methods
to perform operations such as translaiton, rotation, etc directly on
nodes.
2015-03-22 10:33:58 -03:00
Juan Linietsky
c6c72a3c37 input events on Area2D is now supported
also added a demo showing how this works
2015-03-22 01:46:18 -03:00
Juan Linietsky
9dd0d8277d add overlap test function, remove a semicolon 2015-03-18 21:03:11 -03:00
Juan Linietsky
4cac1e0cb6 add functions to test overlap with another body or area 2015-03-17 09:25:35 -03:00
Juan Linietsky
a969e2e6f1 Area2D can now detect overlap with other areas
this should make everything simpler, specially for newcomers to Godot
2015-03-17 00:45:25 -03:00
sanikoyes
7cdd3c86c4 Add missing particles_2d macro bind 2015-03-14 10:40:58 +08:00
marynate
86eedaec21 Fix compile error in back_buffer_copy.h 2015-03-12 14:23:36 +08:00
Juan Linietsky
650e13f3cd back buffer copy node, to improve on texscreen()
back buffer copy node and respective demo
2015-03-12 01:05:50 -03:00
Juan Linietsky
a6f96f46b7 small optimizations to isometric light demo
should work faster, and even faster if exported.. as textures have been
optimized.
2015-03-10 21:05:49 -03:00
marynate
7957709cb1 Fix compie error in TileMap::_fix_cell_transform(...) 2015-03-09 16:28:08 +08:00
Juan Linietsky
09489e3a78 lot of work on 2D lighting and isometric maps
added a new demo, isometric_light that does full isometric sorting,
lights, shadows, etc.
2015-03-09 02:34:56 -03:00
Juan Linietsky
2c2894ceb6 Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	modules/gdscript/gd_tokenizer.cpp
	scene/resources/shader_graph.h
2015-03-03 14:41:36 -03:00
Juan Linietsky
4d2198110b merges from okam repo 2015-03-03 14:39:13 -03:00
Juan Linietsky
a1f715a4da support for 2D shadow casters
Added support for 2D shadow casters.

*DANGER* Shaders in CanvasItem CHANGED, if you are using shader in a
CanvasItem and pull this, you will lose them. Shaders now work through a
2D material system similar to 3D. If you don't want to lose the 2D
shader code, save the shader as a .shd, then create a material in
CanvasItem and re-assign the shader.
2015-03-02 00:54:43 -03:00
Juan Linietsky
1d7337ba10 Merge pull request #1369 from not-surt/tile_rotation
Tile Rotation
2015-02-21 15:37:02 -03:00
Juan Linietsky
cf75bf842d -improved pathfinding accuracy
(i hope?)
2015-02-19 00:27:02 -03:00
Juan Linietsky
5ef3f7392f support for light and normal mapping in 2D 2015-02-18 19:40:02 -03:00
reduz
2bea642583 -Some more work on 2D Lights (NOT FUNCTIONAL YET!) 2015-02-16 14:45:11 -03:00
Carl Olsson
196185d0be Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	scene/2d/tile_map.cpp
2015-02-15 18:21:35 +10:00
Juan Linietsky
2185c018f6 begin new serialization framework
also got rid of STL dependency on triangulator
2015-02-15 01:21:26 -03:00
Juan Linietsky
7ebb224ec1 Merge pull request #1362 from not-surt/tile_map_body_mode
Added body mode property for TileMap as kinematic body
2015-02-14 19:25:35 -03:00
Juan Linietsky
c5f509f238 New Navigation & Pathfinding support for 2D
-Added Navigation & NavigationPolygon nodes
-Added corresponding visual editor
-New pathfinding algorithm is modern and fast!
-Similar API to 3D Pathfinding (more coherent)
2015-02-14 12:10:15 -03:00
Carl Olsson
8bb1e19d73 Replace body_mode property with use_kinematic flag.
Revert 2D Platformer demo's moving platforms to sprite plus body.
2015-02-14 06:43:50 +10:00
Carl Olsson
9d182e93a3 Added body mode property to TileMap to select between static and kinematic physics bodies. Kinematic allow use of TileMaps for moving platforms for example.
Updated 2D Platformer demo to use kinematic TileMaps for moving platforms, in doing so discovered that the tileset was messed up and not converting properly, so fixed that too.
And in order to fix the tileset I need to activate snapping for collision polygon vertices.
2015-02-13 20:49:21 +10:00
Carl Olsson
6a38ab1b43 Reorder tile transforms so transpose occurs before flips. Much more intuitive for flipping transposed tiles. 2015-02-13 10:56:53 +10:00
Carl Olsson
c613fb121b Moved wrapper function to TileMapEditor. 2015-02-11 21:40:50 +10:00
Carl Olsson
573ae5dd92 Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	demos/2d/polygon_path_finder_demo/.fscache
2015-02-11 21:15:49 +10:00
Carl Olsson
9171f71ff5 Revert variant arg length to 5 and add 5 arg wrapper function for TileMap set_cell. 2015-02-11 21:11:14 +10:00
Juan Linietsky
1d54c2dd1c added missing set_shader_param functions
also added code completion hint for shader params
2015-02-11 06:51:20 -03:00
Carl Olsson
ee44664b2a Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-02 21:34:47 +10:00
Carl Olsson
c5bf43f6eb Working TileMap tile transpose transform. 2015-02-02 21:27:48 +10:00
Juan Linietsky
11c1756257 Visual Shader Editing for 2D
Editing 2D shaders with visual editor seems to work now.
2015-01-20 20:36:25 -03:00
Carl Olsson
a8b318871c Prep for tile transpose transform. 2015-01-19 23:07:25 +10:00
Juan Linietsky
9012cd408e -Add support for one-way collision in 2D (only works for kinematic body so far)
-Solve drawing order bug introduced in previous commit: solves #1214
2015-01-13 21:19:11 -03:00
Juan Linietsky
2ef5a342e3 -begin work on unidirectional collision detection
-fixed performance issue in new 2D engine
-texscreen() working in shader 2D
2015-01-13 10:49:26 -03:00
Juan Linietsky
30d3658110 -fixed issue with shader not being reset on layers, closes #1199
-ability for shader to use parent shader and params, closes #1198
2015-01-12 20:44:02 -03:00
Juan Linietsky
66afddb3e8 -Initial (untested) implementation of 2D shaders. Probably broken, will be fixed later.
-fixed issue of opacity not working
2015-01-11 11:43:31 -03:00
Juan Linietsky
8997084831 2D Rewrite Step [1]
-=-=-=-=-=-=-=-=-=-

-Moved drawing code to a single function that takes linked list (should make it easier to optimize in the future).
-Implemented Z ordering of 2D nodes. Node2D and those that inherit have a visibility/Z property that affects drawing order (besides the tree order)
-Removed OpenGL ES 1.x support. Good riddance!
2015-01-10 17:35:26 -03:00
Juan Linietsky
b51f645711 Changes to 2D physics engine
-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-Removed "density" property
-Added instead more flexible "angular damp" and "linear damp"
-Added ability to override angular and linear damp in rigidbody
-Added gravity scale option rigidbody

Test well and iron out bugs, when it works the same will be moved to 3D
2015-01-05 18:37:12 -03:00
Juan Linietsky
ed8e70243f -refresh play options in property when setting samplelibrary (#1016) 2015-01-02 14:32:05 -03:00
Juan Linietsky
a36a774897 Fixes
-=-=-=

-Added missing quaternion constructor
-code completion fixes
-winrt fixes
2014-12-20 15:30:06 -03:00
Juan Linietsky
efb257c675 missing fix in file 2014-12-07 02:31:43 -03:00