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
 

Anonymous

Guest

How difficult is it, exactly, to use capitalization, punctuation, and spell out words like "you" so people don't have to struggle to read your posts? This isn't a chat room, you have plenty of time to type. Respect yourself enough not to sound like you're a 10-year-old AIM user. People will judge you by your typing, and right now, you don't "sound" smart at all. Not to mention not being all that polite, but that's another story.
 
Sorry people, when somebody answers me with the only one thing i know and i don't want to hear i just get angry.
Try to think if you ask someone about London city and they answer you "it's a city"...
If people judges by typing... well... what should i say?
That's really a smart thing, judging by typing oh yeah!
Sorry i'm getting too bad, i'll stop.

Ccoa, i know you are a very good scripter as i use some of your scripts, and i believe that you know how the RGSS player works.
Do you know anything about that?
Would be glad to get someone to clear my idea as everything now is messed up.

P.s.: if i do grammatical errors, just correct me, it's never too late for learning.
 
Do you want to increase the frame rate so you can force it to run faster, or do you want to take away all the useless event updates and checks so it has less work to do, therefore making the game run smoother and faster (Theoreticly)?
Or do you want to reduce lag so you don't have to hold down the right arrow key until the hero gets where you want it to get?
If the screen is jerky as the character moves then it'll be the computer's fault, but if everything runs slow, such as your characters and events move to the next tile slowly and the message windows fade in slowly, then it's the game's fault.
I hope that helps you to try and explain your problem. This must be very frustrating for you.
 
Yep is quite difficult to understand.
Anyways what i wanted to do it's to get advantage of that RGSS behaviour, that is: when he really cannot reach at all the frame rate, it slows down by himself.
So i'm asking if anybody could mind a way to do that on the normal frame rate, because this happens just if the game is fastened.
If it's like you say, that is fault of the game, there must be some system of the game that says "hay i can't do it, slow down a bit for a moment while i'm working!", what i want it's to take advantage of it, but i really don't know if anybody here does really know what causes it... seems like i'm asking the cause of cancer, nobody knows.
 
I think I'm beggining to understand.
When the project can't reach it's normal frame rate, example of 20 fps, then it'll decrease it to 15, you want to change that rule to something new that'll keep the game running at it's same frame rate from when you first loaded up the title screen.
What causes that is your computer. You're probably running too many hidden programs underneath game.exe, so then you should open up task manager and stop a few tasks running underneath what you want. Am I right in saying it's possible to increase priority over the process speed of game.exe, devoting all the speed the computer can give it to your project so it won't run slower, so the fps will stay at 20?
Maby someone can write an rgss code that actually forces 20 frames, and only givesw slack to 19 fps or 21 fps.
I think this is getting close to your idea.
 
Yes, you are surely the closest ever.
Now, what i'm saying, i don't care if my computer has too many processes, it's just nonsense that a player should close all his processes and have a super power computer just to run a 2d game, a 2d game should run on an old game boy... not on a 2ghz processor with 1gb of RAM computer.
The problem is not my computer actually, the RGSS engine itself does too many things, as it has to read tons of script lines, meanwhile continue checking all the events, switches, conditional brantch and everything.
So when you make a map too complicated with events that have more pages, conditional branches and things like that no matter what PC you have... you'll get lag.
Anyways, yes, the script should be something that allows the game to have its fps between 1 and 20, forcing it to 20 just if it's possible.
So if the system cannot reach (and only when it cannot) the 20 fps it's allowed to get a little slower instead of making that annoying lag.
 
What about if the game shows any sign of slowing down then it'll drop the frame rate imediately by around 2-3 fps and as soon as it calms down it raises it back up.
It's when the game starts lagging that it lowers the fps, you'll want it to lower it before the lag, so when on a map with 3 conditional branches it'll lower the fps then, or even better, the game predicts when it'll lag and decrease the fps.
You'll want that instead of what you're asking, which is to have rgss try 20 frames constantly until it is definately impossible. In theory, that'll cause lag.
The only problem is that computers can't think, so they can't predict the same way plants and animals do, it'll only decrease fps when there is a problem.
(I understand entirely what you want.)
 
No, wait this is excessive, by the way, this is a thing already realized on a game (Lord of The rings, i think it was the chapter II).
They just made the game run slower when it couldn't reach the right framerate.
A thing that makes the player crazy, as that game requires too much RAM and processor ghz, it always goes slow.
So what i say wouldn't really cause any lag, as it is not always checking if the frame rate is possible, it doesn't predict it.
I'm quite sure that the RGSS engine FORCES the game to go at 20 fps, and that causes lag, because the game can't slow down, and forced to have a 20 fps rate the only thing it can do is skip some frames, that makes the lag effect.
If i could short down to a sentence what i want, it would be:
Make 20 fps be the MAX frame rating.

I don't know if it's possible, but if someone manages, we would eliminate every kind of lag from all kinds of rmxp games in all the situations that are possible.
 
Ah! Yes!
I couldn't understand because it would've been a too simple idea.
It's possible to change the frame rate, but not give it a maximum. 20fps i think is the default for all rmxp games, but if you have it as 15fps max then that should reduce lag on slower computers.
Someone might be able to fill your request, I have some ideas, but I can't program Ruby.
Rgss doesn't really force 20 fps, it uses 20 as a guideline for the project to run on.
 
Mmmm if it doesn't forces i wonder then why we have lag...
Anyways, yes, you perfectly got the idea, if a good scripters reads this topic, maybe we could finally see the anti-lag "rallenty" script lol :D

P.s.: Fixing 15 fps as max, yes reduces lag, but the game is a 25% slower

Thank god somebody understood me finally, do i explain myself so bad?
Thanks for giving me this satisfaction omega :D
 
Mike Portnoy said:
Now, what i'm saying, i don't care if my computer has too many processes, it's just nonsense that a player should close all his processes and have a super power computer just to run a 2d game, a 2d game should run on an old game boy... not on a 2ghz processor with 1gb of RAM computer.
I understand you better than Omega, I suppose... you're not asking for an Anti-lag script, you're asking for magic. The bad translation of the RGSS Interpreter causes the lag, to fix it, you'd need another programming language and get rid of RMXP, or alternatively a better computer. Since you decline accepting any one of these options, you want some wizard to script you an impossible thing... and an old Gameboy isn't even capable of colors, so that'd need a little magic here and there, too... -.-

For what ccoa was saying, you probably got her wrong... judging a person from what he or she is writing alone sounds faggy, but it's the only way to judge a person inside forums. Besides that, it's a common that you try to be polite if you're asking for something, and besides getting angry about people not getting your obviously indescriptive descriptions, you could express a little politeness by writing polite posts, which means caring about what the readers read, and that is what (at least in my opinion) ccoa meant by taking care about how you write.
If all that won't convince you, notice that ccoa is an administrator in these forums, so do as she says if you write in them.

And finally, to your request... if what Omega says is what you want, it can be kinda hard to do... the difficult thing is to check the frame rate, as the game always try to run at the maximal ammount of frames possible, it's just the computer system that isn't capable of doing this. You won't be able to get anything from your CPU inside your RGSS code block...
 
I know, i'm asking for magic.
If i do that it's because i saw lots of magic before in this forum.
So, if it does exist on this planet somebody who can change that interpreter someway i'll wait for him to come.
If it doesn't, well... no problem.

P.s.: The game boy color is actually very old.
 
I guess the interpreter is a part which mustn't be changed because the EULA doesn't allows it; I guess it's one of the hardcoded functions of RMXP.exe... I don't have enough experience with external program modification, so I can't say if there's a way of doing it by DLLs or anything, but even if it would, it'd be a hard job to do... I doubt anyone in here could actually do it, and that's not because I think the programmers in here are untalented, but because I think it's hard to modify a program you don't know... but there is a chance, though ^_^
 
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