Jump to content

[Blog] Map system and custom vehicle spawning (by ChrML)


jhxp

Recommended Posts

  • MTA Team

Deathmatch will have maps, just like the "race" release has at the moment, though it's improved in several ways. This time when you die, you don't have to wait until everyone has died and a new map is started until you respawn. Respawn times and respawn modes are all specifyable in the map file (the current modes are 'none', 'timelimit' and 'waves').

None is for 'Last Man Standing' maps where you ideally play in a small map with weapons and see who lives in the end.

With timelimit, you can specify how many seconds the server shall wait from the time a player has died till he respawns. Pretty ideal for freeroaming maps in big areas.

With waves, the server tries to respawn players in "waves", meaning dead players are respawned at for example 30 second intervals (the time is specifyable in the map files). This means you can die, and be lucky enough to respawn 1 second later, or you may have to wait another 20 or 30 seconds. This should work pretty well for deathmatches in smaller areas, or in team matches if we decide to implement this in the first deathmatch release.

At the moment, there is no "Click to join", though I will implement this some time later. It's nice when you can stay in spectator and watch the other players if you wish. Note that spectator for deathmatch isn't coded yet. Some of the code is portable from race, though it needs some tweaking to be able to spectate on foot too. Should be pretty trivial.

I've also been working on vehicle spawning. These are places drivable vehicles are spawned by the server in your map. Vehicle spawns are currently definable in the map files using the vehiclespawnpoint tag (or the deathmatch editor when it's done). You're able to have quite a lot of vehicle spawns in your map, theoretically up to 65534 though this hasn't been tested yet, meaning you can put vehicle spawnpoints all over San Andreas if you want. Same as you can do with player spawnpoints.

GTA itself is only able to handle about 110 vehicles at the same time, so I've used the same streamer I've coded to deal with the checkpoint limit and the object limit to deal with the vehicles. The streaming is fast and doesn't add any noticable decrease in FPS.

What I'm going to do the comming days is server/netcode for getting in/out of vehicles and vehicle state management serverside (driver, passengers, position, health, landing gear states, turret states etc...). eAi has been doing the game part.

Remember to watch this space for updates the comming days! :)

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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