A Flash Developer Resource Site

Page 5 of 6 FirstFirst 123456 LastLast
Results 81 to 100 of 105

Thread: !!! How about making a TEAM, and Create games together???? !!!!

  1. #81
    Hi

    Well im slightly disappointed by the whole situation. When I was testing the game using works adsl connection things were a lot faster and smoother than my 56k dial up (no shocks there!)

    Anyway, here a link to the multi-user ‘real-time’ car game (real-time is in inverted commas as its not really that realtime, open two browsers and you’ll see what I mean)

    However please remember this is only an hour and a half’s playing, and more than anything an excuse to play with the FLEM event engine. ( I think I spend more time making the drag and drop FLEM button used in the login page. Yeah you may wonder why a normal button wouldn’t do, its just proved extremely useful for window style interfaces…) Im pretty sure the car thing could be made much smoother, but like I say this is just a quick experiment

    I would suggest that a less real time game is made, maybe the rpg, but it is such a lot of work to do a normal rpg let alone a multiplayer one. Maybe something smaller would be easier?

    Heres the link

    thanks
    matthew


  2. #82
    oh one other quick point, please let the file load first, ive not put a preloader in

  3. #83
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    Hey McChicken,
    yeah there seems to be some problems there but it does show alot of potential! Do you have any other plans/ideas for a game? Since you know the limits of this better than most of us, I think you might be a better judge on what a realistic goal would be!

  4. #84
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    There's a tutorial for a Multiplayer car game in a book on my shelf... Flash Games Studio...


  5. #85
    Jeroen84 – yeps your right, I ive got a copy of that book on my desk at work, but to be honest I never really followed their tutorial. It seems awfully complicated for maing a simple car game. I don’t know why I keep buying these books, I never really seem to end up using them. Maybe its because they look nice on my desk?

    Phreax :

    Ill quickly explain the problems… (its all flash 5 code)

    Code:
    // Ive taken out some bits to make things clearer
    constructor function here…
    
    // Add FLEM  
    ball.prototype.__proto__ = Object.FLEM.prototype;
    
    ball.prototype.rotLeft = function () {
    	this.rotation -= 10;
    }
    ball.prototype.rotRight = function () {
    	this.rotation += 10;
    }
    
    ball.prototype.onEnterFrame = function () {
    		if (this.rotateUp) {
    			this.speed = 5;
    		} else {
    			this.speed = 0;
    		}
    		if (this.rotateLeft) {
    			this.rotLeft();
    		}  else if (this.rotateRight) {
    			this.rotRight();
    		}	
    
    	this.setMotion();
    }
    // When a key is pressed, if the kep pressed is == UP or LEFT or RIGHT
    // Send a KeyIsDown message
    ball.prototype.onKeyDown = function () {
    	if (this.name == _root.myId) {
    		if (Key.isDown(Key.UP) && this.upFlag == false) {
    			this.upFlag = true;
    			this.rotateUp = true
    			this.sendKeyIsDown ("Up");
    		}
    		if (Key.isDown(Key.LEFT) && this.leftFlag == false) {
    			this.leftFlag = true;
    			this.rotateLeft = true;
    			this.sendKeyIsDown ("Left");
    		}
    		if (Key.isDown(Key.RIGHT) && this.rightFlag == false) {
    			this.rightFlag = true;
    			this.rotateRight = true;
    			this.sendKeyIsDown ("Right");
    		}
    	}
    }
    // When A key is released send a key is released message 
    ball.prototype.onKeyUp = function () {
    	if (this.name == _root.myId) {
    		if (!Key.isDown(Key.UP) && this.upFlag == true) {
    			this.upFlag = false;
    			this.rotateUp = false;
    			this.sendKeyIsUp ("Up");		
    		}
    		if (!Key.isDown(Key.LEFT) && this.leftFlag == true) {
    			this.leftFlag = false;
    			this.rotateLeft = false;
    			this.sendKeyIsUp ("Left");		
    		}
    		if (!Key.isDown(Key.RIGHT) && this.rightFlag == true) {
    			this.rightFlag = false;
    			this.rotateRight = false;
    			this.sendKeyIsUp ("Right");		
    		}	
    	}
    }
    ball.prototype.setMotion = function () {
    	// Code to move the instance
    }
    ball.prototype.setRotation = function () {
    	// Code to set rotation of instance
    }
    ball.prototype.setPosition = function () {
    // Code to position the instance
    }
    // Sends a key is down message, with the details of the key pressed, sends current 
    // X and Y positions along with the current rotation when key is pressed
    ball.prototype.sendKeyIsDown = function (key) {
    	var x = new XML ('<keyIsDown key="' add key add '" xPos="' add this.mc._x add'" yPos="' add this.mc._y add '" rotation="' add this.rotation add '">');
    	_root.mySession.myRoom.sendAction(x);
    
    }
    // Sends a key is up message, with the details of the key pressed, sends current 
    // X and Y positions along with the current rotation when key is released
    ball.prototype.sendKeyIsUp = function (key) {
    	var x = new XML ( '<KeyIsUp key="' add key add '" xPos="' add this.mc._x add'" yPos="' add this.mc._y add '" rotation="' add this.rotation add '">');
    	_root.mySession.myRoom.sendAction(x);
    };
    // Sends car coords
    ball.prototype.sendCoords = function (sender) { 
    	var x = new XML ('<Coords xPos="' add this.mc._x add'" yPos="' add this.mc._y add '" rotation="' add this.rotation add '"></Coords>');
    	_root.mySession.myRoom.sendAction(x, sender);	
    }
    // Functions to handle xml messages
    onKeyIsDown = function (xml, sender) {
    	var key = xml.attributes["key"];	
    	for ( var i = 0; i < cars.length; i++ ) {
    		if (cars[i].name == sender) {
    			cars[i]["rotate" add key] = true;
    		}
    	}
    	//onCoords(xml, sender)
    }
    onKeyIsUp = function (xml, sender) {
    	var key = xml.attributes["key"];	
    	for ( var i = 0; i < cars.length; i++ ) {
    		if (cars[i].name == sender) {
    			cars[i]["rotate" add key] = false;
    		}
    	}
    	onCoords(xml, sender)	
    }
    onCoords = function (xml, sender) {
    	var xPos = xml.attributes["xPos"];
    	var yPos = xml.attributes["yPos"];
    	var temprotation_string = xml.attributes["rotation"];
    	var tempRotation = new Number (tempRotation_string);
    	for ( var i = 0; i < cars.length; i++ ) {
    		if (cars[i].name == sender) {
    			cars[i].xStart = xPos;
    			cars[i].yStart = yPos;
    			cars[i].rotation = temprotation;
    			cars[i].rotationRads = (Math.PI/180)*temprotation;
    			cars[i].setRotation();			
    			cars[i].setPosition();
    		}
    	}	
    }
    
    // Code that handles an xml message
    // This is wrapped in a function
    		// If the xml received is from a user other than yourself
    		// Check the xml node name and call the on[nodeName]() function…
    
    		if (sender != myID) {
    			var nn = xml.nodeName
    			_root["on" add nn](xml, sender);
    		}
    	};
    That’s slightly more code than I think is strictly necessary to understand what’s going on. But I think if on the recite of xml xpos, ypos and rotation details the car was not to imdeatiately jump to those positions, but a smoother interpolation of the positions was used I could have the game running much smoother.

    However what I think we should bare in mind is is running on a fast unix box, with a commercial strength multi-user server, a nice big pipe and it is far from great.

    It was only a test to see how fast things would be…

    So anyone else got any ideas?

  6. #86
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    Hehe.

    What's your problem with that code? Rather confused..

  7. #87
    There is no real problem with the code, all I was trying to do was show how simple it is, and how much it could be improved. The code just explains why things look jumpy

  8. #88
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    Yeah ok...I get it Hmm...I suppose this could be fixed but I can see the problem! If you get more players you need a really light function to get it working otherwise the game will run waay too slow, and the sync way off!
    Maybe a turnbased one is a better start!

  9. #89
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    ::raises hand:: rpg anyone?


  10. #90
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    As McNugget said rpg is gonna take alot of work and it seems everybody is making one anyways! Did you mean Multiuser? Man, that's a lot of work...ok, I'm in

  11. #91
    Why not do something more realistic?

    I would suggest if you really want to make a multi-user game, and I strongly thing you should. Why not get your self a copy of colin moocks unity server and learn the intricacies of that first.

    I develop for the fortress multiuser server, this is an extremely powerful application, however it is not that cheap.

    I will happily offer any help, I can, I would recommend fortress, and there is a free trial version, but this only supports 5 users.

    Either way its upto you. But I would not get too ambitious start small, something simple.

    matthew

  12. #92
    Elvis...who tha f**k is Elvis? phreax's Avatar
    Join Date
    Feb 2001
    Posts
    1,836
    For the development I guess the Fortress will be perfect, and if it seems like a success, then we can consider if the game is worth the costs! What I like about these projects is the whole learning-experience, and since I really want to get in on the MU thing I am willing to put alot of time into it! But Nugget do you have an idea?

  13. #93
    DigitalTart nurden's Avatar
    Join Date
    Apr 2001
    Posts
    159
    Chat based multiuser RPG in flash....that would rock!

  14. #94
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    Yes, I know Fortress. And indead, it's only disadvantage is that it cost money if you want to have like 20 users at the same time. It's a very strong software package.

    We could also use the free ircNexus or moockComm..

  15. #95
    Phreax: at the moment nope, no ideas my heads just kind of fried from work, im not really a fountain of inspiration right now, ill let you know if I think of anything.

    Jeroen84: do you mean you know of fortress, or you have used and know how to develop for it?
    You wouldn’t want to use moockComm when he has released unity. I forgot about nexus, I had some fun with the original nexus, definitely consider giving that a try. But my preferred choice is fortress, maybe colin moock would be happy for us to being a tutorial on multiuser games using his server, maybe I should email him

  16. #96
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    Oh, sorry if you misunderstood. I ment that I know Fortress by it's name, I have been a few times on their site a few months ago.

    But preferably I wouldn't want to use Fortress.(Except if you all want it, then I get outvoted.) Because when I buy a server with Shell Access someday, I don't want to spend a lot of money extra, on top of the already expensive costs of such a host.

  17. #97
    We either way I don’t mind which you choose to use. If you choose to user fortress I will be able to offer some help, as this is what I develop in, otherwise I cant do much (well I can offer some programming help) Not that I can commit much time anyway. Just too much on at work, but ill help with what free time I can offer

  18. #98
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    Yes... and indead I am doubting myself. That's because I thought that if I ever would make a multiplayer thing for a client, I would probably be best with using Fortress.

    So I don't care much.

  19. #99
    Senior Member
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    470
    sounds sweet. i would want to be in this project but i wouldnt know where to start....

  20. #100
    Flash Developer on a break
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    1,370
    phreax, you're still with us? What shall we do?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center