ID:262284
 
Code:
    proc/UpdateEye()
var/MoveX=0
var/MoveY=0
switch(src.dir)
if(NORTH)
MoveY+=7
if(SOUTH)
MoveY-=7
if(EAST)
MoveX+=7
if(WEST)
MoveX-=7
client.eye=locate((src.x+MoveX),(src.y+MoveY),src.z)


Problem description:

It's jumpy as I'm using locate to change the client's eye, and when close to the edge of the screen, it will cause all of the view, or all of the view except one line going down the y-axis to be black.

I would prefer to get rid of the jumping, however, that's not mandatory, but getting rid of the black is.


Great thanks,
Prodigal Squirrel
uhh try this

proc/UpdateEye()
var/MoveX=0
var/MoveY=0
if(usr.dir==NORTH)
MoveY+=7
if(usr.dir==SOUTH)
MoveY-=7
if(usr.dir==EAST)
MoveX+=7
if(usr.dir==WEST)
MoveX-=7
usr.client.eye=locate(usr.x+MoveX,usr.y+MoveY,usr.z)
In response to Etneri
Sorry, but that's not going to fix anything.

In this case, UpdateEye() is being called by a specific mob, so client.eye belongs to whatever mob called the proc that it's inside of.
In response to Prodigal Squirrel
hey, do you know how to liek if you mkae this a verb, make a turn off verb..make it go back to normal view?
You should use EDGE_PERSPECTIVE
mob/Login()
..()
src.client.perspective=EDGE_PERSPECTIVE
In response to Zaltron
No, I have already. I still get the same complications.
In response to Prodigal Squirrel
I don't see any black lines when I do it.
In response to Zaltron
Move around a whole bunch, then go to edge of the map. It happens. And it's not black lines. It's each tile becomes black.
In response to Prodigal Squirrel
woops, I never actually went next to the edge, i'll try and fix this. Hold on a sec.
In response to Zaltron
    proc/UpdateEye()
var/MoveX=0
var/MoveY=0
switch(src.dir)
if(NORTH)
MoveY+=7
if(src.y>=world.maxy-7)MoveY-=7
if(SOUTH)
MoveY-=7
if(src.y<=7)MoveY+=7
if(EAST)
MoveX+=7
if(src.x>=world.maxx-7)MoveX-=7
if(WEST)
MoveX-=7
if(src.x<=7)MoveX+=7
client.eye=locate((src.x+MoveX),(src.y+MoveY),src.z)


There you go!
In response to Zaltron
That gives another problem, however. It lets the player see behind them. Which is what I'm tyring not to do.

Prodigal Squirrel
In response to Prodigal Squirrel
I think he means a FOG OF WAR type thing.
In response to Crashed
No. What I'm looking for is to keep the client.eye far enough ahead of the client's mob's direction, that the screen edge is where the mob will be. So there's no seeing behind yourself.

Prodigal Squirrel
In response to Prodigal Squirrel
Unfortunately you can't place the eye off the map. You'll just have to surround your maps with a large enough border (make it dense, black, and opaque). It will still *look* like the edge of the map, but it will allow you to place the eye on it to get the effect you're looking for.
In response to Crispy
That's what I did. Except, I just made the border look like grass. Plus, it's eventually gonna be an Island, so the water surrounding it will be killing two birds with one stone.

Prodigal Squirrel
In response to Prodigal Squirrel
There is a screwed up thing you could do. Make the client's view smaller when they get near the border. that way they'll never see behind them.
In response to Zaltron
Yeah. But I don't think anyone would like that. lol
In response to Prodigal Squirrel
Cool. Good double solution. =)