Creating a modular multi-enabled platform engine

Get help using Construct 2

Post » Mon Sep 23, 2013 1:22 pm

This is something I've had to tear down to its most basic elements in order to strip out all the fat from my experimental stuff, and I want some help on making this work.

What I'm trying to make is basically:

- Multi-purpose platform engine that can support any number of gameplay styles
- Can support both custom controls and AI control
- Supports multiplayer


How I have it set up so far:

- Two families, "PlayerAI_Platformer" and "Platformer_Skins", to handle both the actual player objects and 'skins' representing actual characters. The former contains general variables that usually apply to most characters.

- Four objects for each player:
-- The "Plat_Stats_General" object, which is the 'base' Player object, storing variables that are more 'universal', such as health, money, etc. This always persists for any given player.
-- The "InputPlayer" object, which is contained in the object above, which handles the input for that specific player with a large set of variables. Is persistent.
-- The "platforming" object, which handles all the platforming for a given character. Contains the relevant character 'skin', and character-specific variables. Can be destroyed to be swapped out for another character.
-- The character 'skin'.

Now, the main problem I'm having right now is that the only way I can get the separate players to respond only to their respective controls is to use 'For Each' loops. Problem is, the loops prevent me from using triggers as sub-events, and believe me, there's a lot of triggers involved in creating a fully-functioning character. But using picking conditions doesn't seem to be nearly enough, unless I'm somehow doing it wrong. Is there a better way I should be going about all this?

*Cap link removed for the time being*Candescence2013-09-25 12:03:50
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Sep 23, 2013 1:51 pm

Give me an example of an event you want to trigger.
B
47
S
17
G
82
Posts: 2,231
Reputation: 48,609

Post » Mon Sep 23, 2013 2:03 pm

@plinkie I'm mainly talking about stuff like animation triggers for the platform behaviour (On Stopped, On Landed, etc.), though in hindsight, most of that stuff might be able to work in a separate group outside of the "For Each" loop(s), as they generally don't come into contact with the control-related events that need to be in the loop.Candescence2013-09-23 14:06:08
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Sep 23, 2013 2:39 pm

You wouldn't need to use For Each for that. It would be something like On Stopped > (Family)Trigger Animation
B
47
S
17
G
82
Posts: 2,231
Reputation: 48,609

Post » Mon Sep 23, 2013 2:53 pm

@plinkie Yeah, as I mentioned, I'm heavily considering splitting the character-specific events into two sections each - the 'general' events that don't need to be in the For Each loop, and the control-based events that require the loop in order to distinguish between players.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Tue Dec 17, 2013 4:10 pm

Alright, I've gone back to this topic, it seems...


Well, right now, I've got two sets of events - one for control-based events in the big 'for each' loop, and another group for events that can't go in there. While I've managed to fix up many events to enable multiple players to work better, I've also hit a snag when it comes to 'duplicates' - when two players are using the same 'character', there are, well, issues. Player 1 works fine, but Player 2 is unable to properly end some animations, as "on any animation end"/"on animation <animation name> end" doesn't properly trigger for some reason, which causes the second player to be stuck on the specific action.

This is obviously a problem. Any ideas on how to work around it?
B
94
S
37
G
11
Posts: 404
Reputation: 11,275


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests