ID:136584
 
Greetings! I'm working on a squad-level strategy game where you control a number of mobs. In all RTS games you can see what all your units can see. I just realized that this is not possible in byond. So I suggest that the client should have a list of atoms that all provides the client with sight calculations (or a better solution if found).

Could anything be done about this?


/Andreas
Excellent idea. But can it be done?
Hmmm.... maybe make a list and add the people in the squad to that list.... then have maybe...


usr.client.perspective = usr.group.perspective


Or something like that?
Gazoot wrote:
Greetings! I'm working on a squad-level strategy game where you control a number of mobs. In all RTS games you can see what all your units can see. I just realized that this is not possible in byond. So I suggest that the client should have a list of atoms that all provides the client with sight calculations (or a better solution if found).

Could anything be done about this?

Eh .. good question! I don't think we'll be add anything soon that will get around this problem. However, you might be able to get away with handling the lighting calculations yourself. You could set the mob.sight flags so that the main mob can see everything. Then you could loop through all of your troops and use list += view(troop,5) (or whatever) to add to the list of the objects the main mob can actually see. Then you could gray out the unavailable objects by using an image or something like that. That might work!
In response to Sariat (#2)
Maybe you could assign perspective to a list. (I'don't use lists since I can never work them out so excuse me if this sounds stupid :p)
In response to Tom (#3)
Ooh! Ooh! Pick me!

The entire map has an invisibility of 1. Thus, noone can see anything, it's all black. All the units have see_invisible or 1 or more. Now, whenever a unit moves, loop through all the objects in the new place, and place them as images on the map, with invisibility layer 0 and layer 10. Then, delete the old images. It should work, but I think it would cause massive lag. Maybe just update the views every second or so? If you don't get what I mean, I could whip up a quick demo of it.