This project is read-only.

Only ambient light is rendering

May 4 at 1:34 AM
Yes, I know this is a halted project but I am just noticing this problem, I have installed XNA Studio 4 with VS2015 and opened a project that sat literally un-touched for almost a year, Krypton 2.0 renders the ambient lighting quite nicely but there are no point lights being rendered. I tried changing view ports, creating test lights and everything, nothing... The included sample works, and prior to me opening my game today, the lighting system used to work. how is this possible?
May 6 at 7:38 PM
Have you verified that you have everything set up correctly?
Have you tried in an older version of VS? It's possible that something in 2015 made an incompatibility, though that seems unlikely.
Without posting code, I'm not sure how to help, unless you're looking for a counter example / verification elsewhere.
May 6 at 9:32 PM
Edited May 7 at 12:50 AM
Thank you so much for the reply, Sorry about the lack of code

This game uses a multi-room/level system, resolution management and view ports. It's really complex. This is "TestChambers.CS"

the lighting engine is only used in specific worlds/levels/rooms(whatever you want to call it)
https://pastebin.com/Vrb7QhKU

As of now, I have tried several versions of the game that were already compiled in older versions of VS, and have the same problem

If you need to get further into it, I have the base class (tileGameLevel.cs)

https://pastebin.com/ZxzV5dGb

UPDATE: I found that my positioning system no longer works... That is strange because it used to, but whatever... Now my problem is to basically make the lighting system line up properly. i have changed my code in the draw method
 this.playerLight.Position = new Vector2(Game1.player.Position.X, -Game1.player.Position.Y);//Not sure why it has to be reversed.
            
            Matrix world = Matrix.Identity;//cool...?
            Matrix view = Matrix.CreateTranslation(new Vector3(ViewportLoc.X,ViewportLoc.Y, 0) * -1f);//Okay?
            Matrix projection = Matrix.CreateOrthographic(256, 144, 0, 1);//my viewport dimensions. then z-planes. Rad.

            // Assign the matrix and pre-render the light map.
            // Make sure not to change the position of any lights or shadow hulls after this call, as it won't take effect till the next frame!
            this.krypton.Matrix = world * view * projection;
            this.krypton.Bluriness = 0;
            this.krypton.LightMapPrepare();
Result: gyazo.Video
May 7 at 1:55 AM
Edited May 7 at 5:38 AM
FINAL UPDATE (for now, until something somehow changes again??)

Because my game uses a custom viewport and custom positioning system, I had to do some hardcore trial and error.
(Not sure why it changes my plus signs to &#43 but whatever.)
The following code solution worked

Final result:

public override void Draw(IDisplayDevice device, xTile.Dimensions.Rectangle viewport, xTile.Dimensions.Location offset, bool wrap, SpriteBatch spritebatch, xTile.Dimensions.Location ViewportLoc)
        {
            playerLight.IsOn = true;
            this.playerLight.Position = new Vector2(Game1.player.Position.X, - Game1.player.Position.Y);//Still Not sure why it has to be reversed.
            
            Matrix world = Matrix.Identity;//cool...?
            Matrix view = Matrix.CreateTranslation(new Vector3((viewport.Width/2)+ViewportLoc.X,-ViewportLoc.Y-(viewport.Height/2), 0) * -1f);//Okay!?
            Matrix projection = Matrix.CreateOrthographic(256, 144, 0, 1);//my viewport dimensions. then z-planes. Rad.

            // Assign the matrix and pre-render the light map.
            // Make sure not to change the position of any lights or shadow hulls after this call, as it won't take effect till the next frame!
            this.krypton.Matrix = world * view * projection;
            this.krypton.Bluriness = 0;
            this.krypton.LightMapPrepare();
            
            // ----- DRAW STUFF HERE ----- //
            // By drawing here, you ensure that your scene is properly lit by krypton.
            spritebatch.Begin();
            spritebatch.Draw(Game1.backgroundColor, new Rectangle(0, 0, viewport.Width, viewport.Height), Color.White);
            spritebatch.End();
            base.Draw(device, viewport, offset, wrap, spritebatch, ViewportLoc);
            // Drawing after KryptonEngine.Draw will cause you objects to be drawn on top of the light map (can be useful, fyi)
            // ----- DRAW STUFF HERE ----- //
            this.krypton.Draw(null);
           
            base.DrawHeading(device, viewport, offset, wrap, spritebatch, ViewportLoc);
            
            
            
            if (Game1.ShowBounds)
            {
                foreach (Rectangle item in SolidRectangles)
                {
                    if (item.Intersects(new Rectangle(viewport.X, viewport.Y, viewport.Width, viewport.Height)))
                    {
                        spritebatch.Begin();
                        spritebatch.Draw(Game1.bounds, new Rectangle(-ViewportLoc.X + item.X, -ViewportLoc.Y + item.Y, item.Width, item.Height), Color.Black);
                        spritebatch.End();
                    }
                }
                foreach (TiAPI.Component.ActionTile item in actionTiles)
                {
                    item.draw(spritebatch, ViewportLoc);
                }
                foreach (Krypton.Lights.Light2D item in krypton.Lights)
                {
                    spritebatch.Begin();
                    spritebatch.Draw(Game1.bounds, new Rectangle(-ViewportLoc.X + (int)item.X - (int)item.Bounds.Width / 2, -ViewportLoc.Y - (int)item.Y - (int)item.Bounds.Height / 2, (int)item.Bounds.Width, (int)item.Bounds.Height), item.Color);
                    spritebatch.End();
                }
            }
        }

Video Demo

Marked as answer by rmsoft1 on 5/6/2017 at 9:38 PM