> Godot is probably the best 100% free game engine overall. It has 2D support
> (now with "pseudo-3d"). There are Nim bindings.
They're quite outdated unfortunately. But aren't they bindings for native
scripts, though? (Rather than direct replacement for GDScript.)
> I've had good experiences with SFML via the csfml wrapper
I'm surprised to hear that, because my experience with it hasn't been great.
Maybe it's just me being a complete noob, but I keep having to wrap the
library's procs to abstract unnecessary type castings (to and from cint, for
example)
This immediately leave the proc when across something nil
template safe(obj: typed, field: untyped): untyped =
if obj.isNil:
return
`obj`.`field`
type
MyNullObj = ref object
x: int
proc main =
var nullobj: MyNullObj
You can follow this repo:
[https://github.com/juancarlospaco/nim-new-backend](https://github.com/juancarlospaco/nim-new-backend)
template regGroup(name; types: varargs[int, getId]) =
let name = newGroup types
Run
`compiler/depends.nim` is a minimal "backend" pass, or maybe look at
`compiler/jsgen.nim` and modify it heavily. You can import the compiler as a
library and add a custom backend. It's not that complex, when you get stuck,
join our IRC channel and ask for help over there.
Did Nim ever get anything like this?
Here's an example of the two null-safe features that are baked in most modern
languages (PHP, Groovy, Kotlin...)
someVariable?.someMethod("argument") ?: "otherwise"
| ||
| |
yes I should have been more explicit. I am looking to transpile my nim code
into other languages besides C*/Java. I would want to do it in a way which I
can register my custom-backend-code-translator to compiler process instead of
embedding my code into main nim-repo. Essentially, looking to get
Hello, I have some components that are registered in storage by the template.
Each component gets a unique id that I need to use in the group filter.
template reg(t: typedesc, size = 256) =
var storage {.used.} = newStorage[t]size
var id = idComponentNext
idComponen
@mashingan was right, it was the use of the ..< , thank you!
I reported this on github.
[https://github.com/nim-lang/nimforum/issues/224](https://github.com/nim-lang/nimforum/issues/224)
Also see
[https://github.com/nim-lang/Nim/issues/4441](https://github.com/nim-lang/Nim/issues/4441)
12 matches
Mail list logo