Code Monkey home page Code Monkey logo

nimgame2's People

Contributors

clyybber avatar codedoes avatar freevryheid avatar gulpf avatar metagn avatar narimiran avatar vanyle avatar vladar4 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  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  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  avatar  avatar  avatar  avatar

Watchers

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

nimgame2's Issues

Demo1 leaks memory?

I noticed huge memory usage spikes in demo1 on my 1GB Odroid (ARM Linux) leading to minute long freezes so I decided to investigate.

Having been built with -fsanitize=address, the demo1 binary aborts on startup. Could you comment on this failure? Not sure if this method of debugging is supposed to work for nim OTB.

If the initial error is spurious, how do I find out the cause of the spikes? Valgrind is too heavy for this machine.

$ LD_PRELOAD=/usr/gcc7/lib/libasan.so.4  ./demo1

LIBGL: Initialising gl4es
LIBGL: v0.9.5 built on Mar 11 2017 14:08:47
LIBGL:loaded: libGLESv1_CM.so
LIBGL:loaded: libEGL.so
LIBGL: Extension GL_OES_point_sprite detected and used
LIBGL: Extension GL_OES_point_size_array detected
LIBGL: Extension GL_OES_framebuffer_object detected and used
LIBGL: Extension GL_OES_packed_depth_stencil detected and used
LIBGL: Extension GL_OES_depth24 detected and used
LIBGL: Extension GL_OES_rgb8_rgba8 detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888 detected and used
LIBGL: Extension GL_OES_depth_texture detected and used
LIBGL: Extension GL_OES_texture_cube_map detected and used
LIBGL: Max texture size: 4096
LIBGL: Texture Units: 8, Max lights: 8
LIBGL: Implementation Read is GL_RGB/GL_UNSIGNED_SHORT_5_6_5
LIBGL: Current folder is:../demos/demo1
glXGetProcAddress: glXGetSwapIntervalMESA not found.
glXGetProcAddress: glXGetSwapIntervalMESA not found.
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
LIBGL: warning, gles_glBlendFuncSeparate is NULL
LIBGL: warning, gles_glBlendFuncSeparate is NULL
=================================================================
==4161==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbef6d788 at pc 0x0002a87c bp 0xbef6d53c sp 0xbef6d534
READ of size 4 at 0xbef6d788 thread T0
    #0 0x2a87b in markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q ../demos/demo1/nimcache/stdlib_system.c:2328
    #1 0x30dbf in collectCTBody_zoTIuavlrCHyw3B8MBaLJA_2 ../demos/demo1/nimcache/stdlib_system.c:2718
    #2 0x3ff8b in collectCT_zoTIuavlrCHyw3B8MBaLJA ../demos/demo1/nimcache/stdlib_system.c:2786
    #3 0x3ff8b in rawNewObj_QBPo5VW2O56Eeh8hPbQ7Pg ../demos/demo1/nimcache/stdlib_system.c:2881
    #4 0x3ff8b in newObj ../demos/demo1/nimcache/stdlib_system.c:2952
    #5 0x3ff8b in rawNewString ../demos/demo1/nimcache/stdlib_system.c:3785
    #6 0x3ff8b in nimIntToStr ../demos/demo1/nimcache/stdlib_system.c:3891
    #7 0x4408b in run_E9cSjWeb4G6NszYRcpo6sLA ../demos/demo1/nimcache/nimgame2_nimgame.c:1216
    #8 0x10b2b in NimMain ../demos/demo1/nimcache/nimgame2_demo1.c:2228
    #9 0x9b3b in main ../demos/demo1/nimcache/nimgame2_demo1.c:2235
    #10 0xb686766f in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1766f)

Address 0xbef6d788 is located in stack of thread T0 at offset 424 in frame
    #0 0x28afb in markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q ../demos/demo1/nimcache/stdlib_system.c:2303

  This frame has 1 object(s):
    [32, 424) 'registers' <== Memory access at offset 424 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ../demos/demo1/nimcache/stdlib_system.c:2328 in markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q
Shadow bytes around the buggy address:
  0x37dedaa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37dedab0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x37dedac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37dedad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37dedae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x37dedaf0: 00[f2]f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00
  0x37dedb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37dedb10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37dedb20: f1 f1 f1 f1 04 f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2
  0x37dedb30: f2 f2 f2 f2 04 f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2
  0x37dedb40: f2 f2 f2 f2 04 f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==4161==ABORTING

Compiled with nim git hash: 42e54e55273bc2b8cbba062644f64c18f25fba13 using the following command line:

nim c -d:release --opt:speed --passC:-fsanitize=address --passC:-g --passL:-lasan demo1.nim

input.nim error when compiling any demo

Hi,

This error appears when trying to compile any of the demos:

...\.nimble\pkgs\nimgame2-#devel\nimgame2\input.nim(403, 16) Error: type mismatch: got <seq[Joystick], nil>
but expected one of:
proc `==`[T](x, y: seq[T]): bool
  first type mismatch at position: 2
  required type: seq[T]
  but expression 'nil' is of type: nil

expression: joysticks == nil

Seems like a error introduced by a newer Nim version. I'm using Nim 0.18.1 that was compiled today.

Compile options

Hi there!

I see a recommendation for this kind of compilation command-line:

-d:release --opt:speed

But doesn't -d:release automatically mean --opt:speed? The speed option seems redundant.

Compiler warnings.

Installing with Nimble gives some compilation warnings.

See below:

$ nim -v

Nim Compiler Version 0.16.0 (2017-01-08) [Linux: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf

git hash: 5947403e84ba44397b35f93f9d327c76e794210f
active boot switches: -d:release

$ trash ~/.nimble/

$ nimble update

Downloading Official package list
    Success Package list downloaded.

$ nimble install nimgame2

Downloading Official package list
    Success Package list downloaded.
david@david:/tmp$ nimble install nimgame2
Downloading https://github.com/Vladar4/nimgame2 using git
   Warning: File 'mainscene.nim' inside package 'nimgame2' is outside of the permitted namespace, should be inside a directory named 'nimgame2' but is in a directory named 'demos/demo4' instead. This will be an error in the future.
      Hint: Rename the directory to 'nimgame2' or prevent its installation by adding `skipDirs = @["demos/demo4"]` to the .nimble file.
  Verifying dependencies for [email protected]
 Installing sdl2_nim@any version
Downloading https://github.com/Vladar4/sdl2_nim using git
   Warning: File 'sdl_gfx_primitives.nim' inside package 'sdl2_nim' is outside of the permitted namespace, should be inside a directory named 'sdl2_nim' but is in a directory named 'sdl2' instead. This will be an error in the future.
      Hint: Rename the directory to 'sdl2_nim' or prevent its installation by adding `skipDirs = @["sdl2"]` to the .nimble file.
  Verifying dependencies for [email protected]
 Installing [email protected]
   Success: sdl2_nim installed successfully.
 Installing [email protected]
   Success: nimgame2 installed successfully.

Unable to compile demos if library installed with "nimble install nimgame2"

Get a compile error if we first install nimgame2 with nimble, and then do a git clone and attempt to run examples.

$ nimble update

$ nimble install nimgame2

$ git clone https://github.com/Vladar4/nimgame2

$ cd nimgame2/demos/demo1

$ nim c -r demo1
...
demo1.nim(2, 11) Error: cannot open 'nimgame2/nimgame'

This succeeds, however:

$ trash ~/.nimble

$ nimble update

$ git clone https://github.com/Vladar4/nimgame2

$ cd nimgame2

$ nimble install

$ cd demos/demo1

$ nim -c demo1.nim

How does ng2 handles sprite batching?

Sprite batching and camera occlusion are probably the 2 most important performance aspects of 2d games IMO. How does ng2 handles batching?
Is the batching done automatically ?

nimble file should avoid @#head versions

See c-blake/hldiff#1 (comment) & subsequent.

Your requires sdl2_nim@#head seems to have been put in place and just stuck there since January 2017. 32f7b03e4001885346127b5e7e5d3deaedb2f834 seems to be the appropriate sdl2_nim git hash if you want that version, or else some release since then would likely be better.

Better camera control

I started working on top-down driving game similar to the GTA 1 & 2 and Retro City Rampage DX, and I hit a bit of a road block with trying to make the camera follow the player's vehicle.

I checked out Demo 15, and while it does mostly do the job but it seems rather hacky and not very optimal.
I would like to have the camera entity built into the scene and to just be able to set the position of the camera to the position of the player entity.

Compile error in devel branch

This short example:

import nimgame2/texturegraphic

...fails to compile with this error message:

/home/jjp/.nimble/pkgs/nimgame2-#devel/nimgame2/utils.nim(193, 14) template/generic instantiation of `bytesPerPixel` from here
/home/jjp/.nimble/pkgs/sdl2_nim-#head/sdl2/private/pixels.nim(137, 18) Error: type mismatch: got <uint32> but expected 'int literal(2)'

Occurs on Nim 1.0.4 as well as the devel compiler. I don't really understand the error...

Type error after upgraded to nim v0.20.0

After upgrading nim to v0.20.0 got the following when compiling:

Hint: used config file '/Users/stii/.choosenim/toolchains/nim-0.20.0/config/nim.cfg' [Conf]           
Hint: system [Processing]                          
Hint: widestrs [Processing]                        
Hint: io [Processing]                              
Hint: bounce [Processing]                          
Hint: nimgame [Processing]                         
Hint: math [Processing]                            
Hint: bitops [Processing]                          
Hint: macros [Processing]                          
Hint: parseutils [Processing]                      
Hint: random [Processing]                          
Hint: algorithm [Processing]                       
Hint: times [Processing]                           
Hint: strutils [Processing]                        
Hint: unicode [Processing]                         
Hint: options [Processing]                         
Hint: typetraits [Processing]                      
Hint: posix [Processing]                           
Hint: sdl [Processing]                             
Hint: sdl_image [Processing]                       
Hint: sdl_ttf [Processing]                         
Hint: sdl_mixer [Processing]                       
Hint: audio [Processing]                           
Hint: types [Processing]                           
Hint: utils [Processing]                           
Hint: texturegraphic [Processing]                  
Hint: graphic [Processing]                         
Hint: settings [Processing]                        
Hint: parsecsv [Processing]                        
Hint: lexbase [Processing]                         
Hint: streams [Processing]                         
Hint: indexedimage [Processing]                    
/Users/stii/.nimble/pkgs/nimgame2-0.6.0/nimgame2/audio.nim(221, 21) Error: type mismatch: got <Channel, Distance>                                                                                           
but expected one of:                               
proc setDistance(channel: cint; distance: uint8): cint                                                
  first type mismatch at position: 2               
  required type: uint8                             
  but expression 'distance' is of type: Distance   

expression: mix.setDistance(channel, distance) 

It used to compile perfectly with nim v0.19.6, but I think with the stricter compile time checks for integer conversions broke it.

Doesn't compile with latest Debian version

Required SDL2 TTF version for this lib is 2.0.14.

This is also where a required symbol for demo1 was added: TTF_GetFontKerningSizeGlyphs:

https://www.libsdl.org/projects/SDL_ttf/

However, the latest Debian version ships with SDL2 TTF lib version 2.0.12.

This makes it a lot harder to play with demo1:

$ ./demo1 

could not import: TTF_GetFontKerningSizeGlyphs

Also, the SDL2 ttf page says this for linux distros:

"Please contact your distribution maintainer for updates."

Could you perhaps please also include in your docs, a basic howto on how to compile nimgame2 (eg on misc linux distros) against a new enough version of SDL2?

GuiWidget actions doesn't respond to mouse clicks

GuiWidget doesn't respond to mouse clicks.

I've done the Platformer tutorial. It works perfectly but the actions assigned to Menu buttons aren't being called.

Nim Compiler Version 0.20.2 [Windows: amd64]
Compiled at 2019-07-17
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: 88a0edba4b1a3d535b54336fd589746add54e937
active boot switches: -d:release

Nimsuggest does not work

When importing the nimgame2 functions, nimsuggest does not work.
I go it to work by changing the following:

Inside the .nimble file, I added a name field:

# Package
name = "nimgame2"
version = "0.6.2"
author = "Vladar"
description = "A simple 2D game engine for Nim language."
license = "MIT"

Inside the root directory, I created a nimgame2 file that exports all the symbols of the library so that only one import is needed to use the library:

import
    nimgame2/nimgame,
    nimgame2/draw,
    nimgame2/entity,
    nimgame2/settings,
    nimgame2/scene,
    nimgame2/utils,
    nimgame2/graphic,
    nimgame2/texturegraphic,
    nimgame2/types,
    nimgame2/input

export nimgame,draw,entity,settings,scene,utils,graphic,texturegraphic,types,input
# More imports / exports are needed here ...

[question] Possible project that might rely on nimgame2

In May, I'm considering writing a utility that would convert Scratch games to Nim. Essentially, I'd be writing a program that takes apart the .sb3 file and generates a directory that contains a complete nim project in a directory ready for cross-compilation.

As part of that, I'd need to choose a 2D game engine to target. This one seems fairly active and a reasonable target. But, before I choose it, a few key questions:

  1. This engine uses the sdl2_nim library that in theory can be used for generating code for Linux, Windows 10, MacOS, Android, and iOS. But in practice, does this fully work?

  2. What is the ideal Nim compiler version to use. Specifically is 1.2 okay or is it better to specify an earlier version?

Certain graphical elements update at very low rates unless application window move is in progress

This is hard to explain, so I've made a couple of short screencasts here and here to demonstrate what I mean. Essentially, certain elements (entities?) update much, much slower than expected (based on the framerate, etc). Even stranger, moving the application window causes the update rate of these elements to increase significantly.

Happy to provide details of my system, or do any testing you might require, if it'll help!

Bounce game not compiling

Hey there, I was just now following the tutorial for the Bounce game, and right at the starting fase (when it should compile and run as a blank window), it gives me this error:

C:\Users\...\.nimble\pkgs\nimgame2-0.5.0\nimgame2\input.nim(413, 18) Error: type mismatch: got <array[0..254, int], int, int literal(0)>
but expected one of: 
proc `[]=`[T, U](s: var string; x: HSlice[T, U]; b: string)
proc `[]=`[I: Ordinal; T, S](a: T; i: I; x: S)
proc `[]=`[Idx, T, U, V](a: var array[Idx, T]; x: HSlice[U, V]; b: openArray[T])
proc `[]=`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex; x: T)
proc `[]=`(s: var string; i: BackwardsIndex; x: char)
proc `[]=`[T](s: var openArray[T]; i: BackwardsIndex; x: T)
proc `[]=`[T, U, V](s: var seq[T]; x: HSlice[U, V]; b: openArray[T])

expression: []=(j.pressed, i, 0)

I copied and pasted the code from the site, just to be sure, and it still gives me the same error. I also downloaded the entire source for the game and it didn't compile due to this same issue.

I'm can't be sure if this is something wrong with nimgame2 or with my own installation, as I'm not too good with these things. But I was thinking it might be related to ng2 not having yet caught on to Nim 0.18.

Composing TextGraphic

I am trying to compose two TextGraphics, so I can create text that has a shadow, which makes for better visibility.

What can I do? I am not finding a way to do this; also, in general, how do you compose two Graphic objects?

Compile error during tutorial 1

I'm using the latest dev version of Nim

Followed this tut:

https://vladar4.github.io/nimgame2/tut101_bounce.html

But get stuck at this section:

When we run our "build.debug.sh" script, we should get an executalbe "ng2bounce" that just shows a black screen and outputs a "Switched to MainScene" message to the console when any keyboard key is pressed.

I get this error instead, when I run ./build.debug.sh:

/home/david/.nimble/pkgs/nimgame2-#head/nimgame2/input.nim(413, 18) Error: type mismatch: got (array[0..254, int], int, int literal(0))
but expected one of: 
proc `[]=`[T, U](s: var string; x: HSlice[T, U]; b: string)
proc `[]=`[I: Ordinal; T, S](a: T; i: I; x: S)
proc `[]=`[Idx, T, U, V](a: var array[Idx, T]; x: HSlice[U, V]; b: openArray[T])
proc `[]=`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex; x: T)
proc `[]=`(s: var string; i: BackwardsIndex; x: char)
proc `[]=`[T](s: var openArray[T]; i: BackwardsIndex; x: T)
proc `[]=`[T, U, V](s: var seq[T]; x: HSlice[U, V]; b: openArray[T])

Error with 'sdl.HatPosition' while compiling demos

On Windows 10 64-bit, got all the SDL runtime libs and nimgame2 0.4.0.

Getting the following error while running any of the demos during compilation.
PS C:\Users\rskar\stack\dev\gamedev\nimgame2-master\demos\demo1> nim c -r .\demo1.nim Hint: used config file 'C:\Nim\config\nim.cfg' [Conf] Hint: system [Processing] Hint: demo1 [Processing] Hint: nimgame [Processing] Hint: math [Processing] Hint: parseutils [Processing] Hint: random [Processing] Hint: times [Processing] Hint: strutils [Processing] Hint: algorithm [Processing] Hint: winlean [Processing] Hint: dynlib [Processing] Hint: sdl [Processing] Hint: sdl_image [Processing] Hint: sdl_ttf [Processing] Hint: sdl_mixer [Processing] Hint: audio [Processing] Hint: types [Processing] Hint: settings [Processing] Hint: utils [Processing] Hint: parsecsv [Processing] Hint: lexbase [Processing] Hint: streams [Processing] Hint: texturegraphic [Processing] Hint: graphic [Processing] Hint: indexedimage [Processing] Hint: count [Processing] Hint: draw [Processing] Hint: sdl_gfx_primitives [Processing] Hint: sdl_gfx_primitives_font [Processing] Hint: input [Processing] C:\Users\rskar\.nimble\pkgs\nimgame2-0.4.0\nimgame2\input.nim(315, 24) Error: cannot export: sdl.HatPosition

Type mismatch on joystick procs in input.nim

On windows10 x64 having a problem which can be temporarily solved by commenting out the access to the sequence. It stops the compilation process but I didn't need joystick support!

This is where the first error starts:

nimgame2/nimgame2/input.nim

Lines 403 to 414 in 67fe6fb

proc initJoysticks*() =
## Init the ``joysticks`` sequence.
##
## Called automatically from the main game cycle.
##
if joysticks == nil:
joysticks = @[]
else:
for j in joysticks.opened:
for i in 0..<j.numButtons:
j.pressed[i] = 0
j.released[i] = 0

2 others(same error message) occured on line: 507 and 530
This is the error message:
C:\Users\rskar\.nimble\pkgs\nimgame2-#head\nimgame2\input.nim(507, 21) Error: type mismatch: got (array[0..254, int], int) but expected one of: proc [][I: Ordinal; T](a: T; i: I): T proc [][T](s: openArray[T]; i: BackwardsIndex): T proc [][T, U](s: string; x: HSlice[T, U]): string proc [][Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T proc [][Idx, T, U, V](a: array[Idx, T]; x: HSlice[U, V]): seq[T] proc [][Idx, T](a: array[Idx, T]; i: BackwardsIndex): T proc [][T](s: var openArray[T]; i: BackwardsIndex): var T proc [][T, U, V](s: openArray[T]; x: HSlice[U, V]): seq[T] proc [](s: string; i: BackwardsIndex): char template []`[Idx; T](a: array[Idx, T]; x: Scancode): T

expression: [](j.pressed, button)`

[question] I am toying with the idea of making a Spry integration

Hi!
I am tinkering with a Spry (sprylang.se) integration of Nimgame2 (awesome work btw) for live coding games. One target I think would be fun is the RG350 handheld. I have built and run Spry on it, I am failing with Nimgame2 so far due to old SDL2. Been trying to static link ng2asteroids, and succeeded for the RG350 (!), but it segfaults on startup. It turns out it segfaults on my Ubuntu laptop too. Have you gotten static linking to work? Are you on discord?

sincerely Göran

Demo compilation error

Hi,

Specs:

  • Windows 10 x64
  • Nim: Devel -> Nim Compiler Version 1.5.1 [Windows: amd64]

Compiling any demo gives:

.../.nimble\pkgs\nimgame2-0.6.1\nimgame2\utils.nim(169, 27) Error: type mismatch: got <ptr RWops, ptr char, int, int literal(1000)>
but expected one of:
proc rwRead(context: ptr RWops; p: pointer; size: csize_t; maxnum: csize_t): csize_t
  first type mismatch at position: 3
  required type for size: csize_t
  but expression '1' is of type: int

expression: rwRead(src, addr(result[r]), 1, 1000)

Update required version of SDL_Image to 2.0.2

Tried to compile and run the demo1 files but I got the runtime error could not import: IMG_isSVG which is from SDL_Image. SVG features were added in SDL_Image 2.0.2, but the README lists 2.0.1 as the required version.

Failure in mixer init

Hi there.

On my system, with the first tut, I get this error:

CRITICAL: Can't initialize SDL_mixer: OGG support not available

I'm on Debian (sid), and I do have ogg libs (libogg-dev pkg) installed.

Any idea how to diagnose this?

Also, trying to bypass the ogg failure, over in the first tut, adding "mixerFlags=0" like this:

if game.init(GameWidth, GameHeight, title = GameTitle, integerScale = true, mixerFlags=0):

The first tut fails like this

CRITICAL: Can't initialize SDL_mixer: Failed loading udev_device_get_action: /usr/lib/x86_64-linux-gnu/libSDL2.so: undefined symbol: _udev_device_get_action

Main way I can get game.init to work, is to comment out the one section in nimgame.nim, like this:

  # # Init SDL_mixer
  # if mix.init(mixerFlags) == 0:
  #   sdl.logCritical(
  #     sdl.LogCategoryError, "Can't initialize SDL_mixer: %s", mix.getError())
  #   return false

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.