SA-MP Forums Archive
Pool game - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pool game (/showthread.php?tid=106505)



Pool game - niCe - 03.11.2009

Has anyone ever made a pool game for SA-MP? I've managed to create one, but in fact, I'm affraid it will lag server - it uses 20ms timer and counts 15+1 balls positions and vectors collisions - on first sight, there are no lags, but I don't really think this is good solution, however, I can't think of another one. If anyone has some experience, please let me know, I wanna compare someone's other pool game attempt. I wonder if using OnObjectMoved would load the server a bit less than that timer.

Screenshot just for preview


https://www.youtube.com/watch?v=mU2wzurMioA


Re: Pool game - Joel_Krantz - 03.11.2009

Just gotta say that it looks completely awesome!


Re: Pool game - MX_Master - 03.11.2009

i see just animation, right?


Re: Pool game - MachineHead - 03.11.2009

Depends on many things, how much bandwidth your server has, your server hardware specs. How many players are in your server, etc. Just try the script out and see if it causes any problems.


Re: Pool game - niCe - 03.11.2009

Quote:
Originally Posted by MX_Master
i see just animation, right?
No, it's no scam, it's real
Welcome to Los Santos - Poolgame

Quote:
Originally Posted by clum'
Depends on many things, how much bandwidth your server has, your server hardware specs. How many players are in your server, etc. Just try the script out and see if it causes any problems.
Yes, but generally, is it good idea to use 20ms timer? I also tried that callback OnObjectMoved but it handled just 6+1 balls, when I added 15+1, it simply "frozen" the server - maybe that callback has been called too much times and server wasn't able to handle that load.



Re: Pool game - shady91 - 03.11.2009

this is pritty neat mate


Re: Pool game - Sergei - 03.11.2009

Just wow

Awesome.


Re: Pool game - radhakr - 03.11.2009

Wow, really impressive. Good work.

Edit: After playing the server, all I can say is AWESOME.


Re: Pool game - OddBaLL - 03.11.2009

Would be fun!


Re: Pool game - roby65 - 04.11.2009

This is just awesome, the coolest thing i've ever seen on samp

Some suggestions:
A 20 ms timer is a lot of work for the server. Let's say that a object is 16 byte (x+y+z+ID), in 1 second it is fired 50 times so it is a 800 byte load for every ball.
With 15+1 balls.... 12,8 kb/s for every player for the server.
It's a LOT!
So try to do this:
1)Update only the balls that need update (the ones that are moving)
2)I think that you can use a 50 ms timer
3)Let more the client move the objects, cause i think it can predict movements by itself