The one we got now is helpful but I'm just wondering if there's a new way of doing it.
Honestly, if I were able to control how the opacity 32x squares looked I'd be satisfied.
~Dakumonki
---
Getting
---
Desired
ID:1443814
Dec 13 2013, 11:31 am (Edited on Dec 13 2013, 11:50 am)
(See the best response by Ter13.)
|
|
Thank you for the reply.
In the examples above, the "Desired" image has what I want in it which is how I would want the opacity icon to look. The opacity Shades off view that's being blocked. I simply want to know if I'm able to make my own opacity mechanic to get it how I want it to look which is the Desired photo where it's just a Black square alpha'd over whats supposed to be completely unseen. Hope that helps. |
Well, yeah, you definitely can make an opacity system on your own, but I will warn you, it's gonna be really, really hard to make an efficient one, and even then, the most efficient possible approach will consume quite a bit of CPU, limiting the number of players you can effectively have playing in your game.
I'd say go for it if you are making a single-player game, but if you are planning on doing multiplayer, you need to either live with the built-in system, or write your own client/server setup using cross-world communication. The latter is probably outside of your skillset right now, though. |
You could use block() in place of range() and just check if those turfs in range are in view as well, if not apply an image to the client.
|
It might be faster to use binary operations on a list, rather than manually checking in view().
var/list/L = block(locate(x,y,z),locate(x+w,y+h,z)) Now, you should only have turfs in L that are not in view of the player. However, you will probably have to use a secondary eye object to get the view properties whilst sill showing all turfs to the player. |
Line of sight might be a good method to use. I would store checked chords in a list, example:
var/list/checkedChords=list("5,5","5,6") And then skip chords that have already been checked. Then the tricky part would be adding a type of fader. I actually created a system similar to this for a day-night system awhile back (no longer have scripts), but it does seem that the new way of BYOND communicating causes flicker in some instances. Therefore, I 100% back Ter13's statement that something like this should only be applied to a single player game, elsewise it would simply look undesirable. |
A bit more specific and we might be able to assist.