1mrpaul1's Recent Forum Activity

  • I am trying to use AI tools to develop with C3

    and without luck

    looks like the construct doesn't accept what AI is doing

    for example, this code, Construct shows error on line 9, in "Function ConvertToGridCoord(x, y):" so, it can't start function, sometimes showing a null object'

    we can say that it is just bad AI code, but in unity it works quite good, so, I believe there are some mistakes in transition of the JS to construct JS

    Can it be resolved? maybe somebody has the same experience

    // Global variables
    Variables:
     cellSize = 118 
     cellHeight = 102 
     gridWidth = 10 
     gridHeight = 10 
    
    // Function for converting screen coordinates to grid coordinates
    Function ConvertToGridCoord(x, y):
     let qF = (Math.sqrt(3)/3 * x - 1/3 * y) / cellSize
     let rF = (2/3 * y) / cellSize
     let q = Math.round(qF)
     let r = Math.round(rF)
     let s = Math.round(-qF - rF)
     
     let qDiff = Math.abs(q - qF)
     let rDiff = Math.abs(r - rF)
     let sDiff = Math.abs(s - (-qF - rF))
     
     if (qDiff > rDiff && qDiff > sDiff):
     q = -r - s
     else if (rDiff > sDiff):
     r = -q - s
     
     return {q: q, r: r}
    
    // Function for converting grid coordinates to screen coordinates
    Function ConvertToScreenCoord(q, r):
     let x = cellSize * (Math.sqrt(3) * q + Math.sqrt(3)/2 * r)
     let y = cellSize * (3/2 * r)
     return {x: x, y: y}
    
    // Function to check if a cell is within the grid boundaries
    Function IsInGrid(q, r):
     return q >= 0 && q < gridWidth && r >= 0 && r < gridHeight
    
    // Function to get the neighbors of a cell
    Function GetNeighbors(q, r):
     let directions = [
     {q: 1, r: 0}, {q: 1, r: -1}, {q: 0, r: -1},
     {q: -1, r: 0}, {q: -1, r: 1}, {q: 0, r: 1}
     ]
     let neighbors = []
     for (let dir of directions):
     let newQ = q + dir.q
     let newR = r + dir.r
     if (IsInGrid(newQ, newR)):
     neighbors.push({q: newQ, r: newR})
     return neighbors
    
    // Function for pathfinding (A* algorithm)
    Function FindPath(startQ, startR, endQ, endR):
     let openSet = [{q: startQ, r: startR, g: 0, h: 0, f: 0, parent: null}]
     let closedSet = []
     
     while (openSet.length > 0):
     let current = openSet.reduce((min, item) => item.f < min.f ? item : min, openSet[0])
     
     if (current.q === endQ && current.r === endR):
     let path = []
     while (current):
     path.push({q: current.q, r: current.r})
     current = current.parent
     return path.reverse()
     
     openSet = openSet.filter(item => item !== current)
     closedSet.push(current)
     
     let neighbors = GetNeighbors(current.q, current.r)
     for (let neighbor of neighbors):
     if (closedSet.some(item => item.q === neighbor.q && item.r === neighbor.r)):
     continue
     
     let gScore = current.g + 1
     let isInOpenSet = openSet.some(item => item.q === neighbor.q && item.r === neighbor.r)
     
     if (!isInOpenSet || gScore < neighbor.g):
     let h = Math.abs(neighbor.q - endQ) + Math.abs(neighbor.r - endR)
     let f = gScore + h
     
     if (!isInOpenSet):
     openSet.push({q: neighbor.q, r: neighbor.r, g: gScore, h: h, f: f, parent: current})
     else:
     let existingNeighbor = openSet.find(item => item.q === neighbor.q && item.r === neighbor.r)
     existingNeighbor.g = gScore
     existingNeighbor.f = f
     existingNeighbor.parent = current
     
     return null // путь не найден
    
    // Events
    
    On start of layout:
     // Grid initialization (creating cell sprites)
     For q = 0 to gridWidth - 1:
     For r = 0 to gridHeight - 1:
     let pos = ConvertToScreenCoord(q, r)
     Create object Cell at (pos.x, pos.y)
    
    On Touch object Cell:
     let touchX = Touch.X
     let touchY = Touch.Y
     let gridCoord = ConvertToGridCoord(touchX, touchY)
     let path = FindPath(Ship.GridQ, Ship.GridR, gridCoord.q, gridCoord.r)
     
     if (path):
     Ship.PathToFollow = path
     Ship.CurrentPathIndex = 0
     System.Trigger("MoveShipAlongPath")
    
    System event: MoveShipAlongPath:
     if (Ship.CurrentPathIndex < Ship.PathToFollow.length):
     let nextCell = Ship.PathToFollow[Ship.CurrentPathIndex]
     let screenCoord = ConvertToScreenCoord(nextCell.q, nextCell.r)
     
     Ship.TweenPosition(screenCoord.x, screenCoord.y, 0.5, "ease-out-quad")
     Ship.GridQ = nextCell.q
     Ship.GridR = nextCell.r
     
     Ship.CurrentPathIndex += 1
     else:
     Ship.PathToFollow = null
     Ship.CurrentPathIndex = 0
    
    On TweenPosition completed for Ship:
     System.Trigger("MoveShipAlongPath")
    
  • True, piracy still happens, and actually, in the case of the game engine, piracy is good, it will enlarge the cover in the engine markets, and enlarge the community, which will lead to the growth of the engine at the end

    Like Windows OS, Microsoft could kill piracy very fast but it will kill the OS as well, this is why they just make problems for pirates but do not close the OS completely

    another argument about working in a browser allowing to work on the phone is also not an argument, because it is impossible to work on the phone, especially on modern phones with swipe controls

    so, this online browser app is just decreasing the popularity of the Construct

    And when you are saying that the app can work online, but it is not working online it is just a Lie to your customers

  • There is no offline support in construct 3, while we can see developers saying it is exists, it always requires an internet connection.

    Is it possible to resolve?

    I understand Skirra is living in 3024 year where the internet is 24/7 all over the globe, but in 2024 still a lot of cases when we can't always be online, don't we deserve an always working app?

  • Also you might be the first person to ever mention it

    this is another reason why sometimes I want to leave Construct

    When you see some very unsuccessful UI/UX workflows in some engine, and it is do not bother anybody, it means that nobody really works deeply with the engine, which is a sign of a dead engine.

    Ok with this blue overlay, I found many workarounds on how to pass it, it is hard and annoying, but possible

    But when I see something more weird UX solution that you can't pass in any way, like changing the scale of the sprite in the editor after you change the image order in this sprite, it works like this for years but nobody cares in the community, it is so frustrating

  • you can disable it with alt, which can be handy when you want to color pick into the selected instance. (there is also a "bug", which lets you keep that state, hold alt while going into the color picker, then it stays like that)

    Great workaround

    Sadly it doesn't work with the tiles

    Color distortion there sometimes makes work harder

  • Don't know what the idea was to make a blue overlay for selected objects in the editor, but it is not a good idea

    Especially when you are working with colors, this overlay spoils the working experience

    Probably it is good for some newby devs, like schoolers, who learned to make games

    But not for pro users

    I can say more, it is one of the the fundamental things that will not allow construct to become a professional editor, a small thing with a big negative impact

    And will be a good idea to disable this overlay somewhere in the settings

  • I want to make my own shortcuts, like switching between tile and layer panels, The current shortcut "ctrl + shift + ->" is too complex and useless, so, may be we can edit the shortcuts with our own preferences

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tried to scroll the camera on the scene with a scale 0.6 but the camera motion is not smooth in this case, can you advice how to resolve it?

    lerp doesn't help

  • they are happen after each click on the screen, even in the empty scene

  • This message is not tracking real work

    For example

    the construct is working in background (I am resting actually) and when I return to work, getting this message that I need to rest, it just bothers me

  • Yeah, it is working very strangely.

  • Are there any plans to change auto tiling?

    something like this youtu.be/IS_RIdYZa9M

    current auto tiling is so limited, complex but not effective

1mrpaul1's avatar

1mrpaul1

Member since 21 Feb, 2018

Twitter
1mrpaul1 has 5 followers

Trophy Case

  • 6-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

12/44
How to earn trophies