Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
ScottTheIdeaGuy
@ScottTheIdeaGuy
I notice that Polygon has an angle, but it doesn't look like Masklists have one.
Matrefeytontias
@matrefeytontias
What would be the easiest way to have the Camera zoom be relative to the middle of the screen instead of the upper-left corner ?
'cause that has practically no use case, whereas zooming to the center obviously does
Matrefeytontias
@matrefeytontias
Other issue : NME doesn't set the current working directory to the binary's directory like Lime does
That's easily fixed by Sys.setCwd(haxe.io.Path.directory(Sys.programPath())) but it's pretty annoying having to do it
One downside of not doing it is that you can't run the program from another directory than its own
Matrefeytontias
@matrefeytontias
Other thing : for some reason BitmapText is uglier on NME than Lime
NME :
image.png
Lime :
image.png
This is the BitmapText sample from HaxePunk/examples
Matrefeytontias
@matrefeytontias
Other thing : camera scaling is weird with graphics that don't follow the camera at all (scrollX = scrollY = 0)
There's no way of zooming in and out without moving these around, and usually you want to keep those in place
Matrefeytontias
@matrefeytontias
Right now I'm just using 1 instead of camera.screenScale(X|Y) if scroll(X|Y) is 0 but I don't know if that's production-ready
Matrefeytontias
@matrefeytontias
Waiting on more feedback from here still :|
Ben Morris
@bendmorris
I'm not sure I want to change the camera to centered by default
in the simplest case, when you don't move the camera, it's simpler to have it at 0,0 so coordinates are 0-width and 0-height instead of -width/2 to width/2
might be simpler to add centerX and centerY properties to Camera instead
Matrefeytontias
@matrefeytontias
It's not that the camera is centered, it's just that it zooms in the middle now
Which, yes, could be understood as it being centered, but that's the only place where it acts like it
The point is that before you could only zoom on the top-left corner, which is useless
Taylor Anderson
@ttl_anderson_twitter
has anyone seen this before? it's weirding me out HaxePunk/HaxePunk#607
kro13
@kro13
hi. just ran over an issue in the latest release. haxepunk.graphics.hardware.opengl.GLUtils.checkForErros still trying to GL.getError even in release mode. this seem to slow down the performance dramatically in case when running html5 app in android webview. probably not very common case, but commenting out this part also made rendering smoother even on windows. probably this will help somebody
Matrefeytontias
@matrefeytontias
@kro13 that's a good catch
Also I was thinking we could use instanced rendering in HaxePunk. That would go a long way
Since we already have our own OpenGL rendering code, instanced rendering is possible and it's going to be an amazing improvement to the engine I'm sure
Matrefeytontias
@matrefeytontias
Since the primitive we render is always a quad (eg 2 triangles), we can use instanced rendering to render the same quad thousands of times but distorted by as many matrices as we want (rotoscaled + translated)
All that at the expense of a single draw call
I'm even pretty sure that layering could be made in such a way that it would just build the draw call in the right order for there to only be one of it
<that may not be English>
Ben Morris
@bendmorris

it's worth looking into

Since the primitive we render is always a quad (eg 2 triangles)

not necessarily - I have custom Graphics that render triangles individually

at the level of the renderer it's only concerned with triangles
Matrefeytontias
@matrefeytontias
That's true
Ben Morris
@bendmorris
I'm sure everyone has noticed, but I've been spending much less time on HaxePunk recently - currently working on this: https://github.com/kitlang/kit
Matrefeytontias
@matrefeytontias
Well, wow
Can I request write access to the HaxePunk repo in that case ? I'm already part of the organization but I always have to wait for you to merge pull requests. As you said, I don't want to have you do that if you're busy working on other things
Ben Morris
@bendmorris
sure, I wouldn't mind giving you access
I'm not completely disappearing but this way I won't block you
I would ask though that you still open PRs for larger changes - you can merge your own PR after at least a day or so if no one has any feedback, but I think it's a good practice to still put the PR up
Matrefeytontias
@matrefeytontias
Of course
I don't mean to work on my own
Ben Morris
@bendmorris
:+1: welcome to the committers, honestly I should've added you sooner
Matrefeytontias
@matrefeytontias
Haha glad to hear it
Better late than never :thumbsup: thanks !
Jarrio
@Jarrio
Hello, is there a guide or some documentation about how to introduce a new backend to haxepunk? I would like to try making a kha backend at some point soon
Ben Morris
@bendmorris
no guide or documentation, as it hasn't been done before - your best bet is to use the OpenFL/NME backends as a spec and reimplement them for Kha
Jarrio
@Jarrio
My main source of confusion is how is a backend actually selected?
If I included the library in kha, how does haxepunk know which library to use vs which to not
I don't see syntax like #if nme anywhere