public void gameRender(ScreenManager screenmanager, ClientStreamReader reciever, ObjectOutputStream sendStream) {

		sm = screenmanager;
		recieveDataHandler = reciever;
		sender = sendStream;

		init();

		while(running){
			Graphics2D g = sm.getGraphics();

			try{
				networkTransmit();
			}catch(Exception e){
				System.err.println("network transmission");
				e.printStackTrace();
			}

			try{
				renderThings(g);
			}catch(Exception e){
				System.err.println("render things");
				e.printStackTrace();
			}

			try{
				renderUI(g);
			}catch(Exception e){
				System.err.println("render ui");
				e.printStackTrace();
			}

			g.dispose();

			try{
				sendData();
			}catch(Exception e){
				System.err.println("send commands");
				e.printStackTrace();
			}

			//update the screen
			sm.update();

			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}