zacharycarter / zengine

2D | 3D Game development library
157 stars 13 forks source link

Wasm #50

Closed zacharycarter closed 6 years ago

define-private-public commented 6 years ago

Do you want me to do a review of this?

zacharycarter commented 6 years ago

That would be great if you wouldn't mind.

define-private-public commented 6 years ago

Sure, I can look through it when I get home. Can you assign it to me? I haven't played around with Web Assembly yet. Where can I get started so I can run the stuff.

Also, do you think it we be possible to give me some issue tracker privileges? All I can do at the moment is open, comment, and close issues. I'd like to be able to do things such as tag tickets, set milestones, and other things.

zacharycarter commented 6 years ago

Sure I can do that - do you think you could hop into gitter / IRC tonight? I want to discuss a few things with you regarding the timer module too.

I think we should drop the TImer object and just have the module expose the functions that are there and move the vars under the timer object to globals. I don't see much point in having a timer object and I think it's going to be problematic.

I'm writing network code now where I want to be able to access the engine's time globally in a callback method and I can't do it. Do you see any benefits to having an object? I think if it's modular like the rest of the engine, it's more beneficial and more easily accessible.

Sorry for the hijack.

define-private-public commented 6 years ago

Can you put the thing about the Timer module in a separate ticket?

define-private-public commented 6 years ago

Okay, I haven't looked too much into emscripten and GLSL stuff, but it looks like the best supported version is actually OpenGL ES 2.0/3.0

http://kripken.github.io/emscripten-site/docs/porting/multimedia_and_graphics/OpenGL-support.html

Maybe instead of using Desktop GLSL, we should be using the ES version. That would also give us a boost when it comes to try running zengine on mobile. Many desktop graphics cards support ES anyways. It's just more portable.

define-private-public commented 6 years ago

I'll take another look at this later. Are we set on having one global Timer object?

zacharycarter commented 6 years ago

Yeah we are - I added the changes into this PR.

It supports the WebGL friendly subset of OpenGL ES 2 - meaning we can get away with using the OpenGL bindings. Regardless, webgl 1 requires 100 level shaders.

define-private-public commented 6 years ago

I'll let your pull the trigger to merge.