Jump to content
Lucas22

Question about event movement outside the screen

Recommended Posts

Hello everyone, I don't know if my question is going to sound weird, I'm trying to make a game with a real time system (I'm inspired by Zelda Majora's Mask), I know it's not really possible, but I would like keep its appearance.

I know that events outside the map where the player is do not exist, they are not instantiated. We cannot for example trigger an event move, change the map, and when returning, the movement continued during this time. That said, even within a map it does not work as I would like. If I trigger an event (in parallel process) which is supposed to carry out a displacement (pathfinding), the displacement will be carried out only if the event enters the screen area of the player. This can give rise to inconsistencies such as for example: a guard patrols around the city, he passes in front of the player and leaves the screen, the player takes the opposite direction and expects to find him along the way , but in fact the guard stopped immediately after leaving the screen and waited for us to get closer to resume his patrol.

 

I wonder two things: 1 / Is this problem an inherent part of the software limits or a script could solve it?
2 / Otherwise, do you have any ideas to get around the problem and maintain a semblance of life in real time in the game? I had thought of transporting the event case by case depending on if the player is supposed to cross his path at this time, but it seems really too heavy and complicated.

 

I hope I have been as clear as possible, thanks for your attention!

Share this post


Link to post
Share on other sites

there are scripts that will do what you want.

One is for always update by kread-ex. It will make events carry on even if not on the screen.

Another is remember event position by shaz

Share this post


Link to post
Share on other sites
40 minutes ago, roninator2 said:

there are scripts that will do what you want.

One is for always update by kread-ex. It will make events carry on even if not on the screen.

Another is remember event position by shaz

 

Hi Rominator !, thank you for your reply.
For the Kread-Ex script, it seems to be what I want, the event would continue to advance until arriving at destination, even if this destination is far outside the screen (and the visibility of the player) . But I searched on the Kread-Ex site (https://grimoirecastle.wordpress.com/) and I did not find said script unfortunately.
For the second, I do not think that remembering the position of the event can be really useful in this context. The problem remains the same, what happens for the event outside the player screen.

Share this post


Link to post
Share on other sites
# Put [update] in the event's name and the move route will always update.
#
# ~Kread
 
class Game_Event < Game_Character 
  #--------------------------------------------------------------------------
  # * Determine if Near Visible Area of Screen
  #--------------------------------------------------------------------------
  alias_method(:krx_alfix_ge_nts?, :near_the_screen?)
  def near_the_screen?(dx = 12, dy = 8)
    # YEA compatibility
    if $imported && $imported["YEA-CoreEngine"]
      dx = dy = nil
    end # YEA compatibility
    return true if @event.name.include?('[update]')
    return krx_alfix_ge_nts?(dx, dy)
  end
end

 

Share this post


Link to post
Share on other sites

Woah! Thank you Rominator, I had lost hope, but ultimately it worked well. In fact I have a script which is somewhat incompatible, its simple anti-lag of MOG. Because there is a function UPDATE_OUT_SCREEN_RANGE whose value can be fixed. Afterwards, I don't know if I can just deactivate this function or delete the script altogether.

Share this post


Link to post
Share on other sites

Yeah; anti-lag is fine for some things, but it will make parts of the game weird. All anti-lag scripts will have this issue. If you have maps that are small and little going on as far as events go, anti-lag will do damn little, and to boot, those running on integrated graphics tend to not see any boost in performance with anti-lag (since it's all handled by the CPU instead). All that said, I think the best option for anti-lag is TheoAllen's anti-lag script.

Share this post


Link to post
Share on other sites
4 hours ago, PhoenixSoul said:

Yeah; anti-lag is fine for some things, but it will make parts of the game weird. All anti-lag scripts will have this issue. If you have maps that are small and little going on as far as events go, anti-lag will do damn little, and to boot, those running on integrated graphics tend to not see any boost in performance with anti-lag (since it's all handled by the CPU instead). All that said, I think the best option for anti-lag is TheoAllen's anti-lag script.

 

Oh, thanks for your advice PhoenixSoul. I rather use a lot of script at the same time, I am also often concerned about compatibility issues. I also plan to have large maps such as cities where there will be events that move freely, I also do not exclude doing parallax mapping. For the moment, I don't know what it will give in terms of in-game performance.
Otherwise, I have a paid "anti-lag" script called Effectus, it looks rather solid and in any case it does not prevent me from having events that move outside the screen, phew!

Share this post


Link to post
Share on other sites
1 hour ago, Lucas22 said:

Effectus

This one is good, but does not make anti-lag perfect. I use Effectus myself.

But I was still getting frame drops, so I starting using MhinRa's FrameRate Stabilizer.

I modified it a little and now I get 120 fps. Which for my project with 525 scripts, makes it playable again.

Share this post


Link to post
Share on other sites
Posted (edited)
26 minutes ago, roninator2 said:

This one is good, but does not make anti-lag perfect. I use Effectus myself.

But I was still getting frame drops, so I starting using MhinRa's FrameRate Stabilizer.

I modified it a little and now I get 120 fps. Which for my project with 525 scripts, makes it playable again.

Wow, 525! Haha, I feel like I have exaggerated on my side, I'm still around 170.

By the way, I will be curious to take a look at your project! I will go see MhinRa's FrameRate Stabilizer, it can always be useful in the future.

PS. Suddenly I understand why you are so good at script compatibility, with 525, it gives you a hell of an experience.

Edited by Lucas22

Share this post


Link to post
Share on other sites
13 hours ago, roninator2 said:

If I ever get a demo finished.

Massive project for one person.

Yeah, I see, especially if you are a perfectionist and ambitious, it progresses very slowly, it's also very frustrating if you do not know how to manage development.

Otherwise, I did a Google search for "MhinRa's FrameRate Stabilizer", without success. Isn't there a typo or whatever?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×