06.04.2013, 11:15
After seeing this topic, and having released my own similar include, I decided I would try something I thought of about 3 years ago, but didn't have the knowledge to do it.
The default enex (enter/exit) markers move up and down. But they don't just move up and down, they slow down at the top and bottom. Obviously it's easy to make them just go up and down with MoveObject and OnObjectMoved or a timer, but it looks crap.
Using sin() and a rapid timer, I managed to re-create the 'smooth' animation. I put two arrows next to each other; one using my smooth sin() script and the other just a simple MoveObject/OnObjectMoved script.
[ame]http://www.youtube.com/watch?v=cb-QEbiBzt8[/ame]
Obviously this is using a rapid timer (as I just said), which is never good. The only way I can think of to lessen the server load is to 'stream' the animated arrows, i.e. only animate them if players are near (within 100 meters). The 'FPS' of that arrow was set to 30. I tried 25 and it looked a bit framey. 30 calls a second, per arrow. There could be hundreds of them on your server.
Here's the code used in that video: http://pastebin.com/A33PRK3e
I'd like to get some feedback on this. Do you think it's worth using resources on something so insignificant? I may create ~300 of these arrows and benchmark the results. One thing worth noting is that for every EXTERIOR exit you create on your server, there will be a matching INTERIOR one. I'd estimate there are about 150 interior enter/exits defaultly available, so you're looking at ~300. A loop of 300, 30 times a second.
The default enex (enter/exit) markers move up and down. But they don't just move up and down, they slow down at the top and bottom. Obviously it's easy to make them just go up and down with MoveObject and OnObjectMoved or a timer, but it looks crap.
Using sin() and a rapid timer, I managed to re-create the 'smooth' animation. I put two arrows next to each other; one using my smooth sin() script and the other just a simple MoveObject/OnObjectMoved script.
[ame]http://www.youtube.com/watch?v=cb-QEbiBzt8[/ame]
Obviously this is using a rapid timer (as I just said), which is never good. The only way I can think of to lessen the server load is to 'stream' the animated arrows, i.e. only animate them if players are near (within 100 meters). The 'FPS' of that arrow was set to 30. I tried 25 and it looked a bit framey. 30 calls a second, per arrow. There could be hundreds of them on your server.
Here's the code used in that video: http://pastebin.com/A33PRK3e
I'd like to get some feedback on this. Do you think it's worth using resources on something so insignificant? I may create ~300 of these arrows and benchmark the results. One thing worth noting is that for every EXTERIOR exit you create on your server, there will be a matching INTERIOR one. I'd estimate there are about 150 interior enter/exits defaultly available, so you're looking at ~300. A loop of 300, 30 times a second.