New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer and parallel processes issue #1165

Closed
zell180 opened this Issue May 16, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@zell180

zell180 commented May 16, 2017

Name of the game: Personal Project

Player platform: Windows, Android (same issue)

Attach files (as a .zip archive or link them)

easyrpg_log.txt
TestEasyRPG.zip
Video Issue.zip

Describe the issue in detail and how to reproduce it:

Hi, to help you detect the issue, the main coder of our game created a small RPGM2K3 project containing only the code and the resources needed to test the problem. If he plays this "game" on RPGMaker (on its PC), when the timer elapses, the animated finger disappears from the screen, no more "pressing" sound and he sees only a relaxing black screen (while in our full game the action goes on). If he plays it on EasyRPG (on its Galaxy S7), when the timer elapses the finger remains on the black screen forever, still animated and still making noise. Our main coder's guess is that, for some reason he dosn't know, the two parallel processes which control the animation/sound of the finger and the response to the user's key press, in order to fill the bar, in EasyRPG are not deactivated when the timer elapses. Both parallel processes are actived by the "Switch 0975: timer special" and when this switch goes OFF, they should stop processing. This doesn't seem to happen in EasyRPG.
Let us know and thank you.

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry May 16, 2017

Member

The problem is that the code checks for "Timer >= 1s" and afterwards "Timer <= 0s". And when both cases are false the event is deleted.

Both false didn't happen in RPG_RT but for EasyRPG this was the case because the timer decrements and will be in the interval from 0.01s and 0.99s. But RPG_RT actually rounds this up to 1s..., so the 1st check is true until the timer is really 0.00s.

Member

Ghabry commented May 16, 2017

The problem is that the code checks for "Timer >= 1s" and afterwards "Timer <= 0s". And when both cases are false the event is deleted.

Both false didn't happen in RPG_RT but for EasyRPG this was the case because the timer decrements and will be in the interval from 0.01s and 0.99s. But RPG_RT actually rounds this up to 1s..., so the 1st check is true until the timer is really 0.00s.

@zell180

This comment has been minimized.

Show comment
Hide comment
@zell180

zell180 May 16, 2017

How can we fix this with little effort?

zell180 commented May 16, 2017

How can we fix this with little effort?

@fdelapena

This comment has been minimized.

Show comment
Hide comment
@fdelapena

fdelapena May 16, 2017

Contributor

A fix has been committed for this bug, if you want to test it, you may try the following test builds:

Contributor

fdelapena commented May 16, 2017

A fix has been committed for this bug, if you want to test it, you may try the following test builds:

@zell180

This comment has been minimized.

Show comment
Hide comment
@zell180

zell180 May 16, 2017

Our coder changed the code of our game and then it worked in RPGMaker and in EasyRPG too. By the way, I used your Android test build with the old version of our code (the one that didn't work in EasyRPG only) and it worked fine. We prefer not to change all the points in our game where we do use timers. Therefore: can you confirm me that this fix for the timer will be part of the next official build of EasyRPG?

zell180 commented May 16, 2017

Our coder changed the code of our game and then it worked in RPGMaker and in EasyRPG too. By the way, I used your Android test build with the old version of our code (the one that didn't work in EasyRPG only) and it worked fine. We prefer not to change all the points in our game where we do use timers. Therefore: can you confirm me that this fix for the timer will be part of the next official build of EasyRPG?

@Ghabry Ghabry closed this May 16, 2017

@Ghabry Ghabry reopened this May 16, 2017

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry May 16, 2017

Member

Yes. Because thats a bug in Easyrpg it wiĺl be fixed in the next release

Member

Ghabry commented May 16, 2017

Yes. Because thats a bug in Easyrpg it wiĺl be fixed in the next release

@zell180

This comment has been minimized.

Show comment
Hide comment
@zell180

zell180 commented May 16, 2017

Thanks!

@zell180 zell180 closed this May 16, 2017

@Ghabry Ghabry reopened this May 16, 2017

carstene1ns added a commit that referenced this issue May 21, 2017

Ghabry added a commit to libretro/easyrpg-libretro that referenced this issue May 22, 2018

GetTimer returns now the remaining seconds (rounded up) instead of th…
…e frames.

This fixes a bug when code checks for "Timer >= 1s" followed by "Timer <= 0".
Because EasyRPG checked the frames both tests failed for the frames 1-59 (less then 1s, more then 0s).
The value is now rounded up to next second, to match RPG_RT behaviour.

Thix fixes another bug in CommandControlVariable: For Timer reads the variable was set to the frames, not to seconds.

Fix #1165

Ghabry pushed a commit to libretro/easyrpg-libretro that referenced this issue May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment