[Include] M4S7reamer v1 (object streamer that uses a zoning algorithm)
#1

M4S7reamer v1

Really efficient object streamer!


Defines:

pawn Код:
#define M_ZONES 30      //Total amount of zones will be M_ZONES*M_ZONES (keep this value even)
#define M_SIZE 300      //Width(x) and height(y) of one zone (the larger size, the better)
#define M_OBJECTS 3000  //Change this value to amount of objects on your server
#define M_XSTART 0.0    //X start position (zones are created around this position)
#define M_YSTART 0.0    //Y start position (zones are created around this position)

Look a the picture below to get the idea on how this works: (There should be M_YSTART instead of another M_XSTART)

If player was in zone C4, objects would be streamed in green zones (B3, B4, B5, C3, C4, C5, D3, D4 and D5).

Video:

A video to demonstrate how it works (in small scale). It also shows how precisely moving objects are synched.

[ame]http://www.youtube.com/watch?v=bwEbgxYqQTQ[/ame]


Bugs:

If player goes beyond the borders (bright red lines in the picture) and comes back, objects get bugged. (Fixed!)


Instructions:

1. Download m_streamer.zip
2. Put m_objects.inc in \pawno\include folder.
3. Include m_objects.inc in your gamemode and filterscripts (compile them).
4. Put m_streamer.pwn in \filterscripts folder and compile it.
5. Open server.cfg and type "m_streamer"(without quotations) next to filterscripts.


Download:

MediaFire


You will also need:

foreach (by ******)
Reply
#2

Sounds interesting. I bet it took some effort, good job!
Reply
#3

Very nice, the objects streamers who uses zoning systems are a lot better than other streamers.

Thanks for post.


PS: Sorry for my bad english ._.
Reply
#4

bwaa i dont know..
Lets take 500 players.
everybody are moving from zone to zone fasly etc..

Lets think - if player enters new zone the old zones object would be deleted and new one created..
so 500 player, moving from zone to zone, for everybody it would create and deleate - create and deleate - more if they are moving "fastly" objects would be created and destroyed very fast - so CPU dies or causes alot of lags.

If im wront tell me.
Reply
#5

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
bwaa i dont know..
Lets take 500 players.
everybody are moving from zone to zone fasly etc..

Lets think - if player enters new zone the old zones object would be deleted and new one created..
so 500 player, moving from zone to zone, for everybody it would create and deleate - create and deleate - more if they are moving "fastly" objects would be created and destroyed very fast - so CPU dies or causes alot of lags.

If im wront tell me.
Other streamers without zone system do the same but those streamers need to check if the player is in range of a object, area system is faster to check.

Correct me if I'm wrong.
Reply
#6

really nice good job
Reply
#7

Reply
#8

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение

LMAO D
Reply
#9

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Can you not read?

Your supposed to increase the M_OBJECTS value........
Reply
#10

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
Lets think - if player enters new zone the old zones object would be deleted and new one created..
so 500 player, moving from zone to zone, for everybody it would create and deleate - create and deleate - more if they are moving "fastly" objects would be created and destroyed very fast - so CPU dies or causes alot of lags.
This streamer has no problem streaming 20000 objects, while most of the other streamers need extremely big loops for that. Think about it for a second, streamers that loop through all objects and create the closest ones would need to loop 20000 times for 500 players every time the timer gets called. That would totally kill CPU. My streamer doesn't need to check distance anywhere, it doesn't need to loop through all objects at all! Object ids are saved in each zone's variable and created/destroyed directly from a variable.

@RetardedWolf, thats not a bug. You have exceeded 1000 objects and the message will be printed as many times as you exceed the limit.

Thanks for commets everyone!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)