Coder Social home page Coder Social logo

node-sdl's People

Contributors

creationix avatar joshmarinacci avatar ohmeadhbh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

okwh

node-sdl's Issues

Better type checking in C++

Actually check the types of arguments passed in to the wrapping functions around SDL functions. Currently almost all functions only check argument length, but don't verify that the correct types are received. This is particularly bad when a custom type is expected, and that type is not received. (generally causes segfaults)

Ensure events are fully wrapped

I don't believe I finished wrapping all SDL2 events when I was doing some refactoring. Need to make sure that everything is fully wrapped.

window.getDisplayMode breaks Renderer

In the test.js example code, if you uncomment the window.getDisplayMode line in engine.js, all Entities are rendered in the very top left of the window. Nothing can move during the tick phase, no locations are preserved. I have no idea why this is happening. As far as I know, I'm using the API correctly to get the SDL_DisplayMode.

Window garbage collected too "early"

In a simple test game I'm writing, I used setTimeout to get an infinite loop going with a "ticker" function that would run 60 times per second. However, due to the fact that I did not have any references to the window inside of the function that was constantly being run, node decided that the "var window = ..." bit I had farther up in the code was no longer valid and would soon garbage collect it, causing the window to be destroyed.

While this is technically not a bug, a workaround to this is desirable, so that everybody who decides to write code using setTimeout (or whatever gets provided in the SDL wrapper) does not have to have some hacky fix such as "var mywindow = window" inside of their ticker function.

Hitches when calling render.Present()

For some unknown reason, occasionally, when calling render.Present, it will take a very long time to complete. Normally this should take anywhere from under a second, to about 16ms (a 60hz monitor refresh flip, when vsync is enabled). However, every couple seconds, it seems to take 20-30ms several times in a row, causing a very noticeable visual hitch in rendering. The rest of the time it runs smoothly.

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.