Seeking programming/modding advice

Like the title says, anything and everything else goes here. As long as it follows the forum rules.

Moderator: Raccoon

Post Reply
User avatar
Hoopity
AFH
Posts: 252
Joined: Thu Jul 03, 2008 11:43 am

Seeking programming/modding advice

Post by Hoopity » Sun May 20, 2012 3:27 pm

A friend and I are looking to embark on a project to create room lighting controlled by the light level in a 3D computer game environment. Before digging in, we're trying to learn a little more about the scope and difficulty of the project.

We think Minecraft is the right direction to go. For one, minecraft already has light discretely quantized as part of the game mechanics. I could be wrong, but my gut tells me that this makes things significantly easier. Secondly, Minecraft has a fairly deep community of folks dedicated to modding the game up and down, though it is not open source. Unfortunately, I'm not part of that community, and I haven't been able to make much headway there.

To create what we intend, we need to read live light level values from minecraft (a value already native to the game) into a separate program of our design.

The real meat of the project that we are excited about is the design and control of the lighting, not so much modding minecraft. For those with java experience, modding experience, or even just programming experience at this level, how complicated would you rate this task? Are we barking up a very large and thorny tree?

Thanks :o

User avatar
Fred Nefler
AFH
Posts: 812
Joined: Sat Jan 17, 2009 5:47 pm

Re: Seeking programming/modding advice

Post by Fred Nefler » Sun May 20, 2012 4:02 pm

The first complicating factor that comes to mind is that the location, intensity range, and light distribution (sources can be partially encased in reflecting or opaque materials to make them shed a cone of light instead of a sphere, light can be blocked by objects, walls and ceilings may have different colors and lighting relevant properties, etc.) of the physical rooms light sources can be wildly different from the virtual room. So trying to convert between the two sets could be difficult, and probably impossible in general (within even fairly generous deviations). I'm thinking you might have to make certain assumptions about similarities of the rooms or something like that. Which you might already be making, but I don't see that specified in your post.

User avatar
lotsofphil
Leader of rum ham
Posts: 4075
Joined: Mon Mar 01, 2010 3:56 pm

Re: Seeking programming/modding advice

Post by lotsofphil » Mon May 21, 2012 9:45 am

Two pieces, right?

1) Get the values from Minecraft (at whatever frequency/refresh rate you need/want)
2) Translate those values to whatever controls your lights and change your lighting.

You didn't ask about #2, so that is covered?

For #1 it depends on minecraft. If there is some kind of API where all you have to do is
MinecraftObject mco = currentMinecraftInstance.getEnvironmentVariables();
LightingObject lo = mco.getLightingParameters();
...
HoopitysRoomLighting hrl = new HoopitysRoomLighting(lo);
hrl.changeLights();

Then it looks pretty simple.

But if minecraft doesn't have something like that and you've got to set it up to dump hex to a file, parse that file, etc, then it will be tougher.
However, if there is an active community that does this stuff in minecraft I am almost certain you won't need to redo the work. So, my advice is to stop if you find yourself reproducing basic minecraft/mod interfaces.

Post Reply