Giter Site home page Giter Site logo

sanforgestudio / luanodeeditor Goto Github PK

View Code? Open in Web Editor NEW
49.0 3.0 6.0 9.45 MB

A powerful and simple Lua Visual Node IDE Tool for game engines, mods and software.

Home Page: https://www.lua-node-editor.com/

License: GNU General Public License v3.0

Python 99.88% Batchfile 0.12%
ide lua node-editor tool visualprogramming

luanodeeditor's People

Contributors

gertsyntax avatar mealam1 avatar sanderkofficial avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

luanodeeditor's Issues

Startup Splash

A splashscreen to promote and load the application for few seconds.

Cannot save or load when using While Loop Node

Found a bug that the .lvs wont open or save with the While Loop Node

Issue:

  • While Loop changes to the For Loop when opening the file

Results:

All the attached nodes will be removed because the node changes.

A-Star Support

Adding A*(A-Star) Alghoritm support. For much deeper complex code.

We need a solution to make this easier to implement within our nodes or graphs.

Sample of an A* in usage within Lua.

-- Define a graph (adjacency list)
local graph = {
    A = {B = 1, C = 4},
    B = {A = 1, D = 5},
    C = {A = 4, D = 1},
    D = {B = 5, C = 1}
}

-- Heuristic function (example: Euclidean distance)
local heuristic = {
    A = 5,
    B = 3,
    C = 2,
    D = 0
}

-- A* Algorithm
function astar(start, goal)
    local openSet = {start}
    local cameFrom = {}
    local gScore = { [start] = 0 }
    local fScore = { [start] = heuristic[start] }

    while #openSet > 0 do
        local current = getLowestFScoreNode(openSet, fScore)
        if current == goal then
            return reconstructPath(cameFrom, current)
        end

        table.remove(openSet, findIndex(openSet, current))

        for neighbor, cost in pairs(graph[current]) do
            local tentativeGScore = gScore[current] + cost
            if not gScore[neighbor] or tentativeGScore < gScore[neighbor] then
                cameFrom[neighbor] = current
                gScore[neighbor] = tentativeGScore
                fScore[neighbor] = gScore[neighbor] + heuristic[neighbor]

                if not contains(openSet, neighbor) then
                    table.insert(openSet, neighbor)
                end
            end
        end
    end

    return nil  -- No path found
end

-- Helper functions
function getLowestFScoreNode(set, scores)
    local lowestScore = math.huge
    local lowestNode
    for _, node in ipairs(set) do
        local score = scores[node]
        if score < lowestScore then
            lowestScore = score
            lowestNode = node
        end
    end
    return lowestNode
end

function findIndex(array, value)
    for i, v in ipairs(array) do
        if v == value then
            return i
        end
    end
    return nil
end

function contains(array, value)
    for _, v in ipairs(array) do
        if v == value then
            return true
        end
    end
    return false
end

function reconstructPath(cameFrom, current)
    local path = {current}
    while cameFrom[current] do
        current = cameFrom[current]
        table.insert(path, 1, current)
    end
    return path
end

-- Example usage
local path = astar("A", "D")
print("Path:", table.concat(path, " -> "))

Hardware Profiler

Add a hardware profiler to check hardware performance on the application.

OOP Support

Adding a way to support object oriented programming.

Break Node

What feature do you want to request?

I wanna include a Break node so we can break loops.

Use Case

Usage for breaking loops.

More information

No response

Comment Node

Add a node that allows to insert comments to the code.

Add Modulus Node (%)

What feature do you want to request?

Using Modulus(%) operations like divide or multiply

Use Case

The modulus operator (%) in programming returns the remainder of a division operation.

More information

No response

Integrated Lua Debugger & Compiler

A must have feature to integrate a internal Lua Debugger / Compiler for running code directly in the program.

  • Connect to cusom console log
  • Need to set the print node to add result to console log aswell.

Nodes for (for, while, repeat, until, do)

What feature do you want to request?

Nodes for the operations: for, while, repeat, until, do

Use Case

more variation and needed for deeper code.

More information

N/A

Undo, Copy, Paste

Copy, Paste and undo with the nodes while in the grid, aswell as applying keybinds to them.

Logical NOT Node

What feature do you want to request?

Implement a logical NOT as a node to the node editor.

Use Case

can be used for example like:

local negatedValue = not value

More information

N/A

Click to open on windows desktop

Add a feature that allows the lua node editor to execute by right click on Windows Desktop to show:

"Open with lua node editor"

Include XOR Operator

A way to add XOR?

exclusive OR

Wikipedia link here

Sample of Lua code to demonstrate usage of XOR

local A = true
local B = false

local result = A ~ B

print(result) -- Result is True

In Lua, the bitwise XOR operator is represented by the ~ symbol.

Collapsable Function Node

What feature do you want to request?

Make it so that the function is being drawn to a diffirent graph so it can save optimization.

Use Case

Can be usefull for more complext and deep logic using nodes.

More information

No response

Adding blocks like Scratch?

An idea to create additional blocks like Scratch? To combine with Nodes. Not sure if we can manage it but it is a nice idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.