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.

Game lagging after battle, script count

Hi all,

I've noticed that the game hangs for a very long time after a battle probably about 140 frames.

I've checked the entire battle system, no problems found there, it seems to reside in my "almost untouched" scene_map file.

Now, the problem goes away when I elliminate ANY two custom classes I made. Doesn't matter which ones, at all.

So, my question is, does anyone know of a script "limit" on the game?

I've custom written about 8000 lines of code, that do everything from a complete lockpick, stealing system to a wanted and polarity system with reputation.

If you have any idea of what this could be please let me know.

Thanks!

EDIT: NEVERMIND! I just figured it out, it appears that the location of my scripts determines when they are ran. I thought that Ruby was "indexed" meaning that it just jumped to an indexed location when a script was called, this ISN'T true! It's cycled, so when I was calling the battle, the ending script was before the begining script, so Ruby had to cycle through all the scripts in my game to reach it. I've just finished trying this about 7 times, mixing up the locations of my scripts, and yes, it appears that I'm both correct in my theory of Ruby's non-indexing engine and I'm also an idiot for not taking into account that it opperates this way. Sorry for the post.

Oh. just an update, I'm now able to have my scripts in all sorts of funny orders, the real problem was the position relative to the SDK's battle script. Kinda funny. Yeah. At least it's working now. I'll post more when it backfires on my 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