Pool game
#1

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
Reply
#2

Just gotta say that it looks completely awesome!
Reply
#3

i see just animation, right?
Reply
#4

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.
Reply
#5

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.
Reply
#6

this is pritty neat mate
Reply
#7

Just wow

Awesome.
Reply
#8

Wow, really impressive. Good work.

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

Would be fun!
Reply
#10

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)