Are you still taking library requests? If yes, I do want a library that will make F_A release Tiny Heros.
In response to Avainer1
Avainer1 wrote:
Are you still taking library requests? If yes, I do want a library that will make F_A release Tiny Heros.

If that was possible I'd have made that library already =)

I haven't been working on any BYOND project much lately. I hadn't been working on games at all. If it's any consolation, I started working on a new game a few days ago.
I would like a third person-view world emulator game, where you plant trees'n shiz.
Hello, brother.
Hey Forum_account I've been delving into your Dynamic Lighting library as a result of using it in my game and I have found some bugs or perhaps things that were not intended.

The lighting will apply to every Z level, so if you have lights on Z level 2 their affect is leaking into the first Z level even though no lights are placed on the first level.

Example: Lights are on z level 2 and the first z level has no lights so say around midnight in game it's completely dark on z level 1 but when you wander into the same area on z level 1 that is lit up on z level 2 the light somehow appears on z level 1 in that area. I am thinking this has something to do with when the z levels are compressed into a single map at runtime /and or/ how the lighting is initiated.

Also, a polite request if you could please assist me in getting the day/night in your Dynamic Lighting library to work with the Shadow/Shading part, or if that is even feasible. I already have the day/night system functioning for my game but I would also like to use the Shadow part of your library as well and haven't been able to merge the two together successfully on my own.

Thank you for your time and all of your work; Your Dynamic Lighting Library was a Huge improvement to my previous lighting system which was blocky and the lighting only had map placement as an option. I will give you front page credits on my creation for your contributions to not only my game and development needs but also byond as well- that's the Least I could do for what you provide. Know that it is Truly Appreciated, as I couldn't do the same that you do, that's for sure. Hopefully we can speak and figure out what the problem is in the library.
In response to Bumblemore
Bumblemore wrote:
I would like a third person-view world emulator game, where you plant trees'n shiz.

Let me get it finished and you will have what you want bumble.
Example: Lights are on z level 2 and the first z level has no lights so say around midnight in game it's completely dark on z level 1 but when you wander into the same area on z level 1 that is lit up on z level 2 the light somehow appears on z level 1 in that area. I am thinking this has something to do with when the z levels are compressed into a single map at runtime /and or/ how the lighting is initiated.

I haven't been able to reproduce this problem. Light sources use the built-in range() proc to find what turfs they illuminate so there shouldn't be anything happening across z levels.

What might be happening is that some tiles only get updated when the player moves. If you're setting the player's loc directly there might be something that's not getting triggered.

Also, a polite request if you could please assist me in getting the day/night in your Dynamic Lighting library to work with the Shadow/Shading part, or if that is even feasible. I already have the day/night system functioning for my game but I would also like to use the Shadow part of your library as well and haven't been able to merge the two together successfully on my own.

I'll see what I can come up with =)
Okay thanks for your response!

EDIT2: Removed screenshots
Here's a version of the library that includes a new demo called "day-night-and-shadows-demo", which combines the day/night effect with lights that cast shadows.
In response to Forum_account
EDIT:1

Thanks for fixing the issues.
When you walk over the incorrect areas, do they get fixed? It could be a problem with tiles not updating in some situation (walking over the area will force an update).

If you can isolate the part of your project that's causing the problem and send me a .zip of the files so I can compile it, run it, and see the problem I'll have an easier time figuring it out.
No the areas stay the same when I walk into them, it's basically like walking into an area that's not as dark and the light of the mob grows brighter - my assumption/speculation is that the areas somehow line up with the light being cast from the lamps on z level 2.

Also, the main problem that has prevented me from implementing the shadow system is this runtime error, which while your demo works fine the system implementation doesn't work for how my project is using it I think. Here is the error, mind you I did try to develop around it but wasn't exactly successful. I did put a night/day into it but perhaps more time is in order I just didn't know what to do in the library I suppose.

runtime error: Cannot read null.shading
proc name: Move (/atom/movable/Move)
source file: shadows.dm,51
usr: UmbrousSoul (/mob/creating_character)
src: UmbrousSoul (/mob/players/worker)
call stack:
UmbrousSoul (/mob/players/worker): Move(the stnflr (151,78,2) (/turf/stnflr), 0)

This runtime error is from when the character is created in dantoms character creation - and moved onto the map. I guess the shading system thinks to move the floor but it can't, and I couldn't find a way around that.

Heres a snippet from when the character is finished being created and moved.
src.client.mob = new_mob
var/turf/first_location=locate(rand(139,163),rand(75,86),2)
new_mob.Move(first_location)
del(src)
No the areas stay the same when I walk into them, it's basically like walking into an area that's not as dark and the light of the mob grows brighter - my assumption/speculation is that the areas somehow line up with the light being cast from the lamps on z level 2.

I'm really not sure what's happening. Again, if you can isolate the problem to a small bit of code I can run it'll be easier to track down the problem.

This should fix that runtime error, you can just replace the entire Move() proc around line 51 with this:

atom
movable
Move()
var/shading/old
if(loc && loc:shading)
old = loc:shading
. = ..()

// if the object moved and is opaque, we need to check
// for nearby light sources that need to update in case
// the object changes how shadows are cast
if(old && opaque && .)

// for all nearby light sources...
for(var/light/l in range(10,src))
if(!l.effect) continue

// if you moved to or from a tile that was
// affected by this light source...
var/shading/s = loc:shading
if(!isnull(l.effect[s]) || !isnull(l.effect[old]))

// set the stale flag so they'll be updated automatically
l.changed = 1
Thanks that snippet works. Much Appreciated!

EDIT5:
light = new /light/directional(usr, 4)

light.dir = pick(usr.dir)

The above snippet was the problem, I was creating directional lighting on a users torch and it doesn't work so it was making a huge diamond of invisible light. I don't know why or how, but I removed it and there no longer seems to be a problem from what I can tell.

One final question though, how Would I be able to add directional lighting to a users torch and have it change direction as the user moved? Take into consideration I obviously wasn't able to do it myself, Though I've gotten it to work before but not while moving. The above code creates a bug and the way I got to work doesn't change the light direction for the users movement(only creates it for the dir the user is facing but if they move it vanishes), so if you could explain it to me I'd be very thankful and would very much appreciate it.
Hmm I seem to be running into a bug involving 'Move'; When I try to trade items, for example, I get errors from the library due to trying to move the traded items to the other users inventory.

The runtime error was saying line 52 of shadows.dm, something about the shading var being undefined for the player class that was being used. I think it's trying to shade the traded item and giving a runtime error.

This is the line:

if(loc && loc:shading)
You'll have to check that their loc is a turf. This should do it:

if(istype(loc, /turf) && loc:shading)
Thanks for that I will get to testing it at some point. Did you happen to know the answer to my other question in the above post?

how could I make the directional light on a torch that a user holds change light direction when the user moves?

light = new /light/directional(usr, 4)
light.dir = pick(usr.dir)

usr.dir doesn't work (it was the line creating those strange darkness bugs I was having) and the other method I managed to get to work would only display the light for the direction the person was facing for when they lit the torch, but if they moved it wouldn't stay on.
Sorry, not trying to be bothersome and it's not entirely important I just thought it'd be cool if the torch that a user holds could cast directional lighting for the direction they moved. It might be more complex than I realize I suppose.
The code you have there should work (though you don't need to say pick(usr.dir), you can just say "usr.dir"), but there are some problems with it in the current library. I'll probably post a new version of the library soon that'll change that and I'll make sure directional lights work for that case.

The exact problem is that the light source objects are actual objs and they used to be placed on the map at their owner's loc. I started phasing that out but some things still refer to the light source's location. There's a chance this is causing some of the other problems you've seen.
Alright thanks for your response and explanation, I will keep fiddling around with everything and see what I come up with and let you know about anything more that I find.

My main concern is the performance on a live server with a large amount of players (let's say 20); But I think with the time set to longer intervals I won't notice so much of a kick when the time changes and adjusts the ambient lighting. If you're interested, I can let you be an alpha tester for this project if you'd like to be more involved with the odds and ends, but if not I understand; Everyone's busy these days.
Hey Forum_account i have one question do you know how to give mobs special powers such as fire ball or freeze ray and do you know how to set them so the mob receives them as it levels up?
Answers would be much appreciated.
Page: 1 2 3 ... 13 14 15 16 17 ... 19 20 21