I'd my game to have 8 players on screen at once. Only three buttons are used in the game so up to 4 joysticks and up to 4 keyboard players.
Is there any way to accomplish this? I can only currently attach an active object to Player 1-4![]()
I'd my game to have 8 players on screen at once. Only three buttons are used in the game so up to 4 joysticks and up to 4 keyboard players.
Is there any way to accomplish this? I can only currently attach an active object to Player 1-4![]()

Your going to have 8 people crowded around 1 computer?
Well we managed to get eight people crammed around my old miggy, in front of a 12" telly and in a box room when I was 16.
So I don't see it too problematic to 'crowd' eight people into my living room around my 22 inch monitor. Only 4 people need to be around the keyboard, the other 4 can be anywhere in the room.
Anyway.... does anybody know how to solve the problem?

I would suggest you don't use the built in player slots if you need 8 players on one computer.
yes this will require some work on the eventing but it is very possible.
So... how would I go about doing this?




Think away from the player slots that MMF/TGF provides you with and instead think about what you need to store for each player. You'll need a way of getting their inputs, and most likely a score, possibly lives as well. (Score, lives and other variables can be stored in global values.)
You would need to handle input yourself through events. The MMF Control-X and Joypad extensions make this a lot easier, but in TGF it's possible as well - "Upon pressing a key" and "Repeat while key is pressed" actions are much the same as the "Player presses..." actions that you would use for standard players.
I would actually use the four player objects for your four joypad players, as I think this is the only way to get joypad input in TGF - then handle the rest through events.
Thanks for that David, I shall give it a go.
The only problems I forsee (and I've had this problem when controlling computer objects with events) is that the players are cars. Increasing and decreasing the direction and angle when player presses left or right is easy enough, but I can't see any way to make the object move "in the direction it's facing"
ie what I need is something like this
Condition:
Key "up" is being pressed & repeat while key "up" is being pressed
Action:
Move "car1" in 5 pixels in direction it is facing
but the only way I can see to move objects is set x pos (x pos+1) and set y pos (y pos+y).
Well, if you've got the direction done, say:
()Repeat while key is pressed (Up key) = Set speed of ("player") to 50
(Negate)Repeat while key is pressed (Up key) = Set speed o ("player") to 0
I'll try and put up an example, soon.
Aidan
Thanks for the feedback but I'm still a little confused as to what type of movement to set the object to initially. I would have thought that if I'm coding a custom control system that I'd need the player object to have static movement... in which case I can't set any speed?
Bouncing ball, I believe would be your best bet.