Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - liquid8d

Pages: [1] 2 3
Scripting / Controls module v1.0!
« on: December 10, 2017, 05:06:54 PM »
I've just put together another module for the toolbox  ;D

The Controls module allows you to more easily create a layout that contains selectable buttons and labels:

The module is located here, along with a README to explain usage:

There is also a sample layout for using the module here:

Right now it just contains selectable labels and buttons. I will probably be looking at adding perhaps some checkboxes that could change a setting, or maybe lists as well.

I'm anticipating some good feedback for this module as some designers start figuring out how to create some more unique, navigate-able layouts  ;)


Themes / Blueprint 1.0 (Finally!)
« on: October 28, 2017, 09:14:17 PM »
This is the "Unnamed" theme I was working on way back when...  ;D

Right now it only has a default horizontal design. The intent is for it to support many resolutions, but additional changes could be added in the config.nut file and added to the UserConfig.

It also makes use of the keyboard-search module I just released:

The artwork makes use of PreserveArt and PanAndScan and you can customize what images/videos are used, and whether it will fit, fill and panandscan. I've included these in the zip file.

It has a bunch of options to configure info displayed:

Additional color themes could be added in the themes.nut and UserConfig as well.

It also includes a matching Displays Menu selector:

I've attached a download of the current version, but you can watch for updates here:

Scripting / KeyboardSearch module
« on: October 28, 2017, 05:35:25 PM »
I just pushed my keyboard-search module to github.. have at it! It's completely customizable, see  the README for usage:

I haven't worked on this recently and wanted to get it and my layout that uses it out there, so let me know if you come across any bugs. There may be issues with different orientations or aspect ratios.

General / Useful utilities
« on: June 11, 2017, 12:41:55 AM »
Hi guys,

I just found a great little utility and thought we could share a few of our favs...


I am currently using my desktop with 4 attached screens, one being the TV I want to run AM and the emulators  on. As you might have run into on Windows, some apps do not provide a way to specify which monitor to run on, and fullscreen apps typically default to the primary monitor. This little utility can switch to another display as your primary (aka the TV), then when the app is finished, switch the primary back to your monitor. I'm using this now so when I launch AM, the TV is set to primary until AM finishes, which means all the emulators will  launch on that screen as well.

A few other utilities I use:


I bought this, it was worth it since I have a TON of console controllers with USB adapters, a dance pad and a bunch of other things. This thing handles them all and allows you to map all buttons for all the controls to keys. You can keep profiles and switch them in and out specific to different apps.


CPWizard has a ton of cool features, namely building a CP layout for games, which could then be displayed in MAME or on a secondary monitor while you play

What are some of your favorite utilities??

Themes / I present... AMBuilder: Layout Designer!
« on: June 04, 2017, 05:42:28 PM »
For a couple weeks I have been posting my progress on this in the scripting area but it's getting closer to real-world usage so I thought I would share here:

I have developed AMBuilder, an online Attract Mode layout builder. It is still a WIP, but it is pretty functional at minimum to the point of playing around and getting ideas.

 - full drag and drop design of AM layout
 - includes standard AM objects (text, image, artwork, list, clone, surface)
 - drag and drop upload for custom images and included fonts
 - included joystick/buttons media and arcade font
 - embedded sprite sites to help with using subimg sprites
 - save/resume session
 - view generated code
 - download a complete, ready to run layout zip file containing all resources. Drop this in your AM layouts folder and select it in your display options
 - zip files created with AMBuilder can be dropped right into the layout area to load them

Aspect support is touchy right now, but in the future it will be very simple to design your layout and make sure it looks great in all aspects and resolutions ;)

You can try it out here:

You are welcome (and encouraged!) to share your zip files here, so we can all try the layouts you create! Please do keep in mind copyrights and rights usage when it pertains to included images and fonts.

In that spirit, I attached a layout that I just created in about 5 mins. Just download the attached zip, go to the site and drop the zip file right into the layout area t o check it out. When you are ready to build your own, hit the Clear button and start adding objects from the side menu

Please give it a shot and let me know what you think!

The code for this project is available here:

If you are interested in helping, feel free to submit issues on the github site or PM me if you want to do more.

Scripting / WIP Layout Builder
« on: May 23, 2017, 07:55:15 PM »
I'm still here!

So awhile back, I teased a layout builder that I started working on. It took awhile but it's finally starting to take shape. Here's a quick preview:

This is pretty rough right now, but basic design is working for text and images and it won't take much to export the code (you can see the code builder at the end).. of course it will take quite a bit more to add other objects, sounds, event triggers and animations.. but I'm pretty happy with where it's going. Ideally, it will push you to design in multiple aspects - showing/hiding/adjusting the objects you add for each respective setup. I'm also hoping to do simplify surfaces to essentially make them different layouts and show and hide them on different events. Additional objects could be added fairly easily as you create code to create the html element equivalent, and tell it the code to export out the object.

If you have comments, suggestions, thoughts.. let me know!


The editor is live and a work in progress. You can try it right now at:

Scripting / Icon class WIP
« on: February 11, 2017, 11:26:15 AM »
I wanted to make it easy to add images based on either game info or tags, so I worked on an "Icon" class.

I currenly have extended classes for ESRBIcon, RegionIcon, GenreIcon and SystemIcon, this is what it looks like so far:

It's based on either searching game info, tags or list name - a mix right now.. I'll have to decide what's best for each. Code is as simple as this:
Code: [Select]
local esrb = ESRBIcon(20, 60, 90, 127)
local system = SystemIcon(121, 60, 160, 128)
local region = RegionIcon(291, 60, 160, 128)
local genre = GenreIcon(461, 60, 160, 128)

Feel free to provide feedback or suggestions for other "icon" ideas :P

Here's the images I'm working on:

Scripting / Wiki "Getting Started" article updates
« on: January 28, 2017, 08:15:02 AM »
I have updated and added some additional information in the wiki article related to scripting and layout development:

I also added a Tips and Tricks page which contains some useful info:

If you are just getting started, I recommend perusing these as there is a decent amount of info!

I just added info on classes, scripts, plugins and modules. More will be coming as I go... if you have a request or know of something that should be in there, let me know (or add it! :) )

Themes / [WIP] New Unnamed Theme
« on: January 07, 2017, 10:02:49 PM »
Hey all,

Working up a new theme - let me know what you think!

The fanart uses PanAndScan.. the idea here is to display this during selection, then after a few seconds, fade to "attract mode" with video and possibly other info overlayed. This also has a builtin search keyboard, is setup to allow for multiple aspects and is color themeable. I'm working on a few different color schemes. I've also made all info text and artwork configurable in the options.

Scripting / update artwork file_name (label)
« on: December 07, 2016, 08:56:28 PM »
I swear you used to be able to update the type of artwork used for an artwork object by just setting file_name. Has this changed? I've tried numerous things including catching FromOldSelection transition and setting it there, but it just seems to look for a file instead of setting the dynamic artwork type.

Any ideas or am I crazy?

Scripting / Feedback on potential new layout creation method
« on: November 30, 2016, 08:46:42 PM »
Hey all,

I've been gone for awhile, but I will be plugging away again soon on updates for the animate module. In addition, I sparked a quick idea for fast layout creation and want to get some feedback. Layouts in AM are super flexible because anybody can code whatever they dream up - but sometimes that can be a curse, when everyone does everything their own way.

For layouts, most of the time we are just describing the objects we want on the screen (positions, appearance, etc) so I came up with this quick idea of creating scenes in a single object map:

Code: [Select]

        scenes = [
        //our first scene
            id = "default",
            type = "scene",
            objects = [
                { id = "title", type = "text", msg = "[Title]", x = 0, y = 10, width = fe.layout.width, height = 30 },
                { id = "artwork", type = "artwork", x = 10, y = 90, width = fe.layout.width * 0.5, height = (fe.layout.width * 0.5) / 1.778 },
                { id = "year", type = "text", msg = "[Year]", y = 50, width = fe.layout.width, height = 30 },
                { id = "listbox", type = "listbox", x = 25, y = 100, width = 300, height = 400 },
                { id = "layer1", type = "surface", objects = [
                    { id = "something", type = "text" msg = "This is on a different layer" }
            actions = [
                { action = "onLeft", action = function() {
                    SceneCreator.action("show", { target = "layer1" } )
                { action = "onRight", action = function() {
                    SceneCreator.action("hide", { target = "layer1" } )
        //our second scene
            id = "about",
            type = "scene",
            objects = [
                { id = "title", type = "text", msg = "About SceneCreator", width = fe.layout.width, height = 30 },
                { id = "author", type = "text", msg = "author: liquid8d", y = 50, width = fe.layout.width, height = 30 }

So in this scenario, we are describing everything upfront - all objects are defined, given an id and placed with the specified properties. You'll notice I have it set for multiple scenes, which would allow for different views that could be switched based on actions that are also defined. Actions would be tied to the various events in AM, and hopefully ease the pain of creating custom functions to handle onKeyUp or other common actions.

This is based on the typical Javascript style init format that many js libraries use. This is still a bit of a draft, but creating a layout this way puts all objects at the forefront of the layout code, in a pretty easy to comprehend definition. You could still do whatever you want once the objects are created, but my hope is actions will allow you to do the most common things, even allowing you to show or hide surfaces (layers) or switching between different "scenes".

Of course, I am also setting it up to where you can register creation of other objects or register other actions, so it can be extended fairly easily and I will make it seamless to add animations as well. Even better, this will translate pretty easily to/from JSON, which I have even more exciting plans for :)

What do you think?

Scripting / blendMode in shaders?
« on: May 17, 2016, 04:36:04 PM »
I was researching a lot about shaders the other night.. I wanted to incorporate blend modes but as far as I can tell, it can't be accessed through shaders. I think this would typically be enabled with opengl calls glEnable() and glBlendFunc() but I couldn't get that to work. Things like GL_BLEND, GL_ONE and other params don't seem to be defined when called in shaders:

In order to implement blending yourself, you need access to source color and destination color (which I don't think is available).

It is definitely is a part of SFML, is it maybe just not implemented in AM?

Scripting / Utils module
« on: May 10, 2016, 04:06:43 PM »
When i release my updated animate module, it will make use of a Utils module that will have a bunch of helpful functions. What would you like to see in it? What types of helper functions do you reuse all the time?

Here are some of the things I have already or plan on adding:

Code: [Select]
//math and number helpers
randomf (float)
randoma (val from array)
percent (get a percentage of a val/maxval)

//color utils
int_to_rgb (int color to rgb table)
rgb_to_hex (rgb to hex val)
hex to rgb (hex val to rgb table)

//callback utils
register_callback (register a global callback)
unregister_callback (unregister a callback)
run_callback (run a callback)

//object utils
transform (transform an object with centered scale and rotation)
anchor (anchor one object to another)
align (align one object to another)

//string utils
translate (translates variable strings to their actual value)
replace (replace something in a string with something else)
parse_time (parses a time string like "1s" into ms)

General / FYI: Intel HD and Windows 10
« on: October 20, 2015, 05:47:32 PM »
So I just recently updated my MBP to Windows 10, only to find out it looks like the Intel HD driver doesn't have proper OpenGL support yet - forcing AM to use the 'Microsoft GDI Generic OpenGL implementation' - non-hardware accelerated. I can barely get layouts to load, and if they do it's rather slow.


If you are looking to use 10, might want to double check driver support for OpenGL.

Here's the error I receive:

Code: [Select]
Warning: Detected "Microsoft Corporation GDI Generic" OpenGL implementation
The current OpenGL implementation is not hardware-accelerated
Setting vertical sync not supported
Failed to create texture, its internal size is too high (2048x1024, maximum is 1024x1024)
Impossible to create render texture (failed to create the target texture)
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

Scripting / Progress update for my modules
« on: October 20, 2015, 03:38:54 PM »
Just giving a status update on my modules and what I'm attempting to accomplish..

Phase 1: XML Layouts - file-layout ( 75% )
My current WIP is a good bit better than what's included with AM right now, but not quite ready for primetime. It allows you to create layouts with XML, use included XML files, and include standard as well as custom objects, and add animations to the objects. Lots of bug fixes to work on, but getting there. I've put loading other themes on the backburner, but will revisit it at some point. The updated version should make it a little easier to do this, but the focus right now is AM XML.

Note you will still be able to include and interact with scripts, but the idea is to get the UI creation in XML, and handle everything else in the script.

Sample XML:
Code: [Select]
<layout width="1280" height="720">
    <include type="script">script.nut</include>
            <state id="show" alpha="255" />
            <state id="hide" alpha="0" />
            <macro id="move" from="offscreen" to="primary" />
    <image id="bg" file_name="AttractMode\test\lines.png" x="0" y="0" width="1280" height="720" red="255" />
    <view id="list" x="25" y="50" width="436" height="625">
        <animate id="slide_in" type="PropertyAnimation" delay="2s" duration="3s" triggers="[Transition.StartLayout]">
            <from x="-500" alpha="100" />
            <to x="25" alpha="255" />
        <rect id="list_rect" x="0" y="0" width="436" height="625" red="125" border="5" border_red="200" />
        <listbox x="5" y="10" width="426" height="600" selbg_red="200" charsize="16" />
    <include type="xml" file_name="[SharedPath]\views\simple.xml">
        <override id="simple" x="550" y="50" index_offset="-1" bg_red="200" bg_green="0" bg_blue="0" />
        <override id="title" bg_red="200" bg_blue="0" />
    <include id="box" type="xml" file_name="[SharedPath]\views\art_reflection.xml">
        <override id="reflection" x="475" y="372" />
    <scrollingtext x="0" y="10" width="[fe.layout.width]" height="30" scroll_type="0" bg_red="0" bg_green="0" bg_blue="0" red="200" blue="200" green="200" msg="[Year] ©[Manufacturer]     [Category]" />
    <image id="logo" file_name="[SharedPath]/images/logo.png" x="840" y="520" width="400" height="175">
        <animate type="PropertyAnimation" delay="1.5s" duration="5s" from="show" to="hide" triggers="[Transition.StartLayout]" />
        <animate type="PropertyAnimation" delay="1.5s" duration="5s" easing="ease-out-elastic" triggers="[Transition.StartLayout]">
            <from scale="1.0" />
            <to scale="2" />
    <grid id="grid" x="50" y="50" width="512" height="512" />
    <wheel id="wheel" x="50" y="50" width="400" height="300" />
    <overrides emulators="fceux" aspect="16x9">
        <override id="box" x="475" y="500" />
    <include type="xml" file_name="[SharedPath]\views\simple_group.xml" />
    <image id="genre" x="890" y="480" width="200" height="100" preserve_aspect_ratio="true" file_name="[!check_category]" />
    <include type="xml" file_name="[SharedPath]\views\simple_group.xml" />
    <image id="genre" file_name="[Category].png" x="600" y="200" width="400" height="170" />

Phase 2: Animate v2 ( 60% )
I have a redesigned version of the animate module. I'm  going to do my best to make it backwards compatible, but there's a decent amount of changes. Animations are now created with a single, chainable function - something like:

Code: [Select]
                .debug( true )
                .target( art )
                .set({ x = 0, y = 0, preserve_aspect_ratio = true })
                .triggers( [ Transition.ToNewSelection ] )
                .from( { x = 0, y = 0 } )
                .to( { x = 100, y = 100 } )
                .easing( Easing.OutElastic )
                .easingReverse( Easing.InElastic )
                .on( "stop", anim_complete );
I based a lot of it on the Tweene javascript project:
Again, still a little buggy for public release, but it adds quite a bit more flexibility from the old animate module.

Phase 3: Objects ( 40% )

Along with XML, I want it to be easier for developers to create some reusable objects. I tried this before with ExtendedObjects but it got a little confusing. I've rethought the design and it's working pretty good with a few test objects like Rect and View. I've even started creating Controls ( Buttons, Checkboxes ) for down the roadmap. Ideally I also want a couple standard objects like Grid/Tiles and a Wheel object.

Phase 4: Switchable Views ( TBD )
Once layouts can be created with XML and custom objects, I plan on allowing you to create switchable views ( screens ), so you could say - click a game, it animates to the game info screen, click back it animates back to the game selection screen. This is somewhat implemented with XML and Objects now, but still early prototyping.

Phase 5: Shareable Content ( TBD )
With all this in place, the idea is to be able to share content within different layouts - custom objects, a part of a layout ( in xml ), shaders, animations, and more.

Off topic: Now that search ability is in the current development branch, I've got a close to working onscreen keyboard that implements it.. coming soon :)

Let me know what you think or if you have any suggestions!

Pages: [1] 2 3