SkillAgentSearch skills...

Nodesnim

The Nim GUI/2D framework, based on OpenGL and SDL2.

Install / Use

/learn @Ethosa/Nodesnim

README

<div align="center"> <img src="https://github.com/Ethosa/nodesnim/blob/nightly/icon.svg" width="240">

The Nim GUI/2D framework based on OpenGL and SDL2.

Open Source Love Nim language-plastic License time tracker test

channel icon channel icon

<h4>Stable version - 0.4.2</h4> </div>

Install

  1. Install Nodesnim
    • Stable:
      nimble install nodesnim@#master
      
    • Nightly:
      nimble install nodesnim@#nightly
      
  2. Install dependencies
    • Linux (tested on Ubuntu and Mint):
      • sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
    • Windows / MacOS:

Features

  • Godot-like node system.
  • Runtime scene loader.
  • Powerful node build system using YML-like syntax.
  • Stylesheets (CSS-like).
  • Android-like drawables.
  • Customizable GUI themes.
  • Simple usage
    import nodesnim
    
    Window("Hello, world!")
    
    
    build:
      - Scene scene:
        - Label hello:
          call:
            setSizeAnchor(1, 1)
            setTextAlign(0.5, 0.5, 0.5, 0.5)
            setText("Hello, world!")
            setBackgroundColor(Color(31, 45, 62))
    
    addMainScene(scene)
    windowLaunch()
    
    

Now available

This section contains links to documentation for all nodes. |Core |Default nodes |Control nodes |2D Nodes |3D Nodes |Graphics | |:--: |:--: |:--: | :--: |:--: |:--: | |Anchor |[Node][] |[Control][] |[Node2D][] |[Node3D][] |[Drawable][] | |Color |[Canvas][] |[ColorRect][] |[Sprite][] |[GeometryInstance][]|[GradientDrawable][]| |Font |[Scene][] |[TextureRect][] |[AnimatedSprite][] |[Camera3D][] | | |Enums |[AudioStreamPlayer][]|[Label][] |[YSort][] |[Sprite3D][] | | |Exceptions |[AnimationPlayer][] |[Button][] |[CollisionShape2D][]| | | |Image | |[EditText][] |[Camera2D][] | | | |Input | |[Box][] |[TileMap][] | | | |Rect2 | |[HBox][] | | | | |Vector2 | |[VBox][] | | | | |Circle2 | |[GridBox][] | | | | |Polygon2 | |[Scroll][] | | | | |AudioStream | |[ProgressBar][] | | | | |Animation | |[Slider][] | | | | |Vector3 | |[Popup][] | | | | |SceneBuilder| |[TextureButton][] | | | | |StyleSheet | |[TextureProgressBar][]| | | | |TileSet | |[Counter][] | | | | |ChartData | |[Switch][] | | | | |Scripts | |[SubWindow][] | | | | |Scene loader| |[CheckBox][] | | | | | | |[ToolTip][] | | | | | | |[Chart][] | | | |

Debug mode

For use debug mode you should compile with -d:debug or --define:debug, e.g. nim c -r -d:debug main.nim.

Export

Use the Nim compiler user guide for export to the other OS. Static linking SDL2
Also use niminst tool for generate an installer

  • CrossPlatform export for Windows (tested on Windows 7 x64 and Windows 10 x64)
    • nim c -d:mingw -d:release --opt:speed --noNimblePath file.nim
    • put Runtime binaries in the folder with the program.

Screenshots

<div align="center"> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/hello_world"> <img src="https://user-images.githubusercontent.com/49402667/138453889-ea538f86-2fc4-4947-843f-ca100561b05d.png" height="220" alt="Hello world example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/calculator"> <img src="https://user-images.githubusercontent.com/49402667/138453360-6b701b6a-8695-4ace-bf9f-25d5ae8c68c2.png" height="220" alt="Calculator example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/snake"> <img src="https://user-images.githubusercontent.com/49402667/138456143-292a5b73-7a52-4d29-9769-1c8101db9f85.png" height="220" alt="Snake game example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/screensaver"> <img src="https://user-images.githubusercontent.com/49402667/138455275-3df817ae-275d-4164-afc1-92fbdbbb4a6c.png" height="220" alt="Screensaver example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/novel"> <img src="https://user-images.githubusercontent.com/49402667/138454518-376b40ba-44d0-458a-9b2b-48a5ea53ff64.png" height="220" alt="Novel game example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/roguelike"> <img src="https://user-images.githubusercontent.com/49402667/138454722-e2b2766d-29cd-412a-92d2-29393d442775.png" height="200" alt="Roguelike game example"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/sample_messenger"> <img src="https://user-images.githubusercontent.com/49402667/138455176-d38ea0b3-274d-41c6-b877-2a9be39a7b90.png" height="460" alt="sample messenger"> </a> <a href="https://github.com/Ethosa/nodesnim/tree/nightly/examples/calculator"> <img src="https://user-images.githubusercontent.com/49402667/138453719-0b4d50a9-b4a3-40c5-b017-1e0e0dd4892b.png" height="460" alt="Material Calculator example"> </a> </div> <div align="center" width="100%">

|[Wiki][]|[Examples][]|[Docs][]|[Tests][]| |--------|------------|--------|---------|

</div>

Stargazers over time

[Node

View on GitHub
GitHub Stars129
CategoryDevelopment
Updated3mo ago
Forks6

Languages

Nim

Security Score

97/100

Audited on Dec 9, 2025

No findings