Jump to content

Ace_Gambit

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by Ace_Gambit

  1. I second that. Unless the developers come up with some low level function that allows the cpu to process other system messages while performing operation like image loading. I know for example that Delphi has something like ProcessMessages which you can use in cpu extensive loops. I tried to dig into lua threads but it seems like it doesn't have a good system based threading system. Anyway, I did some testing. It took me 44 seconds to load 1000 images of +/- 3 kB each.
  2. Each file must not be heavier then 1kb. I made a speedometer with a needle which load 260 images each of them is ~2.2kb and it take long to load them all for the first time (may take 60 seconds, depends on your PC). While the game loads them all you can't even move camera, it just freezes you PC for the loading time. So maybe make them smaller then a kilo. I am working on a game-mode and because DP2 does not have support for custom fonts I made a dynamic text script. What it does is basically translate a string to an array of font textures (or font images if you like). As a result of that I had to create over 300 gui images at once causing cpu locks (each up to 3 kB in size). What I did is load the images first thing when the client script is loaded. Instead of creating a loop the image loading takes place in the clients' render call back event. This does bring your fps down for a short while, but it doesn't lock the cpu anymore. This also gave me the opportunity to add a working progress bar to the loading event. The loading does not take more than 20 seconds. And I don't even have the best hardware settings...believe me.
  3. Have you tried OGRE3D? It's a great graphics engine. You should try it.
  4. You could add a "fuel" parameter to each vehicle element and create a timer that is activated when you enter it (server side). The timer simply decreases the fuel level which you can retrieve again client side by fetching the vehicle fuel parameter.
  5. Possibly. But think of all the smiling faces when you manage to make this work .
  6. What did you try to make this work in the first place? Can't you just get the weapon id associated with a helicopter blade kill and cancel the client-side damage call-back event? I assume you already tried this method but I am just asking in case you didn't.
  7. You make it sound like it's a feature.
  8. Yea, that's how I set up my SAM sites. The colshape is created server-side. That way I want to keep the server-script in control. Whenever "something" is entering the colshape the server performs multiple checks before it sends a request to the client to actually fire the rockets. As soon as the client is finished it sends a request back to the server notifying other clients can create projectiles now (just to make sure there aren't 100 clients creating projectiles at the same time). Here's a vid of the working SAM sites:
  9. I reported that issue not long ago viewtopic.php?f=94&t=22000 and I was still hoping someone could tell me if that's MTA or GTA related. It is a pretty annoying bug because the map I am currently working on is like 7000 units over x and 7000 units over y outside off the main map world. It should be noted that pickups show up fine when I load the map in the race mod.
  10. That's probably because it is spelled "parachute" instead of "parashoot" .
  11. Lol, why use C when you are bad at programming? That's like only a few steps away from assembly ( ).
  12. Yes, it is most likely the insane amount of images that's causing my pc to vomit after a while . Although I must say the loading process does not take that long at all (maybe 15 seconds). Why? Just testing what's possible .
  13. I don't think this is 100% right. If I run my game mode (including timers) and just "stop it" (removing all client tidy up code), my timers and MY gui elements disappear. I'm assuming there is some auto-garbage collection going on. It will leave some things as you set them - if you hide/show standard HUD components these will stay in the same state (also skins, gravity etc.) It is not the problem of gui elements not disappearing but rather the fact that it seems like some artifacts remain in memory when I leave the server running my game mode. And by artifact I mean object references in memory of static images. I've noticed rapidly decreasing performance after multiple times of leaving/joining the server when I don't nullify them (we are talking 300+ static image elements that are created every time you join...I am trying to push the limits here lol). Everything is back to normal again when I close MTA entirely and restart it.
  14. Actually what it does is manually nullify gui created static images because somehow these aren't destroyed and removed properly from memory when leaving the server. When the source is not the local player it triggers an "exit" icon for the player that left on the local players' kill messages display. That's how I know it works because the "exit" icon is nicely triggered when a remote player leaves.
  15. Erm, this code works fine for me . Even though I haven't tested it with the "reason" parameter the following lines of script code trigger just fine. -- destroy objects function clean() if (source == player) then objTextManager = nil objProgressBar = nil objSplash = nil objClientVehicles:clean() else if (objTimerUtils:getLoaded()) then -- player left objKillMessages:Process(source, nil, 1003) end end end addEventHandler("onClientPlayerQuit", root, clean)
  16. Yes there is. Although with a slightly different syntax: http://lua-users.org/wiki/ForTutorial
  17. Well at least the credits are written to the file. That's what's most important, right?
  18. It looks like that! Where the hell is dp3 and map editor!!!??? Every time someone asks they will add another month to the release date .
  19. A team killer kicker adds another dimension to the game. It is like in a real life scenario where soldiers receive penalties for violating ROE. Although I must admit that an instant kick is pretty severe punishment .
  20. Something strange happened when I tried to mess around with the wave height settings. Whenever I change the values to create high waves and hit the water while in a "falling" animation sequence I drop through the water surface. It was easy to replica because it always happens. Once fallen though you can walk around like you were walking on land. Here's a vid of what's happening:
  21. Aha, that roadblocks. Why didn't you just mention that in your first post .
  22. I don't see the problem either. You can script these roadblocks easily.
  23. The client-side addCommandHandler function as far as I know does not support a source parameter. This would mean that in your case sourcePlayer is actually the commandName and commandName a optional parameter. It wouldn't make any sense to pass a player as source to the client-side addCommandHandler function since this will always be the local player. But I could be wrong. Just try getLocalPlayer function as sourcePlayer and remove sourcePlayer as a function parameter.
  24. You could put it in the onPlayerWasted event. local ggg = 1000 function player_Wasted(ammo, attacker, weapon, bodypart) -- give $1000 for every kill givePlayerMoney(attacker, ggg) end addEventHandler("onPlayerWasted", getRootElement(), player_Wasted)
×
×
  • Create New...