Nez: free, open source 2D framework

Thanks for the reply!
I tried add the code you provided, but it didn’t change anything. If it helps, I’m already using the PointClamp samplerstate when drawing, so I think the issue just has to do with how the lighting is done in Nez, maybe.

Have you compared your code to the deferred lighting in the Nez.Samples repo? It is a good base to use as you’re starting point.

Yeah, I used the deferred lighting sample scene to get it set up in my own scene. I just tried running the sample scene as well, but it has the same issue with blurring, and there is a border of discolored pixels rendered around the edge of the screen, but it is not as visible because of the higher resolution i think? In my own project, I am use a 640x360 virtual screen size, and letting it be scaled up by the pixel perfect screen resolution.

I’m having terrible luck getting Nez’s content importers and processors recognized in the Pipeline Tool for 3.7.1625. I’m on a Mac. Any help would be awesome. :slight_smile:

With the TiledMapMover (or in general) is there any way to detect whether something is colliding with a wall or floor without moving it? For example, if you create a new entity and its position makes its Box Collider exist inside a wall, is there any way to tell?

The TiledMapMover isnt really made for just doing overlap checks. It works with movement and edge detection. the TiledMapComponent however gives you the option in the constructor to create regular Colliders for any given layer. You can then do standard collision checks with any Collider or directly with the SpatialHash via the Physics class.

I’m on a Mac and I’m having terrible luck getting Nez’s content importers and processors recognized in the Pipeline Tool that comes with the latest version of MonoGame (3.7). Any help would be awesome. :slight_smile:

For what it’s worth, if i use an older version of the pipeline tool they load correctly, but the older tool is quite buggy!

I am looking to add moving platforms to my game. Does nez currently have anything to support this? If not, does anyone have any tips or recommendations on accomplishing this? It seems I may have to edit the TiledMapMover to handle Moving Platform Entities in addition to tiles. Does this sound like the correct approach?

That’s more or less exactly how I would do it. Before calling TiledMapMover.move check for moving platform collisions. You can do that pretty easily using the normal Physics query system to fetch any overlapping platforms. If you get a hit, truncate your movement vector before passing it to the TiledMapMover.

What is the normal Physics query system? But generally what you are saying makes sense! Thanks!

The Physics class has methods for querying for Colliders. See any of the collision methods or the Mover class for examples.

Had the same issue! This is a bug in the 3.7 pipeline tool. You can download a 3.8 development build that has this fixed.

What’s a recommended way to create a level? Can I add child-elements to an entity?

A Nez Scene would be analogous to a level. You can nest Entities via their Transform as deep as you want.

1 Like

Thanks! Another question: how does the camera work? And the zoom? I can’t find relevant hints in this thread, the samples, the wiki and the source.

Edit: Nevermind, I crawled through a couple of github repositories and found it

I’m experiencing a strange behavior when adding child elements to an entity. It seems like the children don’t move to their position unless their parent has a position that is not 0,0. It might be noted that their parent is itself a child to the main entity of the scene. Is this a known issue or expected behavior? Should I try to create an example to debug this? Thanks! Edit: “Solved” it (Don’t understand why the issue was closed though)

Hey guys / gals, I’m having a weird micro lagging issue with follow camera in Nez that I can’t figure out for the life of me. It seems that there is micro lag of camera following a player each frame. Have any of you had a similar issue ?
Here’s a video:
Laggy camera
And source code:
Any help or suggestions will be greatly appreciated!

Yeah I’ve got that or a similar kind of stutter in my project too? Enabling debug rendering shows why, I think.

@prime31 Furthermore, I’ve wrote a little xml level loader (with a filesystemwatcher that automatically removes the level and it’s chrildren from the scene when the file gets changed) because placing objects by hand kept annoying me and restarting all the time was time consuming. Now I’ve got problems controlling the render order back to front / z-coordinate / render layer. How can I control this? Thanks. Edit: Understood it

Which repositories did you go through @0x25b3? I am trying to figure out the DesignResolution and the Screen size and the CameraBounds and a FollowCamera and I can’t seem to get things working just right. Without the Camera stuff I can get my 40x10 tiled map showing how I want but as soon as I add the CameraBounds and FollowCamera the map isn’t corner to corner and there are dead areas scroll as I move around.