TASVideos discussion board
This is the discussion board of the tool-assisted video game movie site TASVideos.
Welcome. Please do not fill the forums with movie requests. Enjoy your stay.
If you have a question, please read the Site FAQ first to see if your question has already been answered.
We also have an IRC channel #tasvideos at irc.freenode.net...
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Log inTerms of use (Forum rules)

Seeking Feedback: Dolphin with Python Scripting support

 
Post new topic   Reply to topic    TASVideos Forum Index -> Dolphin
View previous topic :: View next topic  
Author Message
Felk
Lurker

Joined: 2020-08-04 15:08:41
Posts: 3

PostPosted: 2020-08-19 21:51:37    Post subject: Seeking Feedback: Dolphin with Python Scripting support Reply with quote

Hello everyone,

I've spent the past few weeks getting a little side project of mine to a state where I consider it barely usable by other people, that being added Python Scripting support for the Dolphin Emulator. To get it from a barely working state to something that might eventually become stable, useful and polished, I've decided to seek people willing to play around with it and give some general feedback. Any kind is welcome, be it bug reports, unclear or missing documentation, feature requests, dismay of it being Python and not Lua, etc..

Please take a look: https://github.com/Felk/dolphin
The README on the GitHub page has further information.

Right now it's only available for Windows x64. You can find a pre-built version on GitHub under "releases":
https://github.com/Felk/dolphin/releases/tag/scripting-preview1
_________________
Discord: Felk#0552
Back to top
View user's profile Send private message
Dimon12321
Active player (357)

Joined: 2014-04-05 18:00:55
Posts: 850
Location: Ukraine

PostPosted: 2020-08-20 15:31:45    Post subject: Reply with quote

I'm a big fan of Dolphin, but I don't know neither LUA nor Python to use their benefits.
What it can do for me? For example, I have a round crosshair and, if I keep shooting from my machine gun, it gets bigger and there is no clear pattern where exactly the next bullet will fly (aka dynamic random bullet spread). Is it possible to write a script that would track that pattern and mark on the screen where the next bullet is going to fly?
_________________
TASing is like making a film: only best takes are shown in the final movie.
Back to top
View user's profile Send private message
Felk
Lurker

Joined: 2020-08-04 15:08:41
Posts: 3

PostPosted: 2020-08-20 16:11:27    Post subject: Reply with quote

That will most likely depend on domain knowledge of the game. If there is a way to know where the bullet is going to land, e.g. by reading the rng seed from the game's memory and re-implementing the random spread algorithm to be able to simulate it ahead of time, then sure, that can be drawn on the screen for you.
_________________
Discord: Felk#0552
Back to top
View user's profile Send private message
Dimon12321
Active player (357)

Joined: 2014-04-05 18:00:55
Posts: 850
Location: Ukraine

PostPosted: 2020-08-20 16:20:43    Post subject: Reply with quote

Oh no, I'm too young for reverse engineering though I'm learning Java.
_________________
TASing is like making a film: only best takes are shown in the final movie.
Back to top
View user's profile Send private message
THC98
Experienced player (965)

Joined: 2012-08-07 12:49:45
Posts: 279
Location: Brazil

PostPosted: 2020-08-28 00:40:03    Post subject: Reply with quote

Wow, this project is amazing! Well done, I really wanted to see a nice build of Dolphin with Python support. A while ago I was helping to port a Dolphin build with Lua support, which was originally made by dragonbane0. Here's my fork on that: https://github.com/Tales-Carvalho/dolphin

Is there an interest to port this engine to wxWidget based Dolphin versions as well? As the latest stable revision (5.0), that's still the most used version for TASing as far as I know.
Award - Nintendo 3D TAS of 2015Award - Speedy TAS of 2013Award - Nintendo 3D TASer of 2013

_________________
Youtube Channel | Twitch Channel
• Finished projects: GC Sonic Adventure DX - Sonic | GC Sonic Adventure DX - Tails | GC Sonic Adventure 2: Battle - Hero Story | GC Sonic Heroes - Team Sonic
• Current projects: GC Sonic Adventure 2: Battle - Dark Story - 1st WIP
• Paused projects: GC Sonic Adventure DX - Knuckles - 1st WIP
• Individual levels records: Sonic Adventure DX | Sonic Adventure 2: Battle
• My Discord: Tales (THC98)#0408
Back to top
View user's profile Send private message Visit poster's website Skype
Felk
Lurker

Joined: 2020-08-04 15:08:41
Posts: 3

PostPosted: 2020-08-28 20:22:16    Post subject: Reply with quote

Thanks! Is there anything in particular in your Lua fork that you deemed useful?
One major thing I had on my todo list was an API for storing data across scripts, maybe just a "userdata"-library similar to bizhawk has it. With that I think your Lua showcase video could be replicated.

I currently do not plan on backporting it to any earlier versions of dolphin, but if you leave out the UI that might not be all that hard if anyone wants to try.
Are there any particular reasons beta or development builds are not used for TASing? movie file incompatibilities maybe? Or is it just because there hasn't been any official stable release since 5.0?
_________________
Discord: Felk#0552
Back to top
View user's profile Send private message
THC98
Experienced player (965)

Joined: 2012-08-07 12:49:45
Posts: 279
Location: Brazil

PostPosted: 2020-08-29 03:03:45    Post subject: Reply with quote

I think something that was implemented in the Lua fork that's pretty useful is being able to load a script from a list of saved scripts, instead of looking for the file itself. This was done by keeping a folder of scripts in Dolphin's main folder, so the list would load the scripts saved in that. Furthermore, we could save files with a special formatting (in our cause, with an underscore at the start of the file) so it'd be executed automatically when we'd load a game.

For storing data, what I used to do with Lua was to write a csv file with a normal file output function, built in Lua. With that, I could save data in Dolphin's folder. It wasn't the prettiest solution, but it worked.

That's good to know that it probably isn't that hard to backport it to an older version, I might give it a shot soon. Most TASers that I know of, including myself, just prefer using 5.0 or older because the interface works slightly better for TASing. I myself have experienced some slowdowns in savestates with newer versions (probably due to compression/decompression), and didn't really get used to the Qt TAS input interface yet. And also, as most of the TASes of the games I play were made in older versions of Dolphin, they don't sync in the development versions, due to emulation differences.
Award - Nintendo 3D TAS of 2015Award - Speedy TAS of 2013Award - Nintendo 3D TASer of 2013

_________________
Youtube Channel | Twitch Channel
• Finished projects: GC Sonic Adventure DX - Sonic | GC Sonic Adventure DX - Tails | GC Sonic Adventure 2: Battle - Hero Story | GC Sonic Heroes - Team Sonic
• Current projects: GC Sonic Adventure 2: Battle - Dark Story - 1st WIP
• Paused projects: GC Sonic Adventure DX - Knuckles - 1st WIP
• Individual levels records: Sonic Adventure DX | Sonic Adventure 2: Battle
• My Discord: Tales (THC98)#0408
Back to top
View user's profile Send private message Visit poster's website Skype
Display posts from previous:   
Post new topic   Reply to topic    TASVideos Forum Index -> Dolphin All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group