Jump to content

[Questions]: Lua. Traffic. Java.


Skraund

Recommended Posts

Hello, I have a few questions:

1. Question about variables. Suppose I created a variable and put a floating point number in it, the system will automatically allocate
under this memory. But if I later assign this variable a nil value or another type with a smaller memory size, then the system will re-allocate this variable
new memory or leave the same amount? I ask it, because there is a desire to reduce the amount of memory on the client side, so I wonder if there is any sense
assign unused variables to nil.

2. I have repeatedly stumbled upon a traffic system, as in a single game, but with a large number of characters, it begins to lag. And many users of such resources notice this.
Question - What could be these lags? A large number of calculations? Can you somehow remove or minimize these lags without reducing the number of characters in traffic?

3. At the forum I came across several questions about writing a project in Java. And as far as I understand, this is possible only on the server side.
The question is how to write the server part of the MTA server in Java? Java SDK?

Sorry for my bad english.

Edited by Skraund
Link to comment
  • Moderators

1.

You do not have to do anything. Putting them to nil, will indeed clean them, but there is so much RAM to eat. In case of a large dataset, sure nil it.

http://lua-users.org/wiki/GarbageCollectionTutorial

 

2.

Everything together. Ai is something heavy in general, so there is nothing to be surprised about.

- Functions calls.

- Lot of events.

- Calculations

- Collision detection

 

3.

Yes, serverside only.

 

1 hour ago, Skraund said:

The question is how to write the server part of the MTA server in Java? Java SDK?

Easiest method: local API's

Don't even think about integrations.

 

 

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...