Jump to content

Raine 0.94.11, finally...


Tux

Recommended Posts

I hadn't planned to make a 0.94.11, but things didn't go as planned, and ffman1985 found new ideas to make crazy scripts, so...

 - daioh displays correctly its controls in the gui, and not as a 6 buttons fighting game anymore
 - update for the turbo key (DEL by default) : it was still displaying the fps as an int when it has been a float for years now, so its   display was totally wrong, it now displays the fps reached while the speed was unlimited, and opengl double buffer is temporary disabled when using this so that the speed is not limited by the video hardware.
 - fix bad color for the status bar in the cheats dialog when there is a message...
 - fix for a crash in 32 bits, it happened in linux, but it could happen in windows too, it was a stack misalignment because starscream uses 4 bytes boundaries and the SSE functions in sdl2 require 16 bytes boundaries (which is huge !). There is a function attribute to fix that, so it's fixed simply but it was hard to find.
 

Except that on scripts :
 - you can now make hidden scripts which don't show in the gui dialog. It's useful only if you want to start it like you would call a procedure in a high level language by using the start_script command. It allows to move a block from a script there. It's more an experiment, I find the thing hard to use, but it was easy to make, so I keep it in case it's useful one day. Just replace the "script" command by "hidden", same arguments, same syntax, it just doesn't appear in the gui.
 -
Better error messages : I added the error messages at lightning speed, but there were case where they were really not very helpful. Now you can see which script triggered the error, in which section and what line. And if it's in a run: section, the script is stopped to avoid an endless loop of errors !
 - poke extension, can use a string of any length as the value to poke, the string must be enclosed between ' ' or " ", there is a foum post with an example, and it's in use in the xmcotar1d script (Console script).
 - The big optimization of the scripts : they now preserve their parsed result to avoid to redo the stuff in each frame. Now I got some very strange behavior from windows and I still didn't understand everything here, but windows execution appears slower than linux for some reason (see the script cpu load in the Misc section of the profile display, f11 key). The 64 bits binary seems ok, I am not totally sure about the 32 bits binary, I saw it working well, but not always ! I don't know what triggers this slowdown, maybe with time I'll have more ideas. What I can say is that even when it works at its best, it's still slower than the linux version, I get 2% only in Misc while the console script is in startup (when you just start it), even with a non optimized debug build ! So see by yourself, your results might vary.
 

That's all for this time ! http://raine.1emulation.com/download/latest.html

Edited by Tux
  • Like 2
Link to comment
Share on other sites

Hello, Tux. Thank you for the new version. I perform some test on the new and old version on x-men. I found that the max value of misc can reach about 5x% in the character screen before entering battle in the old version. And it is now only 3x% in the new version for the same condition. A big improvement.

I am very interested to the hidden script function. Can i consider this as a switch to open other scripts in the txt file when the start_script command is used? If it is true, it can be very useful. However, is there any close_script command?

For example, in the character select screen, the start_script command activate  the ‘enable bosses’ script, and after choosing character, the close_script command close the ‘enable bosses’ script. So, the script is totally ignored when it is not needed. Is it something possible?

Link to comment
Share on other sites

29 minutes ago, ffman1985 said:

Hello, Tux. Thank you for the new version. I perform some test on the new and old version on x-men. I found that the max value of misc can reach about 5x% in the character screen before entering battle in the old version. And it is now only 3x% in the new version for the same condition. A big improvement.

I am very interested to the hidden script function. Can i consider this as a switch to open other scripts in the txt file when the start_script command is used? If it is true, it can be very useful. However, is there any close_script command?

Yeah you can start any script hidden or not, but it doesn't require a stop_script command at least I didn't think so yet : if you want to start it just once, just put your code in an on: section, it will be executed once by the start_script command. Otherwise put it in run:, it will start to be executed like a normally activated script in the next frame.

If you find a case where a stop_script could be useful to stop a running script, explain it, it's not hard to add.

29 minutes ago, ffman1985 said:

For example, in the character select screen, the start_script command activate  the ‘enable bosses’ script, and after choosing character, the close_script command close the ‘enable bosses’ script. So, the script is totally ignored when it is not needed. Is it something possible?

If it needs to be executed in every frame while you are in the menu then yeah I'll need to add this stop_script function, otherwise a on: section will do...

Link to comment
Share on other sites

I think that sometime i want a group of instructions operate once only. (For example, switching the control of p1 &p2). Then the start_script command is enough according to what you mention. However, in some other case, it is better to have the stop command (close hidden script). As you mention earlier, even a group of instructions is not operated (condition not fulfilled), it can cause some load.

In short, I want a stop_script command with a start_script command, so a script is read when it is needed (e.g. in character screen before finishing selection), and close the script when it is not needed any more (e.g. after both player have selected the characters).

This is also good for optimasation.

Link to comment
Share on other sites

Yeah optimization was my 1st idea here. Ok, I'll add a stop command, without argument stops the current script, can be useful in an if, with a name argument stops this script.

 

Link to comment
Share on other sites

Hello, Tux, just do some test on the start_script and stop command, and I find that the script name after these 2 commands do not need the quotation mark.  It is in fact problematic, it cannot accept script name with empty space. I have to change the name of the hidden script from “Versus Mode” to “Versus”.

Link to comment
Share on other sites

Also, do you think it is a good idea to automatically close all hidden script at restart(f1)? I think hidden script are sth called out by the programme, it is meaningless to keep it enabled when restart. Without automatic close, I have to include many stop commands to stop all this hidden script at start up. (When i playing in versus mode, the hidden versus script is enabled. When I restart and choose arcade mode, the hidden script Versus still in effect. It is not desirable.)

Link to comment
Share on other sites

2 hours ago, ffman1985 said:

Hello, Tux, just do some test on the start_script and stop command, and I find that the script name after these 2 commands do not need the quotation mark.  It is in fact problematic, it cannot accept script name with empty space. I have to change the name of the hidden script from “Versus Mode” to “Versus”.

Just tried it in xmcotar1d, started the Console script in the gui, opened the console, typed

stop "Console Mode"

it worked, the script is stopped.

I didn't try with a hidden thing, because I never even made a hiiden script which uses a run: section so far...

And to be even more sure I tested from a script by adding a

stop "Console Mode" at the beginning of the if !printed section so it stops actually itself when it reaches the menu, it worked too.

Funny thing is that you see ARCADE, because the script isn't stopped immediately, it's stopped in the next frame, so it has time to write ARCADE before stopping for real.

Everything works as far as I know !

Edited by Tux
Link to comment
Share on other sites

2 hours ago, ffman1985 said:

Also, do you think it is a good idea to automatically close all hidden script at restart(f1)? I think hidden script are sth called out by the programme, it is meaningless to keep it enabled when restart. Without automatic close, I have to include many stop commands to stop all this hidden script at start up. (When i playing in versus mode, the hidden versus script is enabled. When I restart and choose arcade mode, the hidden script Versus still in effect. It is not desirable.)

Yeah even if it's convenient sometimes while testing one of your special scripts to have it survive a reset, logic tells all scripts should be stopped when there is a reset, it's easy to do, I'll push the commit soon.

Link to comment
Share on other sites

I think only hidden script need to be closed in reset.

Also, sth about the optimazation by the start_script command:

Even I separate the vs mode script and practice mode script, (which only open the script during the mode is highlighted and press start), the misc % is almost unchanged……

In addition, I notice that if my laptop is set to the silent mode (slow mode) the misc % can be lower than that of when running in turbo mode for the same script.

Edited by ffman1985
Link to comment
Share on other sites

I have done a new test for optimazation. I create a script full of if..endif statement but without any poke inside and the first line with a condition: if peek($ff2000)==$AA which can never be fufilled. When I turn it on, the misc % is only 1%. However, when I change the condition to if peek($ff2000)==$00 (which can be fufilled), the misc % jump to 5x%.

But it proved that if a script where the first condition is not fufilled, no matter how long it is, it does not affect a lot. So, I think I don't have to do the extra to seperate the vs mode and practice mode from the console mode script, as I already set a condition in the vs mode part(if peek($ff2000)==$01) and pratice mode part(if peek($ff2000)==$02).Here is my test file, the test script is called "rubbish test" which is at the bottom.

https://drive.google.com/file/d/1JKL4bKnHu6DB0lzCv-t02q0KktZ7EtS7/view?usp=share_link

Link to comment
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
×
×
  • Create New...