MAMEWorld >> MAME Artwork X: Other Artwork Projects
View all threads Index   Threaded Mode Threaded  

Pages: 1

wemr97dl
MAME Fan
Reged: 04/25/21
Posts: 218
Send PM


Need some Script Help-EPROM
#396240 - 05/12/23 10:32 AM Attachment: Escape from the Planet of the Robot Monsters .png 532 KB (0 downloads)


NOW ALL WORKING, Re-uploaded with Nightvoice's corrected Lay File

Escape from the Planet of the Robot Monsters, Working CP with two analogue sticks. Started with @Nightvoice files and created Script for both joysticks to work.
Everything is working, BUT for some reason the Joystick location for the full screen view is perfect, but for 9x16 and 9x16_Dark views they are about 300 pixals high?? I've looked this over for hours and can't figure out why they are in the wrong position.
Maybe someone with fresh eyes can have a look.

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment

Edited by wemr97dl (05/16/23 02:05 AM)



My Mame Artwork
https://drive.google.com/drive/folders/1OP43Qk_2uCIJ7HLY2maemAmJHtu9kbyV?usp=share_link



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


.... new [Re: wemr97dl]
#396248 - 05/14/23 12:46 AM


Un-fucking-believable... The fact that you got this to work or even made sense of this code puts you miles ahead of me.

My first thought was that you accidentally used yc somewhere instead of y or vice-versa but that doesn't seem to be the case given the method you've used. I hope someone can get this worked out because I've tried for a long time to get this one to work properly.

Kudos!



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



wemr97dl
MAME Fan
Reged: 04/25/21
Posts: 218
Send PM


Re: .... new [Re: Nightvoice]
#396249 - 05/14/23 07:30 AM


Thanks, just working backwards from the starwars example, had to figure out how to add the 2nd joystick, maybe @Vas Crabb or @Mr. Do could take a look, seems they know more about the code, I'm just coping and pasting others work while I try to understand it.
I was trying to figure out how to set it up to rotate around a single point instead of moving around, using this code the object moves like the crosshairs in game, by changing the image size in the script it only moves a bit to look like a joystick should. If someone knows how to script it to rotate Any Yoke would be doable with just 2 images.



My Mame Artwork
https://drive.google.com/drive/folders/1OP43Qk_2uCIJ7HLY2maemAmJHtu9kbyV?usp=share_link



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


Re: .... new [Re: wemr97dl]
#396250 - 05/15/23 02:47 AM


One thing is that you said it's off by 300 pixels vertically, which is exactly the height of the speaker panel offset, which is not used in the full_cabinet view but IS used in the other two views. ?? Perhaps something is referencing this coordinate.



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


Re: Need some Script Help HEY Try this out new [Re: wemr97dl]
#396251 - 05/15/23 08:23 PM Attachment: default.lay 36 KB (3 downloads)


I changed a couple of variable names and this worked!



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



wemr97dl
MAME Fan
Reged: 04/25/21
Posts: 218
Send PM


Re: Need some Script Help HEY Try this out new [Re: Nightvoice]
#396254 - 05/16/23 01:51 AM


Fantastic!!
Looking it over, I'm seeing
-- calculate ratios of axis units to render coordinates
-- animated items leave 20% of the width/height for the movement range
-- the end of the range of each axis is at 0xff
x_scale = outline_bounds.width * 0.3 / 0xff
y_scale = outline_bounds.height * 0.3 / 0xff
xP2_scale = outlineP2_bounds.width * 0.3 / 0xff
yP2_scale = outlineP2_bounds.height * 0.3 / 0xff

changed from 0.2 on all the views, anything else??
Must be something with the math, GREAT Catch thanks for taking a look.



My Mame Artwork
https://drive.google.com/drive/folders/1OP43Qk_2uCIJ7HLY2maemAmJHtu9kbyV?usp=share_link



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


Re: Need some Script Help HEY Try this out new [Re: wemr97dl]
#396255 - 05/16/23 02:00 AM


All that did was enlarge the movement radius a bit. The important change is this section:

local outline_item916 = file.views["9x16_Analog"].items["outline"]
local outline_item916D = file.views["9x16_Dark_Analog"].items["outline"]
local outline_item = file.views["Full_Cabinet_Analog"].items["outline"]
local outlineP2_item916 = file.views["9x16_Analog"].items["outlineP2"]
local outlineP2_item916D = file.views["9x16_Dark_Analog"].items["outlineP2"]
local outlineP2_item = file.views["Full_Cabinet_Analog"].items["outlineP2"]



... and the corresponding places these are called:

(in the next 9x16 section)
outline_bounds = outline_item916.bounds
outlineP2_bounds = outlineP2_item916.bounds

and

(in the next 9x16_Dark section)
outline_bounds = outline_item916D.bounds
outlineP2_bounds = outlineP2_item916D.bounds

So yeah... Now if I can just figure out Food Fight.

Edited by Nightvoice (05/16/23 02:06 AM)



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



wemr97dl
MAME Fan
Reged: 04/25/21
Posts: 218
Send PM


Re: Need some Script Help HEY Try this out new [Re: Nightvoice]
#396257 - 05/17/23 04:31 AM


WORKING Food fight, was having trouble then realized it helps to name the view the same as you call out in the script



I'm uploading to my drive.

Edited by wemr97dl (05/17/23 06:51 AM)



My Mame Artwork
https://drive.google.com/drive/folders/1OP43Qk_2uCIJ7HLY2maemAmJHtu9kbyV?usp=share_link



wemr97dl
MAME Fan
Reged: 04/25/21
Posts: 218
Send PM


Re: Need some Script Help HEY Try this out new [Re: Nightvoice]
#396258 - 05/17/23 11:46 AM Attachment: Kozmik Kroozr [kroozr] - MAME 0.237 (LLP64) 5_17_2023 5_43_11 AM.png 864 KB (0 downloads)


kroozr -Kozmik Kroozr

DONE and uploaded.
with a template its quick

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment


Pages: 1

MAMEWorld >> MAME Artwork X: Other Artwork Projects
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Mr. Do 
0 registered and 122 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 255