Jump to content

[discussion] Scripting technique in MTA


Maggi

Recommended Posts

Lets discuss this scripting technique:

Game 'phisics' (treat it is as game logic, game rules), Extending game core actions:

various atomic actions is scripted at client side and each action has its ID. so, server only calls trigger_client_event() with action ID + arguments.

Advantages:

minimal bandwidth load + less CPU usage (at server side)

Disadvantages:

player can decompile or just see script contents and look at 'secret' data, or keyword moments (mechanics) of certain script, problem for anticheat.

viewpoint:

core GTA actions is also treated as scripts: ex: if I shoot somebody, I use action 'shoot' with params: target, bodypart, weapon_type, weapon_skill.. and the result of this sript will be target damage (loss HP). lets name this system as game phisics.

So, We can extend game phisics by adding new features:

'shoot' action result depends on player health (If you have extremly low HP, your actions will not be so effective). Next, we can also add param blind (especially useful for RP servers) if you are get blinded (teargas or smth else) you just can't shoot.

To be shorten: Gamemode declares ACTIONS that are represented as scripts on client side, thus extending CORE game RULES (phisics). server's task is to call actions + params for it!. Main conception: ALL actions are scripted at client side.

So, server becomes director of movie named 'GAME'.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...