How can I make a complex battle engine?

I’m looking to making a turn based battle engine for a creature-capturing game but couldn’t find any tutorials or help at all, I’m hoping to have the following features:
- attacks (with animations)
- Item usage
- switch creatures
- experience earning and evolutions

I also don’t really know if its best to have it on the server or the client and wouldn’t even really know how to make it communicate between the client and the server. What I am picturing is something similar to loomian legacy, but 2D (with GUIs). If anyone could help out that would be great, thanks!

For complex problem conquer and divide, or start small. Eventually you will be able to add enough features to create complex battle engine.

The first step I guess should be the combat system and for that I suggest creating a flow chart as suggested in this post on turn based rpgs.

For a Pokemon/loomian legacy like game the server should choose who goes first, then waits for the players response which could contain the three features you talked about of using items, attacks, or switching. But yeah in general the server should handle all the game logic and the player should only send information on what actions they chose for security purpose using the authoritarian server concept which is possible to do so with a GUI based game.

Sorry if it’s all vague because the questions is really big. I recommend just trying it out like animating a single attack animation with guis using tweening to make the guis move.

1 Like

Thanks that helps a lot! One more thing, if the server is controlling the battle then how should I make the battle scene GUI change? e.g. if I wanted to display all of the attacks the opposing creature has, should I use a remoteEvent to send the information to the client? Or would a remoteFunction be better since it yields?

I don’t recommend using a RemoteFunction from server to client. An exploiter can re-route that function to their own and have it infinite yield or send something else back. Use a RemoteEvent instead and have a timer in the server based on what moves are used.

1 Like

alright thanks, I’ll get to work!