Dennis Heine

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

118 Neutral

About Dennis Heine

  • Rank
    Newbie
  1. Hi,   client side prediction is not working as intended :( the other players char is still not walking fluently.   heres the code: every 10 seconds, thread 1 //gets position of players from server //user.isUpToDate is being set to true by server WorldPlayers = (Data.CharacterObjects.CPlayerInstance[])NetworkComms.SendReceiveObject<Data.CharacterObjects.CPlayerInstance[]>("RequestUWP", "192.168.1.113", 999, "UWPReply", 5000, ""); at every frame, called from main loop:^ user is the player character from WorldPlayers (CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).newPosition is the current ppsition in the data structure ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).m_Node.Position is the physical position of the entity if (!user.isUpToDate) { //extrapolate new position if position is not up to date ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).newPosition = ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).m_Node.Position(((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).m_Node.Position - ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).oldPosition); user.isUpToDate = true; } IrrlichtLime.Core.Vector3Df v = new IrrlichtLime.Core.Vector3Df(); //interpolate between current position and new position v = v.Interpolate(((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).m_Node.Position, ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).newPosition, getTime() - ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).lastUpdate); ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).m_Node.Position = v; ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).lastUpdate = getTime() //if current position==new positin, start extrapolation if (v == ((CCharacter)CScene.Characters.m_CCharacterWorldPlayers[user.ID]).newPosition) { user.isUpToDate = false; }
  2. Creating My First Large Scale RPG

    this one is for making 2d games in lua: https://love2d.org/   and then theres torque 2d: http://www.garagegames.com/products/torque-2d
  3. Way's to evolve enimies

    Hi, check out http://www.ai-junkie.com/ great page about genetic algorythms/neural networks