• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Tutorial] Adding more tiles to game window - Updated 7/6/2018

Had anyone tried, or actually made that to fit the resolution ? Would be glad if that person would share
 
Code:
//going further down
else if (newPos.z > oldPos.z && newPos.z > 8 && newPos.z < 14) {
int32_t skip = -1;
GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z + 2, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportX+1)*2, -3, skip);
Instead of:
Code:
... (Map::maxClientViewportX+1)*2, (Map::maxClientViewportX+1)*2, -3, skip);
Should not be:

Code:
... (Map::maxClientViewportX+1)*2,  (Map::maxClientViewportY+1)*2, -3, skip);

?

I corrected the main post, You are right I had a typo.
 
I get the next error many times when i try to compile TFS:

'AddByte' is not a member of 'NetworkMessage' ...

I did this tutorial like 4 times and same mistake...

This are the lines:

if (oldPos.y > newPos.y) { // north, for old x
msg.AddByte(0x65);
GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);
} else if (oldPos.y < newPos.y) { // south, for old x
msg.AddByte(0x67);
GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y + (Map::maxClientViewportY+1), newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);
}

if (oldPos.x < newPos.x) { // east, [with new y]
msg.AddByte(0x66);
GetMapDescription(newPos.x + (Map::maxClientViewportX+1), newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);
} else if (oldPos.x > newPos.x) { // west, [with new y]
msg.AddByte(0x68);
GetMapDescription(newPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);
}

and

//moving up a floor up makes us out of sync
//west
msg.AddByte(0x68);
GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - (Map::maxClientViewportY-1), newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);

//north
msg.AddByte(0x65);
GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);
 
I get the next error many times when i try to compile TFS:

'AddByte' is not a member of 'NetworkMessage' ...

I did this tutorial like 4 times and same mistake...

This are the lines:

if (oldPos.y > newPos.y) { // north, for old x
msg.AddByte(0x65);
GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);
} else if (oldPos.y < newPos.y) { // south, for old x
msg.AddByte(0x67);
GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y + (Map::maxClientViewportY+1), newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);
}

if (oldPos.x < newPos.x) { // east, [with new y]
msg.AddByte(0x66);
GetMapDescription(newPos.x + (Map::maxClientViewportX+1), newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);
} else if (oldPos.x > newPos.x) { // west, [with new y]
msg.AddByte(0x68);
GetMapDescription(newPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);
}

and

//moving up a floor up makes us out of sync
//west
msg.AddByte(0x68);
GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - (Map::maxClientViewportY-1), newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);

//north
msg.AddByte(0x65);
GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);

you must use "addByte" instead of AddByte.
 
Your client is losing localPlayer. You should redo the tutorial and be sure to don't miss steps.
I have not missed something in the tutorial
Where should I look and what function? Have been looking now for a day but cant find the problem.
 
I have not missed something in the tutorial
Where should I look and what function? Have been looking now for a day but cant find the problem.

Well, I took like 3 months to solve a similar problem on my sources. But I'm not sure if we are getting the same trouble. Could ya be more specific when it happens?
 
Well, I took like 3 months to solve a similar problem on my sources. But I'm not sure if we are getting the same trouble. Could ya be more specific when it happens?
Everything works on the floor 6, 7, 8. but when I go further down or higher up, I get these errors. The screen freezes and every item is in the wrong places. I've looked through everything like, 10 times and I have not missed something in the tutorial.
 
Everything works on the floor 6, 7, 8. but when I go further down or higher up, I get these errors. The screen freezes and every item is in the wrong places. I've looked through everything like, 10 times and I have not missed something in the tutorial.

All right.. we need to know if server is sending a TP or calling function CreatureMoveUp and CreatureMoveDown, when he walks into a "floor changer". Add a std::cout << "warning" << std:endl; at sendCreatureMove, where those functions I told ya are being called. Then login in game and check at the console when the message appears. Can u do that?
 
All right.. we need to know if server is sending a TP or calling function CreatureMoveUp and CreatureMoveDown, when he walks into a "floor changer". Add a std::cout << "warning" << std:endl; at sendCreatureMove, where those functions I told ya are being called. Then login in game and check at the console when the message appears. Can u do that?

oh sry i totally forgot to do it :) I use TFS 1.2 but I think I know how to solve the problem. thanks for the help
 
Back
Top