<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Shephertz Community - Recent questions in Windows</title>
<link>http://forum.shephertz.com/?qa=questions/products/appwarp/windows</link>
<description>Powered by Question2Answer</description>
<item>
<title>https://appwarp.shephertz.com is down?</title>
<link>http://forum.shephertz.com/?qa=11619/https-appwarp-shephertz-com-is-down</link>
<description>&lt;p&gt;
	Hey, what happend to the site? Im trying to access the unity documents there to help me with my project, but the site is down please help&lt;/p&gt;
&lt;p&gt;
	i get this error:&amp;nbsp;&lt;/p&gt;
&lt;h1 style=&quot;color: rgb(0, 0, 0); font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
	Error establishing a database connection&lt;/h1&gt;</description>
<category>Windows</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11619/https-appwarp-shephertz-com-is-down</guid>
<pubDate>Tue, 12 Sep 2023 07:40:27 +0000</pubDate>
</item>
<item>
<title>Convert Photon to appwarp</title>
<link>http://forum.shephertz.com/?qa=11580/convert-photon-to-appwarp</link>
<description>Hello I wanted to convert the photon to the appwarp, how do I do that? it will take a long time?</description>
<category>Windows</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11580/convert-photon-to-appwarp</guid>
<pubDate>Tue, 19 May 2020 15:11:55 +0000</pubDate>
</item>
<item>
<title>Unwanted shot of second player</title>
<link>http://forum.shephertz.com/?qa=10927/unwanted-shot-of-second-player</link>
<description>&lt;p&gt;
	&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;Good evening, I have a problem that when my player shoots the other player fires without the player wanting&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;appwarp.cs:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;brush:csharp;&quot;&gt;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

using com.shephertz.app42.gaming.multiplayer.client;
using com.shephertz.app42.gaming.multiplayer.client.events;
using com.shephertz.app42.gaming.multiplayer.client.listener;
using com.shephertz.app42.gaming.multiplayer.client.command;
using com.shephertz.app42.gaming.multiplayer.client.message;
using com.shephertz.app42.gaming.multiplayer.client.transformer;

//using UnityEditor;

using AssemblyCSharp;

public class appwarp : MonoBehaviour 
{    
	public string apiKey = &quot;api Key&quot;;
	public string secretKey = &quot;secret Key&quot;;
	public string roomid = &quot;Room ID&quot;;
	public static string username = &quot;&quot;;
	
	public bool useUDP = true;
	private UserInput userInput;

	
	Listener listen;
	
	public Transform remotePrefab;
	private Animator anim; //added
	
	void Start () {
		anim = GetComponent&amp;lt;Animator&amp;gt; (); //added

		WarpClient.initialize(apiKey,secretKey);  //initializing the SDK

		listen = GetComponent&amp;lt;Listener&amp;gt;(); /*In Order to receive notification,connection &amp;amp; join/leave callbacks, you need 
		                                     to add corresponding listners as defined in listner class*/
		WarpClient.GetInstance().AddConnectionRequestListener(listen);
		WarpClient.GetInstance().AddChatRequestListener(listen);
		WarpClient.GetInstance().AddLobbyRequestListener(listen);
		WarpClient.GetInstance().AddNotificationListener(listen);
		WarpClient.GetInstance().AddRoomRequestListener(listen);
		WarpClient.GetInstance().AddUpdateRequestListener(listen);
		WarpClient.GetInstance().AddZoneRequestListener(listen);
		
		// join with a unique name (current time stamp)
		/* username = System.DateTime.UtcNow.Ticks.ToString(); //Unique username is generated
			WarpClient.GetInstance().Connect(username); */
		
		//EditorApplication.playmodeStateChanged += OnEditorStateChanged;

		username = NickManager.PlayerNick;          //Carrega o nome Ao lado do player no menu e seta ao jogador
		WarpClient.GetInstance().Connect(username);

		userInput = GetComponent&amp;lt;UserInput&amp;gt;();
	}
	
	public float interval = 0.1f;
	float timer = 0;
	
	void Update () {
		timer -= Time.deltaTime;
		if(timer &amp;lt; 0)
		{
			
			float[] data_f = new float[11];
			bool[] data_b = new bool[4];
			data_f[0] = transform.position.x;
			data_f[1] = transform.position.y;
			data_f[2] = transform.position.z;
			data_f[3] = transform.rotation.eulerAngles.x;
			data_f[4] = transform.rotation.eulerAngles.y;
			data_f[5] = transform.rotation.eulerAngles.z;
			data_f[6] = userInput.aimLookPos.x;
			data_f[7] = userInput.aimLookPos.y;
			data_f[8] = userInput.aimLookPos.z;
			data_f[9] = anim.GetFloat(&quot;Forward&quot;);
			data_f[10] = anim.GetFloat(&quot;Turn&quot;);



			data_b[0] = userInput.aim;
			data_b[1] = userInput.fire;
			data_b[2] = true;
			data_b[3] = true;
			int data_len = (sizeof(float)*11) +  (sizeof(bool)*4) + (username.Length*sizeof(char));
			byte[] data = new byte[data_len];
			System.Buffer.BlockCopy(data_f,0,data,0,sizeof(float)*11);
			System.Buffer.BlockCopy(data_b,0,data,sizeof(float)*11,sizeof(bool)*4);
			System.Buffer.BlockCopy(username.ToCharArray(),0,data,(sizeof(float)*11 +sizeof(bool)*4),username.Length*sizeof(char));
			
			listen.sendBytes(data, useUDP);
			
			timer = interval;
		}
		
		if (Input.GetKeyDown(KeyCode.Escape)) {
			Application.Quit();
		}
		WarpClient.GetInstance().Update();
	}
	
	void OnGUI()
	{
		GUI.contentColor = Color.black;
		GUI.Label(new Rect(10,10,500,100), listen.getDebug());
	}
	
	/*void OnEditorStateChanged()
	{
    	if(EditorApplication.isPlaying == false) 
		{
			WarpClient.GetInstance().Disconnect();
    	}
	}*/
	
	void OnApplicationQuit()
	{
		WarpClient.GetInstance().Disconnect();
	}
	
	public void onMsg(string sender, string msg)
	{
		/*
		if(sender != username)
		{
			
		}
		*/
	}
	
	public void onBytes(byte[] msg)
	{	
		float[] data_f = new float[11];
		bool[] data_b = new bool[4];
		char[] data_c = new char[(msg.Length - ((sizeof(float)*11) + (sizeof(bool)*4)))/sizeof(char)];
		
		System.Buffer.BlockCopy(msg,0,data_f,0,sizeof(float)*11);
		System.Buffer.BlockCopy(msg,sizeof(float)*11,data_b,0,sizeof(bool)*4);
		System.Buffer.BlockCopy(msg,sizeof(float)*11+sizeof(bool)*4,data_c,0,msg.Length-(sizeof(bool)*4+ sizeof(float)*11));
		
		string sender = new string(data_c);

	
		if(sender != username)
		{
		

			GameObject remote;
			remote = GameObject.Find(sender);
			if(remote == null)
			{
				Object newRemote = Instantiate(remotePrefab, new Vector3(7.88f,0.42f,1f) ,Quaternion.identity);
				newRemote.name = sender;

			}
			else
			{


				RemotePlayer rp = remote.GetComponent&amp;lt;RemotePlayer&amp;gt;();
				rp.Set(new Vector3(data_f[0],data_f[1],data_f[2]),new Vector3(data_f[3],data_f[4],data_f[5]),new Vector3(data_f[6],data_f[7],data_f[8]),data_f[9],data_f[10],data_b[0],data_b[1]);
			

			}		
		}
	}
	
	public void onUserLeft(string user)
	{
		GameObject remote;
		remote = GameObject.Find(user);
		
		if(remote != null)
		{
			Destroy(remote);
		}
	}
	
}
&lt;/pre&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Windows</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10927/unwanted-shot-of-second-player</guid>
<pubDate>Fri, 19 Jan 2018 04:13:55 +0000</pubDate>
</item>
<item>
<title>Unable to connect- Please help!</title>
<link>http://forum.shephertz.com/?qa=9591/unable-to-connect-please-help</link>
<description>&lt;p&gt;
	Hi all.. fairly new to programming and have just found out about AppWarp. Will be very useful for a project I am working on, however I am unable to connect app when running my program. I have been prodding at the issue and looking for solutions online for hours now and I can not figure out what is going wrong here. I am programming a Windows Forms application in c# using visual studio. Any help is appreciated. I'll note that I also was unable to connect the sample webpage chat aswell.&lt;/p&gt;
&lt;p&gt;
	My connection request listener spits out: &quot;Unkown Error&quot;.&lt;/p&gt;
&lt;p&gt;
	Here is my full code:&lt;/p&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using com.shephertz.app42.gaming.multiplayer.client;
using com.shephertz.app42.gaming.multiplayer.client.events;
using com.shephertz.app42.gaming.multiplayer.client.command;
using com.shephertz.app42.gaming.multiplayer.client.listener;  

namespace WindowsFormsApplication1
{
    public partial class MainForm : Form
    {
        private int loggedInID;
        private string loggedInUser;
        public WarpClient _warpClient;

        public MainForm(int userIDInput, string usernameInput)
        {
            InitializeComponent();
            loggedInID = userIDInput;
            loggedInUser = usernameInput;
            nameDisplayLbl.Text = loggedInUser;
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
        }

        private void matchQueueBtn_Click(object sender, EventArgs e)
        {
            WarpClient.initialize(&quot;api redacted for question&quot;, &quot;secretkey redacted for question&quot;);
            _warpClient = WarpClient.GetInstance();
            _warpClient.AddConnectionRequestListener(new MyConnectionListener());
            _warpClient.Connect(loggedInUser);
            _warpClient.JoinRoom(&quot;Gamelobbytest&quot;);
        }
        
        public class MyConnectionListener : ConnectionRequestListener
        {
            public MyConnectionListener()
            {

            }

            public void onConnectDone(ConnectEvent eventObj)
            {
                switch (eventObj.getResult())
                {
                    case WarpResponseResultCode.SUCCESS:
                        System.Diagnostics.Debug.WriteLine(&quot;connection success&quot;);
                        break;
                    case WarpResponseResultCode.AUTH_ERROR:
                        System.Diagnostics.Debug.WriteLine(&quot;Auth Error&quot;);
                        break;
                    case WarpResponseResultCode.BAD_REQUEST:
                        System.Diagnostics.Debug.WriteLine(&quot;Bad Request&quot;);
                        break;
                    case WarpResponseResultCode.CONNECTION_ERR:
                        System.Diagnostics.Debug.WriteLine(&quot;Connection Error&quot;);
                        break;
                    case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                        System.Diagnostics.Debug.WriteLine(&quot;Connection Error Recoverable&quot;);
                        break;
                    case WarpResponseResultCode.RESOURCE_MOVED:
                        System.Diagnostics.Debug.WriteLine(&quot;Resource moved&quot;);
                        break;
                    case WarpResponseResultCode.RESOURCE_NOT_FOUND:
                        System.Diagnostics.Debug.WriteLine(&quot;Resource not found&quot;);
                        break;
                    case WarpResponseResultCode.RESULT_SIZE_ERROR:
                        System.Diagnostics.Debug.WriteLine(&quot;Size Error&quot;);
                        break;
                    case WarpResponseResultCode.SUCCESS_RECOVERED:
                        System.Diagnostics.Debug.WriteLine(&quot;Success recoeverd&quot;);
                        break;
                    case WarpResponseResultCode.UNKNOWN_ERROR:
                        System.Diagnostics.Debug.WriteLine(&quot;Unknown Error&quot;);
                        break;
                    default:
                        System.Diagnostics.Debug.WriteLine(&quot;Any error&quot;);
                        break;
                }
            }

            public void onDisconnectDone(ConnectEvent eventObj)
            {
                // handle Disconnect here
            }

            public void onInitUDPDone(byte resultCode)
            {
                // handle onInitUDPDone here
            }
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Windows</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=9591/unable-to-connect-please-help</guid>
<pubDate>Mon, 19 Sep 2016 03:39:06 +0000</pubDate>
</item>
</channel>
</rss>