eAi

Administrators
  • Content Count

    2,984
  • Joined

  • Last visited

Community Reputation

9 Neutral

About eAi

  • Rank
    Godfather (The MTA Team)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Megadreams I'm interested that you say it's a lot of extra work. Obviously you've already done a lot of work on this - so changing strategy is obviously difficult - and I've not really thought a huge amount about it so maybe it's different to how I expect, but... The key difference between transpiling and interpreting is that instead of parsing the SCM and then calling functions based on it, you need to generate code that calls the same functions from the SCM. I imagine that either way you end up writing a library of code that handles each operation, and that library could be almost identical between both systems. With the transpiling approach I'd guess that control flow might be the tricky bit - though I believe Lua now supports 'goto' which could help quite a bit (I'm not sure if MTA has updated Lua yet - I know it was being talked about). Anyway interesting stuff - keep us updated!
  2. This is pretty cool. I do wonder if it'd be easier to make a system to transpile/decompile the code from SCM to MTA's LUA? Given that you'll need to modify the missions quite a lot, is SCM actually the best place to do this? I assume there will be opcodes that have to be added to SCM to facilitate co-op. It'd also be much faster to run, presumably.
  3. As the original website designer from approaching 10 years ago(!), I agree it needs an update. But I don't feel this is quite enough. The key art at the top is less interesting, and the rest is just a bit more square. I'm not really involved these days, so whatever I say has very little importance, but I think a more substantial redesign could be worthwhile.
  4. What would that dialog say? "Would you like to run this plugin? It may destroy your computer? [Yes] [No]" There's no easy way to judge whether code is 'good' or 'bad'. On Android, code runs in a fairly protected sandbox (unless you root your phone) so it can't do anything too nefarious. A native plugin on Windows could do pretty much anything - from deleting all your files, to exploiting the OS to install a rootkit - and there's no way to really detect this ahead of time.
  5. Client side modules would be a massive security hole as they'd allow you to run arbitrary native code on the client.
  6. I wouldn't say that breaks OOP - it's a fairly common situation (for example, Unity would behave exactly the same way). Perhaps .position should be be a function called GetPosition? I'm way out of the loop on this stuff though!
  7. It's pretty unusual for games to use double precision floating points - for example both Unity and Unreal don't support it (of course, you can use 64 bit floating point numbers, but everything internal uses 32 bit floats).
  8. It's been basically forever since I wrote any MTA code, but CMatrix and CVector are classes that need to match those in GTA - so their sizes can't be changed. You may have already realised this! This also applies to any class that is suffixed with Interface.
  9. That's correct. There were (years ago, now) some discussions about implementing server-side physics, but it was never going to be an easy task (and would probably require rewriting the client-side physics too, to make them match. It's been a while since I've contributed, but from what I remember, each object has a concept of an owner, and they're responsible for synchronising the physics. Vehicles have dead-reckoning, which makes them have quite good looking physics (though collisions can be an issue sometimes, depending on latency). There's a difference between physics being accurate versus being smooth - and MTA tends towards the latter, which is mostly what you'd want!
  10. Tables aren't arrays, so they only allocate memory for the keys that contain values.
  11. Shared means that it will be loaded on both the server and client. You can't share functions between resources except via exports. What's wrong with doing it that way?
  12. Sure, that's true if you only want to send your data to a single player, but if you want every player to get that data, then I'm fairly sure that setElementData is the most optimal way, or at worst, it makes very little difference.
  13. See this post: viewtopic.php?f=148&t=77161 I'd say get/set element would be more optimal than the code provided.
  14. Try using onClientPreRender rather than onClientRender. By using onClientRender, you're taking the position of the bone just after it has been rendered, then setting the position of the attached object in the next frame, so you always see your attached object where the bone was the previous frame. Your variable and function names are atrocious.