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

Ethosa 90a8cdc8e7 fix gh-pages actions 3 vuotta sitten
.github 5b1b0fbc8b Merge pull request #12 from jiro4989/chore/remove-choosenim-cache 4 vuotta sitten
engine 492b15dc4f :eyes: update engine folder o.o 3 vuotta sitten
examples c407543f50 update helloworld example lol :japanese_goblin: 3 vuotta sitten
screenshots 371453ec7d add screenshots folder. 4 vuotta sitten
src 90a8cdc8e7 fix gh-pages actions 3 vuotta sitten
tests e91e9f6967 add AnimationPlayer :japanese_goblin: 3 vuotta sitten
.gitignore 609d9f42f4 add CollisionShape2D and debug mode. 4 vuotta sitten
CODE_OF_CONDUCT.md 621e4f41ee Create CODE_OF_CONDUCT.md 5 vuotta sitten
LICENSE eb23f4d1f3 Initial commit 5 vuotta sitten
README.md e91e9f6967 add AnimationPlayer :japanese_goblin: 3 vuotta sitten
nodesnim.nimble 7fd2ff9b2a global update! :eyes: 4 vuotta sitten

README.md

Nodesnim

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

Open Source Love Nim language-plastic License time tracker test

Latest version - 0.0.4

Stable version - 0.0.3

Draft of the best version.

Install

  1. Install this repo
    • nimble install nodesnim or nimble install https://github.com/Ethosa/nodesnim.git
  2. Install dependencies
    • Linux (tested on Ubuntu and Mint):
      • sudo apt install -y freeglut3 freeglut3-dev
      • sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
    • Windows / MacOS:

Features

  • Godot-like node system.
  • Build nodes with YML-like syntax.
  • Simple usage ```nim import nodesnim

Window("Hello, world!")

build:

- Scene scene:
  name: "Main"
  - Label hello:
    call setSizeAnchor(1, 1)
    call setTextAlign(0.5, 0.5, 0.5, 0.5)
    call setText("Hello, world!")
    background_color: 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 | |:--: |:--: |:--: | :--: |:--: | |Anchor |Node |Control |Node2D |Node3D | |Color |Canvas |ColorRect |Sprite |GeometryInstance| |ColorText|Scene |TextureRect |AnimatedSprite | | |Enums |AudioStreamPlayer|Label |YSort | | |Exceptions|AnimationPlayer|Button |CollisionShape2D| | |Image | |EditText |Camera2D | | |Input | |RichLabel | | | |Rect2 | |RichEditText | | | |Vector2 | |Box | | | |Circle2 | |HBox | | | |Polygon2| |VBox | | | |AudioStream| |GridBox | | | |Animation | |Scroll | | | |Vector3 | |ProgressBar | | | |SceneBuilder| |Slider | | | | | |VSlider | | | | | |Popup | | | | | |TextureButton | | | | | |TextureProgressBar| | | | | |Counter | | | | | |Switch | | | | | |SubWindow | | | | | |LineEdit | | |

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 (or compile with -d:static_sdl2 -> tested on Windows)

  • 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

F.A.Q

Q: Where can I see examples?
A: You can see this in the tests or examples folder.

Q: Where can I read the docs?
A: You can read docs here