freezerburn / node-sdl Goto Github PK
View Code? Open in Web Editor NEWThis project forked from creationix/node-sdl
Minimal sdl bindings for maximum fun
This project forked from creationix/node-sdl
Minimal sdl bindings for maximum fun
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.
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.
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.
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.