by date
Adding multiplayer
Adding multiplayer
| Name: | Ty Newton | |
|---|---|---|
| Date Posted: | Jan 13, 2007 | |
| Rating: | 1.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Ty Newton |
Blog post
Well I've run into my next challenge: adding multiplayer to my very basic pong game. I've been modifying the StarterGame project and thought I was doing pretty well. I use a tilemap for the level design and two bat sprites and a ball sprite. For some reason the bat sprites don't collide with the tilemap tiles that make up the sides of the game play area - I'll have to look into that further. But my real concern is trying to get 1 bat to be controlled with the arrow keys and the other bat controlled with the WASD keys.
I added the MovementComponent to both bat sprites. I assumed that TX would instantiate 2 MovementComponent objects and I would have to setup the code so it could work out which bat its owner was. This doesn't work; even though the owner object that is passed into the MovementComponent class allows it to determine which bat is its owner. It seems my assumption was wrong and TX only instantiates 1 MovementComponent object. I'll double check this in the forums.
BTW my last blog post seems to have disapeared. I wonder what happened to it...
I added the MovementComponent to both bat sprites. I assumed that TX would instantiate 2 MovementComponent objects and I would have to setup the code so it could work out which bat its owner was. This doesn't work; even though the owner object that is passed into the MovementComponent class allows it to determine which bat is its owner. It seems my assumption was wrong and TX only instantiates 1 MovementComponent object. I'll double check this in the forums.
BTW my last blog post seems to have disapeared. I wonder what happened to it...
Recent Blog Posts
| List: | 08/03/08 - 2. Doco for the Community 07/30/08 - Doco for the community 07/29/08 - 2. Once more into the breach, dear friends, once more 07/26/08 - Once more into the breach, dear friends, once more 07/18/07 - TorqueX platformer kit 01/21/07 - Making StarterGame 2 player 01/13/07 - Adding multiplayer 01/11/07 - Not so easy :-( |
|---|
Submit your own resources!| Jonathon Stevens (Jan 13, 2007 at 06:42 GMT) |
With those assumptions, and the assumption that you set up the component correctly, each owner will have it's own instance of the movement component. Post your component in the forums and what behavior you're experiencing so we can better assist you.

| David Montgomery-Blake (Jan 13, 2007 at 08:06 GMT) |
You must be a member and be logged in to either append comments or rate this resource.


1.0 out of 5


