• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About X5-Programmer

  • Rank
  1. Napalm: What sort of game is it? and how many players will be connected? if like 10-20 then its fine to send all at once. if its like 500-1000 players you need to look into sending each player IF the current player are In view for your character and add it to some sort of inView list on the server. 1, Loop thrught all players. 2, Current playerID != yourID && In range of your player && Not in "inView" List. 3, Send that current player and add it to inView list at the server for your player. the same when you update the players, Just update inView players. And when some player leave the range of your player delete it from your inView list. I think there is alot of ohter ways to do this to, but this is one way. Im not that good at english so I hope you understood something :D Well good luck and Cheers! --- Edit ---- 5:23:39 PM -> Me. 5:38:16 AM -> Kada2k6. But Kada2k6 wrote first, funny :D
  2. Face an point

    Palidine: Yah I can try to make it, Thanks!
  3. Face an point

    jyk: Yah I will look into that, thanks. Palidine: About that you said, if you have time to make some example on how to do it? Thanks.
  4. Face an point

    Hello, I have been trying to get the best way to make a function that rotates my character to face a specific point. I have done something like this: #define PIOVER180 0.0174532925199432957692369076848861f float rot; void Face(float pointX, float pointZ) { float x = pointX - PlayerX; float z = pointZ - PlayerZ; if (x!=0 && z<0) { rot=((atanf(x/z))/PIOVER180)-180; } if (x!=0 && z>0) { rot=((atanf(x/z))/PIOVER180); } } glRotatef( rot-90.0f, 0.0f, 1.0f, 0.0f ); -- Draw my character -- If someone have any better way to do this please feel free to post. Thanks.
  5. Terrain + Camera Collision

    Hello. I will be glad to hear it in more in detail how you did it you if have time. Thanks!
  6. Hello. Camera setup = overhead camera + zoom( character in the center ). What Im up to is, making an camera collision agains the terrain, so If any collisions appear the camera will decrease the zoom to the player, so the camera not moveing ohter the terrain. How would you handle this? I tryed to make some sort of sphere collision test. dVector tTerrainPos = pWorld::GetCurrentWorld().GetTerrainPos( tCamPos ); dVector tPos = ( tTerrainPos - tCamPos ); float len = sqrt( tPos.x + tPos.x * tPos.y + tPos.y * tPos.z + tPos.z ); float range = 10.0f; if( len > ( range * range ) ) { push the sphere up and decress the zoom to player } And when the Roll goes upwards the zoom will increase again to the orginal zoom view. Feel free to give me pointers on how you would do it (or already have done it) or if you have any other tips on how to make an camera like this. Thanks!
  7. Online Game Movements.

    Thanks all for your replyes. DaAnde: "it would make sense to just transmit the players coords to the server and update it as much as possible to have the smoothest game play possible." The you can send what positions you want and make yourself teleport and stuffs, and that kinda suxs :P cheers!
  8. Online Game Movements.

    Thanks alot! Just one thing, You said something like this: "You may have better results sending the players' positions and velocities rather than the state of their controls" I dont think sending the position and velocities to the server is a nice idea :p?
  9. Hello everyone. I have a question about the movement in online games. The current movement I use is a "WASD" setup with mouse orientation, kinda like Everquest. Here is how I do the movement:¨ 1. Client -> Server : The player presses a key which tells the server that he wants to move, and the server moves the character. 2. Server -> ALL clients in range: Said player starts moving. 3. Client -> Server: Player stops pressing the movement button. 4. Server -> Stops moving the player. 5. Server -> All clients in range: Stops motion of the current player. And the sync process: The server loops through all clients every 5 seconds and sends a position update packet IF the position or direction has changed. How does this sound, will it work? Feel free to give me pointers on how you would do it (or already have done it) or if you have any other tips on how to make it faster and more efficient. Thanks beforehand.
  10. Hello there, I have a question about my topic. First thing is, What sort of physic collision system do you think is the best / fastest / smartest in online games? I have working with newtongamedynamics libary but when it comes to online games Im not sure if its fast enogth, What do you people think? Talk here about what you think is best for online games. Thanks and Cheers!.
  11. Reading .PAK files

    Hey, What do you mean by "how can I convert it to cpp" ? Well the "void ListPak(char* pakname)" function reads the PAK file and store the information from it in 2 structures called: packheader_t head; packfile_t* pdir; then it prints out the names of all the files stored in it and the size of them. the long flen(FILE* f) function just return the size of the file. Anyway: Try to call this in your program. ListPak( "MyPakFile.pak" ); Good luck.
  12. Collision Handle Server Side.

    " particular reason you're doing collision detection on the server? " Because online games needs it else you can cheat kinda easy :] and I will look into the col-det method. Cheers!
  13. Collision Handle Server Side.

    Well I mean with the walls and stuffs but if I put it into the player update loop it will be slow right? vector< struct CPlayers >::iterator itr; for( itr = m_game.pPlayerOnline.begin(); itr != m_game.pPlayerOnline.end(); itr++ ) { //Loop for players, Update and stuffs. for( loop thrue all the collision faces ) and check collisions. //Next player... } doesnt that sound slow, I mean to be looping thrue the whole world and check for collisions for each player? Well I dont know exaly I just want to know how ohter online games handle it. Just fun to know. Well, cheers!
  14. Collision Handle Server Side.

    No one having any tips? or maybe can exaplain it? :/
  15. Hi people, I have an question about how collisions get handle in online games. In this case lets say rpg games not shootem. To make the collisions on the client is not that hard, But when it comes to the server it gets more complicated. Lets say you have made some sort of BSP tree for the collision system on the client and it works fine. And then you will do the collisions on the server side, how would you do it? Just make the same as the client? First make a BSP tree of the map/objects in the world but it will be slow right? Because it needs to loop thrue all players online and then check for collisions in the BSP tree... :/ So how does this working? I hope someone can explain how it works :) Well thanks and have a nice day. Cheers!
  • Advertisement