Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

New AntiLag Script // Solution for Script Command Problem

ok.. if high priority is useful depends on your computer.. but as said.. you can simply disable it.. ^^

but the smooth antilag should work fine now, doesnt it?

I tried it with a lot of other processes in the background (photoshop, winamp, aol, trillian, etc... winamp still played fine music, too :) ) and it worked properly..

well.. the smooth antilag will be useful specially for people who have lagging problems at some points because there are too many events or something similar..

when I started to make this script I simply wanted to improve Nears Event AntiLag Script because there where some things which could have been done better.. the methods werent aliased but rewritten, the sprite coordinates were checked, although this is slower than only checking the event coordinates (I tested this ;) ) and you could not declare events which are updated even if they're not on the screen..

btw.. I changed something again..

Code:
$antilag.max_cpu_utilization = 70 # the maximum CPU utilization, the script
                                  # try to stay under this value during changing
                                  # changing the frame rate. The lower this
                                  # value the higher will be the lag reduction
                                  # (and the smoothness, too), [b]a value > 100
                                  # will disable this feature completely[/b]
 
It does smooth out animations, but it makes the character go one speed less than it should, I don't know if i'm the only one who gets this, but it does work, just makes the character slower, I could simply increase the speed perm, but then every enemy has to be faster as well.
 
Axerax, I was just talking about setting the priority AT ALL.... not with fancy additions :P

ok.. if high priority is useful depends on your computer.. but as said.. you can simply disable it.. ^^
^
It was more like.. the PLAYER needs to be able to modifie that, not the Creator XP
 
Yeah, if you place it under a button, then it would work, just toggle it on/off. I wanted to try it without the High Priority, because it makes games run well, but slows everything else down around the computer.You can make it high priority through the task manager your self, but I never do for some reason.
 
For me the first map is the faster one with the default settings. It runs fine...till the second map ^_^ lol, also, i get an saying SDK isn't initialized so I in line 39 so I guess it does need SDK.
Overall great script though :)
 
if there should be an option for the player everybody has to decide himself.. ^^

Dylan: on the second map its of course not that got, but it should still be better than without the script.. to prevent the error you only have to delete those line at the beginning:
Code:
SDK.log('AntiLag', 'f0tz!baerchen', 0.7, '04.01.07')
if SDK.state('AntiLag') == true

plus the last "end" at the end..
 
Ya, just foud out, on my slow computer, the first map is slower but on my fast pc, the second is more efficient, it is smooth and runs great. Lookin forward to an update!! :thumb:
 
where do i place this? i tried making a new script above main and it gav me an error message. i tried pasting it in the main script and it didnt work.

edit: i downloaded ur exe for the demo....still lag.
 
I've used this script in Netplay Plus, with a server running on the background and no lag!

Now when the server is running on the background my whole pc slows down by alot and the FPS of the game goes down to 5 but when I used this anti-lag it went to 19.

Great Job!
 
Dylan Kenny: yeah.. on slow computer everything will slow down.. to prevent this you have to change the settings of the script.. ;)

qewlkid9: anywhere above main should be ok.. what error message did you get and which other scripts do you use?

Mr.Mo: so it works fine? nice^^
 
My friend tested as well. He has 516 MB, I have 318 MB.

On his PC, with the server running on the same PC, the game is usually around 20 FPS, but with the antilag, it went around to 40.

I'm not even using the event antilag, just the priority one. Pretty cool. The server on the same PC made testing a living hell but now, its sweet :p.
 
Hmm.. So for example, i used the WAIT event command with 20frames to execute command. Will the game do it in 0.5 seconds? Will the timing in all WAIT commands be reduced by half if i used this script?
 

Jason

Awesome Bro

Umm... This is dumb but:
I added both scripts to my Script Editor (I don't know where to add second one, maybe thats why ?)
And I get an "Error Report" Whenever I test my game, any help would be appreciated as I need this script SO badly.
Thanks.
 
~Atlaswing~;152996 said:
Hmm.. So for example, i used the WAIT event command with 20frames to execute command. Will the game do it in 0.5 seconds? Will the timing in all WAIT commands be reduced by half if i used this script?

No. You can change the settigns so that it doesn't go too fast or too slow.
 
~Atlaswing~: its like Mr.Mo said.. and it always depends on the frame rate.. so a wait for 20 frames is 0.5 seconds with a 40 frame rate, but a whole second with a 20 frame rate..

jbrist: both scripts have to be put directly above main.. if this does not help.. what error message do you get and which other scripts do you use?
 
Hi, I'm using this script and it is awesome, although I must provide options from menu to change values to make it work the best. I have a question though (this happens after installing your antilag script):

Suppose I have some animated events (e.g. burning fire), then I scroll the screen away. When the animated events are just about to leave the screen, they suddenly stop animating, leaving "frozen frames" on one edge. They always stick to that edge, even if I scroll to another direction, until I move to the next map. (Usually this happens on animated events that are bigger than normal-sized charsets; I haven't tried on normal-sized events.) How do I fix this?

I'll provide screenshots as soon as I gain access to my RMXP project.

Thanks for this script anyway, it helps a lot on my less-powered PC.
 
just add an empty comment in this event.. they "freeze" because their coordinates are already out of the screen, but the sprite isnt yet.. maybe I'll try to prevent that.. but it would slow down the script again..
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top