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.

Zeriab's Anti Event Lag System ~ Version 1.2

This script Rocks...!
However... The "Sun Effect" Script by Rataime errors out all the time and the script "Particle Engine v2" By: Near Fantastica does not work at all.

I will have to forgo using this script until it is compatable with the both two scripts, or the makers update their scripts to work with this one.

If you know of a quick fix to get this script to work with these two other scripts, let me know, I'll attach them below.

Fenwick "I must say, your script is truely amazing in the fact it solved other problems I was having..!"

EDIT: I moved the Sun Effect Script, works like a charm now. I tried out the "Mod" for the Particle Engine Script, and it worked perfect, however... When I leave the screen with the effect and then come back, the particles (graphics) are off. I use a switch to turn them on, so I check to see if the switch was turned off, and it is still on? The graphics will not show up unless I use the switch again to turn the particle engine on. It is as though the particle engine is not refreshing/resetting when I re-enter the screen with the effects on them.?

Anyhoo... All problems were solved but this last one above. Any help is well appreciated.

Once again, thanks in advance Zeriab,
Fenwick
 

Zeriab

Sponsor

Hey Fenwick.

Thanks for attaching the scripts.
I have tested the two scripts and as far as I could tell there was no problem with Rataime's "Sun effect" if you place it below my anti lag script.
I did encounter problems when placing the sun script above my anti lag script.
Basically let it look like this in the script editor:
Zeriab's Anti Event Lag System
Rataime's "Sun effect"
Do tell if you still encounter problems when trying this.

Another thing is the Particle Engine. To make this work use this little mod: (Paste below the Particle Engine)
Code:
class Spriteset_Map
  def update_character_sprites
    nf_particles_spriteset_map_update_character_sprites
    for sprite in @character_event_sprites
      next unless sprite.character.is_a?(Game_Event)
      if sprite.character.pe_refresh == true
        sprite.character.pe_refresh = false
        @particle_engine.remove_effect(sprite.character)
        @particle_engine.add_effect(sprite.character)
      end
    end
  end
end

I hope this helped you with your problems ^_^
Thanks for the nice comments

*hugs*
- Zeriab
 
Hi,

As promised, I tested the new script against f0tz!baerchen. I played around f0tz's settings while leaving Zeriab's at default (well, I don't think I need to play around with the settings).

I wish I could make a table...

Here are my test conditions:
- All background process is shut down (firewall, antispyware, antivirus).
- The only program running is RMXP and Notepad (to note down the results).
- My computer spec can be seen at second page.

I tested on five different settings as follows:
1. Zeriab's standalone script, no config.
2. Zeriab + f0tz, normal (75% CPU, 25% tolerance, normal priority).
3. Zeriab + f0tz, high settings (100% CPU, 50% tolerance, normal priority).
4. Zeriab + f0tz, high priority (75% CPU, 25% tolerance, high priority).
5. Zeriab + f0tz, extreme setting (100% CPU, 50% tolerance, high priority).

Main targets of my test were:
A. Small map
B. Large map with no events around
C. Large map with fairy
D. Large map with loads of goblins
E. Menu opened in large map (menu opened in small map is omitted)

The results are:
A. Small map
All settings had good 20 FPS, undoubtedly (although some settings started with 14 FPS).

B. Large map, no events
1 and 3: 3-4
2: 13-14
4: 14-15
5: 12-13
It's weird that somehow the latest Zeriab's script alone perform worse than the previous one (in my case). Also, combined with high priority, it gave no effect at all.

C. Large map, fairy
Not much improvement nor slowdowns, except setting #5 seemed to drop to 8-12 FPS but stable.

D. Large map, loads of goblins
1: 2-3
2: 8-9
3: 3-4
4: 7-9
5: 3-4
Seems we really have problem when dealing with too many events at once...

E. Menu (large map)
I decided to test this condition, since f0tz does affect the FPS in menu.
Setting #1, #3, and #5 does not affect the menu (20 FPS), while setting #2 and #4 somehow affect the menu (FPS varies based on the last FPS running when opening menu).

Note that this report is not intended to determine whose script is better, but for further improvements of any scripts. I am not affiliated with anyone when performing this test.

Hope this helps.
 

Zeriab

Sponsor

Thanks a lot Exsharaen for spending your time to do this for me.
I am a bit busy right now so expect an evaluation of your report in a week or two.

@Fenwick:
I just noticed that you edited your post. Sorry for not looking into it earlier.

Thanks ^_^
- Zeriab

Edit:
I noticed the direct link doesn't work right now.
I'll fix this as soon as possible. Until then I suggest downloading the demo and getting the script from that.
Sorry for the inconvenience.
 

Zeriab

Sponsor

The link to the script in the first post has been fixed ^_^

@Fenwick:
Try placing this code just above main and tell me what you get. (Below all other scripts other than main.)
Code:
alias Zantilag_XPML_read XPML_read
def XPML_read(markup,event_id,max_param_number=0)
  return if $game_map.events[event_id].nil?
  Zantilag_XPML_read(markup,event_id,max_param_number=0)
end

Tell me if this helps ^^

@Exsharaen:
Thanks again.
Could you provide your system specifications? That would please me ^_^

Your data seems to confirm a suspicion I had.
There are situation where my antilag script is not the best choice. It is heavier on small maps with few events.
Also there apparently are deficiencies on low-end computer with having this script alone versus combining it with other anti-lag scripts.

Could you possible sacrifice a bit more time and test it with f0tz!baerchen's script only?
When I tested it on my own computer I found that f0tz!baerchen's made the game run slower. Then again, I do have dual-core and since I RMXP only can utilize a single CPU changing the thread priority can only have an effect for the worse.

Also notice that there can still be compatibility issues if you use both mine and f0tz!baerchen's antilag. There could easily be some minor event issues. Maybe the always or never update event features you can use in my script doesn't work properly.
The order of which the antilag scripts come in can also be of significance.

Another thing I have to test as well is whether or not using the SDK changes the performance of my antilag.

Thanks a lot again for doing this for me.

*hugs*
- Zeriab
 
Good News:
I must say, all your mods worked great for my scripts. The ones I was having trouble with, are now working...

Bad News:
I found 1 last script that I forgot to check to see if it works, and it doesn't. When ever I use it, I get an error with the "Sun Effect" script
the script is called: "Memorize Location"

The error is on line #126 of the "Sun Effect" script, the line is this:

for i in 0...$scene.sun.size

The error reads, Unknown method for "Size" and only occurs when I try to use the "Memorize Location" script not any other time.

This happens when I use the "class RecallLocation" call when you are teleported back to the last memorized location (hope this helps?)

I'll put up the "Memorize Location" script if you want to look at it for a fix (if you have time). Or, if there is a way to impliment a switch to turn off your script when I use the one and then turn it back on when it is done would work also. But I noticed this is to be inserted in your next version, I can wait if so desired.

EDIT: Currently using a work around so I do not have to use the Script "Memorize Location" which is conflicting... So, I can wait for your update now. Now that I think of it, maybe I shouldn't have posted this entire message, seems like I just wasted the readers time here. I shouldn't have jumped the gun and asked for help but stewed on it a few days to come up with the answer.

EDIT 2: Problem fixed, resorted all the scripts in the project to discover one was conflicting with another, which intern gave me the error. No need for help on this little topic here. Just ignore this entire post, and once again, sorry for the mix up.
The Anti Lag System Script works wonderfully with all my scripts now..!

Once again, thank you so much for your help.

Fenwick
 

Zeriab

Sponsor

Hey Fenwick.

I was unable to duplicate the error you received.
All abnormal behavior I found was that the particle engine didn't function properly when you transfer a player to somewhere on the same map. This did however seem to happen independently of my anti lag script.

Could you possible provide a demo?
 

shinnn

Member

Nice job!
But it shows an error when I use it with the Dynamic Shadows' script.

I get error with this line:
"return if event.list==nil"

I've attached the script.


Thank You.
 
shinnn;307648 said:
Nice job!
But it show a error when I use it with the Dynamic Shadows' script.

I get error with this line:
"return if event.list==nil"

I've attached the script.


Thank You.


alias Zantilag_XPML_read XPML_read
def XPML_read(markup,event_id,max_param_number=0)
return if $game_map.events[event_id].nil?
Zantilag_XPML_read(markup,event_id,max_param_number=0)
end


Shinnn - Try the Mod above, it worked for me..! It fixed the same error you are reporting that I had with both the "Sun Effect" & "Dynamic Shadows" scripts.

Fenwick
 

shinnn

Member

@Fenwick: I know almost nothing about scripts so... can you tell me how can I use this MOD?

I've placed it above main, but It shows an error (another one) and i just can't get it to work =/

Line: Zantilag_XPML_read(markup,event_id,max_param_numbe r=0)

Something like it means nothing for the game I think.


Thank you.
Sorry about my bad english.
 
shinnn;308178 said:
@Fenwick: I know almost nothing about scripts so... can you tell me how can I use this MOD?

I've placed it above main, but It shows an error (another one) and i just can't get it to work =/

Line: Zantilag_XPML_read(markup,event_id,max_param_numbe r=0)

Something like it means nothing for the game I think.


Thank you.
Sorry about my bad english.

Shinnn: Look at the line there, you have a space after the "e" in:
"(markup,event_id,max_param_numbe r=0)"

try fixing this to: "(markup,event_id,max_param_number=0)"

Just open up the Script Editor where the scripts are, insert a new script below the script "Dynamic Shadows" and past this right there.

This is all I did, and it worked for me.
I to am just learning all about scripts, slowly grasping and able to edit them.

Hope this helps?.

Fenwick
 
I think I should ask you for two apologies:

1. Sorry for the late response.

2. Sorry that I can no longer help testing. My computer is being upgraded, so the spec I am using is no longer testable. By the way, my current computer spec (before upgrade) is here: http://www.rmxp.org/forums/showpost.php?p=282890&postcount=13

Maybe I can test it on my friend's computer with less higher specs than (or at least similar to) mine.

This is the result as you asked. I used the same targets as specified here, but this time I can only test the very default configuration of f0tz (75% CPU, 25% tolerance, normal priority).

You were right, when used alone, f0tz did slow down the game. The small map didn't have problems (20 FPS), but the large map drops to 4 FPS. When encountering goblins, sometimes it drops to 1-2 FPS and was quite unstable. Menu was affected too by running 4 FPS.

I will tell you if I can conduct the tests again in a similar specs and give you the results.

Hope this helps.
 

Zeriab

Sponsor

It is alright Exsharaen. I am grateful for the help you have provided ^_^

I got the idea of setting the default buffer size from 2 down to 1. It will become very likely that when using sprites larger than normal they will get stuck to the end. To come around this that I will give the ability to specify the different buffer-sizes for specific maps. This will be an addition to the default buffer-size.
You can currently do it, but since you are required to change the buffer-size yourself most will not do this. It is only really if something goes wrong that most people will change the buffer-size. That at least is my guess.
So yeah, new standard buffer size ^_^
I would like you to test how changing the buffer size from 2 to 1 affects the system. It would be very nice if you had the time ^_^
Oh, and I don't mind tests from high-end computers as well. They could easily behave differently. Especially if you have a multi-core

I also need to update the topic. I need to put the solutions to the known compatibility problems into the first post

Thanks for sticking with me

*hugs*
- Zeriab
 

Zeriab

Sponsor

Thanks ^^

While it might seem to 'work' with Near's anti lag I recommend that you either use Near's or my anti lag.

I believe that in some situations my script is faster and in other situations Near's is faster.

I could potentially script it so that you can switch between Near's and my script at runtime. This will however require a lot of custom scripting.

My suggestion would be that you test both scripts and decide which you want to use.
 

Zeriab

Sponsor

Updated to version 1.2. Major improvements on the topic as well

Version 1.05 ------------------------------------------------- (2007-11-18)
- Fixed bug where sprites might not be disposed when changing scene.

Version 1.1 -------------------------------------------------- (2008-04-10)
- Added declaration to which common events to update

Version 1.15 ------------------------------------------------- (2008-06-19)
- Added automatic detection of which common events to update (optional)

Version 1.2 -------------------------------------------------- (2008-07-04)
- Fixed a case where an event could be registered twice causing transparent
  events to look less transparent.
 
Zeriab,
    I am liking the new version..!  :thumb:

    Oppsss... a problem just poped up on me. 

    I am trying to insert a new script and it is erroring out "Anti Lag Event System v1.2".  I was wondering if you can help me out on this one as you have helped me out tremendously in the past.  I have uploaded a demo with all the scripts in it including:

   SDK v2.3
   AntiLag By: f0tz!baerchen v0.71
   Anti Lag Event System v1.2
   Neo Mode 7 - 12/05/08 By: MGCaladtogel
   MACL 2.1

     Now, when run, the error message is:  "'Script 'Anti Event Lag System v1.2' line 981: NoMethodError occurred.  undefined method '[]' for nil: NilClass"

     When I go to the line number, it points to:

     980           # Finds the sprites on the event's old position
     981           sprites = @character_spritemap[[old_x,old_y]]

     Below is the link to the Demo:

      http://www.megaupload.com/?d=XDXZSEHF

    I must point out, I have tried rearranging the scripts also, with no such luck.  I've tried everything I can think of, this is why I now turn to you  :down:

     Any help you can give me on getting these scripts to work with each other is most appreciated..!


Thanks again in Advance,

Fenwick
 

Zeriab

Sponsor

Hey Fenwick

Your problem resides in that the Neo Mode 7 script changes the spriteset map. Those changes are not compatible with the changes done in my anti lag script.
Here is a version where I have edited the spriteset map part out of the script. It should work with this version: http://zeriab.plesk3.freepgs.com/root/s ... iteset.txt

I see that you also have the antilag script by f0tz!baerchen
I recommend that you use either one or the other, but not both at the same time.

*hugs*
- Zeriab
 
Once again, you pull through...!  :lol:
However, this script it seems is really buggy now or picky, I will see what the creator of the script can do for these problems though.

Thanks a million, once again,

Fenwick
 

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