Commit 8564a621

Add a proper model for the lamp object

Resolves #47


Hello! After a bit of back and forth I present: Reasonable facsimile of a lamp

Pay special attention to the floral pattern, turns out good taste can be bought

The next task coming up will probably entail jumping a bit back into the renderer side of things in order to prepare one or two more visual effects in relation to light. Let’s see! 🙂

Commit 2e8cc034

Add/remove dynamic lights when creating windows and update their light intensity/colour appropriately

Resolves #48


Hi! This commit finishes of the preliminary work on the window light logic, check out the results:

Here the light can be seen propagating less and less per room
Here, another infamous light chair can be seen acting as a light source in the room in the back, so the light level in the third room is influenced from two sides
The effect of the “artificial” light source becomes more apparent when there is no light from the outside coming in

Next thing coming up is finally a model for the lamp. Bye! 🙂

Commit 357b77f0

Fixes per-room weighted light intensity calculation and adds support for weighted ambient colour calculation

Resolves #43


Hello! This commit finishes the (preliminary) implementation of per-room ambient light calculation, but see for yourself:

The overall light intensity depends on the room size and how much light output a single light source has
Light sources may have different colours now

What is clearly still missing is a new model for, well, lamps. That as well as adding support for ambient light changes caused by windows are the next steps on the agenda. Bye! 🙂

Commit 69ceca7c

Fix operator< for the Position2Raw type as well as an off-by-one error when writing the mapping of light position to unique light id

Relates to #43, #48


Hi! The mighty light chair is returning for another appearance. This time, it seems after some quick testing, it seems tearing down and adding new walls works properly in regards to light sources being associated with the right positions. Turns out having a std::map that cannot work properly due to a faulty condition in operator<() in a containing type is not a good thing that may lead to overlapping mappings. While debugging that I had a minor epiphany about a potential off-by-one problem, but the code broke before that even mattered. Now both should be fixed though. 🙂

Still wrong is the calculation that should take the size of the containing room into consideration when calculating the ambient light intensity, same goes for light colour, which is not used at all yet. One step at a time. Bye!

Commit 12a07517

Add the new configuration options for light information, move the data all the way to the python script, make it possible to use job messages even after an object was destroyed, implement add/move/remove light in the abstract light class

Relates to #43, #47, #48


Hello! Once again a rather heavy commit touching many different files and places. After a lot of preparation the point to actually have a visual difference has come, still very much WiP and slightly buggy, but..behold

Behold, the light chair!

As you can see there is no model for light sources yet, so the chair model will have to do for now. When adding and removing rooms it will easily glitch out right now and not reset it tiles to their proper values. There is a problem with the light intensity calculation and the colour of light sources is still simply completely ignored. But it’s still quite nice to finally see a visual difference when adding a new light source. 🙂 Hopefully these bugs won’t take too long to resolve so that the system can be fleshed out more. Bye!

Commit 90ff3892

Change the function signature of the lifecycle object callbacks and move more responsibility to the abstract object class

Resolves #55


Hi! Finally being able to check a ticket off again, that’s nice! The life cycle callbacks work as intended, it looks something like this:

Also enjoy that lovely programmer art on the right

That’s all for today! Next up, exposing (some of) the object configuration to object scripts and then wiring up the light creation code to Python as well, let’s see if we can finally bring some (rudimentary) light to the nights. 🙂

Commit 31d053ed

Add callbacks to object scripts. Refactor object scripts to improve non-controllable script objects. Expose Pos3 class to Python (and refactor it on the C++ end to make it explicit). Add new object categories.

Relates to #55, #56, #47, #48


Hello! I’m pleased to announce that no scope creep whatsoever occurred in this commit. None. Anyway, here’s Wonde in this commit some things were prepared/started, while others almost finished.
The big ticket item this time is probably the almost complete support for callbacks into an object’s Python script. The part I am not yet happy with are the passed arguments, but besides that the basic principle seems more or less sane.
Also a lot of refactoring happened on the Python end, not as much in terms of code, but the actual class hierarchies and what exactly gets passed to object script constructors. Good stuff.
Some more code is also being exposed to the Python API, that too is nice.
New object categories (LightSource, FewTicksRequired, Togglable) were introduced, some only in name, others (half)implemeneted.. so.. no scope creep. Nothing to see here. Move along. Bye.

Commit 1733167f

Make sure to update subsequent light id to light vector mappings. Swap the position from idx -> lightId to lightId ->idx in the mapping to make it easier to work with

Relates to #48


Hi! Once more nothing too exciting happening here, just the sudden realisation it’s probably a good idea to keep proper track of mappings when removing elements. One of these days this code will actually get to run. Stay tuned. 🙂