Skip to content

Current status of 4.1.0

Artur K edited this page Apr 29, 2021 · 9 revisions

This document is WIP and I'll be filling it out as I go 😄

Changes in SegsEngine since latest release:

  • Codebase brought up to date with upstream 3.3 ( with some exceptions, mainly in parts that were removed/refactored )
  • Introduced Entt ECS.
    • There are multiple Entt registries ( GameEntity/game registry, RenderingEntity/renderer registry, etc. )
    • GameEntity replaces ObjectID
  • Each Object contains also a GameEntity
  • Renderer objects are no longer generic RIDs but system-specific RenderingEntity
  • disabled WebRTC and WebSocket engine modules ( it's not very likely we'll need those )
  • split up renderer implementation into components, so the source/header sizes are more manageable
  • fix a few incorrectly named icons
  • Removed almost all usages of list-like types from the renderer
  • Refactored draw_rect method into 2: draw_rect_filled / draw_rect_stroke
  • CanvasItem's draw_polygon and draw_colored_polygon take Spans as parameters now
  • Split a few classes into Logic/ComponentData
    • Control and ControlData
    • Buton and ButtonDrawableComponent

Things in progess

  • Proper Game->Renderer synchronization points + worker thread/graph support using enkiTS
  • Untangling Renderer entity interdependencies.

Todo's

  • remove occluder list from RasterizerCanvasLightOccluderInstanceComponent
  • check if Variant marshaller is using entt::to_integral correctly ( maybe it should only use the idx part of the entity's id?)

Generic info about soc tool

Supports two operation modes:

  • Extract reflection data from all/selected files in a given folder/path into a JSON file.

  • Use the previously generated JSON file to create type/method runtime data ( basically replace the hand-written bind_methods with automatically created ones )

  • Internal changes

    • Signal/slot connections no longer store binds arrays and connect no longer takes them as a parameter.
    • Add disconnect_all method that breaks all specific signal connections from this object to the target.
    • make Object::free into virtual public function, callable from scripts.
    • more rendering server's methods take Span<> parameters
      • canvas_item_add_multiline
    • introduce object_for_entity helper that converts GameEntity into Object *
    • compacted data type layouts by reordering their members to reduce the amount of memory used to hold them.
    • Dictionary class key type has been set to StringName instead of Variant
    • FileAccessRef is copyable no longer and gained support for being assigned from FileAccess *
    • DirAccess and DirAccessRef are no longer copyable.
    • Thread is using std::thread::id's internally.
    • fix a leak in the PacketPeerUDP constructor.
    • change the reflection file format slightly to closer match the one generated by the soc utility.
    • ClassDB::_set_class_header handles external paths better.
    • ClassDB::add_virtual_method no longer takes additional is_virtual parameter, the assumption is that it's always virtual.
    • ClassDB::bind_helper no longer takes unused instance_type parameter.
    • add PROFILE_VALUE and PROFILE_VALUE_CFG macros that record named values in profiling runs.
    • ObjectDB is now just a simple namespace with two methods.
    • Variant now supports construction/conversion to GameEntity/RenderingEntity and conversion to Span<Color>.
    • SceneTree::flush_transform_notifications now uses entt::view<DirtXFormMarker,SceneTreeLink> to visit all nodes.
    • Introduced a common enum for text alignment: UiTextAlign
  • Removals

    • remove Pvrtc and Etc/Etc2 texture support ( those are in use on mobiles ).
    • remove virtual keyboard support
    • remove big-endian support from StreamPeer
    • remove raw XPM support from Image.
      • "atlas import failed" icon is now embedded as a png file.
    • math/bsp_tree since it's not used anywhere.
    • Object support for user signals.
    • Object no longer exposes call-by-name functionality to scripting languages.
    • object_id header, since it's no longer needed.
    • RefPtr now has two separated 'entity' accessors get_rid and get_phys_rid where the returned object type is RenderingEntity and generic RID.
    • Variant no longer has is_shared and is_one methods
    • SceneTree::GROUP_CALL_MULTILEVEL (was unused)