Author Topic: WAFAM (Workarounds for Attract Mode)  (Read 3096 times)

ryback2501

  • Newbie
  • *
  • Posts: 9
    • View Profile
WAFAM (Workarounds for Attract Mode)
« on: June 18, 2020, 03:48:04 AM »
W A F A M
WorkArounds For Attract Mode


WAFAM is a project I have been working on in the last weeks. It started as a bunch of workarounds to make my life asier when using the animate scripting module includded in Attract Mode, but things have gone beyond and now it contains independent modules.

Latest release: Beta 0.3
It is a beta version because I will add more modules and more functionality, but the modules it contains are fully functional.

All the documentation about how to install and use the modules included in it is on the Readme file of the project.

The project includes the following modules:
- animate: This module can be used to animate property values of objects. It uses the interpolate module to make the animations run. It usport animation for properties and sprites.
- animate_old: This is an old version of the animate module. It uses the animate module included in Attract Mode and makes it easy to play animations on demand. I've decided to keep it because I didn't want it to get lost (like tears in the rain  :'( )
- artwork: This module loads artwork into image objects instead of artwork objects. With this you prevent the aoutmatic reloading of artwork when changing the selected game.
- interpolate: A module to interpolate calculations through time. It contains the class that controls the interpolation of other objects and classes to be used as a base classes when creating objects with interpolable logic.

This project is still work in progress. As I said, I will keep adding new functionality to it because I am creating layouts that rely on it to work, but ideas and requests are always wellcome, so feel free to propose. :)
« Last Edit: June 27, 2020, 02:42:43 AM by ryback2501 »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: WAFAM (Workarounds for Attract Mode)
« Reply #1 on: June 21, 2020, 07:02:55 AM »
question on the "artwork"

if the artwork is turnd into an image,  and no reloading, as it says..

could that be used in a wheel type manor and it would be alot faster, then the other way?

also what is the best use of this, and why,      thank you so mutch....
help a friend....

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: WAFAM (Workarounds for Attract Mode)
« Reply #2 on: June 21, 2020, 12:33:19 PM »
question on the "artwork"

if the artwork is turnd into an image,  and no reloading, as it says..

could that be used in a wheel type manor and it would be alot faster, then the other way?

also what is the best use of this, and why,      thank you so mutch....

I did something similar in my theme, all artwork is not an artwork but just image objects and the content is updated using file name and get art property. The advantage? Nothing updates automatically so you can update exactly what you want, where you want. The disadvantage of course is that you have to write your own update routine

ryback2501

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: WAFAM (Workarounds for Attract Mode)
« Reply #3 on: June 22, 2020, 02:22:42 AM »
zpaolo11x explains it pretty well. I'm making a theme that emulates the Nintendo Classic Mini interface (you can check TendoMode on the Themes section of the Forum). I tried to use the normal artwork and I managed to make the automatic refresh unnoticed, but it was invoked every time I changed the selected game and that produced framerate falls all the time.

Now I use the artwork module instead, but I don't refresh the artwork, because I've seen that if you replace an image by another with different proprtions strange things start to happen (and in Famicom not every boxart has the same proportions). So it's better to load everything at the beginning, play with the visibility property and control what to move on every moment.

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: WAFAM (Workarounds for Attract Mode)
« Reply #4 on: June 22, 2020, 02:49:48 AM »
Now I use the artwork module instead, but I don't refresh the artwork, because I've seen that if you replace an image by another with different proprtions strange things start to happen (and in Famicom not every boxart has the same proportions). So it's better to load everything at the beginning, play with the visibility property and control what to move on every moment.

Interesting, I found the same: sometimes playing with visibility is better. I'm wondering, how many images do you have to load in your layout? Do you keep all of them and change visibility? Because for my case, with MAME romlists of thousands of games, I fear that would be overkill...

ryback2501

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: WAFAM (Workarounds for Attract Mode)
« Reply #5 on: June 22, 2020, 04:23:22 AM »
[...]

Interesting, I found the same: sometimes playing with visibility is better. I'm wondering, how many images do you have to load in your layout? Do you keep all of them and change visibility? Because for my case, with MAME romlists of thousands of games, I fear that would be overkill...

It would, of course, because with this method you would load all the related artwork at the same time. Yo could still load artwork on themand, but you would end up having all of them loaded if you runn along all the list of games.

It would be great that AttractMode had the possibility to unload an object inside a layout and free the memory it was using.

For now, for my collection, I limit the number of games I show on a screen and I reduce the artwork size with an image editor. I'm testing this only on a PC, I don't know how this would perform on a RaspberryPi or a similar SBC.

Also, the Mini consoles have limitations on the number of games you can add to a screen, sometimes for limitarions in resources and sometimes because their software does not support long lists of games. This is not an excuse, btw.  ;D

ryback2501

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: WAFAM (Workarounds for Attract Mode)
« Reply #6 on: June 27, 2020, 02:46:17 AM »
Beta 0.3 released.

Changes:
  • Added support for sprite animations.
  • Some refactoring in Animate and Interpolate modules

Get link here.