Jump to content

NQ-Deckard

Staff
  • Posts

    239
  • Joined

  • Last visited

Posts posted by NQ-Deckard

  1. Hello everyone and thank you all for the questions that were asked,

     

    There is a very large amount of feedback for us to go through, so please bare with us and we will try and address some of the questions that were asked in this thread.

    I would like to remind you all that this is a question thread where we are trying to collect questions for a Q&A.
    The majority appears to have been direct opinions and feedback, in future please keep things in their designated threads as it is one of the reasons why it can take us a long time to loop back to you as its more for us to sift through and process. You're feedback is also more likely to get lost in the masses of different threads that way. :)

  2. 55141733_markcopie.jpg

     

    As announced in the Inside Novaquark: Demeter vlog, the Dual Universe public test server (PTS) will be available to enable players to explore the new features and changes we’ve been working on for the Demeter update. The database has been mirrored from the current build on our live server to the test server so that your inventory, talents, and constructs will be readily available. 

     

    SEE IT FOR YOURSELF

     

    Since Demeter introduces significant server-side changes via the integration of hexoctree technology, we need to ensure that we run a charge test on the PTS to assess the stability of these changes. We’ve planned two dedicated time slots where players will be able to play with Novaquark staff, and we kindly ask you to try to connect to the PTS during these two slots.

     

    There will be two long weekends, of three to four days each, for testing Demeter on PTS:

    • October 29th - PTS opens with NQ personnel and players at 13:00 UTC and will remain open until 08:00 UTC on November 1st, and/or...

    • November 5th - PTS opening with a potential second event with NQ personnel and players (depending on the October 29th event). PTS server will remain open until 08:00 UTC on November 8th.

     

    You will also be able to play around with mining units, an exciting addition to the game that will negate the need to dig underground. And, with mining units, a new minigame used to calibrate mining units and increase their output efficiency. It will also trigger spawns of rocks for surface harvesting. 

     

    In view of the impending geometry reset, we highly recommend that all players spend some time on PTS to see how their constructs will be impacted. The geometry reset is not a wipe. Structures above ground will not be affected. Anything below ground is still there; you will only need to clear out the dirt around subterranean constructs. Inventory will not be impacted in any way. Points invested in mining-related talents will be credited back to your talent points pool. (Note that this will not be the case for the PTS, as you can simply refund your talent points there by typing /respec in chat and then reconnecting to the PTS.)

     

    DIGGERS GONNA DIG

    It’s important to stress that you will still be able to dig to create underground constructs and do some terraforming. The difference now will be that you won’t collect ore while doing so. 

     

    If you haven’t watched the vlog yet, we highly encourage you to do so. In particular, you should watch this segment that shows how the geometry reset can affect an existing, pre-Demeter subterranean construct and the “quick clear tool” assistance we may be able to offer to owners of very large underground constructs.  

     

    We ask that requests for construct excavation assistance be submitted before Demeter launches. This is available only for static constructs built before the Demeter release. (The launch date for the update is TBD, but we will give plenty of advance notice beforehand.) You’ll need to use this handy form to submit your request, and be sure to include the following information: 

    • Owner name (player or organization)
    • Construct Name
    • Construct Size (dropdown)
    • Construct Location (orbital body dropdown)
    • Coordinates
    • An image of your construct

     

    Excavation will begin one day after Demeter launches and might take a few days to complete, depending on the number of requests. The queue will be handled on a first-come, first-served basis. The sooner you submit your request, the closer you’ll be to the top of the list. It’s important to note that the excavation tool carves out a cube whose dimensions are determined by the voxel boundary box of the construct. Construct owners will still need to do clean-up here and there. For the best results, or if you are under time pressure, we strongly encourage construct owners to do their own clearing, thus ensuring that the area meets your exact standards for form and style.


    JOIN THE CONVERSATION

    Feedback and comments regarding Demeter on PTS can be shared in this forum thread.
    Bugs can be reported in this forum thread.

  3. PushNotif – 1 (1).png

     

    Voxels make up almost everything you see in the world of Dual Universe. Currently, most creations are made using the basic tools we provide with standard shapes such as cubes, spheres, cylinders, wedges, and tetrahedrons. 

     

    More intricate designs can be achieved through the art of ‘voxelmancy’ where players customize the shapes of voxels using a variety of methods and techniques based on how voxels react to each other when placed. This very advanced technique allows voxelmancers to place each corner of a voxel exactly where they want it. To do that, they use what is called a ‘voxel reactor’.

     

    image1.png

     

    Voxel reactors, as amazingly useful as they are, have three major drawbacks:

    • They are time consuming to use.
    • They are not very intuitive for beginners.
    • They are laid out in a checkered pattern in all three dimensions.

     

    The last item on that list poses some technical problems. 


    VOXEL COMPLEXITY

    When we are effectively applying a checkered pattern of voxels of different colors or even air, it creates a relatively large amount of small surfaces. This doesn’t really pose a problem for a single reactor, but can be a performance burden for some voxel libraries that consist of thousands of reactors.
     
    With more and more detailed constructs of complex design being built, it’s become problematic for the ‘mesh service’ system that generates the shapes that you see when not in build mode. On a few rare occasions, highly-detailed constructs may not render at all or their honeycomb will disappear. 

     

    To prevent this from happening, we will gradually implement a limitation to the complexity that can be created in a single chunk of voxels. It will start with a simple complexity gauge in Demeter:

    1. With the launch of Demeter, you will start by seeing a new feedback gauge while building which highlights the region you’re actively working on and will appear as a bar in the HUD that indicates the complexity level of that region as a percentage. 
    2. In a future update (exact update number still to be discussed), we will introduce the eagerly-awaited vertex precision tool (Known to many of you as the fabled vertex editor) as a way to ensure that the limitation to voxel reactors doesn’t hinder players’ ability to create amazing constructs in the game. (More on that below.)
    3. In a subsequent future (and yet undefined) update, we will enforce the complexity value limit to be 100% for any new voxel operations. As such, old constructs and blueprints will not be altered by this but may become unalterable if they are above the limit in a region. Rest assured that if you have an existing construct that’s above the limitation, you will still be able to use it as is.

     

    With all that out of the way, let’s get to the fun part!


    THE VERTEX PRECISION TOOL

    There is currently a bit of a gap between learning how to build using the basic tools and more advanced voxelmancy techniques, something we’ve wanted to address for a long time. The introduction of the vertex precision tool in a future update will allow you to take any vertex (a corner of a voxel) and move it to a new location on any of its three axes inside the vertex's moveable area at different resolutions. This will provide an intuitive way that fills that crucial gap between basic building and advanced voxelmancy to fine-tune your builds.

     

    See the video below for a demonstration of how this works. Please keep in mind that the video only shows an early prototype, but we think it’s already promising enough to make you as excited as we are about the possibilities of this tool.
     

     

    VPT.gif

     

    VPT2.gif

     

    VENI, VIDI, VOXIED

    I came, I saw, I voxeled 

     

    We hope that these voxelmancy changes, along with all of the great new Lua functions added in the Selene update, will inspire and encourage you to make even more amazing things than you already are. 

     

    Check out our Tutorials page for even more ideas and tips on using voxels to bring your creativity to life in Dual Universe. 

     

    As always, we’d love to hear your comments and answer your questions on the forum
     

  4. Hello Noveans!

     

    We have just released a client-side hotfix update, DU is now in version 0.26.19. The changes can be found below:

     

    Bugfixes

    • [Highlight] Highlight no longer makes elements go invisible when using the build helper or the link tool.
    • [Highlight] Highlight once again follows the full current element model.
    • [Lua] Fixed an incorrect localization field in the local atlas.lua lib.

     

    Thank you all for your support!

    - Deckard

  5. Hello Noveans!

     

    We have just released a new hotfix update, DU is now in version 0.26.18. The changes can be found below:

     

    Bug Fixes

    • Restored previous dispenser behavior (only "Use Element" right required to use a dispenser).
    • The Crash Reporter now works properly again and can be used to send crash reports.
    • Fixed the wrong root folder on the icon paths in the atlas.lua library.

    Crash Fix

    • [Crash] Fixed a bug related to element highlight that could lead to a crash.

    Known Issues

    • [Lua] Edit Lua Parameters can fail to be applied with some specific custom configurations. After investigation, we’ll need time to fix this and can’t provide an ETA yet.
    • [Lua] We are aware of and investigating a number of other Lua-related crashes and freezes.
    • [Highlight] Element highlight doesn't match with the element in some cases.
    • [Tool] Some elements visually disappear when you use the link tool; however, they remain linkable as they reappear when moused over.

     

    Thank you all for your support!

    - Deckard

  6.  

    Members of the Dual Universe dev team joined forces to talk about Dual Universe’s next update, Demeter, which focuses primarily around mining. 

     

    In this vlog, you’ll meet: 

    • NQ-Sesch, General Manager of Novaquark-Montreal
    • NQ-Kyrios, Creative Director
    • NQ-Entropy, Game Designer
    • NQ-Sirg, Technical Director
    • NQ-Deckard, Live Ops Specialist

     

    Topics include:

    • How we're implementing a new voxel grid on planets called hexoctrees, which will significantly decrease database costs and improve performance for players.
    • The fundamental changes to mining, including the removal of underground ore, how mining units work and how their efficiency can be optimized.
    • How the management of territories is impacted with the introduction of monthly ownership fees among other changes.
    • How these changes include a reset of the planets’ geometry and the potential impact on some players with underground bases.
    • How Novaquark is trying to help such players ahead of the launch of Demeter.

     

    To allow players the opportunity to see and experience these changes first-hand, including the effects of the geometry reset on their constructs, the public test server will be available soon with a preview of Demeter. The PTS will host a fresh copy of the database from Live so that all of your inventory and constructs will be waiting for you there . 

     

    We highly encourage DU community members to watch the vlog and join us on PTS to try all the things. Questions or comments about the vlog? We have the perfect place for those on our forum. 
     

  7. PushEngage%20%E2%80%93%20Selene.png

     

    The Dual Universe creator community will be delighted to dive into the latest update. Named for the goddess of the Moon, Selene (0.26.17) shines with new Lua-related features and improvements that players can integrate into their constructs to bring them to new heights. 

     

    Lua is a real and easy-to-learn programming language that can be used in DU to bring functionality and usability to constructs, such as making ships fly, doors open and close, and screens display graphics. For a more in-depth look at the various Lua components in Selene, we published “Lua Improvements and Changes”, a three-part devblog. (See Part 1, Part 2, and Part 3.) If you’re not familiar with Lua scripting, we hope this update will inspire you to give it a try. 

     

    We would also like to highlight these very important container RDMS changes. 

    • The “Use Element” right will no longer provide full access to all containers. Instead, the following RDMS rights will be the sole governors of who has access to containers.
      • Put items in container - Allows an actor to place items into a container
      • Retrieve items from container - Allows an actor to take items from a container
      • View container contents - Allows an actor to view the content of a container. (This right is implicitly given with the Put & Retrieve rights.)
    • This change will affect all container types: containers, fuel tanks, ammunition containers, and Mission containers. 
       

    Alongside the Lua goodies and container changes, the Selene update also includes several improvements and bug fixes. View the full changelog here.  


    Questions or comments about the update? Warp over to the forums. We’d love to hear from you. 
     

  8. Hello Noveans!

     

    Today we released the 0.26.17 - Selene update, named after the Greek goddess of the moon. 

    This update comes with the following changes:
     

    Gameplay Changes 
     

    • The “Use element” RDMS right no longer allows you to fully “use” a container. You now need to assign the specific container management rights associated to the expected level of access.
      • "Use element": Now no longer provides an actor access to the container.
      • “Put Items in container”: Allows an actor to put something into a container
      • “Retrieve items from container”: Allows an actor to take from a container
      • “View container contents”: Allows an actor to view the content of a container. It is implicitly given with the Put & Retrieve rights..
    • The container rights change affects all container types - item containers, fuel tanks, ammo containers, mission package containers.
       

    Lua Improvements and Changes
     

    • Changes in the management of construct and element referentials.

      For more consistency and to pave the way for future radar changes, the Lua now uses the construct building zone center as origin for all. This change affects local elements or player position and radar construct positions.

      We removed the quaternions from the Lua API are now exposing the direction vectors of the objects instead. This change was made to improve the overall player experience as not all players may be familiar with this mathematical notion of representing rotation.

      For more information you can read the Lua Improvements and Changes devblog, Part 1
       
      • Added Lua functions on Core Unit:
        • core.getOrientationUnitId() : Returns the UID of the currently active orientation unit (the core unit or the gyro unit).
        • core.getVelocity(): Returns the construct's linear velocity, relative to its parent, in construct local coordinates.
        • core.getWorldVelocity(): Returns the construct's linear velocity, relative to its parent, in world coordinates.
        • core.getAbsoluteVelocity(): Returns the construct's absolute linear velocity in construct local coordinates.
        • core.getWorldAbsoluteVelocity(): Returns the construct's absolute linear velocity in world coordinates.
        • core.getParentPosition(): Returns the position of the construct's parent when docked in construct local coordinates.
        • core.getParentWorldPosition(): Returns the position of the construct's parent when docked in world coordinates.
        • core.getParentForward(): Returns the construct's parent forward direction vector in construct local coordinates.
        • core.getParentUp(): Returns the construct's parent up direction vector in construct local coordinates.
        • core.getParentRight(): Returns the construct's parent right direction vector in construct local coordinates.
        • core.getParentWorldForward(): Returns the construct's parent forward direction vector in world coordinates.
        • core.getParentWorldUp(): Returns the construct's parent up direction vector in world coordinates.
        • core.getParentWorldRight(): Returns the construct's parent right direction vector in world coordinates.
        • core.getElementForwardById( uid) : Returns the forward direction vector of the element identified by its UID in construct local coordinates.
        • core.getElementUpById( uid) : Returns the up direction vector of the element identified by its UID in construct local coordinates.
        • core.getElementRightById( uid) : Returns the right direction vector of the element identified by its UID in construct local coordinates.
      • Added Lua functions on Control Unit:
        • unit.getMasterPlayerPosition() : Returns the position of the player currently running the control unit in construct local coordinates (relative to the construct center instead of the control unit).
        • unit.getMasterPlayerWorldPosition() : Returns the position of the player currently running the control unit in world coordinates.
        • unit.getMasterPlayerForward() : Returns the forward direction vector of the player currently running the control unit in construct local coordinates.
        • unit.getMasterPlayerUp() : Returns the up direction vector of the player currently running the control unit in construct local coordinates.
        • unit.getMasterPlayerRight() : Returns the right direction vector of the player currently running the control unit in construct local coordinates.
        • unit.getMasterPlayerWorldForward() : Returns the forward direction vector of the player currently running the control unit in world coordinates.
        • unit.getMasterPlayerWorldUp() : Returns the up direction vector of the player currently running the control unit in world coordinates.
        • unit.getMasterPlayerWorldRight() : Returns the right direction vector of the player currently running the control unit in world coordinates.
      • Changed existing Lua functions:
        • core.getConstructOrientationForward() : Returns the forward direction vector of the active orientation unit in construct local coordinates.
        • core.getConstructOrientationUp() : Returns the up direction vector of the active orientation unit in construct local coordinates.
        • core.getConstructOrientationRight() : Returns the right direction vector of the active orientation unit in construct local coordinates.
        • core.getConstructWorldOrientationForward() : Returns the forward direction vector of the active orientation unit in world coordinates.
        • core.getConstructWorldOrientationUp() : Returns the up direction vector of the active orientation unit in world coordinates.
        • core.getConstructWorldOrientationForward() : Returns the right direction vector of the active orientation unit in world coordinates.
        • core.getConstructWorldPos() : Returns the position of the center of the construct in world coordinates (instead of orientation units position).
        • core.getElementPositionById(<int> uid) : Returns the position of the element, identified by its UID in construct local coordinates (instead of the construct corner).
      • Deprecated existing Lua functions:
        • core.getElementRotationById() : Deprecated.
        • unit.getMasterPlayerRelativePosition() : Deprecated.
        • unit.getMasterPlayerRelativeOrientation() : Deprecated.
      • Removed Lua functions that were previously deprecated: 
        • unit.getOwnerRelativePosition(),
        • core.getElementList(),
        • core.getElementName(),
        • core.getElementType(),
        • core.getElementHitPoints(),
        • core.getElementMaxHitPoints(),
        • core.getElementMass(),
        • engine.getFuelRate(),
        • engine.isObstructed(),
        • gyro.setYawWorldReference(),
        • gyro.getYaw()
           
    • Radar and transponder changes.
      There are some future backend radar changes in the planning stages now. In preparation, we have made some improvements to the Lua implementation of the radar. These should not only have a usability benefit but also improve performance as we reduce the usage of JSON strings to deliver payloads in Lua in favor of tables and values.

      We also heard your feedback that many of you found the transponder lacking in usability. To counter this,  we’ve added the transponder Lua API.

      For more information on the radar changes, you can read the Lua Improvements and Changes, Part 2 devblog. 
      • Added Lua functions on radar unit:
        • radar.isOperational() : Returns 1 if the radar is not broken, works in the current environment and is not used by another control unit.
        • radar.getRange() : Returns the scan range of the radar unit.
        • radar.getIdentifyRanges() : Returns ranges to identify a target based on its core size.
        • radar.getConstructIds() : Returns the list of construct IDs in the scan range.
        • radar.getIdentifiedConstructIds() : Returns the list of identified construct IDs.
        • radar.getTargetId() : Returns the ID of the target construct.
        • radar.getConstructDistance( cid) : Returns the distance to the given construct.
        • radar.isConstructIdentified( cid) : Returns 1 if the given construct is identified.
        • radar.isConstructAbandoned( cid) : Returns 1 if the given construct was abandoned.
        • radar.getConstructCoreSize( cid) : Returns the core size of the given construct.
        • radar.getThreatTo( cid) : Returns the threat rate your construct is for the given construct.
        • radar.getThreatFrom( cid) : Returns the threat rate the given construct is for your construct.
        • radar.getConstructOwner( cid) : Returns a table with ID of the owner entities (player or organization) of the given construct if in range and if active transponder tags match.
        • radar.getConstructPos( cid) : Returns the position of the given construct in construct local coordinates if the active transponder tags match.
        • radar.getConstructWorldPos( cid) : Returns the position of the given construct in world coordinates if in range and if the active transponder tags match.
        • radar.getConstructSpeed( cid) : Returns the speed of the given construct if identified.
        • radar.getConstructAngularSpeed( cid) : Returns the angular speed of the given construct relative to your construct if identified.
        • radar.getConstructRadialSpeed( cid) : Returns the radial speed of the given construct relative to your construct if identified.
        • radar.getConstructMass( cid) : Returns the mass of the given construct if identified.
        • radar.getConstructInfos( cid) : Returns a list of working elements on the given construct if identified.
        • radar.getConstructVelocity( cid) : Returns the velocity vector of the given construct in construct local coordinates if identified and if the active transponder tags match.
        • radar.getConstructWorldVelocity( cid) : Returns the velocity vector of the given construct in world coordinates if identified and if the active transponder tags match.
      • Added Lua functions on Transponder Unit:
        • transponder.activate() : Activate the transponder.
        • transponder.deactivate() : Deactivate the transponder.
        • transponder.toggle() : Toggle the state of the transponder.
        • transponder.getState() : Returns the activation state of the transponder.
        • transponder.setTags( tags) : Set the tags list with up to eight entries. Returns 1 if the application was successful, 0 if the tag format is invalid.
        • transponder.getTags() : Returns the tag list.
        • transponder.toggled( active) event : Emitted when the transponder is started or stopped.
      • Deprecated existing Lua functions:
        • radar.getEntries() : has been renamed to getConstructIds for consistency.
      • The radar can now be connected to all controllers. You can only use radar for PvP on restricted links or you will not be able to identify or engage a target with it.
         
    • Additional local libraries and update
      We took the time to add a few minor features to the Lua following some popular requests that we felt would gel well with the other changes.

      For more information on the libraries, you can read the Lua Improvements and Changes, Part 3 devblog. 
      • Updated database Lua library:
        • database.getPlayer( pid) : Returns all information about a given player, identified by its ID.
        • database.getMasterPlayer( unit) : Returns all information about the player running the script.
        • database.getConstruct( cid) : Returns all information about a given construct, identified by its ID;  requires a radar to detect the construct.
        • database.getElement( core, uid) : Returns all information about a given element, identified by its ID, and requires a linked core unit.
      • Added the atlas Lua library containing all the information about the stellar bodies. (Check the devblog or check the file in your local Lua game folder.)
      • Added the event Lua library designed to help players create events in pure Lua. (Check the devblog or check the file in your local Lua game folder.)
         
    • Other changes and improvements.
      • Ammo containers now have the same Lua API as other container elements.
      • Added a section on RenderScript and Lua screen units to the Codex.
      • Added Lua functions on Lua screen units:
        • getTime(): Return the time, in seconds, relative to the first execution.
        • getAvailableFontCount(): Return the number of fonts available to be used by render script.
        • getAvailableFontName(index): Return the name of the nth available font
      • Added additional Lua functions :
        • core.getConstructName() : Returns the name of the construct.
        • core.getCurrentPlanetId() : Returns the ID of the current close stellar body.
        • system.getPlayerName( pid) : Returns the name of the given player if in range of visibility or broadcasted by a transponder.
        • unit.getMasterPlayerOrgIds() : Returns the list of organization IDs of which the player running the script is a member.
        • system.getOrganizationName( oid) : Returns the name of the given organization, if known, e.g. broadcasted by a transponder.
        • system.getOrganizationTag( oid) : Returns the tag of the given organization, if known, e.g. broadcasted by a transponder.
      • Deprecated isFontLoaded() function due to a bug fix related to font loading.


    Improvements
     

    • [UI] Added a wallet log when canceling a buy order on a market. (Refund was already done but was not noted in the log.)
    • [UI] Reordered context menu for pack and unpack item action.
    • [UI] Polished lateral consumable bar displayed with materials or elements tools.
    • [UI] Add Talent queue warning notification when you are on surrogate session: "Talent training only affects your avatar".


    Bug Fixes
     

    • Fixed a bug where a destroyed construct immediately stops and does not move until it is repaired.
    • Fixed an issue where game pop-ups would never appear during a session, including the "quit game" pop-up.
    • Fixed occasional framerate drops at the beginning of a game session.
    • Fixed the scanner in the hand preventing the territory scanner interface from opening correctly.
    • Fixed the Dual Universe black screen before loading which could freeze the game.
    • [Lua] core.getParent function no longer returns nearby construct/planet IDs. Now returns the parent construct ID.
    • [Lua Screens] Fixed a problem that sometimes caused fonts to load incorrectly.
    • [Codex] core.getBoardedAvatars() was incorrect; the correct function name is core.getPlayersOnBoard().
    • [UI] Fixed hand scanner graphic not showing closest voxels.
    • [Talents] Fixed inconsistency with Fixed Refill and Drain Speed.
    • [Build] Fixed an issue where animated element meshes would be duplicated when using the Move element tool in build mode.
    • [Build] Element highlights now correctly correspond to the whole element mesh.
    • Fixed refuel tool feedback when player doesn’t have rights.


    Known Issues
     

    • [Lua] Edit Lua parameters can fail to be applied with some specific custom configurations. After investigation, we’ll need time to fix this and can’t provide an ETA yet.
    • [Lua] We are aware of and investigating a number of other Lua-related crashes and freezes.
    • We currently have an issue with the Crash Reporter causing it to not trigger correctly, we’re investigating this bug and will push an update to resolve the issue soon.
    • [Crash] An issue related to element highlights has been identified that can lead to a crash. This is most noticeable when using the Repair Tool or Linking Elements.

     

    Thank you all for your support!

    - Deckard

     

  9. PushNotif – 1.png

     

    With production on the Demeter update well underway, we wanted to make you aware of one of the big changes that will be included in the release, the Stacked Element Detection function. 

     

    Previously, it was possible (though not permissible) to stack elements while creating ships. We’ve since eliminated the means to do this; however, there could still be players who are unknowingly piloting purchased ships that contain stacked elements. Used in tandem with the in-game build helper, we will now provide a way to identify stacked elements on constructs so that the owner can remove them.


    image1.png

     

    You may now find that some elements listed have a red triangle in front of them, indicating a stacked element and/or an element that is overlapping another element. 


    The following elements* are currently subject to disabling:

    • Repair units
    • Shield generators
    • Weapons
    • Elevators
    • Anti-gravity generators
    • Anti-gravity pulsors
    • Containers
    • Industries
    • Mining units
    • Airfoils (wings, stabilizers, and ailerons)
    • Space and air brakes
    • Adjustors
    • Engines (atmospheric, space, rocket, hover, and vertical boosters)
    • Control units (including PvP seats)
    • Deep space asteroid trackers
    • Resurrection nodes
    • Surrogate pods and VR stations
    • Territory scanners

    *List subject to change

     

    Please note that this is a temporary method to address the issues caused by stacked elements. An automated process will be introduced in a future update in which any stacked or overlapping element will have its function disabled. We highly recommend that all players use this to retrofit, redesign, or unstack any stacked elements to ensure retention of functionality once the final phase of the stacking fixes is implemented.
     

    A forum thread is available here for questions and comments. 

  10. Hello @EasternGamer!

     

    That was quite the read.

     

    Although we do already have very similar plans on the drawing board, it is unlikely that this will happen soon as it will likely have to go hand in hand with a larger Lua change for which we simply do not have an ETA at this time. And it's also not something that can be implemented at any point as it involves some major changes that would mean refactoring and "fixing" just about every single Lua script that currently exists in the game.

     

    As such, although we agree with the idea and would eventually like to do something along these lines. It is very unlikely it will be before release.

  11. The Event Library Example
     

    Below you will find example Lua code for a Lua Screen Units renderscript which demonstrates some of the use cases of the events library. 
    (Yes, I realise this is a stunning example screenshot. ?)

     

    image.png

     

    The Event Library example code: (This example will not work in game until the related update is deployed.)

    --Local libs used in this example
    local event = require('utils/event')
    local rslib = require('rslib')
    
    --Layers instanciation and font loading
    local font = loadFont('RefrigeratorDeluxe',20)
    local back = createLayer()
    local front = createLayer()
    local fore = createLayer()
    local rx,ry = getResolution()
    local mx,my = getCursor()
    
    --Default styles definition
    setDefaultFillColor(back,Shape_BoxRounded,0.2,0.2,0.3,1)
    
    setDefaultFillColor(front,Shape_Text,1,1,1,1)
    setDefaultFillColor(fore,Shape_Text,1,193/255,32/255,1)
    
    
    --Background color definition
    setBackgroundColor(15/255,25/255,40/255)
    
    
    --[EXAMPLE] Button class definition
    local function addButton(x,y,w,h,text,ft)
        --Pubic properties
        local self = {}
        self.text = text or ""
        self.font = ft or nil
        self.onPressed = event:new()
        self.onDown = event:new()
        self.onReleased = event:new()
        self.onHover = event:new()
        self.onLeave = event:new()
        
        --Local properties
        local _x,_y,_w,_h = x,y,w,h
        local _lines = {}
        local _hover = false
        
        
        local _asc, _desc = 0,0
        if self.font then
            _asc,_desc = getFontMetrics(font)
            _lines = rslib.getTextWrapped(font, text, _w)
        end
        
        --Set the caption of the button
        function self:setText(text)
            if self.font then
                _lines = rslib.getTextWrapped(self.font, text, _w)
            end
        end
        
        --Handle button events
        function self:compute(x,y)
            if x>_x and x<_x+_w and y>_y and y<_y+_h then
                if getCursorPressed() then
                    self.onPressed:emit(self,x,y)
                elseif getCursorReleased() then
                    self.onReleased:emit(self,x,y)
                elseif getCursorDown() then
                    self.onDown:emit(self,x,y)
                end
                _hover = true
                self.onHover:emit(self,x,y)
            elseif _hover then
                self.onLeave:emit(self,x,y)
                _hover = false
            end
        end
        
        --Draw the button
        function self.draw(self)
            local x,y,w,h,txt,ft = _x, _y, _w, _h, self.text, self.font
            local layer = _hover and fore or front
            addBoxRounded(back,_x,_y,_w,_h,6)
            
            if ft then
                for k,l in pairs(_lines) do
                    local ty = y + h*0.5 - (#_lines-1)*(_asc+_desc)*0.5 + _asc*(k-1)
                    setNextTextAlign( layer, AlignH_Center, AlignV_Middle)
                    addText( layer, ft, l, x+w/2, ty)
                end
            end
        end
        
        return self
    end
    
    
    ---# Initialization - Executed only at the first frame
    if not _init then
        display = {"Don't click me!","No! What did I say?!","STOP!! I SAID STOP !","STOP!! I'M BLOCKING MYSELF NOW"}
        k = 1
        
        --Create the button
        btn_print = addButton(rx/2 -93, ry/2 -28, 186, 56, display[1], font)
            
        --Add the action on the onPressed event.
        --event:addAction( call, enabled, limit)
        btn_print.onPressed:addAction(function(self,x,y)
                k = k+1
                self:setText(display[k])
            end, true, 3)
        --In this case, we limit the action to 3 invoke and is disabled after.
        
        _init = true
    end
    
    ---# Computation
    btn_print:compute(mx,my)
    
    ---# Rendering
    btn_print:draw()
    
    requestAnimationFrame(10)

     

  12. The Atlas Library Example
     

    Below you will find example Lua code for a Lua Screen Units renderscript which demonstrates some of the use cases of the atlas library. 

     

    image.png

     

    The Atlas Library example code: (This example will not work in game until the related update is deployed.)

    -----------------------------------------------------------------------------------
    -- Atlas Lua Screen
    --
    -- This screen provides an example of a stellar atlas based on screen rendering
    -- and the local atlas.lua library.
    -----------------------------------------------------------------------------------
    
    ---# Local constants class and objects definition
    local atlas = require("atlas")
    local json = require("dkjson")
    local rslib = require("rslib")
    local vec3 = require("cpml/vec3")
    
    local system = atlas[0]
    
    local rx,ry = getResolution()
    
    local rear = createLayer()
    local back = createLayer()
    local front = createLayer()
    local fore = createLayer()
    
    local small = loadFont('Play',10)
    local smallBold = loadFont('Play-Bold',10)
    local normal = loadFont('Play',16)
    local normalBold = loadFont('Play-Bold',16)
    local medium = loadFont('Play',22)
    local mediumBold = loadFont('Play-Bold',22)
    
    
    ---# Local functions definition
    --Returns the id of the images requested to load (prevent to load multiple time the same image)
    local images = {}
    local function loadImages(src)
        for k,img in pairs(images) do
            if k == src then return img end
        end
        images[src] = loadImage(src)
        return images[src]
    end
    
    --Returns a concatenated string of the given table with the comma separator according to the language
    local function concatList(list,lng)
        local out = {}
        for i,v in pairs(list) do
            out[i] = v[lng]
        end
        return table.concat(out,', ')
    end
    
    --Check if the given table t has the given entry u
    local function contains(t, u)
        for i,v in pairs(t) do
            if v == u then return true, i end
        end
        return false
    end
    
    --Used to set the view to a given stellar body id
    local function setView(id)
        local i = 0
        
        for k,b in pairs(system) do
            if b.id == id and b.systemId == 0 then
                i = k
            else
                for k,b in pairs(system) do
                    if b.id == b.systemId then
                        i = k
                    end
                end
            end
        end
        
        if _mode == 1 then
            _viewX = 470-(i*350)
        else
            _initShift = _viewX
            _shift = 470-(i*350)
            _time = 0
        end
    end
    
    
    ---# Settings
    -- showCursor : Set at true to display a cursor
    -- _lang : Set here the default language (1: English, 2: French, 3: German)
    -- _mode : Set the view mode (1: system view, 2: local view)
    -- _select : Set the default selected stellar body (i.e. 2 for Alioth)
    
    local showCursor = false
    _lang = _lang or 1
    _mode = _mode or 1
    _select = _select or 1
    
    local loc = {
        description = {"Description", "Description", "Beschreibung"},
        ores = {"Ores", "Minerais", "Erze"},
        biosphere = {"Biosphere", "Biosphere", "Biosphare"},
        habitability = {"Habitability", "Habitabilite", "Bewohnbarkeit"},
        classification = {"Classification", "Classification", "Klassifizierung"},
        satellites = {"Satellites", "Satellites", "Satelliten"},
        distance = {"Distance", "Distance", "Entfernung"},
        radius = {"Radius", "Rayon", "Radius"},
        gravity = {"Gravity", "Gravité", "Schwerkraft"},
        atmoThickness = {"Atmo. Thickness", "Epaiss. atmosphère", "Atmospharendicke"},
        noSatellite = {"This stellar body does not have satellites.","Ce corps stellaire ne dispose pas de satellites.","Dieser Sternkörper hat keine Satelliten."}
    }
    
    
    ---# Initialization
    _viewX = _viewX or 220
    _planets = _planets or {}
    _time = _time and _time+getDeltaTime() or 0
    _initShift, _shift = _initShift or 0, _shift or 0
    
    local input, dist = getInput(), 0
    
    if not _init then
        if not system[_select] then
            _select = 1
        end
    
        setView(_select)
    
        local data = json.decode(input) or {}
        if data.pos then dist = vec3(data.pos) - vec3(planet.center) end
        _init = true
        
        for _,b in pairs(system) do
            if b.systemId == 0 then
                if b.satellites then
                    table.sort (b.satellites, function (b1, b2) return system[b1].positionInSystem < system[b1].positionInSystem end )
                end
                
                _planets[#_planets+1] = b
            end
        end
        table.sort (_planets, function (b1, b2) return b1.positionInSystem < b2.positionInSystem end )
    end
    
    local planet = system[_select]
    local vignette = loadImages(planet.iconPath)
    
    ---# Computation
    local mx, my = getCursor()
    local down, pressed = getCursorDown(), getCursorPressed()
    
    --Compute actions on mouse clicks
    if pressed then
        for k=1,3 do
            local lx = rx-84 + k*24
            if (mx-lx)^2 + (my-13) < 20^2 then
                _lang = k
            end
        end
    
        if _mode==2 and (mx-256)^2 + (my-32)^2 < 24^2 then
            _mode = 1
        end
    end
    
    if my>ry-60 and mx>224 and down then
        if _mode==1 then
            _viewX = 220-((mx-224)/700)*4200 + (rx-224)/2
        else
            _mode = 1
        end
    end
    
    --Slide animation when clicked on a planet
    if _mode == 2 then    
        local t = _time/1
        local sqt = t * t;
        _viewX = t>=1 and _shift or _initShift + (sqt / (2.0 * (sqt - t) + 1.0))*(_shift-_initShift);
    end
    
    --Clamp the view shift
    _viewX = _viewX>220 and 220 or _viewX
    _viewX = _viewX<-3800 and -3800 or _viewX
    
    
    ---# Rendering
    --Draw backgrounds and cursor circle
    setBackgroundColor(5/255, 6/255, 10/255)
    
    setNextFillColor( front, 15/255, 16/255, 20/255, 1)
    addBox( front, 0, 0, 224, ry)
    
    setNextFillColor( back, 5/255, 6/255, 10/255, 1)
    addBox( back, 224, ry-60, rx-224, 60)
    
    if showCursor then
        setNextStrokeWidth( fore, 0.1)
        setNextStrokeColor( fore, 1, 193/255, 32/255, 1)
        setNextFillColor( fore, 0,0,0,0)
        addCircle( fore, mx, my, 5)
        setNextFillColor( fore, 1, 193/255, 32/255, 1)
        addCircle( fore, mx, my, 1)
    end
    
    ---Main view
    --Draw the main view sun glow, only if visible on the view
    if _viewX > 0 then
        setNextStrokeWidth( rear, 0)
        setNextStrokeColor( rear, 0, 0, 0, 0)
        setNextShadow( rear, 200, 255/255, 120/255, 5/255, 0.85)
        addBox( rear, _viewX-10, 0, 0, ry)
    end
        
    local bx,by = _viewX+300, ry/2
    
    --Draw the thumbnail sun glow
    setNextStrokeWidth( back, 0)
    setNextStrokeColor( back, 0, 0, 0, 0)
    setNextShadow( back, 45, 255/255, 120/255, 5/255, 0.75)
    addBox( back, 200, ry-35, 0, 10)
    
    --Draw all planets
    for i,body in pairs(_planets) do
        local img = loadImages(body.iconPath)
        local hover = false
        local r = body.radius/900
        local mbx = 224+(i*350)/6
    
        if _mode==1 or (_mode == 2 and _select == body.id or (body.satellites and contains(body.satellites, _select))) then
            
            --Check the hover and click events in the rendering (exception made to avoid having to do the same loop in the computation part).
            if (mx-bx)*(mx-bx) + (my-by)*(my-by) < (r+18)^2 then
                hover = true
                if pressed then
                    _select = body.id
                    if _mode == 1 then
                        _mode = 2
                        setView(body.id)
                    end
                end
            end
    
            --Draw the planet only if it is visible on the screen in order to optimize the rendering cost.
            if bx > -r*1.5 and bx < rx+r*1.5 then
                if hover then
                    setNextStrokeWidth( rear, 0.1)
                    setNextStrokeColor( rear, 1, 193/255, 32/255, 1)
                end
                setNextFillColor( rear, 0, 0, 0, 0)
                addCircle( rear, bx, by, r+18)
                
                --Draw atmosphere if the stellar body has
                if body.hasAtmosphere then
                    local atm = body.atmosphereRadius/900
                    
                    setNextStrokeWidth( rear, 0.1)
                    setNextStrokeColor( rear, 1, 1, 1, 0.03)
                    setNextFillColor( rear, 1, 1, 1, 0.025)
                    addCircle( rear, bx, by, atm)
                end
    
                --Draw back line
                setNextStrokeWidth( rear, 0.1)
                setNextStrokeColor( rear, 1, 1, 1, 0.25)
                addLine( rear, bx, 0, bx, ry)
    
                --Draw planet image
                if body.id == 3 then
                    addImage( back, img, bx-(2*r)+8, by-(2*r)+14, 2*(2*r), 2*(2*r))
                else
                    r = 1.025 * r
                    addImage( back, img, bx-r, by-r, 2*r, 2*r)
                end
                
                --Draw satellites if in local view
                if _mode == 2 then
                    if body.satellites then
                        
                        
                        local dsx = 0.5 * (rx-bx+r)/(#body.satellites+1)
                        local sx, sy = bx + r + dsx, by
                        for j,sid in pairs(body.satellites) do                     
                            
                            hover = false
                            local sat = system[sid]
                            local satImg = loadImages(sat.iconPath)
                            sr = sat.radius/1240
                            
                            if (mx-sx)*(mx-sx) + (my-sy)*(my-sy) < (sr+18)^2 then
                                hover = true
                                if pressed then
                                    _select = sat.id
                                end
                            end
    
                            if hover then
                                setNextStrokeWidth( rear, 0.1)
                                setNextStrokeColor( rear, 1, 193/255, 32/255, 1)
                            end
                            setNextFillColor( rear, 0, 0, 0, 0)
                            addCircle( rear, sx, sy, sr+18)
    
                            if sat.hasAtmosphere then
                                atm = sat.atmosphereRadius/1240
    
                                setNextStrokeWidth( rear, 0.1)
                                setNextStrokeColor( rear, 1, 1, 1, 0.03)
                                setNextFillColor( rear, 1, 1, 1, 0.025)
                                addCircle( rear, sx, sy, atm)
                            end
                            
                            addImage( back, satImg, sx-sr, sy-sr, 2*sr, 2*sr)
    
                            setNextStrokeWidth( rear, 0.1)
                            setNextStrokeColor( rear, 1, 1, 1, 0.25)
                            addLine( rear, sx, sy + (sr+10)*(-1)^j, sx, sy + (sr+38)*(-1)^j)
    
                            setNextTextAlign( back, AlignH_Center, AlignV_Middle)
                            addText( back, normal, sat.name[_lang], sx, sy + (sr+48)*(-1)^j)
                            
                            sx = sx + sr + dsx
                        end                
                        
                    else
                        --Otherwise, if the star body has no satellites, we display a message.
                        setNextTextAlign( back, AlignH_Center, AlignV_Middle)
                        addText( back, normal, loc.noSatellite[_lang], (rx+bx)/2, by)
                    end
                end
    
                --Draw the planet name
                setNextTextAlign( back, AlignH_Center, AlignV_Baseline)
                addText( back, medium, body.name[_lang], bx, by+r+38)
            end
        end
    
    
        --Draw the thumbnail view
        setNextStrokeWidth( back, 0.1)
        setNextStrokeColor( back, 1, 1, 1, 0.25)
        addLine( back, mbx, ry-60, mbx, ry)
        addImage( front, img, mbx -r/8, ry-30 -r/8, 2*r/8, 2*r/8)
    
        --If the local view, show the back button arrow
        if _mode == 2 then
            setNextStrokeColor( fore, 1, 193/255, 32/255, 1)
            setNextStrokeWidth( fore, 1)
            addLine( fore, 250, 32, 262, 44)
            
            setNextStrokeColor( fore, 1, 193/255, 32/255, 1)
            setNextStrokeWidth( fore, 1)
            addLine( fore, 250, 32, 262, 20)
        end
        
        bx = bx +350
    end
    
    
    --Draw the minature view box
    setNextFillColor( front, 1, 1, 1, 0.1)
    addBox( front, 224+(220-_viewX)/6, ry-60, (rx-224)/6, 60)
    
    --Draw the language selector
    local langs = {'EN', 'FR', 'GE'}
    for k,l in pairs(langs) do
        if _lang == k then
            setNextFillColor( fore, 1, 193/255, 32/255, 1)
        end
        addText( fore, small, l .. (k<3 and '  |' or ''), rx-96 + k*24, 18)
    end
    
    
    ---Lateral View
    --Draw all informations on the lateral panel
    addText( front, medium, string.upper('| '..planet.name[_lang]), 18, 38)
    
    local y = 50
    setNextFillColor( front, 10/255, 11/255, 15/255, 1)
    addBox( front, 0, y, 224, 120)
    
    addImage( fore, vignette, 112 - 50, y+10, 100, 100)
    y = y + 140
    
    
    addText( front, smallBold, string.upper('| '.. loc.description[_lang]), 18, y)
    local _lines = rslib.getTextWrapped( small, planet.description and planet.description[_lang] or '-', 200)
    for k,l in pairs(_lines) do
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, l, 18, y+2+k*10)
    end
    y = y + #_lines*10 + 16
    
    addText( front, smallBold, string.upper('| '.. loc.ores[_lang]), 18, y)
    setNextFillColor( front, 1, 1, 1, 0.75)
    local _lines = rslib.getTextWrapped( small, concatList(planet.ores, _lang), 200)
    for k,l in pairs(_lines) do
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, l, 18, y+2+k*10)
    end
    y = y + #_lines*10 + 28
    
    if planet.biosphere then
        addText( front, smallBold, string.upper('| '.. loc.biosphere[_lang]), 18, y)
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, planet.biosphere[_lang], 18, y+11)
        y = y +26
    end
    
    if planet.habitability then
        addText( front, smallBold, string.upper('| '.. loc.habitability[_lang]), 18, y)
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, planet.habitability[_lang], 18, y+11)
        y = y +26
    end
    
    if planet.classification then
        addText( front, smallBold, string.upper('| '.. loc.classification[_lang]), 18, y)
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, planet.classification[_lang], 18, y+11)
        y = y +26
    end
    
    addText( front, smallBold, string.upper('| '.. loc.satellites[_lang]), 18, y)
    setNextFillColor( front, 1, 1, 1, 0.75)
    addText( front, small, planet.satellites and #planet.satellites or 0, 18, y+11)
    y = y +38
    
    addText( front, smallBold, string.upper('| '.. loc.distance[_lang]), 18, y)
    setNextFillColor( front, 1, 1, 1, 0.75)
    addText( front, small, string.format('%.2f km', dist/1000), 18, y+11)
    y = y +26
    
    addText( front, smallBold, string.upper('| '.. loc.radius[_lang]), 18, y)
    setNextFillColor( front, 1, 1, 1, 0.75)
    addText( front, small, string.format('%.2f km', planet.radius/1000), 18, y+11)
    y = y +26
    
    addText( front, smallBold, string.upper('| '.. loc.gravity[_lang]), 18, y)
    setNextFillColor( front, 1, 1, 1, 0.75)
    addText( front, small, string.format('%.2f m/s²', planet.gravity), 18, y+11)
    y = y +26
    
    if planet.hasAtmosphere then
        addText( front, smallBold, string.upper('| '.. loc.atmoThickness[_lang]), 18, y)
        setNextFillColor( front, 1, 1, 1, 0.75)
        addText( front, small, string.format('%.2f m', planet.atmosphereThickness), 18, y+11)
    end
    
    ---# Request animation frame
    requestAnimationFrame(1)

     

  13. PushNotif (1).png

     

    Lua is a real programming language that can be used in Dual Universe to bring dynamics and interactivity. Whether it is to fly a ship made in voxels or to add movement and functionality to a construct (such as controlling doors), Lua is everywhere. 


    If you haven’t read the first two devblogs in this series, here’s what you missed: 

    • Part 1: Recent changes and additions, docking-related changes, and the deprecation of quaternions
    • Part 2: Radar API changes and transponder API additions


    In Part 3, we’re wrapping up this round of Lua devblogs by taking a look at highly-requested features, an update to the database library, the in-game atlas, and the event handling system. 


    OTHER ADDITIONS
    We took the time to add a few minor features to the Lua following some popular requests that we felt would gel well with the other changes.

     

    • <string> core.getConstructName() : Returns the name of the construct.
    • <int> core.getCurrentPlanetId() : Returns the ID of the current close stellar body.
    • <string> system.getPlayerName(<int> pid) : Returns the name of the given player if in range of visibility or broadcasted by a transponder.
    • <list> unit.getMasterPlayerOrgIds() : Returns the list of organization IDs of which the player running the script is a member.
    • <string> system.getOrganizationName(<int> oid) : Returns the name of the given organization, if known, e.g. broadcasted by a transponder.
    • <string> system.getOrganizationTag(<int> oid) : Returns the tag of the given organization, if known, e.g. broadcasted by a transponder.

     

    DATABASE LUA LIBRARY UPDATE
    With all of these other changes and improvements being deployed, it seemed a perfect time to update the local database library accordingly and to add some others based on players’ feedback.
    You will now find the following functions:

    • <table> database.getPlayer(<int> pid) : Returns all information about a given player, identified by its ID.
    • <table> database.getMasterPlayer(<table> unit) : Returns all information about the player running the script.
    • <table> database.getOrganization(<int> oid) : Returns all information about the given organization, identified by its ID.
    • <table> database.getConstruct(<int> cid) : Returns all information about a given construct, identified by its ID;  requires a radar to detect the construct.
    • <table> database.getElement(<table> core,<int> uid) : Returns all information about a given element, identified by its ID, and requires a linked core unit.


    LUA ATLAS ADDITION
    Lua designers have indicated the need for an in-game atlas. With the addition of the getCurrentPlanetId function, we can make that available now.


    We’re pleased that we were able to stick close to a similar structure that players were already familiar with, but with certified values and refactoring, especially for localization aspects. 


    The text fields for the name, description, minerals, etc. are not strings but tables. This was done with the objective of providing simple information in the three languages we currently support: English, French, and German.


    With this atlas library, you will have the following information:

    • <int> id : The id of the stellar body.
    • <list> name : The name of the stellar body.
    • <list> type: The type of the stellar body (planet or moon).
    • <list> biosphere : The stellar body biosphere.
    • <list> habitability : The level of habitability of the stellar body.
    • <list> classification : The thermal classification of planetary habitability.
    • <list> description: The description of the stellar body.
    • <string> iconPath: The stellar body icon image path (i.e. to be used on screens).
    • <bool> hasAtmosphere: True if the stellar body has an atmosphere.
    • <bool> isSanctuary: True if the stellar body is a sanctuary moon.
    • <bool> isInSafeZone: True if the stellar body is in the safe zone.
    • <int> systemId: The stellar system id in which is the stellar body.
    • <int> positionInSystem: The indicative position of the stellar body in the stellar system.
    • <list> satellites: The list of IDs of the satellites of this stellar body.
    • <vec3> center: The position of the center of the stellar body in world coordinates.
    • <float> gravity: The gravitational acceleration at the nominal radius of the stellar body in m/s².
    • <float> radius: The nominal radius of the stellar body.
    • <float> atmosphereThickness: The atmosphere thickness in meters.
    • <float> atmosphereRadius: The radius of the sphere of the atmosphere measured from the center of the stellar body.
    • <float> surfaceArea: The nominal surface area for the stellar body.
    • <float> surfaceAverageAltitude: The average altitude at the surface of the stellar body.
    • <float> surfaceMaxAltitude: The maximum altitude at the surface of the stellar body.
    • <float> surfaceMinAltitude: The minimum altitude at the surface of the stellar body.
    • <float> GM: The standard gravitational parameter of the stellar body.
    • <list> ores: The list of ores available on the stellar body.
    • <int> territories:  The number of territories on the surface of the stellar body.


    Example of use:

    local atlas = require(‘atlas’)
    --You can access to any stellar body from its id : atlas[system_id][stellar_body_id]
    local alioth = atlas[0][1]

     

    EVENT HANDLING LUA LIBRARY ADDITION

    To make it easier for players to organize and implement an event handling system, either for use on Lua screens or for various board systems, we added a new local Lua event library. This makes it possible to create events, associate actions to it, and manage these events and their emissions.


    Here is  a short documentation of this light library.


    Event
    Description: An event contains actions to be triggered on its emission.

     

    Properties:

    • <table> actions: The tables of actions attached to the event.

     

    Functions :

    • event:emit(...): Emit the event and invoke attached actions with the given arguments.
    • <bool, int> event:findAction(<string> id): Find a specific action associated with this event with the given ID. The function can take an action in argument to know if the action is attached to this event.
      • Arguments:
        • <string> id: The ID of an action.
      • Returns:
        • <bool> success: True if an action is found attached to this event.
        • <bool> index: The index of the action found in the actions table of the event.
    • <string> event:addAction(<any> call,<bool> enabled,<int> limit): Add an action to the event with the given arguments.
      • Arguments:
        • <object> call: The function or the thread invoked when the event is triggered.
        • <bool> enabled: The boolean that indicates whether or not the action is enabled.
        • <int> limit: The number of times the event can invoke this action.
      • Returns:
        • <string> id: The ID of an action.
    • <nil> event:removeAction(<string> id): Remove the action associated with the event with the given arguments. The function can take an action object in argument.

     

    Action

    Description: An action is defined by a callable object, a function, or a thread.

     

    Properties:

    • <string> id: This is an ID that can be used later to refer to this action.
    • <any> call: Invoked when the event is triggered.
    • <bool> enabled: This boolean indicates whether or not the action is enabled.
    • <int> limit: This property represents the number of times events can invoke this action.
    • <int> nbCall: This property keeps track of how many times events have invoked this action.
    • <float> interval: This property allows to limit the time interval between two calls.
    • <float> lastCall: This property helps track the time of when we last called this action.

     

    Example of use of the Atlas Library.

    Example of use of the Event Library.

     

    <BOOL> ARTICLE.ENDDEVBLOG()


    We hope you’ve enjoyed the Lua devblog series. Our work here is done, but yours isn’t. Our primary motivation for the blogs was to gather your feedback before perhaps considering further Lua changes and new features, whether for the API, as for the addition of additional libraries. Head over to the forum and join the conversation, share your thoughts and insights, and let us know what Lua-related improvements you’d like to see in the future. 
     

  14. On 10/11/2021 at 8:40 PM, Kirth Gersen said:

    Drop LUA. Use WASM or JS. it's 2021 not 2003.

    They're millions of people, tools (linters and ide), libraries, transpilers, etc that can produce code for WASM or JS.

     

    Sure LUA is popular in gaming mainly because of World of Warcraft (WoW) addons system. But WoW is from 2003 not 2021. Back then PC were slower, with less RAM and CPU cores  and the JS ecosystem wasn't very big. LUA was a good choice back in 2003. It's not in the 2020s.

    Progress have been made since then. JS came along and dominated. Now WASM it the next step. Build for the future not for 2003.

     

    There are tons of UI code, physics code, atmo & space flight code, whatever code and libraries already developed. 

     

    You're losing lot of skilled programmers and a huge existing base code by not using WASM for this game. Even JS is better than LUA nowadays because tons of stuff exist in JS and they're tons of transpilers to JS.

     

    Hello everyone, I just want to quickly chime in on the conversation and take the time to respond to this post.

    There are a few factors at play here, including security, sandboxing and learning.

    Particularly the last one, as Lua is a very verbal language, with terms such as 

    if something == true then 
        doAction() 
    end


    It is a particularly easy language for someone to learn who has never seen code before, and as Dual Universe is a game for everyone it is a much better fit.

    Besides that, it also meshes well with C++, can be nicely sandboxed and is commonly used in many games and thus a familiar platform for many players.

    Chances are high, that if you have good knowledge of JS, Lua will be a piece of cake to learn.

     

    On top of all that, there is also simply: Lua, Lua, oh baby, said we gotta go. Yeah, yeah, yeah, yeah...
     

     

  15.  PushEngage (2).jpg

     

    Sure, you can go it alone in Dual Universe, but you don’t have to, thanks to our new Recruit a Friend program. Who better than your tried and true mates to join you as wingmen on your epic adventures?

     

    The Recruit a Friend program is a reward system that allows you to earn free game time and great in-game rewards (including exclusive item skins and elements such as thrones and firework types) when you invite friends to purchase game time. In turn, your recruits will also receive items that will help them in their journey, such as handy starter elements, a speeder blueprint, and a week’s worth of talent points.

     

    The program is built in a way that rewards the total game time purchased by your recruits and not just the total number of players who were recruited.

     

    Watch this video to see the incredible benefits that await you and your recruits:

     

     

    HOW DOES IT WORK ?

     

    GET YOUR CODE

    Go to My Account, copy your Recruiter link and send it to your friends.

     

    RECRUIT A NOVEAN

    When your friends:

     

    • create a Dual Universe account with your unique link (clicking on it will redirect your friend directly to the signup page), or
    • enter your link in My Account before subscribing for the first time with an existing account, or
    • enter your link in My Account before applying game time for the first time on an existing account,

     

    THEN, their accounts become linked to yours.

     

    GET THE REWARDS

    Every time a linked friend buys game time, it is added to your total and contributes toward unlocking new rewards.

     

    CHECK YOUR PROGRESS

    Go to My Account to check which rewards you have unlocked.

     

    Visit the Recruit a Friend page on our website for more information.

     

    You need to have an active subscription to qualify for the Recruitment Program.

  16. DevBlog 169 (2).png

     

    In Part 1, we went over some of the fresh new Lua options available, such as changes to repositories, the removal of quaternions, and docking-related changes. In Part 2, we’re back to spread the good word about exciting things like radars and transponders.  

     

    Previously, we announced that Part 2 would also include databases, the atlas, and event libraries. Instead, these will be covered in Part 3


    RADAR LUA API CHANGES AND ADDITIONS
    There are some future backend radar changes in the planning stages now. In preparation, we have made some improvements to the Lua implementation of the radar. These should not only have a usability benefit, but also improve performance as we reduce the usage of JSON strings to deliver payloads in Lua in favour of tables and values.


    See below:

    • <list> radar.getEntries() : DEPRECATED (renamed to getConstructIds for consistency).
    • <int> radar.isOperational() : Returns 1 if the radar is not broken, works in the current environment and is not used by another control unit.
    • <float> radar.getRange() : Returns the scan range of the radar unit.
    • <list> radar.getIdentifyRanges() : Returns ranges to identify a target based on its core size.
    • <list> radar.getConstructIds() : Returns the list of construct IDs in the scan range.
    • <list> radar.getIdentifiedConstructIds() : Returns the list of identified construct IDs.
    • <int> radar.getTargetId() : Returns the ID of the target construct.
    • <float> radar.getConstructDistance(<int> cid) : Returns the distance to the given construct.
    • <int> radar.isConstructIdentified(<int> cid) : Returns 1 if the given construct is identified.
    • <int> radar.isConstructAbandoned(<int> cid) : Returns 1 if the given construct was abandoned.
    • <int> radar.getConstructCoreSize(<int> cid) : Returns the core size of the given construct.
    • <string> radar.getThreatTo(<int> cid) : Returns the threat rate your construct is for the given construct.
    • <string> radar.getThreatFrom(<int> cid) : Returns the threat rate the given construct is for your construct.

    With a matching transponder:

    • <table> radar.getConstructOwner(<int> cid) : Returns a table with ID of the owner entities (player or organization) of the given construct if in range and if active transponder tags match.
    • <vec3> radar.getConstructPos(<int> cid) : Returns the position of the given construct in construct local coordinates if the active transponder tags match.
    • <vec3> radar.getConstructWorldPos(<int> cid) : Returns the position of the given construct in world coordinates if in range and if the active transponder tags match.

    If identified:

    • <float> radar.getConstructSpeed(<int> cid) : Returns the speed of the given construct if identified.
    • <float> radar.getConstructAngularSpeed(<int> cid) : Returns the angular speed of the given construct if identified.
    • <float> radar.getConstructRadialSpeed(<int> cid) : Returns the radial speed of the given construct if identified.
    • <float> radar.getConstructMass(<int> cid) : Returns the mass of the given construct if identified.
    • <list> radar.getConstructInfos(<int> cid) : Returns a list of working elements on the given construct if identified.

    If identified AND a matching transponder:  :

    • <vec3> radar.getConstructVelocity(<int> cid) : Returns the velocity vector of the given construct in construct local coordinates if identified and if the active transponder tags match.
    • <vec3> radar.getConstructWorldVelocity(<int> cid) : Returns the velocity vector of the given construct in world coordinates if identified and if the active transponder tags match.


    TRANSPONDER LUA API ADDITIONS
    We also heard your feedback that many of you found the transponder lacking in usability. To counter this,  we’ve added and modified the following functions:

    • transponder.activate() : Activate the transponder.
    • transponder.deactivate() : Deactivate the transponder.
    • transponder.toggle() : Toggle the state of the transponder.
    • <int> transponder.getState() : Returns the activation state of the transponder.
    • <int> transponder.setTags(<list> tags) : Set the tags list with up to eight entries. Returns 1 if the application is successful, 0 if the list is too long or if the tag format is invalid.
    • <list> transponder.getTags() : Returns the tag list.
    • transponder.toggled(<int> active) event : Emitted when the transponder is started or stopped.

     

    JOIN THE CONVERSATION
    What do you think of these Lua changes and additions? Are there more you’d like to see? We’d love to hear your thoughts in this thread
     

  17. Hello Noveans!

     

    We would love to hear your feedback on the latest Lua DevBlog.


    I'd also personally like to read you all the following quote:  ( You can't stop me @NQ-Pann? )

     

    “... quaternions appear to exude an air of nineteenth century decay, as a rather unsuccessful species in the struggle-for-life of mathematical ideas. Mathematicians, admittedly, still keep a warm place in their hearts for the remarkable algebraic properties of quaternions but, alas, such enthusiasm means little to the harder-headed physical scientist Novean.”
    — Simon L. Altmann (1986)

     

     

  18. DevBlog 169 (1).png

     

    We have been adding a lot of features to the Lua API following the additions of shields and core combat stress in addition to the docking and boarding changes. We have taken a lot of your feedback and suggestions into consideration and have made a few changes to improve some of the consistency and implementation of Lua.


    These changes are minor; we can't rework the whole Lua API without breaking most of your scripts. 


    With this in mind and to finalize the implementation of the Lua API associated with docking and future changes to other mechanics, we have decided to adjust a few parts that may be major for Lua creators, both for the addition of new features and the improvement and consistency of the API as a whole.


    In this first part of a three-part devblog, we’ll cover the recent Lua changes and additions, including some related to docking and the deprecation of quaternions. 

     

    You can read up on the other parts here: Part 2 & Part 3
     

    CHANGES AND ADDITIONS
    First, we have decided to rework the way the repositories associated with constructs and elements are managed.


    Previously, some functions returning position or orientation information referred to the center or even a corner of the construct, others to the position of the core unit in the construct.


    Going forward we have standardized everything. Once these changes go live, all functions will be based on the reference frame of the construct whose origin is the center of the build zone. Further, in order to guarantee the functionality of the flight systems and to safeguard the gyro unit, we have integrated in a clearer way of representing orientation.


    An orientation unit is an element that is used to define the orientation of your construct. There are two orientation units in the game, the core unit and the gyro unit. As a construct cannot exist without a unique core unit, the core unit is always the default orientation unit. By pressing F on a gyro unit, you can switch to using the gyro unit as the current orientation unit.


    You can see that the marker and arrow displayed when you enter the build mode will indicate the orientation given by the active orientation unit. 
    You can activate a gyro unit by pressing F on it and so use its orientation.
     

    See examples below:
    refCoreUnitOnly.png refCoreUnitOnly2.png

    refInactiveGyroUnit.png refActiveGyroUnit.png

    For these changes, we have added:

    • <int> core.getOrientationUnitId() : Returns the UID of the currently active orientation unit (the core unit or the gyro unit).

    We have also modified the following functions:

    • <vec3> core.getConstructOrientationForward() : Returns the forward direction vector of the active orientation unit in construct local coordinates.
    • <vec3> core.getConstructOrientationUp() : Returns the up direction vector of the active orientation unit in construct local coordinates.
    • <vec3> core.getConstructOrientationRight() : Returns the right direction vector of the active orientation unit in construct local coordinates.
    • <vec3> core.getConstructWorldOrientationForward() : Returns the forward direction vector of the active orientation unit in world coordinates.
    • <vec3> core.getConstructWorldOrientationUp() : Returns the up direction vector of the active orientation unit in world coordinates.
    • <vec3> core.getConstructWorldOrientationRight() : Returns the right direction vector of the active orientation unit in world coordinates.
    • <vec3> core.getConstructWorldPos() : Returns the position of the center of the construct in world coordinates (instead of orientation units position).
       

    REMOVAL OF QUATERNIONS

     

    Quaternions are the quotient of two directed lines in a three-dimensional space or the quotient of two vectors.  In looking at how players were using Lua and reading their feedback, , we realized that very few players were familiar with this mathematical notion of representing rotation. 

     

    Therefore, we decided to deprecate quaternions from the Lua API and instead expose the direction vectors of objects.
     

    refElement.png refCharacter.png

     

    While this leads to the addition and change of some functions, deprecated functions will remain backwards compatible and will display a deprecated message in the Lua console.

     

    • <quat> core.getElementRotationById(<int> uid) : DEPRECATED
    • <vec3> core.getElementPositionById(<int> uid) : Returns the position of the element, identified by its UID in construct local coordinates (instead of the construct corner).
    • <vec3> unit.getMasterPlayerRelativePosition() : DEPRECATED
    • <quat> unit.getMasterPlayerRelativeOrientation() : DEPRECATED

    And we have added the following functions:

    • <vec3> core.getElementForwardById(<int> uid) : Returns the forward direction vector of the element identified by its UID in construct local coordinates.
    • <vec3> core.getElementUpById(<int> uid) : Returns the up direction vector of the element identified by its UID in construct local coordinates.
    • <vec3> core.getElementRightById(<int> uid) : Returns the right direction vector of the element identified by its UID in construct local coordinates.
    • <vec3> unit.getMasterPlayerPosition() : Returns the position of the player currently running the control unit in construct local coordinates (relative to the construct center instead of the control unit).
    • <vec3> unit.getMasterPlayerWorldPosition() : Returns the position of the player currently running the control unit in world coordinates.
    • <vec3> unit.getMasterPlayerForward() : Returns the forward direction vector of the player currently running the control unit in construct local coordinates.
    • <vec3> unit.getMasterPlayerUp() : Returns the up direction vector of the player currently running the control unit in construct local coordinates.
    • <vec3> unit.getMasterPlayerRight() : Returns the right direction vector of the player currently running the control unit in construct local coordinates.
    • <vec3> unit.getMasterPlayerWorldForward() : Returns the forward direction vector of the player currently running the control unit in world coordinates.
    • <vec3> unit.getMasterPlayerWorldUp() : Returns the up direction vector of the player currently running the control unit in world coordinates.
    • <vec3> unit.getMasterPlayerWorldRight() : Returns the right direction vector of the player currently running the control unit in world coordinates.

     

    DOCKING-RELATED LUA API ADDITIONS


    With the new docking mechanic, we wanted to empower players to manage the parent-child relationship between constructs. 


    Some of the additions were added in  the Ares (0.26.12) update;  however, we still had more changes and additions planned and these will be included with the Lua changes release


    We have added and modified the following functions:

    • <vec3> core.getVelocity(): Returns the construct's linear velocity, relative to its parent, in construct local coordinates.
    • <vec3> core.getWorldVelocity(): Returns the construct's linear velocity, relative to its parent, in world coordinates.
    • <vec3> core.getAbsoluteVelocity(): Returns the construct's absolute linear velocity in construct local coordinates.
    • <vec3> core.getWorldAbsoluteVelocity(): Returns the construct's absolute linear velocity in world coordinates.
    • <vec3> core.getParentPosition(): Returns the position of the construct's parent when docked in construct local coordinates.
    • <vec3> core.getParentWorldPosition(): Returns the position of the construct's parent when docked in world coordinates.
    • <vec3> core.getParentForward(): Returns the construct's parent forward direction vector in construct local coordinates.
    • <vec3> core.getParentUp(): Returns the construct's parent up direction vector in construct local coordinates.
    • <vec3> core.getParentRight(): Returns the construct's parent right direction vector in construct local coordinates.
    • <vec3> core.getParentWorldForward(): Returns the construct's parent forward direction vector in world coordinates.
    • <vec3> core.getParentWorldUp(): Returns the construct's parent up direction vector in world coordinates.
    • <vec3> core.getParentWorldRight(): Returns the construct's parent right direction vector in world coordinates.

     

    Questions? Comments? 


    We’re sure some of the Lua-enthusiasts in our community will have questions and comments about this blog. Post them here so our resident Lua expert, Ligo, can discuss them with you.

     

    Watch for Part 2 next week. It’s got great information about radar changes, the library database, an in-game atlas, and an event handling system. 
     

×
×
  • Create New...