Visionaire Update 5.0.7

  • #20, by MateuszTuesday, 02. October 2018, 13:07 2 years ago
    Didin't realize that there was a new one smile  My bad, didn't rally read that carefully throught first post. Testing right now, TY sebastian. EDIT: yes, with new toolkit it works as intendent.

    Newbie

    52 Posts


  • #21, by chronologicTuesday, 02. October 2018, 23:40 2 years ago
    Hi, 

    Can I report what seems to be an issue in the way system.
    I have uploaded a video to demonstrate.


    It seems to be random each time, but in this instance, things start to go wrong from 1:23 onwards...

    I also experienced the character jump to a distant way point, and appear outside of the borders as described in #11.

    Any help appreciated.

    Thanks

    Newbie

    22 Posts

  • #22, by MuklinWednesday, 03. October 2018, 18:11 2 years ago
    I have another issue; Visionaire still freezes as soon as I start the game; I start it on full screen and have two screens active. When there is only one Screen, it doesn't freeze. It would be nice if you would fix that soon or later.

    Newbie

    94 Posts

  • #23, by afrlmeThursday, 04. October 2018, 11:26 2 years ago
    Isn't that issue related to when you move the mouse cursor over to the other screen, which causes the game to lose focus - same as if you minimized it? I'm sure Simon mentioned something about it a while back.

    Imperator

    6817 Posts

  • #24, by SimonSThursday, 04. October 2018, 12:50 2 years ago
    @Muklin: can't reproduce. Please check that the player has focus.

    @chronologic: will get patches.

    Thread Captain

    1352 Posts

  • #25, by caligarimarteThursday, 04. October 2018, 13:05 2 years ago
    That "click thrice for Doubleclick"-Bug is really bizarre.
    But this current also Version seems to have broken my PixelArt's Guard-A.I.: His first Script places him randomly, which works, and then the second Script lets him walk around and repeatedly check for the Player, both of which do not happen right now: He neither walks around nor notices the Player, so the second Script, it seems, doesn't get executed at all. Maybe there is something to it that used to work (because it still worked in 5.0.6) and now with the updated Lua won't work anymore? (Which, by the way, sounds super uncomfortable for someone who has used quite a few Scripts in the Past.) Here is the second Script, so maybe someone can point out to me what might be wrong now in the Eyes of the current Lua-Version? (Sorry for the long Code.)

    -- Enemy A.I. 

    local GuardId = "Guard01"
    local Guard = getObject("Characters[" .. GuardId .. "]")

    local Obstacle = 0
    local RecognitionSpeed = 2

    --if dymphna's outfit has changed
    if Dymphna.CurrentOutfit ~= Dymphna.Outfits["dymA_default"] then
      RecognitionSpeed = 1
    end
    --

    local Distanz =
      math.sqrt(
        math.pow(Guard.Position.x-Dymphna.Position.x,2)
        +
        math.pow(Guard.Position.y-Dymphna.Position.y,2)
      )

    --RecognitionSpeed = RecognitionSpeed/Distanz

    math.randomseed( os.time() + 1 )
    local AI_Dest_X = math.floor(math.random(320))
    math.randomseed( os.time() + 2 )
    local AI_Dest_Y = math.floor(math.random(200))

    --graphics.addDrawFunc("debugDest()", 0)

    function Rect(_x1,_y1,_x2,_y2)
      return {
        {x=_x1,y=_y1},
        {x=_x2,y=_y1},
        {x=_x2,y=_y2},
        {x=_x1,y=_y2}
      }
    end

    function CheckRect(_x1,_y1,_x2,_y2)
      for i=0, 1, 0.1 do
        if isPointInsidePolygon( {x=lerp(Guard.Position.x,Dymphna.Position.x,i),y=lerp(Guard.Position.y-16,Dymphna.Position.y-13,i)}, Rect(_x1,_y1,_x2,_y2) ) then
          Obstacle = Obstacle + 1
        end
      end
    end

    CheckRect(123, 66,196,138)
    CheckRect( 0, 0,106, 59)
    CheckRect(214, 0,320, 59)
    CheckRect( 28, 89,106,126)
    CheckRect(214, 89,292,126)
    CheckRect( 0,156,105,200)
    CheckRect(214,156,320,200)
    CheckRect( 0,168,150,200)
    CheckRect(169,168,320,200)

    --if isPointInsidePolygon({x=30,y=80},game.GameCurrentScene.WaySystems.BurhCorridorWaysystem.Border) then

    Guard:setValue(VCharacterTint, 0xffffff)

    graphics.addDrawFunc("draw()", 0)

    if Obstacle == 0 then

    --Guard:setValue(VCharacterState,2)
    Guard:setValue(VCharacterDestination, Guard.Position)

    if Distanz <; ImmediateRecognitionAt then
      Guard.Values.Recognition.Int = 100
    end

    if Values.Recognition.Int == 0 then
      startSound(
        "vispath:sound/guard01.wav",
        {flags=1,volume=GuardVolume}
      )
    end

    Guard.Values.AI_UpdateTime.Int = 50

    alignChar(GuardId, "")

    if Guard.Values.Recognition.Int <; 100 then
      Guard.Values.Recognition.Int = Guard.Values.Recognition.Int + RecognitionSpeed
    else
      Guard.Values.Alarm.Int = 1
      graphics.removeDrawFunc("draw()")
     
      startSound(
        "vispath:sound/guard02.wav",
        {flags=1,volume=GuardVolume}
      )

    end

    function draw()
      -- "Recognized"-Line
      graphics.drawLine(
        Guard.Position.x,
        Guard.Position.y -16,
        lerp(
          Guard.Position.x,
          Dymphna.Position.x,
          Guard.Values.Recognition.Int/100
        ),
        lerp(
          Guard.Position.y -16,
          Dymphna.Position.y -13,
          Guard.Values.Recognition.Int/100
        ),
        RecognizeLineColor,
        RecognizeLineAlpha
      )
      -- "Noticed"-Line
      graphics.drawLine(
        lerp(
          Guard.Position.x,
          Dymphna.Position.x,
          Guard.Values.Recognition.Int/100
        ),
        lerp(
          Guard.Position.y -16,
          Dymphna.Position.y -13,
          Guard.Values.Recognition.Int/100
        ),
        Dymphna.Position.x,
        Dymphna.Position.y -13,
        NoticeLineColor,
        NoticeLineAlpha
      )
    end

    else

    --DEBUG: Visualize next Destination
    function debugDest()
      graphics.drawLine(
        Guard.Position.x,
        Guard.Position.y,
        AI_Dest_X,
        AI_Dest_Y,
        "0x8800ff",
        0.5
      )
    end

      Guard.Values.AI_UpdateTime.Int = 500
     
      Guard.Values.Recognition.Int = 0
     
      graphics.removeDrawFunc("draw()")
     
      --CharacterState scheint broken zu sein.
      --if Guard.State == 2 then
      if Guard.Position.x == Guard.Destination.x then
        --
        Guard:setValue(
          VCharacterDestination,
          {x=AI_Dest_X,y=AI_Dest_Y}
        )
        --
      end
     
    end

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167

    Forum Fan

    145 Posts

  • #26, by SimonSThursday, 04. October 2018, 13:33 2 years ago
    Please go the extra mile and look into the messages.log for errors....

    I can see math.pow, this is not allowed anymore, you need to do ^ 2.

    Thread Captain

    1352 Posts

  • #27, by afrlmeThursday, 04. October 2018, 13:50 2 years ago
    Strange that they decided to remove functions in Lua 5.3, but whatever.

    I also noticed that I had to triple click to register double click - I tested the other day with the mouse event handler & print function.

    Imperator

    6817 Posts

  • #28, by caligarimarteThursday, 04. October 2018, 14:00 2 years ago
    Please go the extra mile and look into the messages.log for errors....

    I can see math.pow, this is not allowed anymore, you need to do ^ 2.

    Thanks, that has worked so far. Though it's not like I didn't check, I did go into Debug-Mode and it told me that there was an Error with that Line, and I supposed it was the Line-Breaks, but that was not the Issue -- I didn't see any Message explicating that math.pow must be changed into ^, only that there was something wrong with the Line. I see now that I will have to check external Sources about Lua 5.3 to find out what the proper Replacements are -- a little annoying, but doable.

    Forum Fan

    145 Posts

  • #29, by afrlmeThursday, 04. October 2018, 14:10 2 years ago

    There are links on the pages that list incompatibilities.

    Why would they scrap most of the math functions? They made it easier for people like me that hate/have a hard time with math. It also means you have to write out more code rather than less.

    Imperator

    6817 Posts

  • #30, by SimonSThursday, 04. October 2018, 14:23 2 years ago
    Who says most, nobody needs the the h functions and I doubt ldexp and frexp.

    So only:
    math.pow -> ^
    atan2 -> atan (cause it does the same)

    Thread Captain

    1352 Posts

Write post