Krol-X / toshiko

The game engine writing in Nim.

Home Page:https://ethosa.github.io/toshiko/toshiko.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toshiko

The game engine writing in Nim.

Open Source Love Nim language-plastic License time tracker
Ubuntu tests Github pages Examples

Latest version - 0.0.2
Stable version - 0.0.1

Install

  1. Install this repo
    • last stable version nimble install https://github.com/Ethosa/toshiko.git
    • specific version nimble install https://github.com/Ethosa/toshiko.git@1.2.3
  2. Install dependencies
    • Linux (tested on Ubuntu, Debian 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.
  • CSS-like stylesheets support.
  • Little dynamic type.
  • Build nodes with YML-like syntax.
  • Convert the JSON/XML files to the Scenes.
  • Global settings in the root of the project (global_settings.toshiko).

Simple usage

import toshiko

Window(title="Test window", w=720, h=480)
setStandardFont("assets/unifont.ttf", 16)  # or indicate this in `global_settings.toshiko`

var
  scene = Scene("Main")
  label = Label()

label.setText("Hello, world!")
scene.addChild(label)

addMainScene(scene)
showWindow()

Now availale

See Nodes list file.

Export

Use the Nim compiler user guide for export to the other OS.
Static linking SDL2 (or compile with -d:static_sdl2 --dynlibOverride:libSDL2)

  • 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 or use static linking.

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

Q: Can I create my own Node?
A: Yeap, you can đź‘€, follow this tutorial ^^

Copyright Ethosa 2020

About

The game engine writing in Nim.

https://ethosa.github.io/toshiko/toshiko.html

License:MIT License


Languages

Language:Nim 100.0%