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.

Asking for a revolutionary Anti-lag script

Status
Not open for further replies.
Did you ever try to put the frame rate to a value like 2000?
A strange thing happens at that value, when you have too much events acting, it appears a kind of rallenty effect (for who doesn't know, it's the slow-down effect, like you see at cinema).
I make an example: If putting 40 fps as default, in a map with too much events you get lag.
What do i mean with lag? I mean that you have 10-20 fps so you don't see the game smoothly, but events do still move at the same speed. So it's like there are 30-20 frame missing every second.
If instead you put 2000, then you have a slow-down effect: you get to have less fps, and the events move slower too. There are not frame missing, it's perfectly smooth. But things move slower.
I think the RGSS engine does that, but i'm not sure, and i suppose we could use this thing on the normal frame rate.
The script i need should get that rallenty effect when the computer is not able to play the RPG smoothly.
Anybody has an idea on how we could realize it?
This would be a new-concept kind of anti-lag script.
PLEASE don't post about old concept anti-lag scripts like Near fantastica's, Lambchop or whatever. I don't need to stop the update rate of out-of-sight events. I really don't need that.

Thanks
 
Okay i'll check, i have golem's link.
@ chaos - please put a link of what you say cause i don't know where to look for it.

Sand golem's script it's just like near's but simplified.
Please read what i wrote before posting.
I'm asking a new concept of anti-lag now, and i don't need it for giant maps with tons of events, i need it for little maps but when you have all the events near you, like an army fighting another army.
So near's anti lag conception totally fails.
(srry for double post)

Stop double posting. Next one will be a warn.
... this is not a double post, it's an answer to a post... should i answer in the post before????? how can the people know i answered then...
 
Please stop double-posting, Chaosg1 already told you to use the edit button. Also, try the search function, as a script is most likely found in this forums as long as no link or such is given. Besides, it's near the top of submitted script's section...

For the script itself, you probably don't know, but scripting is not equal to magic... just because you want something, that doesn't mean it's possible. RGSS is very limited compared to Ruby or other languages because it uses hardcoded scripts and interpreters (well, of course both can be modified, but it still slows down the whole construct) which cause the lag. It's not like you can just put '$lag = false' in Main class and no lag will appear anymore... -.-
 
-____________________________-
Okay guys, maybe i'd better close the request as really few people read what i ask, and lots sends me to old concepts anti lag scripts that have NOTHING to do with what i'm talking about and telling me OBVIOUS things as "use the search botton" i should answer "use your brain and think, if i'm asking here is because nowhere else i found what i want".
The script you say, Bluescope, is TOTALLY USELESS to me, is it so hard to understand?
I'm not saying script is easy, i'm just making a request, if it's not possible, then i will have no help and that's all, but to me it seems simple.
I just want this script to be applied to all the game, because here it is possible to activate it just pressing F8 in playtest title.
Maybe it's enought to change it and make it work in scene title withouth needing to press F8, or something like that.
It's not such an hard work i believe.
Ok? Don't think about its its use, just do it.
If somebody manages to do it i'll explain in the detail to everybody how it works.
Thanks. (please somebody explain me how to put it in code mode):

-------------------------------------------
Code:
begin
  SDK.log('Playtesting Game Rush', 'sandgolem', 1, '19.07.06')
  rescue
end

if $DEBUG
  class Scene_Title
    alias sg_gamerush_update update
    def update
      sg_gamerush_update
      if Input.trigger?(Input::F8)
        $game_system.se_play($data_system.decision_se)
        Graphics.frame_rate = 20
      end
    end
  end
end


If i made some double post it was just a mistake sorry, actually i edited lots of time all my posts.
 
Mike Portnoy said:
@ chaos - please put a link of what you say cause i don't know where to look for it.
Obviously, the search function doesn't seem to be that OBVIOUS -.- And I didn't tell you a script you should use, I just pointed towards the search function you seem to be familiar with but still don't use for some weird uber-galactic reason, I suppose... -.-

Also, if you think it's easy, just do it yourself O_o
 
Ok What you ask is to Make vairous Updates speeds for the events right so like An event is updated only each 5 seconds and other depending on your comments...
Good points: (for me)
Would fill your request :P
Bad points:
Would still lagg, because nears stop completly the update method, and sometimes it still lags...
Will add lag because the interpreter would need to read all the comments to check What's the update rate of that event, to do this you would need to edit Game event and scene map giving Lagg.

That's what I got from your request is that what you want?
 
That's a kind of "secondary request", for the request itself look at 5 posts before this one.
I'm happy somebody finally read what i wrote ^^.
Anyways, what you say depends from the events also, because if events are very big and complicated, than you would have less lag, if they are small and simple, yes u'll have more lag in that case.
Anyways like i told it's just a "secondary request", and it's much harder than the first request itself, that for me is more important.
 
Mike, your edited version of that script of mine on page 3 is actually the default way RMXP works :)

For your maps, you might want to try combining those events into several. Like, using an event character with nine soldiers on it instead of nine seperate events, etc.
 

Kaoii

Member

Mike Portnoy said:
Okay guys, i think i'll better close the request as nobody reads what i ask, and sends me to old concepts anti lag scripts that have NOTHING to do with what i'm talking about and telling me OBVIOUS things as "use the search botton" i should answer "use your brain and think, if i'm asking here is because nowhere else i found what i want".
At least he took the time to reply 0.o
 
Are you sure sandgolem that there isn't any difference?
Cause i never saw the rmxp slowing down on lagging situation...
Are you really sure it's the exact copy?
Maybe rmxp has a line more or less, i don't know but if it was identical your playtest rush script should lag, not do rallenty. Am i wrong?
Anyways, i looked for any "Graphics.frame_rate = 20" but haven't found any.
Maybe the concept is the same but the script has some difference.
Let me know if you are sure about that.

P.s.: what about the 9 soldiers? u mean doin a big charaset that does look as 9 soldiers? It's not such a bad idea, i'll remember it for walking situations, but i must make some hits animation on any soldier, and as they are moving i must use events to be sure the hit goes on them, can't even use an animation script...
 
Bump... i'm really getting mad with this script, i do try to understand why it does rallenty instead of lag... even if i put it at 20, isn't the same thing of leaving rmxp as default...

P.s.: I refreshed the request so that it's clearer... somebody could be confused by all that edits and it wasn't understandable what was my real request, sorry for the mess.
 
Mike Portnoy said:
-____________________________-
Okay guys, maybe i'd better close the request as really few people read what i ask, and lots sends me to old concepts anti lag scripts that have NOTHING to do with what i'm talking about and telling me OBVIOUS things as "use the search botton" i should answer "use your brain and think, if i'm asking here is because nowhere else i found what i want".
The script you say, Bluescope, is TOTALLY USELESS to me, is it so hard to understand?
I'm not saying script is easy, i'm just making a request, if it's not possible, then i will have no help and that's all, but to me it seems simple.
I just want this script to be applied to all the game, because here it is possible to activate it just pressing F8 in playtest title.
Maybe it's enought to change it and make it work in scene title withouth needing to press F8, or something like that.
It's not such an hard work i believe.
Ok? Don't think about its its use, just do it.
If somebody manages to do it i'll explain in the detail to everybody how it works.
Thanks. (please somebody explain me how to put it in code mode):

-------------------------------------------
Code:
begin
  SDK.log('Playtesting Game Rush', 'sandgolem', 1, '19.07.06')
  rescue
end

if $DEBUG
  class Scene_Title
    alias sg_gamerush_update update
    def update
      sg_gamerush_update
      if Input.trigger?(Input::F8)
        $game_system.se_play($data_system.decision_se)
        Graphics.frame_rate = 20
      end
    end
  end
end
If i made some double post it was just a mistake sorry, actually i edited lots of time all my posts.
Simple.

Code:
class Scene_Map
   alias mr_mo_update update
   def update
      if Input.trigger?(Input::F8)
        $game_system.se_play($data_system.decision_se)
        Graphics.frame_rate = 20
      end
   alias mr_mo_update
   end
end

Put it above main. Change 20 to 20 - 120. I advise 50.
 
mmm i supposed it was like that...
Anyways gives error, don't know why, it sends me to the last end.
Maybe u forgot the SDK log?

P.S.: maybe i managed, i'm trying now the edit i did, seems to work!
Mo, u're right anyways, 20 makes it slower!

Edit: Yes i managed. But now i'm totally confused.
When i put the update frame rate at an high value as 120, then i get a rallenty instead of lag.
When i put 40, that strangely correspond to the default setting (that is not 20...), i still have lag and not a rallenty. Wtf is going on?
Anyways here's the code as i think should work

Code:
begin
  SDK.log('Playtesting Game Rush-antilag?', 'sandgolem edit by Mike_Portnoy', 1, '30.08.06')
  rescue
end

  class Scene_Title
    alias sg_gamerush_update update
    def update
      sg_gamerush_update
      
        Graphics.frame_rate = 40
      
    end
  end

Try to make a map full with events moving randomly, and put this first at 40, then at 400.
You'll get lag with 40, and a rallenty with 400... what the hell does happen????
 
oops.. I forgat to remove the second alias XD.;

Code:
class Scene_Map
   alias mr_mo_update update
   def update
      if Input.trigger?(Input::F8)
        $game_system.se_play($data_system.decision_se)
        Graphics.frame_rate = 20
      end
    mr_mo_update
   end
end
 
Mo, the script has only a little error: it activates only if you press F8
The script i posted before it's what i wanted but... it works really strange... u get a rallenty on lag ONLY if you put a very high framerate... WHY?
Why does this happen, i really don't get it!!
 
I tried telling you...
Its the RGSS player, I don't exactly know why, but I know that it doesn't work.

if you want to change the frame rate permanantly then put this in Main, first line;
Graphics.frame_rate = 50

for your lag problem, what exactly is there on the map?
 
It's not a problem, i want to solve everyone's lags problems... but this is such a strange thing... it rallenties just on high frame rates and lags with 50...
Anyways i'm using a map with 2 armys going toward each others to check if it works...
Does anybody know why rmxp slows down when u put an high frame rate instead of lagging?
 
Status
Not open for further replies.

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