Jump to content


Decoy

Member Since 06 Feb 2008
Offline Last Active May 28 2009 09:05 PM

Topics I've Started

Sprite Rotation With Mouse Position

10 March 2009 - 04:22 AM

Okay, so I am just working on a little side project for fun, and I was making a game where the left and right movements are controlled by the keyboard, and the aiming is done with the mouse. I wanted the sprite to rotate left or right depending on where the mouse_x is on the screen, and I didn't want the sprite to be able to move completely around, always facing up so to speak. Anyhow, I got my little bit of code here, I just can't seem to figure out the logic behind it, it's past midnight and the number crunching is frying my brain. Thanks.

// Sprite drawing
global.paddleRot = (mouse_x / 360) * 100;

// Full Shield
if(status == 3)
{
	draw_sprite_ext(paddle_3Shield, -1, x, y, -1, -1, global.paddleRot, -1, 1);
}

I have tried it numerous ways already, any help is appreciated. If you want to use hints, its probably better for me in the long run. Thanks again!

Keeping A 3d Multiplayer Game In Sync

01 February 2009 - 06:37 PM

Does anyone have any suggestions on the best way to keep a 3D Multiplayer game in sync? The game runs a little laggy as is with the 3D models in play, I was wondering the best method to keep the game in synchronization with the other players over TCPIP. Thanks.

Mplay Issues

01 February 2009 - 06:35 PM

I have been toying around with mPlay for a project I am working on, and I had it working on two computers running on a network both running Windows XP. I've been trying to get it to work at home with my own PC with XP, and my laptop with Vista. Are there compatibility issues with this? Trying to run under two different OSs? Here are my scripts, I keep failing to join a session with either computer. I have already tried disabling firewalls, etc.

// start_session() = Start a new multiplayer session

global.pName = string(get_string("Please enter your Gamer Tag:", ""));

if (mplay_session_create("", 4, global.pName))
{
show_message("Session started.");
global.master = true;
}
else
{
show_message("Failed to create a session.");
}


// find_session() = Find a mutliplayer session
global.pName = string(get_string("Please enter your Gamer Tag:", ""));

if (mplay_session_find() > 0)
{
if (mplay_session_join(0,""))
{
global.master = false;
show_message("Connection complete!");
room_goto(2);
}
else
{
show_message("Failed to join a session.");
mplay_end();
}
}


// init_session() = Initialize Connection

if (mplay_init_tcpip(""))
{
show_message("mPlay Initialization Complete.");
global.initCheck = true;
}
else
{
show_message("Failed to Initialize TCP Connection.");
global.initCheck = false;
}


This code was working when both OSs were the same. Thanks.